cleanup and pep8 compliance