pep8 cleanup and verbose logging fix