Refactor and test pages
Refactor
Refactor pages