Mock refactor, functional tests only working.
Tests running, coverage still lacking.
Test coverage improvements.
Coverage improvements.
Test coverage restored.