From 0d40683d9e21b306220cdcd5bba8dc261db505b8 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Tue, 16 Feb 2021 02:20:02 -0500
Subject: [PATCH] convert lower and fixes

---
 src/Corporation/corporate.js                  |  2 +-
 src/Mods/SpecialForce/TrickShotNight.tw       |  2 +-
 .../backwardsCompatibility/datatypeCleanup.js |  8 ++--
 src/endWeek/economics/neighborsDevelopment.js |  4 +-
 src/events/intro/pcAppearance.js              |  4 +-
 .../surgery/surgeryPassageExotic.js           |  2 +-
 src/futureSocieties/fsPassage.js              |  4 +-
 src/npc/generate/generateGenetics.js          |  2 +-
 src/npc/generate/generateMarketSlave.js       |  2 +-
 src/npc/generate/generateNewSlaveJS.js        |  2 +-
 src/npc/generate/heroCreator.js               |  4 +-
 src/pregmod/FCTV/FCTVshows.js                 |  6 +--
 src/pregmod/FCTV/seFCTVremote.tw              |  4 +-
 src/pregmod/eliteTakeOverResult.tw            |  4 +-
 src/pregmod/pRaped.tw                         |  2 +-
 src/uncategorized/REFS.tw                     | 12 ++---
 src/uncategorized/RESS.tw                     |  2 +-
 src/uncategorized/genericPlotEvents.tw        |  2 +-
 src/uncategorized/pHostageAcquisition.tw      |  2 +-
 src/uncategorized/pRivalryActions.tw          |  2 +-
 src/uncategorized/pRivalryCapture.js          |  2 +-
 src/uncategorized/pRivalryHostage.tw          |  2 +-
 src/uncategorized/pRivalryVictory.tw          |  2 +-
 src/uncategorized/reAWOL.tw                   |  2 +-
 src/uncategorized/reFSAcquisition.tw          | 16 +++----
 src/uncategorized/reMalefactor.tw             | 12 ++---
 src/uncategorized/reMilfTourist.tw            |  2 +-
 src/uncategorized/rePokerNight.tw             |  2 +-
 src/uncategorized/reRecruit.tw                | 46 +++++++++----------
 src/uncategorized/reShelterInspection.tw      |  2 +-
 src/uncategorized/recETS.tw                   |  6 +--
 31 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/src/Corporation/corporate.js b/src/Corporation/corporate.js
index f3e6f60653f..f691089eb93 100644
--- a/src/Corporation/corporate.js
+++ b/src/Corporation/corporate.js
@@ -921,7 +921,7 @@ globalThis.corpBlacklistRace = function(race, blacklist) {
 	if (raceArray.length > 0 && blacklist === 1) {
 		raceArray.delete(race);
 	} else if (blacklist === 1) {
-		raceArray = App.Data.filterRaces.values().filter(x => x !== race);
+		raceArray = App.Data.misc.filterRaces.values().filter(x => x !== race);
 	} else {
 		raceArray.push(race);
 	}
diff --git a/src/Mods/SpecialForce/TrickShotNight.tw b/src/Mods/SpecialForce/TrickShotNight.tw
index 5b9ff2e1c44..9c3c5cf6fa9 100644
--- a/src/Mods/SpecialForce/TrickShotNight.tw
+++ b/src/Mods/SpecialForce/TrickShotNight.tw
@@ -70,7 +70,7 @@ Despite your direct elevator, interaction with the majority of your security for
 						<<if $arcologies[0].FSSupremacistLawME == 1>>
 							<<set _race = $arcologies[0].FSSupremacistRace>>
 						<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-							<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+							<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 							<<set _race = _races.random()>>
 						<</if>>
 						<<set _genParam = {minAge: 25, maxAge: 35, ageOverridesPedoMode: 1, race: _race, disableDisability: 1}>>
diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js
index cb51ef0b836..34f63822ee8 100644
--- a/src/data/backwardsCompatibility/datatypeCleanup.js
+++ b/src/data/backwardsCompatibility/datatypeCleanup.js
@@ -2423,11 +2423,11 @@ App.Update.neighborArcologyCheatDatatypeCleanup = function() {
 			}
 		}
 
-		if (arc.FSSupremacist !== "unset" && !App.Data.filterRacesLowercase.includes(arc.FSSupremacistRace)) {
-			arc.FSSupremacistRace = App.Data.filterRacesLowercase.random();
+		if (arc.FSSupremacist !== "unset" && !App.Data.misc.filterRaces.keys().includes(arc.FSSupremacistRace)) {
+			arc.FSSupremacistRace = App.Data.misc.filterRaces.keys().random();
 		}
-		if (arc.FSSubjugationist !== "unset" && !App.Data.filterRacesLowercase.includes(arc.FSSubjugationistRace)) {
-			arc.FSSubjugationistRace = App.Data.filterRacesLowercase.random();
+		if (arc.FSSubjugationist !== "unset" && !App.Data.misc.filterRaces.keys().includes(arc.FSSubjugationistRace)) {
+			arc.FSSubjugationistRace = App.Data.misc.filterRaces.keys().random();
 		}
 
 		arc.embargo = Number(arc.embargo) || 0;
diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js
index 440cc1ded4c..4c6354c786e 100644
--- a/src/endWeek/economics/neighborsDevelopment.js
+++ b/src/endWeek/economics/neighborsDevelopment.js
@@ -2617,7 +2617,7 @@ App.EndWeek.neighborsDevelopment = function() {
 				}
 				switch (validFSes.random()) {
 					case "FSSubjugationist": {
-						const subjugationRace = App.Data.filterRacesLowercase.random();
+						const subjugationRace = App.Data.misc.filterRaces.keys().random();
 						if ((arc.FSSupremacist === "unset") || (subjugationRace !== arc.FSSupremacistRace)) {
 							r.push(`${desc} preoccupied by a racial animus towards ${subjugationRace} people, leading the arcology to <span class="yellow">adopt ${subjugationRace} Subjugation.</span>`);
 							arc.FSSubjugationist = 5;
@@ -2627,7 +2627,7 @@ App.EndWeek.neighborsDevelopment = function() {
 						break;
 					}
 					case "FSSupremacist": {
-						const supremacistRace = App.Data.filterRacesLowercase.random();
+						const supremacistRace = App.Data.misc.filterRaces.keys().random();
 						if ((arc.FSSubjugationist === "unset") || (supremacistRace !== arc.FSSubjugationistRace)) {
 							r.push(`${desc} preoccupied by belief in the superiority of the ${supremacistRace} race, leading the arcology to <span class="yellow">adopt ${supremacistRace} Supremacy.</span>`);
 							arc.FSSupremacist = 5;
diff --git a/src/events/intro/pcAppearance.js b/src/events/intro/pcAppearance.js
index c09881efa53..8ab31e42072 100644
--- a/src/events/intro/pcAppearance.js
+++ b/src/events/intro/pcAppearance.js
@@ -6,11 +6,11 @@ App.UI.Player.appearance = function(options) {
 		.addComment("For best result capitalize it.").pulldown();
 
 	options.addOption("Your race is", "race", V.PC).showTextBox()
-		.addValueList(Array.from(App.Data.filterRaces, ((k, v) => [v, k])));
+		.addValueList(Array.from(App.Data.misc.filterRaces, (k => [k[1], k[0]])));
 
 	if (V.cheatMode) {
 		options.addOption("Your race is", "origRace", V.PC).showTextBox()
-			.addValueList(Array.from(App.Data.filterRaces, ((k, v) => [v, k])));
+			.addValueList(Array.from(App.Data.misc.filterRaces, (k => [k[1], k[0]])));
 	}
 
 	options.addOption("Your skin tone is", "skin", V.PC).showTextBox()
diff --git a/src/facilities/surgery/surgeryPassageExotic.js b/src/facilities/surgery/surgeryPassageExotic.js
index 4a4156e48be..9187e1e12ef 100644
--- a/src/facilities/surgery/surgeryPassageExotic.js
+++ b/src/facilities/surgery/surgeryPassageExotic.js
@@ -34,7 +34,7 @@ App.UI.surgeryPassageExotic = function(slave, cheat = false) {
 			if (slave.indentureRestrictions > 1) {
 				App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]);
 			} else {
-				for (const [race, raceCap] of App.Data.misc.filterRacesLowercase) {
+				for (const [race, raceCap] of App.Data.misc.filterRaces) {
 					if (slave.race === race) {
 						continue;
 					}
diff --git a/src/futureSocieties/fsPassage.js b/src/futureSocieties/fsPassage.js
index 9eebec5e4e6..2169a34f938 100644
--- a/src/futureSocieties/fsPassage.js
+++ b/src/futureSocieties/fsPassage.js
@@ -387,7 +387,7 @@ App.UI.fsPassage = function() {
 				r.push(`Select race:`);
 				const select = document.createElement("select");
 				r.push(select);
-				for (const race of App.Data.misc.filterRacesLowercase.filter(race => race !== arc.FSSubjugationistRace)) { // Subjugation race cannot be superior, so remove
+				for (const race of Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== arc.FSSubjugationistRace)) { // Subjugation race cannot be superior, so remove
 					const choice = App.UI.DOM.appendNewElement("option", select, capFirstChar(race));
 					choice.value = race;
 					if (race === arc.FSSupremacistRace) {
@@ -431,7 +431,7 @@ App.UI.fsPassage = function() {
 				const select = document.createElement("select");
 				r.push(select);
 
-				for (const race of App.Data.misc.filterRacesLowercase.filter(race => race !== arc.FSSupremacistRace)) { // Superior race cannot be subj, so remove
+				for (const race of Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== arc.FSSupremacistRace)) { // Superior race cannot be subj, so remove
 					const choice = App.UI.DOM.appendNewElement("option", select, capFirstChar(race));
 					choice.value = race;
 					if (race === arc.FSSubjugationistRace) {
diff --git a/src/npc/generate/generateGenetics.js b/src/npc/generate/generateGenetics.js
index b8f76c798d0..983bc32d62a 100644
--- a/src/npc/generate/generateGenetics.js
+++ b/src/npc/generate/generateGenetics.js
@@ -241,7 +241,7 @@ globalThis.generateGenetics = (function() {
 		if (((actor2 === -2 || actor2 === -5) && V.arcologies[0].FSSupremacistLawME === 1) || (actor2 === -6 && V.arcologies[0].FSSupremacist !== "unset")) {
 			fatherRace = V.arcologies[0].FSSupremacistRace;
 		} else if (((actor2 === -2 || actor2 === -5) && V.arcologies[0].FSSubjugationistLawME === 1) || (actor2 === -6 && V.arcologies[0].FSSubjugationist !== "unset")) {
-			fatherRace = App.Data.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace).random();
+			fatherRace = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== V.arcologies[0].FSSubjugationistRace).random();
 		}
 	}
 
diff --git a/src/npc/generate/generateMarketSlave.js b/src/npc/generate/generateMarketSlave.js
index 620bc20714b..757e73b82cb 100644
--- a/src/npc/generate/generateMarketSlave.js
+++ b/src/npc/generate/generateMarketSlave.js
@@ -1283,7 +1283,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1
 			if (V.arcologies[0].FSSupremacistLawME === 1) {
 				SGProp.race = V.arcologies[0].FSSupremacistRace;
 			} else if (V.arcologies[0].FSSubjugationistLawME === 1) {
-				const races = App.Data.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace);
+				const races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== V.arcologies[0].FSSubjugationistRace);
 				SGProp.race = jsEither(races);
 			}
 			slave = GenerateNewSlave(null, SGProp);
diff --git a/src/npc/generate/generateNewSlaveJS.js b/src/npc/generate/generateNewSlaveJS.js
index 8f465f2304b..7909e02e273 100644
--- a/src/npc/generate/generateNewSlaveJS.js
+++ b/src/npc/generate/generateNewSlaveJS.js
@@ -45,7 +45,7 @@ globalThis.GenerateNewSlave = (function() {
 		x.mature = (mature === 0) ? 0 : 1;
 		x.nationality = nationality || 0;
 		x.race = race || 0;
-		if (x.race !== 0 && !(App.Data.filterRacesLowercase.includes(x.race))) {
+		if (x.race !== 0 && !(App.Data.misc.filterRaces.keys().includes(x.race))) {
 			console.log("Error, cannot find race: ", x.race);
 			x.race = 0;
 		}
diff --git a/src/npc/generate/heroCreator.js b/src/npc/generate/heroCreator.js
index 7ec07ec290c..faac9eee3f0 100644
--- a/src/npc/generate/heroCreator.js
+++ b/src/npc/generate/heroCreator.js
@@ -68,13 +68,13 @@ App.Utils.getHeroSlave = function(heroSlave) {
 	// Nationalities, races, surnames random fill
 	if (!heroSlave.nationality) {
 		// Check for a pre-set race and if the nationality fits, else regenerate
-		if (heroSlave.race && App.Data.filterRacesLowercase.includes(heroSlave.race)) {
+		if (heroSlave.race && App.Data.misc.filterRaces.keys().includes(heroSlave.race)) {
 			raceToNationality(heroSlave);
 		} else {
 			heroSlave.nationality = hashChoice(V.nationalities);
 		}
 	}
-	if (!heroSlave.race || !App.Data.filterRacesLowercase.includes(heroSlave.race)) {
+	if (!heroSlave.race || !App.Data.misc.filterRaces.keys().includes(heroSlave.race)) {
 		nationalityToRace(heroSlave);
 	}
 	if (!heroSlave.birthSurname && heroSlave.birthSurname !== "") {
diff --git a/src/pregmod/FCTV/FCTVshows.js b/src/pregmod/FCTV/FCTVshows.js
index 4da9476f024..9e00d56a69a 100644
--- a/src/pregmod/FCTV/FCTVshows.js
+++ b/src/pregmod/FCTV/FCTVshows.js
@@ -409,7 +409,7 @@ App.Data.FCTV.actors = {
 		if (V.arcologies[0].FSSupremacistLawME === 1) {
 			races = [V.arcologies[0].FSSupremacistRace];
 		} else if (V.arcologies[0].FSSubjugationistLawME === 1) {
-			races = App.Data.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace);
+			races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== V.arcologies[0].FSSubjugationistRace);
 		}
 		const slave = GenerateNewSlave(gender, {
 			ageOverridesPedoMode: 1, disableDisability: 1, minAge: 25, maxAge: 35, race: races.random()
@@ -438,7 +438,7 @@ App.Data.FCTV.actors = {
 		if (V.arcologies[0].FSSupremacistLawME === 1) {
 			races = [V.arcologies[0].FSSupremacistRace];
 		} else if (V.arcologies[0].FSSubjugationistLawME === 1) {
-			races = App.Data.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace);
+			races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== V.arcologies[0].FSSubjugationistRace);
 		}
 		const slave = GenerateNewSlave(gender, {
 			ageOverridesPedoMode: 1, disableDisability: 1, minAge: 25, maxAge: 35, race: races.random()
@@ -470,7 +470,7 @@ App.Data.FCTV.actors = {
 		if (V.arcologies[0].FSSupremacistLawME === 1) {
 			races = [V.arcologies[0].FSSupremacistRace];
 		} else if (V.arcologies[0].FSSubjugationistLawME === 1) {
-			races = App.Data.filterRacesLowercase.filter(race => race !== V.arcologies[0].FSSubjugationistRace);
+			races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== V.arcologies[0].FSSubjugationistRace);
 		}
 		const slave = GenerateNewSlave(gender, {
 			ageOverridesPedoMode: 1, disableDisability: 1, minAge: 25, maxAge: 35, race: races.random()
diff --git a/src/pregmod/FCTV/seFCTVremote.tw b/src/pregmod/FCTV/seFCTVremote.tw
index 7e8394851e9..6b08416c8a4 100644
--- a/src/pregmod/FCTV/seFCTVremote.tw
+++ b/src/pregmod/FCTV/seFCTVremote.tw
@@ -6,7 +6,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _slave = GenerateNewSlave(null, {minAge: 25, maxAge: 35, ageOverridesPedoMode: 1, race: _race, disableDisability: 1})>>
@@ -88,7 +88,7 @@
 			<<if $arcologies[0].FSSupremacistLawME == 1>>
 				<<set _race = $arcologies[0].FSSupremacistRace>>
 			<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-				<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+				<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 				<<set _race = _races.random()>>
 			<</if>>
 			<<set _genParam = {minAge: 25, maxAge: 35, ageOverridesPedoMode: 1, race: _race, disableDisability: 1}>>
diff --git a/src/pregmod/eliteTakeOverResult.tw b/src/pregmod/eliteTakeOverResult.tw
index 8839964d8d2..0668b6c9286 100644
--- a/src/pregmod/eliteTakeOverResult.tw
+++ b/src/pregmod/eliteTakeOverResult.tw
@@ -120,7 +120,7 @@
 		<<if $arcologies[0].FSSupremacistLawME == 1>>
 			<<set _race = $arcologies[0].FSSupremacistRace>>
 		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-			<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+			<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 			<<set _race = _races.random()>>
 		<</if>>
 		<<if $seeDicks == 0>>
@@ -160,7 +160,7 @@
 		<<if $arcologies[0].FSSupremacistLawME == 1>>
 			<<set _race = $arcologies[0].FSSupremacistRace>>
 		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-			<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+			<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 			<<set _race = _races.random()>>
 		<</if>>
 		<<if $seeDicks == 0>>
diff --git a/src/pregmod/pRaped.tw b/src/pregmod/pRaped.tw
index 2c461686db4..8d5437cf028 100644
--- a/src/pregmod/pRaped.tw
+++ b/src/pregmod/pRaped.tw
@@ -7,7 +7,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _genParam = {minAge: 16, race: _race, disableDisability: 1}>>
diff --git a/src/uncategorized/REFS.tw b/src/uncategorized/REFS.tw
index 03a82035fdc..93a7a8382b0 100644
--- a/src/uncategorized/REFS.tw
+++ b/src/uncategorized/REFS.tw
@@ -67,7 +67,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -85,7 +85,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -181,7 +181,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -203,7 +203,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -222,7 +222,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -244,7 +244,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index df7e7ab0cae..04cf89116ec 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -68,7 +68,7 @@
 		<<if $arcologies[0].FSSupremacistLawME == 1>>
 			<<set _race = $arcologies[0].FSSupremacistRace>>
 		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-			<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+			<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 			<<set _race = _races.random()>>
 		<</if>>
 		<<set _meanGirl = GenerateNewSlave("XX", {minAge: 16, maxAge: 19, ageOverridesPedoMode: 1, nationality: "American", race: _race, disableDisability: 1})>>
diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw
index 2d3d86eee66..f31ec806760 100644
--- a/src/uncategorized/genericPlotEvents.tw
+++ b/src/uncategorized/genericPlotEvents.tw
@@ -51,7 +51,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
diff --git a/src/uncategorized/pHostageAcquisition.tw b/src/uncategorized/pHostageAcquisition.tw
index 3a993cec632..cbd07efedf4 100644
--- a/src/uncategorized/pHostageAcquisition.tw
+++ b/src/uncategorized/pHostageAcquisition.tw
@@ -83,7 +83,7 @@ Your hired mercenaries are en route now with your precious cargo.
 		<<if $arcologies[0].FSSubjugationistRace != 0>>
 			<<set _notSupreme = $arcologies[0].FSSubjugationistRace>>
 		<<else>>
-			<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSupremacistRace)>>
+			<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSupremacistRace)>>
 			<<set _notSupreme = _races.random()>>
 		<</if>>
 		<<run WombFatherRace($hostage, _notSupreme)>>
diff --git a/src/uncategorized/pRivalryActions.tw b/src/uncategorized/pRivalryActions.tw
index 827d828bbcb..c23a05d80cb 100644
--- a/src/uncategorized/pRivalryActions.tw
+++ b/src/uncategorized/pRivalryActions.tw
@@ -3327,7 +3327,7 @@ You remind yourself that success in this conflict will not be defined by the tra
 							<<if _rivalCaptured == 1 && $arcologies[_pra].FSSupremacist > 20>>
 								<<set $rivalRace = $arcologies[_pra].FSSupremacistRace>>
 							<<elseif _rivalCaptured == 1 && $arcologies[_pra].FSSubjugationist > 20>>
-								<<set $rivalRace = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[_pra].FSSubjugationistRace)>>
+								<<set $rivalRace = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[_pra].FSSubjugationistRace)>>
 							<</if>>
 							<<break>>
 						<</if>>
diff --git a/src/uncategorized/pRivalryCapture.js b/src/uncategorized/pRivalryCapture.js
index 1f1126bba18..4206f37ec6a 100644
--- a/src/uncategorized/pRivalryCapture.js
+++ b/src/uncategorized/pRivalryCapture.js
@@ -103,7 +103,7 @@ globalThis.pRivalryCapture = function() {
 		}
 		rivalType = rivalTypeArray.random();
 
-		if (App.Data.filterRacesLowercase.includes(V.rivalRace)) {
+		if (App.Data.misc.filterRaces.keys().includes(V.rivalRace)) {
 			race = V.rivalRace;
 		}
 		switch (rivalType) {
diff --git a/src/uncategorized/pRivalryHostage.tw b/src/uncategorized/pRivalryHostage.tw
index 5bb8f1da34b..37a8002a5f8 100644
--- a/src/uncategorized/pRivalryHostage.tw
+++ b/src/uncategorized/pRivalryHostage.tw
@@ -7,7 +7,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _slave = GenerateNewSlave("XX", {race: _race, disableDisability: 1})>>
diff --git a/src/uncategorized/pRivalryVictory.tw b/src/uncategorized/pRivalryVictory.tw
index 7af19195bfe..9f178fcf0fd 100644
--- a/src/uncategorized/pRivalryVictory.tw
+++ b/src/uncategorized/pRivalryVictory.tw
@@ -121,7 +121,7 @@ For the first time, you receive a direct call from your rival. You pictured the
 				<<if $arcologies[_prv].FSSupremacist > 20>>
 					<<set $rivalRace = $arcologies[_prv].FSSupremacistRace>>
 				<<elseif $arcologies[_prv].FSSubjugationist > 20>>
-					<<set $rivalRace = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[_prv].FSSubjugationistRace)>>
+					<<set $rivalRace = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[_prv].FSSubjugationistRace)>>
 				<</if>>
 				<<break>>
 			<</if>>
diff --git a/src/uncategorized/reAWOL.tw b/src/uncategorized/reAWOL.tw
index a343811eba0..1b03e9859db 100644
--- a/src/uncategorized/reAWOL.tw
+++ b/src/uncategorized/reAWOL.tw
@@ -11,7 +11,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _genParam = {minAge: _minAge, maxAge: 43, ageOverridesPedoMode: 1, race: _race, disableDisability: 1}>>
diff --git a/src/uncategorized/reFSAcquisition.tw b/src/uncategorized/reFSAcquisition.tw
index 30e88ce1d46..60ca02e549b 100644
--- a/src/uncategorized/reFSAcquisition.tw
+++ b/src/uncategorized/reFSAcquisition.tw
@@ -66,7 +66,7 @@
 	<<if $arcologies[0].FSSubjugationistRace != 0>>
 		<<set _pram.race = $arcologies[0].FSSubjugationistRace>>
 	<<else>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSupremacistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSupremacistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave()>>
@@ -82,7 +82,7 @@
 	<<if $arcologies[0].FSSubjugationistRace != 0>>
 		<<set _pram.race = $arcologies[0].FSSubjugationistRace>>
 	<<else>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSupremacistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSupremacistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -294,7 +294,7 @@
 	<<if $arcologies[0].FSSupremacistLawME == 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -382,7 +382,7 @@
 	<<if $arcologies[0].FSSupremacistLawME == 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -581,7 +581,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -791,7 +791,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -902,7 +902,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -1005,7 +1005,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
diff --git a/src/uncategorized/reMalefactor.tw b/src/uncategorized/reMalefactor.tw
index ba9ef6e3eba..f56f60bbf50 100644
--- a/src/uncategorized/reMalefactor.tw
+++ b/src/uncategorized/reMalefactor.tw
@@ -117,7 +117,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -146,7 +146,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -188,7 +188,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -211,7 +211,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -262,7 +262,7 @@
 	<<if $arcologies[0].FSSubjugationistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSubjugationistRace>>
 	<<elseif $arcologies[0].FSSupremacistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSupremacistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSupremacistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -277,7 +277,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _fakeRace = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _fakeRace = _races.random()>>
 	<</if>>
 	<<set _realRace = _slave.race>>
diff --git a/src/uncategorized/reMilfTourist.tw b/src/uncategorized/reMilfTourist.tw
index 7e6cbee5d16..69a964df6fb 100644
--- a/src/uncategorized/reMilfTourist.tw
+++ b/src/uncategorized/reMilfTourist.tw
@@ -9,7 +9,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _slave = GenerateNewSlave("XX", {minAge: 36, maxAge: 42, ageOverridesPedoMode: 1, race: _race, disableDisability: 1})>>
diff --git a/src/uncategorized/rePokerNight.tw b/src/uncategorized/rePokerNight.tw
index 4bd1cf8e326..e7bc93f8e29 100644
--- a/src/uncategorized/rePokerNight.tw
+++ b/src/uncategorized/rePokerNight.tw
@@ -57,7 +57,7 @@ On a particularly lackadaisical evening, you find yourself alerted to a message
 					<<if $arcologies[0].FSSupremacistLawME == 1>>
 						<<set _race = $arcologies[0].FSSupremacistRace>>
 					<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-						<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+						<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 						<<set _race = _races.random()>>
 					<</if>>
 					<<set _genParam = {minAge: 38, maxAge: 43, ageOverridesPedoMode: 1, race: _race, disableDisability: 1}>>
diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw
index 97d8483ad69..cbeaa2b7446 100644
--- a/src/uncategorized/reRecruit.tw
+++ b/src/uncategorized/reRecruit.tw
@@ -29,7 +29,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -57,7 +57,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -86,7 +86,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -127,7 +127,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -139,7 +139,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -165,7 +165,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -198,7 +198,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -225,7 +225,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -258,7 +258,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -277,7 +277,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -358,7 +358,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -381,7 +381,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -408,7 +408,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -449,7 +449,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -482,7 +482,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -517,7 +517,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -565,7 +565,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -602,7 +602,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -641,7 +641,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XY", _pram)>>
@@ -1388,7 +1388,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -1449,7 +1449,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave(null, _pram)>>
@@ -1515,7 +1515,7 @@
 	<<if $arcologies[0].FSSupremacistLawME === 1>>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
@@ -1629,7 +1629,7 @@
 	<<if $arcologies[0].FSSupremacist != "unset">>
 		<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 	<<elseif $arcologies[0].FSSubjugationist != "unset">>
-		<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+		<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set _pram.race = _races.random()>>
 	<</if>>
 	<<set _slave = GenerateNewSlave("XX", _pram)>>
diff --git a/src/uncategorized/reShelterInspection.tw b/src/uncategorized/reShelterInspection.tw
index dc4d2ea834b..3a156330e15 100644
--- a/src/uncategorized/reShelterInspection.tw
+++ b/src/uncategorized/reShelterInspection.tw
@@ -6,7 +6,7 @@
 <<if $arcologies[0].FSSupremacistLawME == 1>>
 	<<set _race = $arcologies[0].FSSupremacistRace>>
 <<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set _race = _races.random()>>
 <</if>>
 <<set _ContractCost = 10000>>
diff --git a/src/uncategorized/recETS.tw b/src/uncategorized/recETS.tw
index 87e9268eea6..620886bc777 100644
--- a/src/uncategorized/recETS.tw
+++ b/src/uncategorized/recETS.tw
@@ -65,7 +65,7 @@
 			<<if $arcologies[0].FSSupremacistLawME === 1>>
 				<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 			<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-				<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+				<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 				<<set _pram.race = _races.random()>>
 			<</if>>
 
@@ -94,7 +94,7 @@
 			<<if $arcologies[0].FSSupremacistLawME === 1>>
 				<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 			<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-				<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+				<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 				<<set _pram.race = _races.random()>>
 			<</if>>
 
@@ -392,7 +392,7 @@
 			<<if $arcologies[0].FSSupremacistLawME === 1>>
 				<<set _pram.race = $arcologies[0].FSSupremacistRace>>
 			<<elseif $arcologies[0].FSSubjugationistLawME === 1>>
-				<<set _races = App.Data.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+				<<set _races = Array.from(App.Data.misc.filterRaces.keys()).filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 				<<set _pram.race = _races.random()>>
 			<</if>>
 
-- 
GitLab