Refactored to make each page its own object