Refactoring. Created routes and controllers.