Make code flake8 (pep8 + pyflakes) compliant

Keeping the max-line-length for pep8 to be 95 as discussed.