Fixed tests and added integration with travis ci