Code Flake8 compliant + Refactor