Improved error handling.
Preparing for release of 1.1