pep8 cleanup, raise exceptions