added flake8 configuration
docs and setup flake8 compliance
whitespace fixes
remaining flake8 issues