Updates and refactoring for travis.ci