Using custom Exceptions

With the library as is, using try/except was a bit of a nightmare given the variety of exceptions.

I added custom exceptions for each of the exception conditions, so that they can be imported and checked properly in try/except blocks.