Improve error handling.
Consistency in property name.
Merge pull request #8 from brianloveswords/error-handling

Improve error handling.