Add tests for uncovered code.
Merge pull request #51 from MessiJS/tests

Add tests for uncovered code. Fixes #49