pep8 refactoring. Removed unused code.