Clean up and add tests
Add travis configuration