Refactoring, adjustments and documentation for custom exception handlers. Closes #44