several changes of formating to turn the code flake8 compliant
added flake8 modifications