Some reorganization to be able to write unit tests
Add unit test + travis setup