Updated error handling mechanics to be more consistent
Merge pull request #1 from rubikzube/master

A few changes to error handling