Add some unit tests and Travis-CI integration