Refactoring. Tests. Cleanup.
add .travis.yml