Sets up routes and dependencies for edit page