Added coveralls.io integration and improved unit tests.