creates routes and controller for URLs