Initial code and tests
Add Travis support