Reworking the routing

Trying to find a better way to manage the routes.