added some tests and minor fixes
added travis support