Added unit tests. Integrated with Travis