Refactor pages to use a container