Code coverage

Expanded the test infrastructure through run loops for UI callbacks.
Enabled code coverage in the test build
Expanded the test coverage
Fixed some bugs like multi-threading issues with the logger