Added Travis CI.
Fixed pyflakes, PEP8 issues.