Better exception handler and added mimetypes to the view.