Clean up for flake8 compliance.
Fix conflict for python 3.