Refactor travis for easier testing outside travis