Updated code documentation and README. Added Travis CI config. Added unit test