Refactors the routing
Refactors 404 into full errors