While debugging I started fixing flake8 errors