Refactored Error Handling

Completely re-factored error handling and added DIAGNOSTICS section to
POD.