diff --git a/src/uncategorized/PESS.tw b/src/uncategorized/PESS.tw
index f1dd9d4aa041d9ba4266d341c1be82b707e9e763..135204a79e920558c3f21d86d06e7562bf3f148e 100644
--- a/src/uncategorized/PESS.tw
+++ b/src/uncategorized/PESS.tw
@@ -44,17 +44,17 @@
 /* special leadership events can be rolled on any eventSlave */
 <<switch $PESSevent>>
   <<case "madam strategy">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $Madam.ID; })>>
+	<<set $activeSlave = getSlave($Madam.ID)>>
   <<case "DJ publicity">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $DJ.ID; })>>
+	<<set $activeSlave = getSlave($DJ.ID)>>
   <<case "tired milkmaid" "tired collectrix">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $Milkmaid.ID; })>>
+	<<set $activeSlave = getSlave($Milkmaid.ID)>>
   <<case "loving concubine">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $Concubine.ID; })>>
+	<<set $activeSlave = getSlave($Concubine.ID)>>
   <<case "bodyguard bedtime" "bodyguard beatdown">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $Bodyguard.ID; })>>
+	<<set $activeSlave = getSlave($Bodyguard.ID)>>
   <<case "loving headgirl" "headgirl dickgirl" "worried headgirl" "worshipful impregnatrix">>
-	<<set $activeSlave = $slaves.find(function(s) { return s.ID == $HeadGirl.ID; })>>
+	<<set $activeSlave = getSlave($HeadGirl.ID)>>
 	<<set $j = $slaves.findIndex(function(s) { return s.ID != $HeadGirl.ID && s.devotion < 20; })>>
 <</switch>>
 
diff --git a/src/uncategorized/PETS.tw b/src/uncategorized/PETS.tw
index 2e5ee0973b61395527c4097b7bc58c26a23ca37d..c0978ade2543246a63a9170abcf5e09ae349ae67 100644
--- a/src/uncategorized/PETS.tw
+++ b/src/uncategorized/PETS.tw
@@ -262,8 +262,7 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo
 	In a conversational tone of voice, you tell $activeSlave.slaveName to continue the spanking. $subSlave.slaveName has one anguished second to realize what's happening before you shove yourself <<if ($PC.dick == 0)>>against her mouth<<else>>down her throat<</if>>. She gags reflexively, jerking back, only to jerk forward again in automatic pain avoidance when $activeSlave.slaveName hits her already-sore buttocks yet again. She's broken enough to understand that she needs to relax and let herself be abused, but her body's reflexive responses deny her the relief that might give. The sadistic stewardess @@.hotpink;comes twice@@ before you do, a deliciously aggressive expression on her face. Poor $subSlave.slaveName staggers off coughing, promising to @@.gold;never offend@@ again.
 	<<set $activeSlave.devotion += 4>>
 	<<set $subSlave.trust -= 5, $subSlave.oralCount += 1, $oralTotal += 1>>
-	<<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>>
-	<<set $slaves[_i] = $subSlave>>
+	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
 <br><<link "Make sure your stewardess remembers her place">>
@@ -295,8 +294,7 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo
 	<<replace "#result">>
 	When $activeSlave.slaveName finishes using $subSlave.slaveName's mouth, $subSlave.slaveName crawls out from under her desk and stumbles back towards her seat. She stops short when she realizes you're sitting in it. All the other students do their absolute best to be perfectly studious as $subSlave.slaveName gets back to her knees, for you this time. After class is over, you tell her that since she can't have been paying particularly good attention, she'll have to take @@.green;remedial classes@@ after everyone else is done. $activeSlave.slaveName gives $subSlave.slaveName a very thorough grope at 'remedial classes,' making sure to pinch her student's nipples.
 	<<set $subSlave.oralCount += 1, $oralTotal += 1, $subSlave.intelligenceImplant += 0.5>>
-	<<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>>
-	<<set $slaves[_i] = $subSlave>>
+	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
 
@@ -332,8 +330,7 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo
 	You silently interrupt $activeSlave.slaveName and indicate that she should sit down on the cell's bed without letting $subSlave.slaveName's head out from between her legs. She sits down with a thump, dragging the struggling $subSlave.slaveName with her. You<<if ($PC.dick == 0)>> pull on a strap-on, and then<</if>> seize $subSlave.slaveName's hips and hoist them into the air, giving her a horrible second of anticipation as you manhandle <<if ($PC.dick == 0)>>the cruelly large phallus<<else>>your cock<</if>> into place. She gives a strangled squeal of protest at the feeling of you pushing your way inexorably up her poor anus, making $activeSlave.slaveName jerk with surprise at the sensation of $subSlave.slaveName howling into her crotch. Twenty minutes later, you and $activeSlave.slaveName leave her @@.hotpink;quiescent@@ on the floor of the cell. After she locks the door after herself, $activeSlave.slaveName can't resist the urge to @@.hotpink;offer you a cheerful high-five.@@
 	<<set $activeSlave.devotion += 10, $activeSlave.oralCount += 1, $oralTotal += 1>>
 	<<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 12, $subSlave.analCount += 1, $analTotal += 1>>
-	<<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>>
-	<<set $slaves[_i] = $subSlave>>
+	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
 <</if>>
@@ -344,8 +341,7 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo
 	You silently interrupt $activeSlave.slaveName and indicate that she should sit down on the cell's bed without letting $subSlave.slaveName's head out from between her legs. She sits down with a thump, dragging the struggling $subSlave.slaveName with her. You<<if ($PC.dick == 0)>> pull on a strap-on, and then<</if>> seize $subSlave.slaveName's hips and hoist them into the air, giving her a horrible second of anticipation as you manhandle <<if ($PC.dick == 0)>>the cruelly large phallus<<else>>your cock<</if>> into place. She gives a strangled squeal of protest at the feeling of you pushing your way inexorably up her poor pussy, making $activeSlave.slaveName jerk with surprise at the sensation of $subSlave.slaveName howling into her crotch. Twenty minutes later, you and $activeSlave.slaveName leave her @@.hotpink;quiescent@@ on the floor of the cell. After she locks the door after herself, $activeSlave.slaveName can't resist the urge to @@.hotpink;offer you a cheerful high-five.@@
 	<<set $activeSlave.devotion += 10, $activeSlave.oralCount += 1, $oralTotal += 1>>
 	<<set $subSlave.devotion += 4, $subSlave.oralCount += 2, $oralTotal += 2, $subSlave.vaginaCount += 1, $vaginalTotal += 1>>	
-	<<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>>
-	<<set $slaves[_i] = $subSlave>>
+	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
 <</if>>
@@ -358,8 +354,7 @@ You decide to knit up care's raveled sleeve with a break in the spa. You have yo
 	You meet $activeSlave.slaveName after $subSlave.slaveName leaves. She likes to take a cool shower after spending time in the steam, so you get under the refreshing water with her, encircling her <<if ($activeSlave.weight > 10)>>plush<<else>>taut<</if>> midriff with your arms and giving her a hug before asking her about $subSlave.slaveName. In $activeSlave.slaveName's opinion, there's nothing really wrong with her: she's just having a little trouble accepting different expectations about human interactions. <<if SlaveStatsChecker.checkForLisp($activeSlave)>>"The girl jutht needth a little help accepting that her free dayth are over, and it'th her place to therve you, <<Master>>," she lisps. "Like I have!"<<else>>"She just needs a little help accepting that she's a slave and it's her place to serve you, <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>>," she says. "Like I have!"<</if>> She wriggles around in your arms and plants a wet kiss on your nose. She's clean now, so you release her and she steps over to her towel. As she does, you land a wet slap on her <<if ($activeSlave.butt > 5)>>massive<<elseif ($activeSlave.butt > 3)>>big<<else>>nice<</if>> butt, eliciting a @@.hotpink;delighted@@ squeal. You use the information to @@.hotpink;subtly address@@ $subSlave.slaveName's unhappiness.
 	<<set $activeSlave.devotion += 4>>
 	<<set $subSlave.devotion += 4>>
-	<<set _i = $slaves.findIndex(function(s) { return s.ID == $subSlave.ID; })>>
-	<<set $slaves[_i] = $subSlave>>
+	<<set $slaves[$slaveIndices[$subSlave.ID]] = $subSlave>>
 	<</replace>>
 <</link>>
 <br><<link "Leave the matter between the Attendant and the slave she's helping">>
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index 913265256670de5884db3fba427834895138cf53..7334e5860e012819efcd34aeec73023f789a3be8 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -3766,7 +3766,7 @@ You pass through your slaves' living area as some of them are starting their day
 	gotten out of her neat little cot.
 <<elseif $activeSlave.relationship >= 4>>
 	climbed out of bed. ($activeSlave.slaveName's <<if $activeSlave.relationship == 5>>wife<<else>>girlfriend<</if>>
-	<<set _ress = $slaves.findIndex(function(s) { return s.ID == $activeSlave.relationTarget; })>>
+	<<set _ress = $slaveIndices[$activeSlave.relationshipTarget]>>
 	$slaves[_ress].slaveName is still asleep in it, and the shape of her
 	<<if $slaves[_ress].belly >= 120000>>_belly belly is
 	<<elseif $slaves[_ress].boobs > 25000>>immense <<if Math.floor($slaves[_ress].boobsImplant/$slaves[_ress].boobs) >= .60>>fake <</if>> breasts are
@@ -4329,7 +4329,7 @@ May I plea<<s>>e try out <<s>>omething <<s>>kimpier today?"
 		<<if $mutinery != 1>>
 			<br><<link "Lock her dick in chastity">>
 				<<replace "#result2">>
-				You simply clamp a chastity cage onto her limp dick; she'll be taking a little break from fucking girls for the time being. When she comes to and finds herself locked in chastity, immediately begins fiddling with it in an attempt to remove it. She feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<if $PC.customTitle != 0>>$PC.customTitle<<elseif $PC.title == 1>>Master<<else>>Mistress<</if>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebelious slaves.
+				You simply clamp a chastity cage onto her limp dick; she'll be taking a little break from fucking girls for the time being. When she comes to and finds herself locked in chastity, immediately begins fiddling with it in an attempt to remove it. She feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<if $PC.customTitle != 0>>$PC.customTitle<<elseif $PC.title == 1>>Master<<else>>Mistress<</if>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
 				<<set $activeSlave.trust += 10, $activeSlave.dickAccessory = "chastity">>
 				<<set $slaves.forEach(function(s) { if (s.devotion <= -50) { s.trust += 5; } })>>
 				<</replace>>
@@ -4689,11 +4689,10 @@ May I plea<<s>>e try out <<s>>omething <<s>>kimpier today?"
 		She is far stronger than you expected and has you trapped in a compromising position; you shout out for <<if $Bodyguard != 0>>$Bodyguard.slaveName<<elseif $Concubine != 0 && canWalk($Concubine)>>$Concubine.slaveName<<else>>somebody<</if>> to help you. You've seen $activeSlave.slaveName fuck before; she's a quick shot, only in it to get her mate pregnant. You question if anyone is coming as her gigantic dick pokes at your crotch, eager to find the egg at the end of the tunnel. She lacks even the basic understanding of foreplay, you realize, as she drives her cock deep into your pussy. You groan with pain at the sheer size of the rod stretching out your poor hole and struggle to hold back the tears once she starts thrusting. There is no pleasure for you here as she batters your cervix; you barely stop yourself from screaming out as she slams through your final defense
 		<<if $Bodyguard != 0>>
 			and gets tackled off of you by $Bodyguard.slaveName. After a quick tussle, the amorous cow is restrained and leaking cum on your floor. You sigh to yourself, knowing you have nobody to blame but yourself for this. She's a breeding bull and you a fertile woman. She only did what she was conditioned for; the fault is on you for ignoring the warning signs and not taking the proper precautions. $Bodyguard.slaveName is visibly disturbed by an assault on you happening within her defensive perimeter and @@.hotpink;vows@@ to not allow it to happen again.
-			<<set _c = $slaves.findIndex(function(s) { return s.ID == $Bodyguard.ID; })>>
-			<<set $slaves[_c].devotion += 2>>
+			<<set $slaves[$slaveIndices[$Bodyguard.ID]].devotion += 2>>
 		<<elseif $Concubine != 0 && canWalk($Concubine)>>
 			and gets tackled off of you by $Concubine.slaveName. After a violent struggle, the amorous cow is restrained and leaking cum on your floor. You sigh to yourself, knowing you have nobody to blame but yourself for this. She's a breeding bull and you a fertile woman. She only did what she was conditioned for; the fault is on you for ignoring the warning signs and not taking the proper precautions. $Concubine.slaveName is @@.gold;visibly shaken@@ by the assault and was @@.red;badly beaten@@ by the muscular slave during the fight.
-			<<set _c = $slaves.findIndex(function(s) { return s.ID == $Concubine.ID; })>>
+			<<set _c = $slaveIndices[$Concubine.ID]>>
 			<<set $slaves[_c].health -= 40, $slaves[_c].trust -= 5>>
 		<<else>>
 			and cums directly into your exposed womb. She backs off, possibly startled by the shouting, giving you the chance to slip away to safety. You sigh to yourself, knowing you have nobody to blame but yourself for this. She's a breeding bull and you a fertile woman. She only did what she was conditioned for; the fault is on you for ignoring the warning signs and not taking the proper precautions. Still, she knew you were fertile and went right for the prize; it would be wise to assume she's done her job well.
@@ -7296,8 +7295,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	<<if canImpreg($activeSlave, $HeadGirl)>>
 		<<KnockMeUp $activeSlave 5 0 $HeadGirl.ID 1>>
 	<</if>>
-	<<set _RESS = $slaves.findIndex(function(s) { return s.ID == $HeadGirl.ID; })>>
-	<<set $slaves[_RESS] = $HeadGirl>>
+	<<set $slaves[$slaveIndices[$HeadGirl.ID]] = $HeadGirl>>
 	<</replace>>
 <</link>>
 <</if>>
@@ -8309,8 +8307,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	$HeadGirl.slaveName understands the situation immediately. She gets herself and $activeSlave.slaveName dressed for a nice, non-sexual 'date' in $clubName, and leads her out by the hand with a wink over her shoulder to you. Your Head Girl understands just what kind of break from sexual servitude $activeSlave.slaveName really needs. They enjoy a nice meal, take a stroll and talk as friends, and get some inconsequential but relaxing beauty treatments together. They both @@.hotpink;enjoy the relaxation,@@ and $activeSlave.slaveName @@.green;feels much better@@ after the rest, too.
 	<<set $activeSlave.devotion += 4, $activeSlave.health += 10>>
 	<<set $cash -= 500>>
-	<<set _RESS = $slaves.findIndex(function(s) { return s.ID == $HeadGirl.ID; })>>
-	<<set $slaves[_RESS].devotion += 4>>
+	<<set $slaves[$slaveIndices[$HeadGirl.ID]].devotion += 4>>
 	<</replace>>
 <</link>> //This option will cost <<print cashFormat(500)>>//
 <</if>>
@@ -13687,7 +13684,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 		<<set _sourceSeed = random(0,$slaves.length-1)>>
 		<<for _ress = _sourceSeed + 1; _ress != _sourceSeed; _ress++>>
 			<<if _ress == $slaves.length>><<set _ress = 0>><</if>> /* wrap around */
-			<<if canImpreg($activeSlave, $slaves[_ress]) && _targetJobs.includes($slaves[_ress].assignment) && $slaves[_ress].ID == $activeSlave.ID>>
+			<<if canImpreg($activeSlave, $slaves[_ress]) && _targetJobs.includes($slaves[_ress].assignment) && $slaves[_ress].ID != $activeSlave.ID>>
 				<<KnockMeUp $activeSlave 50 1 $slaves[_ress].ID 1>>
 				<<break>>
 			<</if>>
@@ -16335,17 +16332,17 @@ You tell her kindly that you understand, and that she'll be trained to address t
 			<<case "buttslut">>
 				She has a one track mind, and that track is anal sex. So, she assrapes them, enjoying their sobbed apologies while she <<if canPenetrate($eventSlave)>>fills their backdoors with her cum<<else>>uses a dildo on them<</if>>.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].analCount += 10>><</if>><</for>>
-				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].ID == $eventSlave.ID>><<set $slaves[_ress].penetrativeCount += 10>><<break>><</if>><</for>>
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10
 				<<set $analTotal += 30, $penetrativeTotal += 30>>
 			<<case "boobs">>
 				She forces them to <<if $eventSlave.lactation > 0>>nurse from her<<else>>suck her nipples until she orgasms<</if>>, mostly for how much she enjoys the sensation, but also for the revulsion it produces.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].oralCount += 10>><</if>><</for>>
-				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].ID == $eventSlave.ID>><<set $slaves[_ress].mammaryCount += 10>><<break>><</if>><</for>>
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].mammaryCount += 10
 				<<set $oralTotal += 30, $mammaryTotal += 30>>
 			<<case "pregnancy">>
 				She doesn't have permission to impregnate them, but they don't know that, and she lies shamelessly. <<if canPenetrate($eventSlave)>>They beg her not to cum inside them, but she does anyway,<<else>>She uses a strap-on with a reservoir to fill them with cum,<</if>> and they cry themselves to sleep every night.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].vaginalCount += 10>><</if>><</for>>
-				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].ID == $eventSlave.ID>><<set $slaves[_ress].penetrativeCount += 10>><<break>><</if>><</for>>
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].penetrativeCount += 10
 				<<set $vaginalTotal += 30, $penetrativeTotal += 30>>
 			<<case "dom">>
 				She prizes the opportunity to be dominant, and makes the most of it. Rather than doing something pedestrian like force them to fuck her, she forces them to fuck each other, punishing them for hesitation until they're eating each other out even while they cry.
@@ -16354,14 +16351,14 @@ You tell her kindly that you understand, and that she'll be trained to address t
 			<<case "sadist">>
 				Their tears aren't a means for her; they're an end. She extracts them with greed, enjoying the sensation of being <<if $eventSlave.dick > 0>>sucked off<<elseif $activeSlave.vagina == -1>>rimmed<<else>>eaten out<</if>> by one sobbing rich bitch while she forces another to spank her friend's pussy.
 				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].oralCount += 10>><</if>><</for>>
-				<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].ID == $eventSlave.ID>><<set $slaves[_ress].oralCount += 10>><<break>><</if>><</for>>
+				<<set $slaves[$slaveIndices[$eventSlave.ID]].oralCount += 10
 				<<set $oralTotal += 60>>
 			<<case "masochist">>
 				As a masochist, she's naturally inclined to be on the receiving end, but in this case she makes an exception for the sake of justice. And it's to her victims' anguish that she does, because she knows pain like a lover, and inflicts it in excruciating crescendos without leaving a single mark.
 			<</switch>>
 			The horrible experience is certainly @@.gold;educational@@ for your new slaves, and $eventSlave.slaveName is @@.hotpink;well pleased.@@ Tolerating insults is part of being a public slave, but getting this opportunity to take her pent-up frustrations out on some deserving targets is a @@.mediumaquamarine;trust building@@ exercise for her. It seems their insults really did upset her.
 			<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].origin == _origin>><<set $slaves[_ress].trust -= 4>><</if>><</for>>
-			<<for _ress = 0; _ress < $slaves.length; _ress++>><<if $slaves[_ress].ID == $eventSlave.ID>><<set $slaves[_ress].devotion += 5>><<set $slaves[_ress].trust += 5>><<break>><</if>><</for>>
+			<<set _ress = $slaveIndices[$eventSlave.ID]>><<set $slaves[_ress].devotion += 5, $slaves[_ress].trust += 5>>
 		<<else>>
 			She obeys, but isn't so far gone into sexual slavery that she's willing to really throw herself into the task. Her visits are terrifying enough, though. Simply seeing their own likely futures reflected in her is usually enough to leave your new slaves crying themselves to sleep.
 		<</if>>
@@ -17292,8 +17289,7 @@ You tell her kindly that you understand, and that she'll be trained to address t
 		<<if canImpreg($activeSlave, $HeadGirl)>>
 			<<KnockMeUp $activeSlave 5 1 $HeadGirl.ID 1>>
 		<</if>>
-		<<set _ress = $slaves.findIndex(function(s) { return s.ID == $HeadGirl.ID; })>>
-		<<set $slaves[_ress].devotion += 4>>
+		<<set $slaves[$slaveIndices[$HeadGirl.ID]].devotion += 4>>
 		<<EventFetish $activeSlave "buttslut">>
 		<<EventFetish $activeSlave "submissive">>
 	<</replace>>
@@ -17847,18 +17843,14 @@ You tell her kindly that you understand, and that she'll be trained to address t
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 		<<set _pussy = false, _balls = false>>
-		<<for _ress = 0; _ress < $slaves.length; _ress++>>
-			<<if $slaves[_ress].assignment == "be confined in the arcade">>
-				<<if $slaves[_ress].vagina > 0>>
-					<<set _pussy = true>><<break>>
-				<</if>>
+		<<for _ress = 0; _ress < $ArcadeiIDs.length; _ress++>>
+			<<if $slaves[$slaveIndices[$ArcadeiIDs[_ress]]].vagina > 0>>
+				<<set _pussy = true>><<break>>
 			<</if>>
 		<</for>>
-		<<for _ress = 0; _ress < $slaves.length; _ress++>>
-			<<if $slaves[_ress].assignment == "be confined in the arcade">>
-				<<if $slaves[_ress].balls > 0>>
-					<<set _balls = true>><<break>>
-				<</if>>
+		<<for _ress = 0; _ress < $ArcadeiIDs.length; _ress++>>
+			<<if $slaves[$slaveIndices[$ArcadeiIDs[_ress]]].balls > 0>>
+				<<set _balls = true>><<break>>
 			<</if>>
 		<</for>>
 		You order her to explain further. "<<Master>>," she <<say>>s carefully, "it'<<s>> $arcadeName. There'<<s>> a <<s>>pe<<c>>ific pla<<c>>e there, and, well, I can't de<<s>>cribe it. It'<<s>> in the <<s>>ervi<<c>>e area under $arcadeName. Can I show you what I mean?" Intrigued, you order her to show you the place she's talking about, and lead her to $arcadeName through the access hallway. She points to the service tunnel under one of the rows of inmates, which allows trusted slaves to clean up and perform maintenance.
@@ -17908,12 +17900,8 @@ You tell her kindly that you understand, and that she'll be trained to address t
 			<br><<link "Teach her about true sadism">>
 				<<replace "#result2">>
 					She seems to be focusing on the purely physical aspects of the degradation here. The true meaning of this place is so much more, and you decide to share it with her. You call her name, tearing her attention away from the spectacle mere centimeters over your heads, and <<if canSee($activeSlave)>>point<<else>>direct her<</if>> to a particular slave. You tell $activeSlave.slaveName that this particular Arcade inmate's name is
-					<<for _ress = 0; _ress < $slaves.length; _ress++>>
-					<<if $slaves[_ress].assignment == "be confined in the arcade">>
-						<<SlaveFullName $slaves[_ress]>>. You tell her that she is $slaves[_ress].actualAge years old, that she is $slaves[_ress].nationality, and that she was once $slaves[_ress].career. You list more details of her life before she was placed here to be fucked endlessly. $activeSlave.slaveName's eyes widen as you recite the details of the prior life of this piece of human sexual equipment and the sheer weight of the intellectual sadism smashes into her. Then the slave above you both jerks a little. <<if $activeSlave.dick == 0>>There's no visible sign her pussy's being fucked, so it must be<<else>>Her cock hardens involuntarily, indicating that it's<</if>> going into her ass. You resume, mentioning that she's been buttfucked $slaves[_ress].analCount times.
-						<<break>>
-					<</if>>
-					<</for>>
+					<<set _ress = $slaveIndices[$ArcadeiIDs.random()]>>
+					<<SlaveFullName $slaves[_ress]>>. You tell her that she is $slaves[_ress].actualAge years old, that she is $slaves[_ress].nationality, and that she was once $slaves[_ress].career. You list more details of her life before she was placed here to be fucked endlessly. $activeSlave.slaveName's eyes widen as you recite the details of the prior life of this piece of human sexual equipment and the sheer weight of the intellectual sadism smashes into her. Then the slave above you both jerks a little. <<if $activeSlave.dick == 0>>There's no visible sign her pussy's being fucked, so it must be<<else>>Her cock hardens involuntarily, indicating that it's<</if>> going into her ass. You resume, mentioning that she's been buttfucked $slaves[_ress].analCount times.
 					$activeSlave.slaveName jerks suddenly, <<if canAchieveErection($activeSlave)>>shooting her cum onto the floor<<elseif $activeSlave.vagina < 0>>dribbling a little<<elseif $activeSlave.vaginaLube > 0>>squirting onto the floor<<else>>orgasming<</if>>. She came without being touched. She <<if canSee($activeSlave)>>stares at<<else>>faces<</if>> the mess she made just by being in the presence of the arcology's @@.hotpink;undisputed preeminent sadist;@@ she shudders at the sheer gothic glory of it. She has a new moment to think of when she feels like @@.lightsalmon;indulging her own sadism.@@
 				<</replace>>
 				<<set $activeSlave.devotion += 5, $activeSlave.fetishStrength = Math.clamp($activeSlave.fetishStrength+10, 0, 100)>>
diff --git a/src/utility/assignWidgets.tw b/src/utility/assignWidgets.tw
index eabe9a13ae82665848b03e6560da80872489b90c..b4e2cc9a45d40b01214df771edc2ce7b746a3bff 100644
--- a/src/utility/assignWidgets.tw
+++ b/src/utility/assignWidgets.tw
@@ -140,7 +140,7 @@
 %/
 <<widget removeJob>>
 <<set _wID = $args[0].ID>>
-<<set _wi = $slaves.findIndex(function(s) { return s.ID === _wID; })>>
+<<set _wi = $slaveIndices[_wID]>>
 
 <<if ($args[1] == "Pit")>>
 	<<set $fighterIDs.delete(_wID)>>
diff --git a/src/utility/birthWidgets.tw b/src/utility/birthWidgets.tw
index 4f50eb41bbb03666722b374401580f136d73510b..de675848e2efbffe12cfcaeeaace9a2e402082e3 100644
--- a/src/utility/birthWidgets.tw
+++ b/src/utility/birthWidgets.tw
@@ -39,7 +39,7 @@
 	<</if>>
 
 <<case "be a subordinate slave">>
-	<<set _bw = $slaves.findIndex(function(s) { return $slaves[$i].subTarget == s.ID; })>>
+	<<set _bw = $slaveIndices[$slaves[$i].subTarget]>>
 	<<if $slaves[$i].fetish == "mindbroken">>
 		<<if $slaves[$i].subTarget == 0>>
 			She returns to her bed and strips before slipping into it. Instinctively, she begins to push out her bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>>. Her child<<if $slaves[$i].pregType > 1>>ren are<<else>> is<</if>> promptly taken and she rests for a short while before returned to your waiting slaves.
@@ -377,7 +377,7 @@
 	<</if>>
 
 <<case "be a subordinate slave">>
-	<<set _bw = $slaves.findIndex(function(s) { return $slaves[$i].subTarget == s.ID; })>>
+	<<set _bw = $slaveIndices[$slaves[$i].subTarget]>>
 	<<if $slaves[$i].fetish == "mindbroken">>
 		<<if $slaves[$i].subTarget == 0>>
 			She is placed on her bed and stripped. Instinctively, she begins to push out her bab<<if $slaves[$i].pregType > 1>>ies<<else>>y<</if>>, indifferent to her watching helper. Her child<<if $slaves[$i].pregType > 1>>ren are<<else>> is<</if>> promptly taken and she is returned to your waiting slaves.
@@ -569,7 +569,7 @@
 <<set _birthScene = random(1,100)>>
 <<if random(1,2) == 1 && canWalk($slaves[$i])>> /* at assignment else in halls/etc, only if able to move */
 
-	<<set _bw = $slaves.findIndex(function(s) { return $slaves[$i].rivalTarget == s.ID; })>>
+	<<set _bw = $slaveIndices[$slaves[$i].rivalTarget]>>
 
 	<<if $slaves[$i].fetish == "mindbroken">>
 		While wandering the penthouse absentmindedly, $slaves[$i].slaveName's water breaks. She carries on until the contractions drag her to the floor.
@@ -626,7 +626,7 @@
 	<</if>>
 
 <<case "be a subordinate slave">>
-	<<set _bw = $slaves.findIndex(function(s) { return $slaves[$i].subTarget == s.ID; })>>
+	<<set _bw = $slaveIndices[$slaves[$i].subTarget]>>
 		<<if $slaves[$i].fetish == "mindbroken">>
 			<<if $slaves[$i].subTarget == 0>>
 			While servicing your other slaves, $slaves[$i].slaveName's water breaks, though it does nothing to deter her from her task.
diff --git a/src/utility/extendedFamilyWidgets.tw b/src/utility/extendedFamilyWidgets.tw
index cdfbcf990bbc813055e4055ce693123b00692804..cec168645ebec6e9cbe96a1a591e4a95da962297 100644
--- a/src/utility/extendedFamilyWidgets.tw
+++ b/src/utility/extendedFamilyWidgets.tw
@@ -18,14 +18,14 @@
 <<if $activeSlave.father == -1 && $activeSlave.mother != -1>>
 	$pronounCap's @@.lightgreen;your child;@@ you knocked $possessive mother up.
 <<elseif $activeSlave.father > 0>>
-	<<set _efw = $slaves.findIndex(function(s) { return s.ID == $activeSlave.father; })>>
+	<<set _efw = $slaveIndices[$activeSlave.father]>>
 	$pronounCap was @@.lightgreen;fathered by $slaves[_efw].slaveName's@@ virile dick.
 <</if>>
 
 <<if $activeSlave.father != -1 && $activeSlave.mother == -1>>
 	$pronounCap's @@.lightgreen;your child;@@ you gave birth to $object.
 <<elseif $activeSlave.mother > 0>>
-	<<set _efw = $slaves.findIndex(function(s) { return s.ID == $activeSlave.mother; })>>
+	<<set _efw = $slaveIndices[$activeSlave.mother]>>
 	$pronounCap was @@.lightgreen;born from $slaves[_efw].slaveName's@@ fertile womb.
 <</if>>
 
@@ -63,17 +63,18 @@
 
 
 /*testtest maternal grandma passage - determines if the current slave has a maternal grandmother*/
-<<for $i = 0; $i < $slaves.length; $i++>>
-	<<if $slaves[$i].ID != $activeSlave.ID && $slaves[$i].ID == $activeSlave.mother>>
-		<<for $j = 0; $j < $slaves.length; $j++>>
-			<<if $slaves[$j].ID != $activeSlave.ID && $slaves[$j].ID != $slaves[$i].ID && $slaves[$j].ID == $slaves[$i].mother>>
-				$possessiveCap maternal @@.lightgreen;grandmother is $slaves[$j].slaveName.@@
-			<</if>>
-		<</for>>
-	<<elseif $PC.ID == $activeSlave.mother && $slaves[$i].ID == $PC.mother>>
+<<set $i = $slaveIndices[$activeSlave.mother]>>
+<<if def $i && $slaves[$i].ID != $activeSlave.ID>>
+	<<set $j = $slaveIndices[$slaves[$i].mother]>>
+	<<if def $j && $slaves[$j].ID != $activeSlave.ID && $slaves[$j].ID != $slaves[$i].ID>>
+		$possessiveCap maternal @@.lightgreen;grandmother is $slaves[$j].slaveName.@@
+	<</if>>
+<<elseif $PC.ID == $activeSlave.mother>>
+	<<set $i = $slaveIndices[$PC.mother]>>
+	<<if def $i>>
 		$possessiveCap maternal @@.lightgreen;grandmother is $slaves[$i].slaveName.@@
 	<</if>>
-<</for>>
+<</if>>
 
 /*testtest maternal grandpa passage - determines if the current slave has a maternal grandfather*/
 <<for $i = 0; $i < $slaves.length; $i++>>