update ModuleReferenceCounter
adjusted modules to use new class ModuleReferenceCounter