fixed pep8 warnings/errors, added flake8 config in setup.cfg