Fixed some bugs in the routing and also added action methods to the controllers to support routing.