History of the monastery and the church