Completed middleware rewrite
Added HTTPError and HTTPRedirect exceptions, which are pretty cool.
Whoops, forgot to add a template for the new HTTP error handling.