Switched encoding generators to singletons.