 				var randomButton:MenuButton = new GraphicButton(90, 90, _random_sprite, function _():void {
 					initialMemory = level.goal.genMem();
 					memory = initialMemory.slice();
+					upperLayer.add(new DMemory(memory));
 				}, "Generate new memory", new Key("R"));
 				upperLayer.add(randomButton);
 			}
 			
 			if (level.goal.dynamicallyTested) {
-				var testButton:MenuButton = new GraphicButton(130, 90, _test_sprite, function _():void {
+				var testButton:MenuButton = new GraphicButton(FlxG.width / 2 - 16, 40, _test_sprite, function _():void {
 					level.goal.startRun();
 					lastRunTime = elapsed;
 				}, "Test your machine!", new Key("T"));
 				upperLayer.add(testButton);
 			}
+		}
+		
+		protected function makeEndTestButton():void {
+			var testButton:MenuButton = new GraphicButton(FlxG.width / 2 - 16, 40, _inv_test_sprite, finishDisplayTest, "Finish the test!", new Key("T"));
+			upperLayer.add(testButton);
 		}
 		
 		protected function makeModeButton():void {

		protected var loadButton:MenuButton;
		protected var resetButton:MenuButton;
		
		protected var displayTime:DTime;
		protected var displayDelay:DDelay;
		protected var preserveModule:Boolean;

		}
		
		protected function checkTime():void {
			var editShouldBeEnabled:Boolean = time.moment == 0 && !runningDisplayTest;
			if (editShouldBeEnabled != editEnabled) {
				editEnabled = editShouldBeEnabled;
				makeUI();
			}
			
			if (runningDisplayTest && (level.goal.stateValid(this) || time.moment >= level.goal.timeLimit))
				finishDisplayTest();
		}
		
		protected function finishDisplayTest():void {
			runningDisplayTest = false;
			
			if (!level.goal.succeeded) {
				FlxG.fade(0xff000000, MenuButton.FADE_TIME*2, function switchStates():void { 
					FlxG.switchState(new FailureState(level));
				});
				return;
			}
			
			U.save.data[level.name + SUCCESS_SUFFIX] = genSaveString();
			
			if (level == U.tuts[0])
				U.updateTutState(U.TUT_BEAT_TUT_1);
			else if (level == U.tuts[1])
				U.updateTutState(U.TUT_BEAT_TUT_2);
			
			FlxG.fade(0xff000000, MenuButton.FADE_TIME*2, function switchStates():void { 
				FlxG.switchState(new SuccessState(level));
			});
		}
		
		//protected function get buttonMoused():MenuButton {
