Add error handler, routes and config