Changes to support unit tests.