A little refactoring

errors.html is still pretty horrible though.