Refactor and add tests.
Refactor and tests.
Add .travis.yml and .rspec.