A few changes

New custom exception
PEP 8 compliant
Probably some other stuff too