Switched to new exception structure.
Merge pull request #12 from sumerjabri/master

Switched to new exception structure.