Add new unit tests to improve coverage. Fixes #52