Refactor pages.