         }
     }
 
+    private function moduleInfo_unloadHandler(event:ModuleEvent):void
+    {
+        if (Log.isInfo())
+        {
+            LOG.info('Module unloaded: {0}', swf.url);
+        }
+
+        var moduleInfo:IModuleInfo = event.module;
+        moduleInfo.removeEventListener(ModuleEvent.UNLOAD, moduleInfo_unloadHandler);
+        var moduleInfoIndex:int = loadedModuleInfos.indexOf(moduleInfo);
+        if (moduleInfoIndex > -1)
+        {
+            loadedModuleInfos.splice(moduleInfoIndex, 1);
+        }
+        this.moduleInfo = null;
+        FlexGlobals.topLevelApplication.callLater(loadModule);
+    }
+
     private function moduleInfo_progressHandler(event:ModuleEvent):void
     {
         if (event.bytesLoaded == event.bytesTotal)

        }
    }

    private function moduleInfo_unloadHandler(event:ModuleEvent):void
    {
        if (Log.isInfo())
        {
            LOG.info('Module unloaded: {0}', swf.url);
        }

        var moduleInfo:IModuleInfo = event.module;
        moduleInfo.removeEventListener(ModuleEvent.UNLOAD, moduleInfo_unloadHandler);
        var moduleInfoIndex:int = loadedModuleInfos.indexOf(moduleInfo);
        if (moduleInfoIndex > -1)
        {
            loadedModuleInfos.splice(moduleInfoIndex, 1);
        }
        this.moduleInfo = null;
        FlexGlobals.topLevelApplication.callLater(loadModule);
    }

    private function processModuleInfo(moduleInfo:IModuleInfo):void
    {
        if (Log.isInfo())

        }

        return configXML;
    }

    private function parseCustomWidgetType(configXML:XML):CustomWidgetType
