Refactor_pages