Refactor pages