Fix existing tests and set up Travis CI