Changing the order of some of the middleware layering. Also setting up 404 route.