Problems in the catholic church in the middle ages