Refactoring for travis-ci builds.