Refactoring the travis scripts to allow easier extension.

Copyrigtht and licence?