Sets up view and edit pages