Refactoring for Travis CI integration. Pep8 fixes. Fixed naive datetime
warnings.