moving not_found and serve_views middleware code out of server.js and into separate files