flake8

Summary

No flake8 config file and not much of the code follows the standard, some parts as well in setup need updating

Possible fixes

Add flake8 config and apply most of the fixes, then apply a CI later on with flake8 to prevent future issues