Some refactoring and testing of travis CI