Initial testing
===

- Added some unit tests
- Enabled Travis
- Fixed a bug found by unit tests