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