Added Travis services. Fixed minor bugs. Added some tests