Use travis
Refactor master and slave