Refactoring travis-ci build