more tests and fixes
minor fixes
a few more custom exceptions added
minor fix