A few changes to support singletons better.

See CHANGES.md.