Separated the routes to register controller.