Added 1 unit test. Some minor source changes.