 					
 					modules.push(currentModule);
 					displayModules.push(midLayer.add(new DModule(currentModule)));
+					addRecentModule(moduleType);
 					
 					preserveModule = true;
 				}, "").setParam(moduleType).setTooltipCallback(Module.getArchetype(moduleType).getDescription));

		protected var preserveModule:Boolean;
		protected var runningTest:Boolean;
		
		protected var moduleCategory:String;
		protected var moduleList:ButtonList;
		protected var moduleSliders:Vector.<ModuleSlider>;

				}, "Choose "+category+" modules" /*TODO: replace with category description?*/).setParam(category).setDisabled(!allowed));
			}
			
			if (recentModules.length) {
				moduleButtons.push(new TextButton( -1, -1, "<Recent>").setDisabled(true));
				for each (moduleType in recentModules) {
					moduleButtons.push(new TextButton( -1, -1, Module.getArchetype(moduleType).name, function chooseModule(moduleType:Class):void {
						archetype = Module.getArchetype(moduleType);
						if (archetype.getConfiguration())
							currentModule = new moduleType( -1, -1, archetype.getConfiguration().value);
						else
							currentModule = new moduleType( -1, -1);
						currentModule.initialize();
						
						modules.push(currentModule);
						displayModules.push(midLayer.add(new DModule(currentModule)));
						addRecentModule(moduleType);
						
						preserveModule = true;
					}, "").setParam(moduleType).setTooltipCallback(Module.getArchetype(moduleType).getDescription));
				}
			}
			
			//put 'em in a list
			moduleList = new ButtonList(130, 10, moduleButtons, function onListClose():void {
				if (listOpen == LIST_CATEGORIES)
