Simplify error handling.
Merge pull request #39 from vibhavp/master

Simplify Error Handling