Adding flake8 test. Fix needed corrections