Fix memory leak
Add Travis CI build configuration