Added some tests for the router and middleware. Fixed a bug where the notFound middleware would never be used. Added views for 404 and 500 pages.