Add some optimizations to travis build