Flake8

Replace pep8 with flake8 to check pep rules, logic errors and unused imports or variables
Flake8 Command

Ignore F403 error - unable to detect undefined names
Fix imports

Remove unused imports