added code-analysis and fixed a bunch of flake8 problems