Various improvements.
Test instrumentation