Moved warning to exceptions
Minor PEP clean up