Pep8 and code cleanup.