Refactoring broken page administration code a little