Fix a shitton of flake8 warnings and errors