Fix tests and add travis ci