Respond to comments and fix mocks for logging in tests.