Better exception handling
Merge branch 'better-error-handling'