Fix a ton of pep8/flake8 warnings and errors