the castle began its existence as a church and medieval cemetery