fixes all critical liniting errors

flake8 now passes!