More tests, fixes and added coveralls.io to travis config