Setting headers properly, and not relying on ES5 in the error handler.