Refactoring the travis scripts slightly.