Moving to flake8 and fixing issues