Factored out routes and controllers.