travis: refactor and clean up