Rewrite travis config and test [skip ci]