page repairer refactoring