Fix tests and add Travis CI