Pep8/Pyflakes cleanup and resolving transient errors.