flake8 fixes and check on Travis