Add flake8 to the travis tests, correct a bunch of small sisues.