Reduced the size of some of the module manager constructor code.
Fixed bug that was created in refactored ModuleManager code