Improved test coverage and fixed bugs in adapter abstract/core.
Further work on code maintainability, test coverage, and bugfixes in model layer.