refactoring functionality around viewing the home page out into its own class