flake8/pep8 fixes

 (except for the max size of a line and visual indent warnings)