Cleanup pep8 and bugs.