Some more error handling refactoring to help with issue #9.