add flake8 tests
fixed some pep8/pylint/flake8 errors and warnings
update the changelog