Merge pull request #245 from shermdog/unit-tests

Unit tests up to 99% (14 lines missing)
UT with code coverage at 99.97% with just 3 lines missing
UT with code coverage at 99.97% with just 3 lines missing
Merge pull request #246 from vnitinv/unit-tests

Unit tests, code coverage at 99.97%, 3 lines remaining.
Unit test cleanup, plus 1 more line!