Added 400.html and 500.html templates and cleaned up base.html and certain template inheritance