Improving test code coverage as per #2. Up to 29% branch in core.