Refactored error handling. More unit testing.
Refactored servlet error handling. Fixed info request mime type handling.