fix pep8 and pyflakes violations and enforce with travis