Several fixes and improvements
Added Travis CI support