Fail fast on flake8 for travis, fix tests, small modifications