Move page view module into its own file