Merge pull request #21 from cowboy129/master

Fix bugs
add .travis.yml for ci