Tests fixed and Flake8