enabled pyflake8 checks
fix many pep8/pyflake8/pylint errors and warnings