Enhancement: Switched to a weakref based implementation for singletons