Fixed tests
Merge pull request #78 from GrahamCampbell/tests

Fixed Tests
Refactored exceptions