fixed routing, refactored exceptions, added tests
Merge pull request #118 from pulibrary/exception_refactoring

fixed routing, refactored exceptions, added tests