Fix unit tests.
Tweak example to use new factory.