Refactor travis-ci config file