pep8 fixes
code cleanup and docstring updates