diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index d1e805d9e435d2522ac85a90711fa5939d77dbe7..3eb9f4458e453a3418e5702e923f7c0fd2098673 100644
--- a/devNotes/twine JS.txt	
+++ b/devNotes/twine JS.txt	
@@ -2131,7 +2131,7 @@ window.getCost = function(array) {
 	var foodCost = State.variables.foodCost;
 	var drugsCost = State.variables.drugsCost;
 	var facilityCost = State.variables.facilityCost;
-	var economy = State.variables.economy;
+	var localEcon = State.variables.localEcon;
 	var brothel = State.variables.brothel;
 	var arcade = State.variables.arcade;
 	var club = State.variables.club;
@@ -2240,7 +2240,7 @@ window.getCost = function(array) {
 	}
 
 	//general arcology costs
-	costs += (State.variables.girls * (250 + (50000 / economy)));
+	costs += (State.variables.girls * (250 + (50000 / localEcon)));
 
 	if(State.variables.arcologies[0].FSRepopulationFocusLaw === 1 && State.variables.PC.pregKnown == 1) {
 		costs -= 500;
@@ -2454,6 +2454,9 @@ window.getCost = function(array) {
 	if(State.variables.econWeatherDamage && State.variables.disasterResponse > 0) {
 		costs += Math.trunc(State.variables.disasterResponse * 200000 / State.variables.localEcon);
 	}
+	if(State.variables.antiWeatherFreeze > 0) {
+		costs += Math.trunc(State.variables.antiWeatherFreeze * 200000 / State.variables.localEcon);
+	}
 	// clean up
 	if(costs < 0) {
 		costs = 0;
@@ -36962,9 +36965,7 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() {
 	const V = State.variables;
 	
 	V.ACitizens = Math.max(+V.ACitizens, 0) || 0;
-	V.ACitizenLimit = Math.max(+V.ACitizenLimit, 0) || 0;
 	V.ASlaves = Math.max(+V.ASlaves, 0) || 0;
-	V.ASlaveLimit = Math.max(+V.ASlaveLimit, 0) || 0;
 	V.shelterAbuse = Math.max(+V.shelterAbuse, 0) || 0;
 	
 	V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, 300) || 1;
diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw
index a22dd5afcca10d6ababfd0ba45dd90278982ae4e..496a76ecfa86de992a454eb511a7d0fa4e375c4c 100644
--- a/src/SecExp/attackReport.tw
+++ b/src/SecExp/attackReport.tw
@@ -460,24 +460,44 @@
 	In the raiding following the battle @@.red;the arcology sustained heavy damage@@, which will cost quite the amount of cash to fix. Reports of @@.red;citizens or slaves killed or missing@@ flood your office for a few days following the defeat.
 	<<set $cash -= 5000 * _majorBattleMod, $PC.engineering += .1>>
 	<<if $week <= 30>>
-		<<set $ACitizens -= random(100) * _majorBattleMod>>
-		<<set $ASlaves -= random(150) * _majorBattleMod>>
+		<<set $lowerClass -= random(100) * _majorBattleMod>>
+		<<set _lostSlaves = random(150) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>>
 	<<elseif $week <= 60>>
-		<<set $ACitizens -= random(120) * _majorBattleMod>>
-		<<set $ASlaves -= random(170) * _majorBattleMod>>
+		<<set $lowerClass -= random(120) * _majorBattleMod>>
+		<<set _lostSlaves = random(170) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>>
 	<<elseif $week <= 90>>
-		<<set $ACitizens -= random(140) * _majorBattleMod>>
-		<<set $ASlaves -= random(190) * _majorBattleMod>>
+		<<set $lowerClass -= random(140) * _majorBattleMod>>
+		<<set _lostSlaves = random(190) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>>
 	<<elseif $week <= 120>>
-		<<set $ACitizens -= random(160) * _majorBattleMod>>
-		<<set $ASlaves -= random(210) * _majorBattleMod>>
+		<<set $lowerClass -= random(160) * _majorBattleMod>>
+		<<set _lostSlaves = random(210) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>>
 	<<else>>
-		<<set $ACitizens -= random(180) * _majorBattleMod>>
-		<<set $ASlaves -= random(230) * _majorBattleMod>>
+		<<set $lowerClass -= random(180) * _majorBattleMod>>
+		<<set _lostSlaves = random(230) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>>
 	<</if>>
 	<<if $PClossStreak >= 3>>
@@ -524,8 +544,12 @@
 	<br>
 	Damage to the city was @@.red;limited@@, it won't take much to rebuild. Very few citizens or slaves were involved in the fight and even fewer met their end, safeguarding the prosperity of the arcology.
 	<<set $cash -= 2000 * _majorBattleMod, $PC.engineering += .1>>
-	<<set $ACitizens -= random(10) * _majorBattleMod>>
-	<<set $ASlaves -= random(20) * _majorBattleMod>>
+	<<set $lowerClass -= random(10) * _majorBattleMod>>
+	<<set _lostSlaves = random(20) * _majorBattleMod,
+	$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+	$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+	$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+	$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 <<elseif $battleResult == -2>>
 	It was a close defeat, but nonetheless your @@.red;reputation@@ and @@.red;authority@@ slightly decreased. Your troops were not able to capture anyone or anything.
 	<<if $attackType == "raiders">>
@@ -546,24 +570,44 @@
 	Some business sustained heavy damage, slightly impacting the arcology's prosperity.
 	<<set $cash -= 3000 * _majorBattleMod, $PC.engineering += .1>>
 	<<if $week <= 30>>
-		<<set $ACitizens -= random(50) * _majorBattleMod>>
-		<<set $ASlaves -= random(75) * _majorBattleMod>>
+		<<set $lowerClass -= random(50) * _majorBattleMod>>
+		<<set _lostSlaves = random(75) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(2) * _majorBattleMod>>
 	<<elseif $week <= 60>>
-		<<set $ACitizens -= random(60) * _majorBattleMod>>
-		<<set $ASlaves -= random(65) * _majorBattleMod>>
+		<<set $lowerClass -= random(60) * _majorBattleMod>>
+		<<set _lostSlaves = random(85) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>>
 	<<elseif $week <= 90>>
-		<<set $ACitizens -= random(70) * _majorBattleMod>>
-		<<set $ASlaves -= random(95) * _majorBattleMod>>
+		<<set $lowerClass -= random(70) * _majorBattleMod>>
+		<<set _lostSlaves = random(95) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(7) * _majorBattleMod>>
 	<<elseif $week <= 120>>
-		<<set $ACitizens -= random(80) * _majorBattleMod>>
-		<<set $ASlaves -= random(105) * _majorBattleMod>>
+		<<set $lowerClass -= random(80) * _majorBattleMod>>
+		<<set _lostSlaves = random(105) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>>
 	<<else>>
-		<<set $ACitizens -= random(90) * _majorBattleMod>>
-		<<set $ASlaves -= random(115) * _majorBattleMod>>
+		<<set $lowerClass -= random(90) * _majorBattleMod>>
+		<<set _lostSlaves = random(115) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(12) * _majorBattleMod>>
 	<</if>>
 <<elseif $battleResult == -1>>
@@ -585,24 +629,44 @@
 	The surrender allows the arcology to survive @@.red;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
 	<<set $cash -= 1000 * _majorBattleMod, $PC.engineering += .1>>
 	<<if $week <= 30>>
-		<<set $ACitizens -= random(80) * _majorBattleMod>>
-		<<set $ASlaves -= random(120) * _majorBattleMod>>
+		<<set $lowerClass -= random(80) * _majorBattleMod>>
+		<<set _lostSlaves = random(120) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>>
 	<<elseif $week <= 60>>
-		<<set $ACitizens -= random(100) * _majorBattleMod>>
-		<<set $ASlaves -= random(140) * _majorBattleMod>>
+		<<set $lowerClass -= random(100) * _majorBattleMod>>
+		<<set _lostSlaves = random(140) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>>
 	<<elseif $week <= 90>>
-		<<set $ACitizens -= random(120) * _majorBattleMod>>
-		<<set $ASlaves -= random(160) * _majorBattleMod>>
+		<<set $lowerClass -= random(120) * _majorBattleMod>>
+		<<set _lostSlaves = random(160) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>>
 	<<elseif $week <= 120>>
-		<<set $ACitizens -= random(140) * _majorBattleMod>>
-		<<set $ASlaves -= random(180) * _majorBattleMod>>
+		<<set $lowerClass -= random(140) * _majorBattleMod>>
+		<<set _lostSlaves = random(180) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>>
 	<<else>>
-		<<set $ACitizens -= random(160) * _majorBattleMod>>
-		<<set $ASlaves -= random(190) * _majorBattleMod>>
+		<<set $lowerClass -= random(160) * _majorBattleMod>>
+		<<set _lostSlaves = random(200) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>>
 	<</if>>
 <<elseif $battleResult == 0>>
@@ -625,24 +689,44 @@
 	Fortunately the arcology survives @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
 	<<set $cash -= 1000, $PC.engineering += .1>>
 	<<if $week <= 30>>
-		<<set $ACitizens -= random(80) * _majorBattleMod>>
-		<<set $ASlaves -= random(120) * _majorBattleMod>>
+		<<set $lowerClass -= random(80) * _majorBattleMod>>
+		<<set _lostSlaves = random(120) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(5) * _majorBattleMod>>
 	<<elseif $week <= 60>>
-		<<set $ACitizens -= random(100) * _majorBattleMod>>
-		<<set $ASlaves -= random(140) * _majorBattleMod>>
+		<<set $lowerClass -= random(100) * _majorBattleMod>>
+		<<set _lostSlaves = random(140) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(10) * _majorBattleMod>>
 	<<elseif $week <= 90>>
-		<<set $ACitizens -= random(120) * _majorBattleMod>>
-		<<set $ASlaves -= random(160) * _majorBattleMod>>
+		<<set $lowerClass -= random(120) * _majorBattleMod>>
+		<<set _lostSlaves = random(160) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(15) * _majorBattleMod>>
 	<<elseif $week <= 120>>
-		<<set $ACitizens -= random(140) * _majorBattleMod>>
-		<<set $ASlaves -= random(180) * _majorBattleMod>>
+		<<set $lowerClass -= random(140) * _majorBattleMod>>
+		<<set _lostSlaves = random(180) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(20) * _majorBattleMod>>
 	<<else>>
-		<<set $ACitizens -= random(160) * _majorBattleMod>>
-		<<set $ASlaves -= random(190) * _majorBattleMod>>
+		<<set $lowerClass -= random(160) * _majorBattleMod>>
+		<<set _lostSlaves = random(200) * _majorBattleMod,
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $arcologies[0].prosperity -= random(25) * _majorBattleMod>>
 	<</if>>
 	<br>
@@ -660,18 +744,22 @@
 	<</if>>
 	<<set $cash -= $bribeCost>>
 <</if>>
-<<if !isInt($ACitizens)>>
-	<<if isNaN($ACitizens)>>
+<<if !isInt($lowerClass)>>
+	<<if isNaN($lowerClass)>>
 		<br>@@.red;Error: ACitizens is NaN, please report this issue@@
+	<<elseif $lowerClass > 0>>
+		<<set $lowerClass = Math.trunc($lowerClass)>>
 	<<else>>
-		<<set $ACitizens = Math.clamp(Math.trunc($ACitizens),100,$ACitizenLimit)>>
+		<<set $lowerClass = 0>>
 	<</if>>
 <</if>>
-<<if !isInt($ASlaves)>>
-	<<if isNaN($ASlaves)>>
+<<if !isInt($NPCSlaves)>>
+	<<if isNaN($NPCSlaves)>>
 		<br>@@.red;Error: ASlaves is NaN, please report this issue@@
+	<<elseif $NPCSlaves > 0>>
+		<<set $NPCSlaves = Math.trunc($NPCSlaves)>>
 	<<else>>
-		<<set $ASlaves = Math.clamp(Math.trunc($ASlaves),1000,$ASlaveLimit)>>
+		<<set $NPCSlaves = 0>>
 	<</if>>
 <</if>>
 
diff --git a/src/SecExp/rebellionGenerator.tw b/src/SecExp/rebellionGenerator.tw
index 216b32af21800f390b612f01dbf895ce90a03097..b6a6683a336201235f8b0754ec1b48e2b559d89c 100644
--- a/src/SecExp/rebellionGenerator.tw
+++ b/src/SecExp/rebellionGenerator.tw
@@ -2,7 +2,7 @@
 
 <<set _slave = 0>>
 <<set _citizen = 0>>
-<<set _CSratio = $ACitizens / ($ASlaves + $helots)>>
+<<set _CSratio = $ACitizens / ($ASlaves)>>
 
 <strong>Slaves security analysis:</strong>
 <<if $authority <= 3000>>
diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw
index f360f6a0d7108901582d283a7b585cd0248e8a6f..bc447191e64c0a5ba01f287e74776ae95507ad4f 100644
--- a/src/SecExp/rebellionReport.tw
+++ b/src/SecExp/rebellionReport.tw
@@ -91,7 +91,10 @@
 	<<if $SFGear>>
 		More units were able to survive thanks to wearining $SF.Lower's combat armour suits.
 	<</if>>
-	<<set $ASlaves -= $enemyLosses>>
+	<<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses),
+	$helots -= Math.trunc(($helots / $ASlaves) * $enemyLosses),
+	$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses),
+	$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>>
 	<<if $battleResult == 3>>
 		<<if $battleTurns <= 5>>
 			The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults.
@@ -122,29 +125,37 @@
 		<<set $rep += random(800,1000)>>
 		<<set $authority += random(800,1000)>>
 		<br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days.
-		<<set $ASlaves -= random(10,30)>>
+		<<set $NPCSlaves -= random(10,30)>>
 	<<elseif $battleResult == -3>>
 		Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased.
 		<<set $rep -= random(800,1000)>>
 		<<set $authority -= random(800,1000)>>
 		<br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time.
-		<<set $ACitizens -= random(50,100)>>
-		<<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>>
+		<<set $lowerClass -= random(50,100)>>
+		<<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8),
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $rebelDefeatAftermath = 5>>
 	<<elseif $battleResult == -2>>
 		Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased.
 		<<set $rep -= random(600,800)>>
 		<<set $authority -= random(600,800)>>
 		<br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time.
-		<<set $ACitizens -= random(40,80)>>
-		<<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.6)>>
+		<<set $lowerClass -= random(40,80)>>
+		<<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8),
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $rebelDefeatAftermath = 3>>
 	<<elseif $battleResult == 2>>
 		Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased.
 		<<set $rep += random(600,180)>>
 		<<set $authority += random(600,800)>>
 		<br>Many of the rebelling slaves were recaptured and punished. The instigators were executed one after another in a public trial that lasted for almost three days.
-		<<set $ASlaves -= random(10,30)>>
+		<<set $NPCSlaves -= random(10,30)>>
 	<<elseif $battleResult == -1>>
 		Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted.
 		<<set $rep -= random(1000,1200)>>
@@ -153,29 +164,53 @@
 		The surrender allows the arcology to survive @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
 		<<set $cash -= 1000>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(100)>>
-			<<set $ASlaves -= random(150)>>
+			<<set $lowerClass -= random(100)>>
+			<<set _lostSlaves = random(150),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(5)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(120)>>
-			<<set $ASlaves -= random(170)>>
+			<<set $lowerClass -= random(120)>>
+			<<set _lostSlaves = random(170),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(10)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(140)>>
-			<<set $ASlaves -= random(190)>>
+			<<set $lowerClass -= random(140)>>
+			<<set _lostSlaves = random(190),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(15)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(160)>>
-			<<set $ASlaves -= random(210)>>
+			<<set $lowerClass -= random(160)>>
+			<<set _lostSlaves = random(210),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(20)>>
 		<<else>>
-			<<set $ACitizens -= random(180)>>
-			<<set $ASlaves -= random(230)>>
+			<<set $lowerClass -= random(180)>>
+			<<set _lostSlaves = random(230),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(25)>>
 		<</if>>
 		<br>After the battle most of the rebelling slaves managed to escape, while others remained in the arcology for days looting and hunting their former masters. The arcology will bear the scars of this day for a long time.
-		<<set $ACitizens -= random(50,100)>>
-		<<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>>
+		<<set $lowerClass -= random(50,100)>>
+		<<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8),
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $rebelDefeatAftermath = 5>>
 	<</if>>
 <<else>>
@@ -188,7 +223,10 @@
 	<<if $SFGear>>
 		More units were able to survive thanks to wearining $SF.Lower's combat armour suits.
 	<</if>>
-	<<set $ASlaves -= $enemyLosses>>
+	<<set $NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * $enemyLosses),
+	$helots -= Math.trunc(($helots / $ASlaves) * $enemyLosses),
+	$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * $enemyLosses),
+	$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * $enemyLosses)>>
 	<<if $battleResult == 3>>
 		<<if $battleTurns <= 5>>
 			The fight was quick and one sided, our men easily stopped the disorganized revolt in a few well aimed assaults.
@@ -219,28 +257,32 @@
 		<<set $rep += random(800,1000)>>
 		<<set $authority += random(800,1000)>>
 		<br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days.
-		<<set $ACitizens -= random(10,30)>>
+		<<set $lowerClass -= random(10,30)>>
 	<<elseif $battleResult == -3>>
 		Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased.
 		<<set $rep -= random(800,1000)>>
 		<<set $authority -= random(800,1000)>>
 		<br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time.
-		<<set $ACitizens -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>>
+		<<set $lowerClass -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>>
 		<<set $rebelDefeatAftermath = 5>>
 	<<elseif $battleResult == -2>>
 		Due to your defeat, your @@.red;reputation@@ and @@.red;authority@@ decreased.
 		<<set $rep -= random(600,800)>>
 		<<set $authority -= random(600,800)>>
 		<br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time.
-		<<set $ACitizens -= random(40,80)>>
-		<<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.6)>>
+		<<set $lowerClass -= random(40,80)>>
+		<<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.6),
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $rebelDefeatAftermath = 3>>
 	<<elseif $battleResult == 2>>
 		Thanks to your victory, your @@.green;reputation@@ and @@.darkviolet;authority@@ increased.
 		<<set $rep += random(600,180)>>
 		<<set $authority += random(600,800)>>
 		<br>Many of the rebelling citizens were captured and punished, many others enslaved. The instigators were executed one after another in a public trial that lasted for almost three days.
-		<<set $ASlaves -= random(10,30)>>
+		<<set $NPCSlaves -= random(10,30)>>
 	<<elseif $battleResult == -1>>
 		Rather than waste the lives of your men you decided to surrender, hoping the rebels will cause less damage if you indulge them, this is however a big hit to your status. Your @@.red;reputation@@ and @@.red;authority@@ are significantly impacted.
 		<<set $rep -= random(1000,1200)>>
@@ -249,29 +291,53 @@
 		The surrender allows the arcology to survive @@.yellow;mostly intact@@, however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
 		<<set $cash -= 1000>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(100)>>
-			<<set $ASlaves -= random(150)>>
+			<<set $lowerClass -= random(100)>>
+			<<set _lostSlaves = random(150),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(5)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(120)>>
-			<<set $ASlaves -= random(170)>>
+			<<set $lowerClass -= random(120)>>
+			<<set _lostSlaves = random(170),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(10)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(140)>>
-			<<set $ASlaves -= random(190)>>
+			<<set $lowerClass -= random(140)>>
+			<<set _lostSlaves = random(190),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(15)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(160)>>
-			<<set $ASlaves -= random(210)>>
+			<<set $lowerClass -= random(160)>>
+			<<set _lostSlaves = random(210),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(20)>>
 		<<else>>
-			<<set $ACitizens -= random(180)>>
-			<<set $ASlaves -= random(230)>>
+			<<set $lowerClass -= random(180)>>
+			<<set _lostSlaves = random(230),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(25)>>
 		<</if>>
 		<br>After the battle most of the rebelling citizens remained in the arcology for days looting and hunting their former arcology. We will bear the scars of this day for a long time.
-		<<set $ACitizens -= random(50,100)>>
-		<<set $ASlaves -= Math.trunc(($attackTroops - $enemyLosses) * 0.8)>>
+		<<set $lowerClass -= random(50,100)>>
+		<<set _lostSlaves = Math.trunc(($attackTroops - $enemyLosses) * 0.8),
+		$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+		$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+		$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+		$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 		<<set $rebelDefeatAftermath = 5>>
 	<</if>>
 <</if>>
@@ -283,24 +349,44 @@
 		A few businesses were looted and burned, but the damage was pretty limited.
 		<<set $arcRepairTime += 3, $PC.engineering += .1>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(40)>>
-			<<set $ASlaves -= random(65)>>
+			<<set $lowerClass -= random(40)>>
+			<<set _lostSlaves = random(65),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(2)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(50)>>
-			<<set $ASlaves -= random(55)>>
+			<<set $lowerClass -= random(50)>>
+			<<set _lostSlaves = random(75),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(5)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(60)>>
-			<<set $ASlaves -= random(85)>>
+			<<set $lowerClass -= random(60)>>
+			<<set _lostSlaves = random(85),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(7)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(70)>>
-			<<set $ASlaves -= random(95)>>
+			<<set $lowerClass -= random(70)>>
+			<<set _lostSlaves = random(95),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(10)>>
 		<<else>>
-			<<set $ACitizens -= random(80)>>
-			<<set $ASlaves -= random(105)>>
+			<<set $lowerClass -= random(80)>>
+			<<set _lostSlaves = random(105),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(12)>>
 		<</if>>
 	<<elseif $engageRule == 1>>
@@ -308,24 +394,44 @@
 		A few businesses were looted and burned, but the damage was pretty limited.
 		<<set $arcRepairTime += 5, $PC.engineering += .1>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(60)>>
-			<<set $ASlaves -= random(85)>>
+			<<set $lowerClass -= random(60)>>
+			<<set _lostSlaves = random(85),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(4)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(70)>>
-			<<set $ASlaves -= random(75)>>
+			<<set $lowerClass -= random(70)>>
+			<<set _lostSlaves = random(95),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(7)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(80)>>
-			<<set $ASlaves -= random(105)>>
+			<<set $lowerClass -= random(80)>>
+			<<set _lostSlaves = random(105),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(9)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(90)>>
-			<<set $ASlaves -= random(115)>>
+			<<set $lowerClass -= random(90)>>
+			<<set _lostSlaves = random(115),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(12)>>
 		<<else>>
-			<<set $ACitizens -= random(100)>>
-			<<set $ASlaves -= random(125)>>
+			<<set $lowerClass -= random(100)>>
+			<<set _lostSlaves = random(125),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(14)>>
 		<</if>>
 	<<elseif $engageRule == 2>>
@@ -333,24 +439,44 @@
 		Many businesses were damaged during the battle either by the fight itself, by fires which spread unchecked for hours or by looters.
 		<<set $arcRepairTime += 7, $PC.engineering += .1>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(100)>>
-			<<set $ASlaves -= random(150)>>
+			<<set $lowerClass -= random(100)>>
+			<<set _lostSlaves = random(150),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(5)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(120)>>
-			<<set $ASlaves -= random(170)>>
+			<<set $lowerClass -= random(120)>>
+			<<set _lostSlaves = random(170),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(10)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(140)>>
-			<<set $ASlaves -= random(190)>>
+			<<set $lowerClass -= random(140)>>
+			<<set _lostSlaves = random(190),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(15)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(160)>>
-			<<set $ASlaves -= random(210)>>
+			<<set $lowerClass -= random(160)>>
+			<<set _lostSlaves = random(210),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(20)>>
 		<<else>>
-			<<set $ACitizens -= random(180)>>
-			<<set $ASlaves -= random(230)>>
+			<<set $lowerClass -= random(180)>>
+			<<set _lostSlaves = random(230),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(25)>>
 		<</if>>
 	<<else>>
@@ -359,33 +485,53 @@
 		<<set $arcRepairTime += 2, $PC.engineering += .1>>
 		<<set $cash -= 1000>>
 		<<if $week <= 30>>
-			<<set $ACitizens -= random(20)>>
-			<<set $ASlaves -= random(45)>>
+			<<set $lowerClass -= random(20)>>
+			<<set _lostSlaves = random(45),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(2)>>
 		<<elseif $week <= 60>>
-			<<set $ACitizens -= random(30)>>
-			<<set $ASlaves -= random(35)>>
+			<<set $lowerClass -= random(30)>>
+			<<set _lostSlaves = random(55),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(4)>>
 		<<elseif $week <= 90>>
-			<<set $ACitizens -= random(40)>>
-			<<set $ASlaves -= random(65)>>
+			<<set $lowerClass -= random(40)>>
+			<<set _lostSlaves = random(65),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(6)>>
 		<<elseif $week <= 120>>
-			<<set $ACitizens -= random(50)>>
-			<<set $ASlaves -= random(75)>>
+			<<set $lowerClass -= random(50)>>
+			<<set _lostSlaves = random(75),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(8)>>
 		<<else>>
-			<<set $ACitizens -= random(60)>>
-			<<set $ASlaves -= random(85)>>
+			<<set $lowerClass -= random(60)>>
+			<<set _lostSlaves = random(85),
+			$NPCSlaves -= Math.trunc(($NPCSlaves / $ASlaves) * _lostSlaves),
+			$helots -= Math.trunc(($helots / $ASlaves) * _lostSlaves),
+			$fuckdolls -= Math.trunc(($fuckdolls / $ASlaves) * _lostSlaves),
+			$menialBioreactors -= Math.trunc(($menialBioreactors / $ASlaves) * _lostSlaves)>>
 			<<set $arcologies[0].prosperity -= random(10)>>
 		<</if>>
 	<</if>>
 <</if>>
-<<if $ACitizens < 100>>
-	<<set $ACitizens = 100>>
+<<if $lowerClass < 0>>
+	<<set $lowerClass = 0>>
 <</if>>
-<<if $ASlaves < 200>>
-	<<set $ASlaves = 200>>
+<<if $NPCSlaves < 0>>
+	<<set $NPCSlaves = 0>>
 <</if>>
 
 /* garrisons */
diff --git a/src/SecExp/secExpOptions.tw b/src/SecExp/secExpOptions.tw
index 1e0eae270ceedb2af9fe5090270dde3a50151ad2..122cc3d12702e3572ec949082fa58f2de91019b9 100644
--- a/src/SecExp/secExpOptions.tw
+++ b/src/SecExp/secExpOptions.tw
@@ -494,15 +494,21 @@ __Debug/cheats:__
 	<<set $mercFreeManpower = Math.clamp($mercFreeManpower - 30, 0, $mercFreeManpower)>>
 	<<recalcManpower>>
 <</link>>
-<br><<link "Add citizens" "secExpOptions">>
-	<<set $ACitizens = Math.clamp($ACitizens + 200, 0, $ACitizenLimit)>>
-<</link>> | <<link "Remove citizens" "secExpOptions">>
-	<<set $ACitizens = Math.clamp($ACitizens - 200, 0, $ACitizenLimit)>>
+<br><<link "Add citizens" "secExpOptions">> /*Will no longer work as intended due to population changes*/
+	<<set $lowerClass += 200>>
+<</link>> | <<link "Remove citizens" "secExpOptions">> /*also no longer properly functional*/
+	<<set $lowerClass -= 200>>
+	<<if $lowerClass < 0>>
+		<<set $lowerClass = 0>>
+	<</if>>
 <</link>>
-<br><<link "Add slaves" "secExpOptions">>
-	<<set $ASlaves = Math.clamp($ASlaves + 200, 0, $ASlaveLimit)>>
-<</link>> | <<link "Remove slaves" "secExpOptions">>
-	<<set $ASlaves = Math.clamp($ASlaves - 200, 0, $ASlaveLimit)>>
+<br><<link "Add slaves" "secExpOptions">> /*Will work to a limited degree, minimums and maximums for slaves are set through population*/
+	<<set $NPCSlaves += 200>>
+<</link>> | <<link "Remove slaves" "secExpOptions">> /*Will work to a limited degree*/
+	<<set $NPCSlaves -= 200>>
+	<<if $NPCSLaves < 0>>
+		<<set $NPCSlaves = 0>>
+	<</if>>
 <</link>>
 <br><<link "Raise prosperity" "secExpOptions">>
 	<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity + 10, 0, 1000)>>
diff --git a/src/cheats/mod_EditArcologyCheat.tw b/src/cheats/mod_EditArcologyCheat.tw
index 473019194ebad182fae4cbaf010009dfd4f60dfe..f109b003da949e284110d9a61cd6fde14f320e39 100644
--- a/src/cheats/mod_EditArcologyCheat.tw
+++ b/src/cheats/mod_EditArcologyCheat.tw
@@ -186,14 +186,8 @@ International slave variety is
 <</if>>
 <</nobr>>*/
 
-<br><br>Arcology citizens: <<print commaNum($ACitizens)>>
-<<textbox "$ACitizens" $ACitizens>>
-<br>Arcology citizen limit: <<print commaNum($ACitizenLimit)>>
-<<textbox "$ACitizenLimit" $ACitizenLimit>>
-<br>Arcology sex slaves: <<print commaNum($ASlaves)>>
-<<textbox "$ASlaves" $ASlaves>>
-<br>Arcology sex slave limit: <<print commaNum($ASlaveLimit)>>
-<<textbox "$ASlaveLimit" $ASlaveLimit>>
+<br>Arcology sex slaves: <<print commaNum($NPCSlaves)>>
+<<textbox "$NPCSlaves" $NPCSlaves>>
 <br>Arcology prosperity: $arcologies[0].prosperity
 <<textbox "$arcologies[0].prosperity" $arcologies[0].prosperity>>
 <br>Arcology prosperity cap: $AProsperityCap
diff --git a/src/events/intro/initNationalities.tw b/src/events/intro/initNationalities.tw
index 363fea53a269147a965087ad6172667f406933c3..1d6c358681d67d567df33eb3d04d12ab6747c4c5 100644
--- a/src/events/intro/initNationalities.tw
+++ b/src/events/intro/initNationalities.tw
@@ -144,6 +144,11 @@
 			<<if $PC.rumor == "social engineering">>
 				<<set $FSGotRepCredits += 1>>
 			<</if>>
+		<<else>>
+			<<set $activeArcology.honeymoon = 20>>
+			<<if $PC.rumor == "social engineering">>
+				<<set $FSGotRepCredits += 1>>
+			<</if>>
 		<</if>>
 	<<else>>
 		<<if $i < 4>> /* X-4 is reserved for player's arcology, so X-1 is available */
diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index b036969187bf46515a7338d103fca24528da5445..b31f740bfcb4ccbcbb249d0063935e45035bb4c9 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -307,6 +307,7 @@ You should have received a copy of the GNU General Public License along with thi
 	/* Pregmod specific */
 	<<set $economy = 100>>
 	<<set $econRate = 2>>
+	<<set $antiWeatherFreeze = 0>>
 	<<set $difficultySwitch = 0>>
 	<<set $econWeatherDamage = 0>>
 	<<set $disasterResponse = 0>>
@@ -1052,10 +1053,33 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $arcologyUpgrade = {drones: 0, hydro: 0, apron: 0, grid: 0, spire: 0}>>
 
 <<set $AGrowth = 2>>
-<<set $ACitizens = 4000>>
-<<set $ACitizenLimit = 4800>>
-<<set $ASlaves = 1000>>
-<<set $ASlaveLimit = 12000>>
+<<set $ACitizens = 4250>>
+<<set $lowerClass = 3120>>
+<<set $LSCBase = 800>>
+<<set $visitors = 0>>
+<<set $welfare = 0.004>>
+<<set $rentEffectL = 1>>
+<<set $LCRent = 20>>
+<<set $middleClass = 890>>
+<<set $MCBase = 200>>
+<<set $rentEffectM = 1>>
+<<set $MCRent = 50>>
+<<set $upperClass = 200>>
+<<set $UCBase = 40>>
+<<set $rentEffectU = 1>>
+<<set $UCRent = 175>>
+<<set $topClass = 40>>
+<<set $TCBase = 20>>
+<<set $rentEffectT = 1>>
+<<set $TCRent = 650>>
+<<set $GDP = 278.6>>
+<<set $NPCSlaves = 900>>
+<<set $ASlaves = 900>>
+<<set $slaveDemandU = 2>>
+<<set $slaveDemandT = 12>>
+<<set $slaveProductivity = 0.8>>
+<<set $enslaveChance = 0.2>>
+<<set $slaveExpiration = 0.005>>
 <<set $AProsperityCap = 120>>
 
 <<set $sectors = [
@@ -1168,6 +1192,9 @@ DairyRestraintsSetting($dairyRestraintsSetting)
 <<set $BioreactorRetirement = 0>>
 <<set $ArcadeRetirement = 0>>
 <<set $CitizenRetirement = 0>>
+<<set $CitizenRetirementTrigger = 0>>
+<<set $FSSupLawTrigger = 0>>
+<<set $FSSubLawTrigger = 0>> 
 <<set $SexMilestoneRetirement = 0>>
 <<set $MilkMilestoneRetirement = 0>>
 <<set $CumMilestoneRetirement = 0>>
diff --git a/src/js/datatypeCleanupJS.tw b/src/js/datatypeCleanupJS.tw
index c45b2a15167cdf22a6d89bd6e6839d7cc4fa1948..5ee785eb3b705cf5e21275fc657cfa1485c4b326 100644
--- a/src/js/datatypeCleanupJS.tw
+++ b/src/js/datatypeCleanupJS.tw
@@ -1195,9 +1195,7 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() {
 	const V = State.variables;
 	
 	V.ACitizens = Math.max(+V.ACitizens, 0) || 0;
-	V.ACitizenLimit = Math.max(+V.ACitizenLimit, 0) || 0;
 	V.ASlaves = Math.max(+V.ASlaves, 0) || 0;
-	V.ASlaveLimit = Math.max(+V.ASlaveLimit, 0) || 0;
 	V.shelterAbuse = Math.max(+V.shelterAbuse, 0) || 0;
 	
 	V.arcologies[0].prosperity = Math.clamp(+V.arcologies[0].prosperity, 1, 300) || 1;
diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw
index ee5ec7ad47e0bef22cec5b2284df70409510b0a1..03e1955e6b3babfcd6819780988b92c5fe6fcc88 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economyJS.tw
@@ -15,7 +15,7 @@ window.getCost = function(array) {
 	var foodCost = State.variables.foodCost;
 	var drugsCost = State.variables.drugsCost;
 	var facilityCost = State.variables.facilityCost;
-	var economy = State.variables.economy;
+	var localEcon = State.variables.localEcon;
 	var brothel = State.variables.brothel;
 	var arcade = State.variables.arcade;
 	var club = State.variables.club;
@@ -124,7 +124,7 @@ window.getCost = function(array) {
 	}
 
 	//general arcology costs
-	costs += (State.variables.girls * (250 + (50000 / economy)));
+	costs += (State.variables.girls * (250 + (50000 / localEcon)));
 
 	if(State.variables.arcologies[0].FSRepopulationFocusLaw === 1 && State.variables.PC.pregKnown == 1) {
 		costs -= 500;
@@ -338,6 +338,9 @@ window.getCost = function(array) {
 	if(State.variables.econWeatherDamage && State.variables.disasterResponse > 0) {
 		costs += Math.trunc(State.variables.disasterResponse * 200000 / State.variables.localEcon);
 	}
+	if(State.variables.antiWeatherFreeze > 0) {
+		costs += Math.trunc(State.variables.antiWeatherFreeze * 200000 / State.variables.localEcon);
+	}
 	// clean up
 	if(costs < 0) {
 		costs = 0;
diff --git a/src/pregmod/manageEconomy.tw b/src/pregmod/manageEconomy.tw
index bb05654a2803365049580cb4e5ac9366f41f2906..2b223974a781e7d9857894056d224b2728863a49 100644
--- a/src/pregmod/manageEconomy.tw
+++ b/src/pregmod/manageEconomy.tw
@@ -1,6 +1,7 @@
 :: Manage Economy [nobr]
 
 <<if $difficultySwitch == 1>>
+__Economy__<br>
 	<span id="economy">
 		@@.yellowgreen;Global Economy@@
 	| <<print $economy>>
@@ -38,12 +39,12 @@
 	<br> The current score is 
 	<<if $localEcon > 100>>
 		<<set _econPercent = Math.trunc(1000-100000/$localEcon)/10>>
-		reducing prices by @@.green;''<<print _econPercent>> %.''@@
+		reducing prices by @@.green;''<<print _econPercent>>%.''@@
 	<<elseif $localEcon == 100>>
 		equal to the base score. There are no price modifications.
 	<<else>>
 		<<set _econPercent = Math.trunc(100000/$localEcon-1000)/10>>
-		increasing prices by @@.red;''<<print _econPercent>> %.''@@
+		increasing prices by @@.red;''<<print _econPercent>>%.''@@
 	<</if>>
 	<<if $econWeatherDamage > 0>>
 		<br><br>The recent terrible weather has damaged the local infrastructure. It is @@.red;reducing the local economy score by <<print $econWeatherDamage>>.@@
@@ -57,11 +58,85 @@
 			<br>Your highly capable disaster response unit is rapidly repairing the weather damage.
 		<</if>>
 	<<elseif $disasterResponse > 0>>
-		<br><br>Your disaster response unit is idle. It won't cost you any upkeep this week.
+		<br><br>Your disaster response unit is idle. It will not cost you any upkeep this week.
 	<</if>>
 <br><br>	
 <</if>>
 
+__Population and Rent__<br>
+<<print $arcologies[0].name>> is home to the following;
+<<set _percACitizens = Math.trunc(($ACitizens / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percASlaves = Math.trunc(($ASlaves / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percLowerClass = Math.trunc(($lowerClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percMiddleClass = Math.trunc(($middleClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percUpperClass = Math.trunc(($upperClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>>
+<br>Lower Class Citizens  | $lowerClass | <<print _percLowerClass>>% | Rent @@.yellowgreen;<<print cashFormat($LCRent)>>@@ 
+<<if $LCRent > 30>>
+	//Very High// | [[Decrease|Manage Economy][$LCRent = 30, $rentEffectL = 0.94]]
+<<elseif $LCRent > 20>>
+	//High// | [[Increase|Manage Economy][$LCRent = 40, $rentEffectL = 0.85]] | [[Decrease|Manage Economy][$LCRent = 20, $rentEffectL = 1]]
+<<elseif $LCRent > 10>>
+	//Average// | [[Increase|Manage Economy][$LCRent = 30, $rentEffectL = 0.94]] | [[Decrease|Manage Economy][$LCRent = 10, $rentEffectL = 1.04]]
+<<elseif $LCRent > 0>>
+	//Low// | [[Increase|Manage Economy][$LCRent = 20, $rentEffectL = 1]] | [[Free Rent|Manage Economy][$LCRent = 0, $rentEffectL = 1.1]]
+<<else>>
+	//Free// | [[Increase|Manage Economy][$LCRent = 10, $rentEffectL = 1.04]]
+<</if>>
+<br>Middle Class Citizens | $middleClass | <<print _percMiddleClass>>% | Rent @@.yellowgreen;<<print cashFormat($MCRent)>>@@
+<<if $MCRent > 75>>
+	//Very High// | [[Decrease|Manage Economy][$MCRent = 75, $rentEffectM = 0.94]]
+<<elseif $MCRent > 50>>
+	//High// | [[Increase|Manage Economy][$MCRent = 100, $rentEffectM = 0.85]] | [[Decrease|Manage Economy][$MCRent = 50, $rentEffectM = 1]]
+<<elseif $MCRent > 25>>
+	//Average// | [[Increase|Manage Economy][$MCRent = 75, $rentEffectM = 0.94]] | [[Decrease|Manage Economy][$MCRent = 25, $rentEffectM = 1.04]]
+<<elseif $MCRent > 0>>
+	//Low// | [[Increase|Manage Economy][$MCRent = 20, $rentEffectM = 1]] | [[Free Rent|Manage Economy][$MCRent = 0, $rentEffectM = 1.1]]
+<<else>>
+	//Free// | [[Increase|Manage Economy][$LCRent = 10, $rentEffectL = 1.04]]
+<</if>>
+<br>Upper Class Citizens  | $upperClass | <<print _percUpperClass>>% | Rent @@.yellowgreen;<<print cashFormat($UCRent)>>@@
+<<if $UCRent > 270>>
+	//Very High// | [[Decrease|Manage Economy][$UCRent = 270, $rentEffectU = 0.94]]
+<<elseif $UCRent > 180>>
+	//High// | [[Increase|Manage Economy][$UCRent = 360, $rentEffectU = 0.85]] | [[Decrease|Manage Economy][$UCRent = 180, $rentEffectU = 1]]
+<<elseif $UCRent > 90>>
+	//Average// | [[Increase|Manage Economy][$UCRent = 270, $rentEffectU = 0.94]] | [[Decrease|Manage Economy][$UCRent = 90, $rentEffectU = 1.04]]
+<<elseif $UCRent > 0>>
+	//Low// | [[Increase|Manage Economy][$UCRent = 180, $rentEffectU = 1]] | [[Free Rent|Manage Economy][$UCRent = 0, $rentEffectU = 1.1]]
+<<else>>
+	//Free// | [[Increase|Manage Economy][$UCRent = 90, $rentEffectU = 1.04]]
+<</if>>
+<br>Millionaires          | $topClass | <<print _percTopClass>>% | Rent @@.yellowgreen;<<print cashFormat($TCRent)>>@@
+<<if $TCRent > 975>>
+	//Very High// | [[Decrease|Manage Economy][$TCRent = 975, $rentEffectT = 0.94]]
+<<elseif $TCRent > 650>>
+	//High// | [[Increase|Manage Economy][$TCRent = 1300, $rentEffectT = 0.85]] | [[Decrease|Manage Economy][$TCRent = 650, $rentEffectT = 1]]
+<<elseif $TCRent > 325>>
+	//Average// | [[Increase|Manage Economy][$TCRent = 975, $rentEffectT = 0.94]] | [[Decrease|Manage Economy][$TCRent = 325, $rentEffectT = 1.04]]
+<<elseif $TCRent > 0>>
+	//Low// | [[Increase|Manage Economy][$TCRent = 650, $rentEffectT = 1]] | [[Free Rent|Manage Economy][$TCRent = 0, $rentEffectT = 1.1]]
+<<else>>
+	//Free// | [[Increase|Manage Economy][$TCRent = 325, $rentEffectT = 1.04]]
+<</if>>
+<br>Slaves                | $ASlaves | <<print _percASlaves>>% /*should probably include player owned slaves of all types*/
+
+<<if $secExp == 0>>
+	<<if $weatherAwareness > 0>>
+		<<if $antiWeatherFreeze == 0>>
+			<br><br>The extreme weather hurts your arcology's ability to function. Reinforcing your passenger terminals increase the weather range at which they can operate.<br>
+			Reinforcing passenger terminals costs <<print cashFormat(50000)>> and increase upkeep. [[Reinforce|Manage Economy][$antiWeatherFreeze = 1, $cash -= 50000]]
+		<<elseif $antiWeatherFreeze == 1>>
+			<br><br>You have reinforced your passenger terminals to function even during bad weather. You can invest into all-weather transportation to remain functional no matter what.<br>
+			Investing in all-weather transportation costs <<print cashFormat(100000)>> and increase upkeep. [[Invest|Manage Economy][$antiWeatherFreeze = 2, $cash -= 100000]]
+		<<elseif $antiWeatherFreeze == 2>>
+			<br><br>Your arcology's passenger terminals remain fully operational even during the most extreme weather.			
+		<</if>>
+	<</if>>
+<</if>>
+<br><br>
+
+__Slaves__<br>
 Slave demand is 
 <<if $menialDemandFactor <= -35000>>
 	@@.red;''extremely low''@@
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index 9fea8d86b7b0de554dd787167c64bd90a4f5bc8c..334a54bdcaedc16caf903e30a4e8bc71eed1e817 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -2605,6 +2605,15 @@ Setting missing global variables:
 <<if ndef $CitizenRetirement>>
 <<set $CitizenRetirement = 0>>
 <</if>>
+<<if ndef $CitizenRetirementTrigger>>
+<<set $CitizenRetirementTrigger = 0>>
+<</if>>
+<<if ndef $FSSupLawTrigger>>
+<<set $FSSupLawTrigger = 0>>
+<</if>>
+<<if ndef $FSSubLawTrigger>>
+<<set $FSSubLawTrigger = 0>>
+<</if>>
 <<if def $manuallyRetired>>
 <<unset $manuallyRetired>>
 <</if>>
@@ -2783,6 +2792,86 @@ Setting missing global variables:
 <<if $economy == 1.5>>
 	<<set $economy = 67>>
 <</if>>
+<<if ndef $NPCSlaves>>
+	<<set $NPCSlaves = $ASlaves,
+	$ASlaves += $helots + $fuckdolls + $menialBioreactors>>
+<</if>>
+<<if def $ACitizenLimit || def $ASlaveLimit>>
+	<<set $ACitizenLimit = "unset",
+	$ASlaveLimit = "unset">>
+<</if>>
+<<if ndef $lowerClass>>
+	<<set $lowerClass = 3120>>
+<</if>>
+<<if ndef $LSCBase>>
+	<<set $LSCBase = 800>>
+<</if>>
+<<if ndef $welfare>>
+	<<set $welfare = 0.004>>
+<</if>>
+<<if ndef $rentEffectL>>
+	<<set $rentEffectL = 1>>
+<</if>>
+<<if ndef $LCRent>>
+	<<set $LCRent = 20>>
+<</if>>
+<<if ndef $middleClass>>
+	<<set $middleClass = 890>>
+<</if>>
+<<if ndef $MCBase>>
+	<<set $MCBase = 200>>
+<</if>>
+<<if ndef $rentEffectM>>
+	<<set $rentEffectM = 1>>
+<</if>>
+<<if ndef $MCRent>>
+	<<set $MCRent = 50>>
+<</if>>
+<<if ndef $upperClass>>
+	<<set $upperClass = 200>>
+<</if>>
+<<if ndef $UCBase>>
+	<<set $UCBase = 40>>
+<</if>>
+<<if ndef $rentEffectU>>
+	<<set $rentEffectU = 1>>
+<</if>>
+<<if ndef $UCRent>>
+	<<set $UCRent = 175>>
+<</if>>
+<<if ndef $topClass>>
+	<<set $topClass = 38>>
+<</if>>
+<<if ndef $TCBase>>
+	<<set $TCBase = 20>>
+<</if>>
+<<if ndef $rentEffectT>>
+	<<set $rentEffectT = 1>>
+<</if>>
+<<if ndef $TCRent>>
+	<<set $TCRent = 650>>
+<</if>>
+<<if ndef $GDP>>
+	<<set $GDP = 278.6>>
+<</if>>
+<<if ndef $slaveDemandU>>
+	<<set $slaveDemandU = 2>>
+<</if>>
+<<if ndef $slaveDemandT>>
+	<<set $slaveDemandT = 12>>
+<</if>>
+<<if ndef $slaveProductivity>>
+	<<set $slaveProductivity = 0.8>>
+<</if>>
+<<if ndef $enslaveChance>>
+	<<set $enslaveChance = 0.2>>
+<</if>>
+<<if ndef $slaveExpiration>>
+	<<set $slaveExpiration = 0.005>>
+<</if>>
+<<if ndef $antiWeatherFreeze>>
+	<<set $antiWeatherFreeze = 0>>
+<</if>>
 
 <<run ArcologyDatatypeCleanup()>>
 
diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw
index cd5c8b0f5d0573708dee067cb7fb018903db7eae..8ac9985a6f9d1654a277ac20463a8ad989422a3e 100644
--- a/src/uncategorized/arcmgmt.tw
+++ b/src/uncategorized/arcmgmt.tw
@@ -3,192 +3,839 @@
 <<if $useTabs == 0>>__Arcology Management__<</if>>
 <br>
 
-<<set _flux = random(20,40)>>
+/* New Population 
+Populations depend on the 'demand' for them. People flock to the Free City when there are jobs. Jobs for lower class people depend on prosperity and the need for labor from other classes. They compete with slaves for work. 
+More elite citizens require their own slaves and will cause the population of slaves to increase as they move in. FS and policies will impact how many slaves they desire and how productive they are. The PC's menials also compete for labor within the arcology. Slaves can now 'expire', speed depends on FS and policies. Default lifespan for menials is an average of ~4 years. */
+
+<<set $oldACitizens = $ACitizens,
+_oldASlaves = $ASlaves, 
+_oldLowerClass = $lowerClass, /*debugging stuff, perhaps worth keeping if polished*/
+_oldMiddleClass = $middleClass,
+_oldUpperClass = $upperClass,
+_oldTopClass = $topClass,
+_FSScore = 0, /*FS progress for tourism*/
+_slaveDemandU = 1, /*Changes to upperclass slave demand*/
+_slaveDemandT = 1, /*Changes to topclass slave demand*/
+_expirationFS = 1, /*changes to likelyhood of slave death*/
+_slaveProductivity = 0, /*changes to slave productivity*/
+_lowerClass = 0, /*fixed amount of changes to lowerclass interest to move in*/
+_lowerClassP = 1, /*scaling changes to lowerclass interest ("stacking bonus")*/
+_welfareFS = 1, /*changes to likelyhood of lowerclass getting enslaved*/
+_middleClass = 0, /*see lowerclass examples for the rest of these*/
+_middleClassP = 1,
+_upperClass = 0,
+_upperClassP = 1,
+_topClass = 0,
+_topClassP = 1>>
+<<if $arcologies[0].FSSupremacist != "unset">>
+	<<set _FSScore += $arcologies[0].FSSupremacist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * 0.05,
+	_lowerClass += Math.trunc($arcologies[0].FSSupremacist / 20) * -80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * -0.004,
+	_middleClass += Math.trunc($arcologies[0].FSSupremacist / 20) * -16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSSupremacist / 20) * 5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSSupremacist / 20) * 2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSSupremacist / 20) * 0.004>>
+	Your racial policies are concentrating power in the hands of $arcologies[0].FSSupremacistRace people. /*perhaps too obvious to bother with printing?*/
+<</if>>
+<<if $arcologies[0].FSSubjugationist != "unset">>
+	<<set _FSScore += $arcologies[0].FSSubjugationist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * 0.05,
+	_lowerClass += Math.trunc($arcologies[0].FSSubjugationist / 20) * -80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * -0.004,
+	_middleClass += Math.trunc($arcologies[0].FSSubjugationist / 20) * -16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSSubjugationist / 20) * 5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSSubjugationist / 20) * 2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSSubjugationist / 20) * 0.004>>
+	Your racial policies are stripping all power from the $arcologies[0].FSSubjugationistRace people. /*perhaps too obvious to bother with printing?*/
+<</if>>
+<<if $arcologies[0].FSGenderRadicalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSGenderRadicalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSGenderRadicalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSGenderRadicalist / 20) * 0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSGenderRadicalist / 20) * -40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSGenderRadicalist / 20) * -0.002,
+	_topClass += Math.trunc($arcologies[0].FSGenderRadicalist / 20),
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSGenderRadicalist / 20) * 0.002>>
+	Your radical views on gender are scaring away the more traditionally minded.
+<</if>>
+<<if $arcologies[0].FSGenderFundamentalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSGenderFundamentalist,
+	_lowerClass += Math.trunc($arcologies[0].FSGenderFundamentalist / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSGenderFundamentalist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSGenderFundamentalist / 20) * -1,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSGenderFundamentalist / 20) * -0.002>>
+	Your traditional views on gender are comforting to many, unimaginative to some.
+<</if>>
 <<if $arcologies[0].FSPaternalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSPaternalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.05,
+	_expirationFS *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.1,
+	_slaveProductivity += Math.trunc($arcologies[0].FSPaternalist / 20) * 0.02,
+	_lowerClass += Math.trunc($arcologies[0].FSPaternalist / 20) * 80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * 0.004,
+	_welfareFS *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.1,
+	_middleClass += Math.trunc($arcologies[0].FSPaternalist / 20) * 16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * 0.002,
+	_upperClass += Math.trunc($arcologies[0].FSPaternalist / 20) * -5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.002,
+	_topClass += Math.trunc($arcologies[0].FSPaternalist / 20) * -2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSPaternalist / 20) * -0.002>>
 	Poor citizens can rely on their better-off peers in $arcologies[0].name.
-	<<set _flux -= Math.trunc($arcologies[0].FSPaternalist/10)>>
-<<elseif $arcologies[0].FSDegradationist != "unset">>
+<</if>>
+<<if $arcologies[0].FSDegradationist != "unset">>
+	<<set _FSScore += $arcologies[0].FSDegradationist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.05,
+	_expirationFS *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.1,
+	_slaveProductivity += Math.trunc($arcologies[0].FSDegradationist / 20) * 0.01,
+	_lowerClass += Math.trunc($arcologies[0].FSDegradationist / 20) * -80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * -0.004,
+	_welfareFS *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.1,
+	_middleClass += Math.trunc($arcologies[0].FSDegradationist / 20) * -16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSDegradationist / 20) * 5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSDegradationist / 20) * 2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.004>>
 	The arcology is a cutthroat place in which falling into slavery is very easy.
-	<<set _flux += Math.trunc($arcologies[0].FSDegradationist/10)>>
 <</if>>
-<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
-	Egyptian Revivalism is benevolent in some ways, and charity is common here.
-	<<set _flux -= Math.trunc($arcologies[0].FSEgyptianRevivalist/10)>>
-<<elseif $arcologies[0].FSRomanRevivalist != "unset">>
-	Your citizens take pride in looking after each other.
-	<<set _flux -= Math.trunc($arcologies[0].FSRomanRevivalist/10)>>
+<<if $arcologies[0].FSBodyPurist != "unset">>
+	<<set _FSScore += $arcologies[0].FSBodyPurist,
+	_lowerClass += Math.trunc($arcologies[0].FSBodyPurist / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSBodyPurist / 20) * 0.002,
+	_upperClass += Math.trunc($arcologies[0].FSBodyPurist / 20) * -2.7,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSBodyPurist / 20) * -0.001,
+	_topClass += Math.trunc($arcologies[0].FSBodyPurist / 20) * -0.5,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSBodyPurist / 20) * -0.001>>
+	Body purist fashion standards comfort the poor stand as they stand out less from their more fortunate neighbors.
+<</if>>
+<<if $arcologies[0].FSTransformationFetishist != "unset">>
+	<<set _FSScore += $arcologies[0].FSTransformationFetishist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSTransformationFetishist / 20) * -40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSTransformationFetishist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 2.7,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 0.001,
+	_topClass += Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 0.5,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSTransformationFetishist / 20) * 0.001>>
+	The lower class fear the kind of transformations could be forced on them if they ever end up enslaved, whereas the rich enjoy weilding such power.
+<</if>>
+<<if $arcologies[0].FSYouthPreferentialist != "unset">>
+	<<set _FSScore += $arcologies[0].FSYouthPreferentialist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * 0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * 0.002,
+	_middleClass += Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * -5.4,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSYouthPreferentialist / 20) * -0.002>>
+	Preference for youth makes the young poor in your arcology feel appreciated despite their lack of wealth.
+<</if>>
+<<if $arcologies[0].FSMaturityPreferentialist != "unset">>
+	<<set _FSScore += $arcologies[0].FSMaturityPreferentialist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * 0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * -40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * -0.002,
+	_middleClass += Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * 5.4,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSMaturityPreferentialist / 20) * 0.002>>
+	Preference for maturity makes the middle class of your arcology feel like their experience is finally properly appreciated.
+<</if>>
+<<if $arcologies[0].FSSlimnessEnthusiast != "unset">>
+	<<set _FSScore += $arcologies[0].FSSlimnessEnthusiast>>
+<</if>>
+<<if $arcologies[0].FSAssetExpansionist != "unset">>
+	<<set _FSScore += $arcologies[0].FSAssetExpansionist>>
+<</if>>
+<<if $arcologies[0].FSPastoralist != "unset">>
+	<<set _FSScore += $arcologies[0].FSPastoralist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * 0.05,
+	_lowerClass += Math.trunc($arcologies[0].FSPastoralist / 20) * -80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * -0.004,
+	_middleClass += Math.trunc($arcologies[0].FSPastoralist / 20) * 16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * 0.002,
+	_upperClass += Math.trunc($arcologies[0].FSPastoralist / 20) * 2.7,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * 0.001,
+	_topClass += Math.trunc($arcologies[0].FSPastoralist / 20) * 0.5,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSPastoralist / 20) * 0.001>>
+	The pastoralization of $arcologies[0].name spurs a whole industry around human produce.
+<</if>>
+<<if $arcologies[0].FSPhysicalIdealist != "unset">>
+	<<set _FSScore += $arcologies[0].FSPhysicalIdealist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.025,
+	_slaveProductivity += Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.01,
+	_lowerClass += Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * -40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 2.7,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.001,
+	_topClass += Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.5,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSPhysicalIdealist / 20) * 0.001>>
+	Fit slaves and citizens are more productive! However, your arcology's poor do not look forward to even more toil and sweat.
 <</if>>
 <<if $arcologies[0].FSChattelReligionist != "unset">>
+	<<set _FSScore += $arcologies[0].FSChattelReligionist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSChattelReligionist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSChattelReligionist / 20) * 0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSChattelReligionist / 20) * -40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSChattelReligionist / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSChattelReligionist / 20) * 2.7,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSChattelReligionist / 20) * 0.001,
+	_topClass += Math.trunc($arcologies[0].FSChattelReligionist / 20) * 0.5,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSChattelReligionist / 20) * 0.001>>
 	Chattel Religionism helps some poor citizens see slavery as a spiritually pure fate.
-	<<set _flux += Math.trunc($arcologies[0].FSChattelReligionist/10)>>
-<<elseif $arcologies[0].FSNull != "unset">>
+<</if>>
+<<if $arcologies[0].FSRomanRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSRomanRevivalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSRomanRevivalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSRomanRevivalist / 20) * 0.025,
+	_welfareFS *= 1 + Math.trunc($arcologies[0].FSRomanRevivalist / 20) * -0.05, 
+	_lowerClass += Math.trunc($arcologies[0].FSRomanRevivalist / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSRomanRevivalist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSRomanRevivalist / 20) * -5.4,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSRomanRevivalist / 20) * -0.002>>
+	Your citizens take pride in looking after each other.
+<</if>>
+<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSEgyptianRevivalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * 0.025,
+	_welfareFS *= 1 + Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * -0.05,
+	_lowerClass += Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * -5.4,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSEgyptianRevivalist / 20) * -0.002>>
+	Egyptian Revivalism is benevolent in some ways, and charity is common here.
+<</if>>
+<<if $arcologies[0].FSEdoRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSEdoRevivalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSEdoRevivalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSEdoRevivalist / 20) * 0.025>>
+<</if>>
+<<if $arcologies[0].FSArabianRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSArabianRevivalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSArabianRevivalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSArabianRevivalist / 20) * 0.025>>
+<</if>>
+<<if $arcologies[0].FSChineseRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSDegradationist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSDegradationist / 20) * 0.025>>
+<</if>>
+<<if $arcologies[0].FSAztecRevivalist != "unset">>
+	<<set _FSScore += $arcologies[0].FSAztecRevivalist,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSAztecRevivalist / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSAztecRevivalist / 20) * 0.025>>
+<</if>>
+<<if $arcologies[0].FSNull != "unset">>
+	<<set _FSScore += $arcologies[0].FSNull,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSNull / 20) * -0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSNull / 20) * -0.025,
+	_lowerClass += Math.trunc($arcologies[0].FSNull / 20) * 80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSNull / 20) * 0.004,
+	_middleClass += Math.trunc($arcologies[0].FSNull / 20) * 16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSNull / 20) * 0.002,
+	_upperClass += Math.trunc($arcologies[0].FSNull / 20) * -5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSNull / 20) * -0.002,
+	_topClass += Math.trunc($arcologies[0].FSNull / 20) * -2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSNull / 20) * -0.004>>
 	Your arcology's vibrant, open culture helps everyone succeed, preventing many struggling citizens from falling into slavery.
-	<<set _flux -= Math.trunc($arcologies[0].FSNull/5)>>
 <</if>>
-<<if $arcologies[0].FSPastoralist != "unset">>
-	The pastoralization of $arcologies[0].name helps concentrate wealth in the hands of a few.
-	<<set _flux += Math.trunc($arcologies[0].FSPastoralist/10)>>
+<<if $arcologies[0].FSRepopulationFocus != "unset">>
+	<<set _FSScore += $arcologies[0].FSRepopulationFocus,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 0.05,
+	_slaveProductivity += Math.trunc($arcologies[0].FSRepopulationFocus / 20) * -0.01,
+	_lowerClass += Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 0.004,
+	_middleClass += Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * 0.002,
+	_upperClass += Math.trunc($arcologies[0].FSRepopulationFocus / 20) * -5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * -0.002,
+	_topClass += Math.trunc($arcologies[0].FSRepopulationFocus / 20) * -2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSRepopulationFocus / 20) * -0.004>>
+	You've made repopulation a priority and the less fortunate hope all these new children will make their lives easier in the future, but the wealthy are wary.
+<</if>>
+<<if $arcologies[0].FSRestart != "unset">>
+	<<set _FSScore += $arcologies[0].FSRestart,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * 0.04,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * 0.05,
+	_lowerClass += Math.trunc($arcologies[0].FSRestart / 20) * -80,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * -0.004,
+	_middleClass += Math.trunc($arcologies[0].FSRestart / 20) * -16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSRestart / 20) * 5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * 0.002,
+	_topClass += Math.trunc($arcologies[0].FSRestart / 20) * 2,
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSRestart / 20) * 0.004>>
+	Highly restricted breeding pleases the powerful, but the less fortunate may seek reproductive freedom elsewhere.
+<</if>>
+<<if $arcologies[0].FSHedonisticDecadence != "unset">>
+	<<set _FSScore += $arcologies[0].FSHedonisticDecadence,
+	_slaveDemandU *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * 0.02,
+	_slaveDemandT *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * 0.025,
+	_slaveProductivity += Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * -0.01,
+	_lowerClass += Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * 40,
+	_lowerClassP *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * 0.002,
+	_middleClass += Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * -16,
+	_middleClassP *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * -0.002,
+	_upperClass += Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * -5.4,
+	_upperClassP *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * -0.002,
+	_topClass += Math.trunc($arcologies[0].FSHedonisticDecadence / 20),
+	_topClassP *= 1 + Math.trunc($arcologies[0].FSHedonisticDecadence / 20) * 0.002>>
+	Your citizens enjoy the pleasures of life to their fullest, but some prefer to earn these pleasures.
+<</if>>
+
+/*policies*/
+<<if $CitizenRetirement == 1>>
+	<<set _slaveDemandU *= 0.8,
+	_slaveDemandT *= 0.75,
+	_slaveProductivity += 0.05,
+	_expirationFS *= 0.8,
+	_lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_middleClass += 80,
+	_middleClassP *= 1.02,
+	_upperClass += -27,
+	_upperClassP *= 0.98,
+	_topClass += -5,
+	_topClassP *= 0.98>>
+<</if>>
+<<if $ProRefugees == 1>>
+	<<set _slaveDemandU *= 1.1,
+	_slaveDemandT *= 1.125>>
+<</if>>
+<<if $ProImmigrationCash == 1>>
+	<<set _lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_middleClass += 40,
+	_middleClassP *= 1.01,
+	_upperClass += -13.5,
+	_upperClassP *= 0.99,
+	_topClass += -5,
+	_topClass *= 0.98>>
+<</if>>
+<<if $ProImmigrationRep == 1>>
+	<<set _lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_middleClass += 40,
+	_middleClassP *= 1.01,
+	_upperClass += -13.5,
+	_upperClassP *= 0.99,
+	_topClass += -5,
+	_topClass *= 0.98>>
+<</if>>
+<<if $AntiImmigrationCash == 1>>
+	<<set _lowerClass += -200,
+	_lowerClassP *= 0.98,
+	_middleClass += -40,
+	_middleClassP *= 0.99,
+	_upperClass += 13.5,
+	_upperClassP *= 1.01,
+	_topClass += 5,
+	_topClass *= 1.02>>
+<</if>>
+<<if $AntiImmigrationRep == 1>>
+	<<set _lowerClass += -200,
+	_lowerClassP *= 0.98,
+	_middleClass += -40,
+	_middleClassP *= 0.99,
+	_upperClass += 13.5,
+	_upperClassP *= 1.01,
+	_topClass += 5,
+	_topClass *= 1.02>>
+<</if>>
+<<if $ProEnslavementCash == 1>>
+	<<set _slaveDemandU *= 1.1,
+	_slaveDemandT *= 1.125,
+	_lowerClass += -200,
+	_lowerClassP *= .98,
+	_topClass += 5,
+	_topClass *= 1.02>>
+<</if>>
+<<if $ProEnslavementRep == 1>>
+	<<set _slaveDemandU *= 1.1,
+	_slaveDemandT *= 1.125,
+	_lowerClass += -200,
+	_lowerClassP *= 0.98,
+	_topClass += 5,
+	_topClass *= 1.02>>
 <</if>>
 <<if $AntiEnslavementCash == 1>>
-	Your charity purse prevents a few citizens from falling into slavery.
-	<<set _flux -= 10>>
-<<elseif $ProEnslavementCash == 1>>
-	You @@.yellowgreen;take kickbacks@@ for ignoring enslavement of citizens.
-	<<set _flux += 10>>
-	<<set $cash += random(500,1500)>>
+	<<set _slaveDemandU *= 0.9,
+	_slaveDemandT *= 0.875,
+	_lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_topClass += -5,
+	_topClass *= 0.98>>
 <</if>>
 <<if $AntiEnslavementRep == 1>>
-	You use your personal influence to help struggling citizens.
-	<<set _flux -= 10, $rep -= 100>>
-<<elseif $ProEnslavementRep == 1>>
-	You @@.green;make friends@@ by tacitly supporting enslavement of upstart citizens.
-	<<set _flux += 10, $rep += 100>>
+	<<set _slaveDemandU *= 0.9,
+	_slaveDemandT *= 0.875,
+	_lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_topClass += -5,
+	_topClass *= 0.98>>
+<</if>>
+<<if $arcologies[0].FSSupremacistLawME == 1>>
+	<<set _slaveDemandU *= 2.2,
+	_slaveDemandT *= 2.5,
+	_lowerClass += -400,
+	_lowerClassP *= 0.96,
+	_middleClass += -80,
+	_middleClassP *= 0.98,
+	_upperClass += 27,
+	_upperClassP *= 1.02,
+	_topClass += 10,
+	_topClassP *= 1.04>>
+	<<if $FSSupLawTrigger == 1>>
+		<<set _slavesSupLaw = 0,
+		_slavesSupLaw += Math.trunc(($lowerClass + $middleClass + $upperClass) * 0.65),
+		$NPCSlaves += Math.trunc(_slavesSupLaw * 0.7),
+		$helots += Math.trunc(_slavesSupLaw * 0.2),
+		$lowerClass = Math.trunc($lowerClass * 0.35),
+		$middleClass = Math.trunc($middleClass * 0.35),
+		$upperClass = Math.trunc($upperClass * 0.35),
+		$FSSupLawTrigger = 2>>
+	<</if>>
 <</if>>
-<<if $enslavementRights == 1>>
-	As the only legal entity in the arcology able to declare the status of a person as enslaved, you are able to @@.yellowgreen;collect fees@@ over enslavement of your citizens. Many, however, consider this move an intromission in private affairs, @@.red;damaging your authority.@@
-	<<set $authority -= 10>>
-	<<set $cash += _flux * 100>>
+<<if $arcologies[0].FSSubjugationistLawME == 1>>
+	<<set _slaveDemandU *= 1.24,
+	_slaveDemandT *= 1.3,
+	_lowerClass += -200,
+	_lowerClassP *= 0.98,
+	_middleClass += -40,
+	_middleClassP *= 0.99,
+	_upperClass += 13.5,
+	_upperClassP *= 1.01,
+	_topClass += 5,
+	_topClassP *= 1.02>>
+	<<if $FSSubLawTrigger == 1 && $arcologies[0].FSSupremacistLawME < 1>>
+		<<set _slavesSubLaw = Math.trunc(($lowerClass + $middleClass + $upperClass) * 0.2),
+		$NPCSlaves += Math.trunc(_slavesSubLaw * 0.7),
+		$helots += Math.trunc(_slavesSubLaw * 0.2),
+		$lowerClass = Math.trunc($lowerClass * 0.8),
+		$middleClass = Math.trunc($middleClass * 0.8),
+		$upperClass = Math.trunc($upperClass * 0.8),
+		$FSSubLawTrigger = 2>>
+	<</if>>
 <</if>>
-<<set $oldFlux = _flux>>
-<<set $ACitizens -= _flux, $ASlaves += _flux>>
-This week, <<if _flux >= 20>>many<<elseif _flux >= 5>>some<<else>>few to none<</if>> of $arcologies[0].name's citizens fell into slavery.
-
-<<if $ACitizens < $ACitizenLimit>>
-	<<if $AntiImmigrationCash == 1>>
-		You covertly @@.yellowgreen;sell@@ the private information of potential arcology immigrants on the old world black market.
-		<<set $cash += random(500,1500), $ACitizens -= random(5,15)>>
+<<if $arcologies[0].FSRepopulationFocusLaw == 1>>
+	<<set _lowerClass += 100,
+	_lowerClassP *= 1.01,
+	_topClass += -2.5,
+	_topClassP *= 0.99>>
+<</if>>
+<<if $arcologies[0].FSRestartLaw == 1>>
+	<<set _lowerClass += -100,
+	_lowerClassP *= 0.99,
+	_topClass += 2.5,
+	_topClassP *= 1.01>>
+<</if>>
+<<if $arcologies[0].FSHedonisticDecadenceLaw == 1>>
+	<<set _middleClass += 80,
+	_middleClassP *= 1.02>>
+<</if>>
+<<if $arcologies[0].FSPaternalistLaw == 1>>
+	<<set _slaveDemandU *= 0.9,
+	_slaveDemandT *= 0.875,
+	_upperClass += -13.5,
+	_upperClassP *= 1.01,
+	_topClass += -2.5,
+	_topClassP *= 1.01>>
+<</if>>
+<<if $arcologies[0].FSYouthPreferentialistLaw == 1>>
+	<<set _lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_middleClass += -80,
+	_middleClassP *= 0.98>>
+<</if>>
+<<if $arcologies[0].FSMaturityPreferentialistLaw == 1>>
+	<<set _lowerClass += -200,
+	_lowerClassP *= 0.98,
+	_middleClass += 80,
+	_middleClassP *= 1.02>>
+<</if>>	
+<<if $arcologies[0].FSChattelReligionistCreed == 1>>
+	<<if $nicaeaFocus == "slaves">>
+		<<set _slaveDemandU *= 1 + $nicaeaPower * -0.05,
+		_slaveDemandT *= 1 + $nicaeaPower * -0.0625,
+		_slaveProductivity += $nicaeaPower * 0.025,
+		_expirationFS *= 1 + $nicaeaPower * -0.125,
+		_lowerClass += $nicaeaPower * 100,
+		_lowerClassP *= 1 + $nicaeaPower * 0.01,
+		_topClass += $nicaeaPower * -2.5,
+		_topClassP *= 1 + $nicaeaPower * -0.01>>
+	<<elseif $nicaeaFocus == "slaveowners">>
+		<<set _slaveDemandU *= 1 + $nicaeaPower * 0.05,
+		_slaveDemandT *= 1 + $nicaeaPower * 0.0625,
+		_lowerClass += $nicaeaPower * -100,
+		_lowerClassP *= 1 + $nicaeaPower * -0.01,
+		_middleClass += $nicaeaPower * -20,
+		_middleClassP *= 1 + $nicaeaPower * -0.005,
+		_upperClass += $nicaeaPower * 6.75,
+		_upperClassP *= 1 + $nicaeaPower * 0.005,
+		_topClass += $nicaeaPower * 2.5,
+		_topClassP *= 1 + $nicaeaPower * 0.01>>
 	<</if>>
-	<<if $AntiImmigrationRep == 1>>
-		You allow citizens input on potential immigrants, a @@.green;popular@@ program.
-		<<set $rep += 100, $ACitizens -= random(5,15)>>
+	<<if $nicaeaAssignment == "whore">>
+		<<set _upperClass += $nicaeaPower * 6.75,
+		_upperClassP *= 1 + $nicaeaPower * 0.005,
+		_topClass += $nicaeaPower * 1.25,
+		_topClassP *= 1 + $nicaeaPower * 0.005>>
+	<<elseif $nicaeaAssignment == "serve the public">>
+		<<set _lowerClass += $nicaeaPower * 50,
+		_lowerClassP *= 1 + $nicaeaPower * 0.005,
+		_middleClass += $nicaeaPower * 20,
+		_middleClassP *= 1 + $nicaeaPower * 0.005>>
+	<<else>>
+		<<set _expirationFS *= 1 + $nicaeaPower 0.25,
+		_lowerClass += $nicaeaPower * 100,
+		_lowerClassP *= 1 + $nicaeaPower *0.01,
+		_middleClass += $nicaeaPower * 20,
+		_middleClassP *= 1 + $nicaeaPower * 0.005,
+		_upperClass += $nicaeaPower * -6.75,
+		_upperClassP *= 1 + $nicaeaPower * -0.005,
+		_topClass += $nicaeaPower * -2.5,
+		_topClassP *= 1 + $nicaeaPower * -0.01>>
 	<</if>>
-	<<if $arcologies[0].FSRestartLaw == 1>>
-		Your sterilization program drives several disloyal citizens out of the arcology.
-		<<set $ACitizens -= random(3,10)>>
+	<<if $nicaeaAchievement == "slaves">>
+		<<set _slaveDemandU *= 1 + $nicaeaPower * 0.4,
+		_slaveDemandT *= 1 + $nicaeaPower * 0.5,
+		_lowerClass += $nicaeaPower * -200,
+		_lowerClassP *= 1 + $nicaeaPower * -0.02>>
 	<</if>>
 <</if>>
+<<if $arcologies[0].FSAztecRevivalistLaw == 1>>
+	<<set _lowerClass += 200,
+	_lowerClassP *= 1.02,
+	_middleClass += -40,
+	_middleClassP *= 0.99,
+	_upperClass += -6.75,
+	_upperClassP *= 0.99>>
+<</if>>
+<<set _middleClass += ($TSS.subsidize + $GRI.subsidize + $SCP.subsidize + $LDE.subsidize + $TGA.subsidize + $TCR.subsidize + $TFS.subsidize + $HA.subsidize) * 20,
+_middleClass *= 1 + ($TSS.subsidize + $GRI.subsidize + $SCP.subsidize + $LDE.subsidize + $TGA.subsidize + $TCR.subsidize + $TFS.subsidize + $HA.subsidize) * 0.01>>
 
-<<set $oldACitizens = $ACitizens>>
- <<set _immigrants = 0>>
-<<if $ACitizens >= $ACitizenLimit>>
-	<<set $ACitizens = $ACitizenLimit>>
-	Your arcology is currently home to as many citizens as it can house; unless the living areas are reconfigured, the citizen population will not increase.
-<<else>>
-	<<set _immigrants += random(-10,10)>>
-	<<if $ProImmigrationRep == 1>>
-		Your welcome program for new citizens helps encourage wealthy people from the old world to immigrate, but @@.red;annoys some longstanding citizens.@@
-		<<set _immigrants += random(10,20), $rep -= 100>>
+<br>
+
+/*Slave retirement trigger pulled (one time only)*/
+<<if $CitizenRetirementTrigger == 1>>
+	<<if $arcologies[0].FSSupremacistLawME < 1 && $arcologies[0].FSSubjugationistLawME < 1>> 
+		<<set $lowerClass += Math.trunc(($NPCSlaves + $helots + $fuckdolls + $menialBioreactors) * 0.2)>>
+	<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
+		<<set $lowerClass += Math.trunc(($NPCSlaves + $helots + $fuckdolls + $menialBioreactors) * 0.15)>>
 	<</if>>
-	<<if $ProImmigrationCash == 1>>
-		The rent promotion for new immigrants brings new citizens to the arcology.
-		<<set _immigrants += random(10,20)>>
+	_helotsRetirement = Math.trunc($helots * 0.8),
+	$helots = Math.trunc($helots * 0.8),
+	_fuckdollsRetirement = Math.trunc($fuckdolls * 0.8),
+	$fuckdolls = Math.trunc($fuckdolls * 0.8),
+	_menialBioreactorsRetirement = Math.trunc($menialBioreactors * 0.8),
+	$menialBioreactors = Math.trunc($menialBioreactors * 0.8),
+	_ASlavesRetirement = Math.trunc($NPCSlaves * 0.8),
+	$NPCSlaves = Math.trunc($NPCSlaves * 0.8),
+	$CitizenRetirement = 2>>
+	You have enacted citizen retirement, the slaves of eligible age are granted freedom. 
+	<<if _helotsRetirement > 1>>
+		@@.red;<<print _helotsRetirement>> of your menial slaves@@ were retired.
+	<<elseif _helotsRetirements > 0>>
+		@@.red;One of your menial slaves@@ was retired.
 	<</if>>
-	<<if $arcologies[0].FSRepopulationFocusLaw == 1>>
-		The rent promotion for pregnant women attracts several gravid ladies and a few girls eager to become mothers to enroll as citizens in your arcology.
-		<<set _immigrants += random(5,10)>>
+	<<if _fuckdollsRetirement > 1>>
+		@@.red;<<print _fuckdollsRetirement>> of your fuckdolls@@ were retired.
+	<<elseif _fuckdollsRetirements > 0>>
+		@@.red;One of your fuckdolls@@ was retired.
 	<</if>>
-	<<if $ACitizens < $ACitizenLimit*0.6>>
-		The availability of a large number of apartments encourages many new citizens to immigrate.
-		<<set _immigrants += random(10,20)>>
+	<<if _menialBioreactorsRetirement > 1>>
+		@@.red;<<print _menialBioreactorsRetirement>> of your bioreactors@@ were retired.
+	<<elseif _menialBioreactorsRetirements > 0>>
+		@@.red;One of your bioreactors@@ was retired.
 	<</if>>
+	<<if _ASlavesRetirement > 1>>
+		@@.red;<<print _ASlavesRetirement>> slaves@@ in your arcology were given a citizen retirement.
+	<</if>> /*I could bother with a single slave retirement message, but that's never going to get used*/
+<</if>>
+
+/*Slave expiration*/
+<<set _expirationPC = Math.trunc($helots * ($slaveExpiration * _expirationFS)),
+_expirationFD = Math.trunc($fuckdolls * ($slaveExpiration * _expirationFS)),
+_expirationBR = Math.trunc($menialBioreactors * ($slaveExpiration * _expirationFS)),
+_expirationNPC = Math.trunc($NPCSlaves * ($slaveExpiration * _expirationFS)),
+_expiration = _expirationPC + _expirationNPC + _expirationFD + _expirationBR,
+$NPCSlaves -= _expirationNPC,
+$helots -= _expirationPC,
+$fuckdolls -= _expirationFD,
+$menialBioreactors -= _expirationBR>>
+<<if _expiration > 1>>
+	@@.red;<<print _expiration>> Slaves died@@ due to the tough working conditions in your arcology.
+	<<if _expirationPC > 1>>
+		Of which @@.red;<<print _expirationPC>> were yours.@@
+	<<elseif _expirationPC > 0>>
+		@@.red;One of them was yours.@@
+	<</if>>
+<</if>>
+
+/*Citizens turning into slaves*/
+<<set _enslaved = Math.trunc($lowerClass * ($welfare * _welfareFS)),
+$lowerClass -= _enslaved>>
+
+/*Bad weather switch*/
+<<if $weatherToday.severity > 3>>
 	<<if $secExp == 1>>
-		<<if $crime > 80>>
-			Crime is a widespread phenomenon in your arcology, many potential immigrants are scared away.
-			<<set _immigrants -= random(5,10)>>
-		<<elseif $crime < 20>>
-			Crime is a distant issue within the walls of your arcology, many immigrants are attracted to such safe shores.
-			<<set _immigrants += random(5,10)>>
-		<</if>>
-		<<if $limitSubhumans == 1>>
-			Subhumans are stopped and turned away as soon as they dare petition for citizenship in your arcology, slightly lowering immigrants numbers.
-			<<set _immigrants -= random(5,10)>>
-		<</if>>
-		<<if $openBorders == 1>>
-			The very liberal attitude towards immigration calls many hopeful immigrants to your arcology.
-			<<set _immigrants += random(10,20)>>
-		<</if>>
-		<<if $propCampaign >= 1 && $propFocus == "immigration">>
-			Your advertisement campaign outside the free city brings more people to the gates of your arcology.
-			<<if $RecuriterOffice == 0 || $Recruiter == 0>>
-				<<if $propCampaignBoost == 0>>
-					<<set _immigrants += random(1,2) * $propCampaign>>
-				<<else>>
-					<<set _immigrants += random(1,4) * $propCampaign>>
-				<</if>>
-			<<else>>
-				''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your immigration campaign from her PR hub office.
-				<<if $propCampaignBoost == 0>>
-					<<set _immigrants += random(2,5+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)) * $propCampaign>>
-				<<else>>
-					<<set _immigrants += random(2,6+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)) * $propCampaign>>
-				<</if>>
-			<</if>>
-		<</if>>
-		<<if $limitImmigration == 1>>
-			The strict limits on immigration keep the number of people coming in the arcology limited.
-			<<if _immigrants > 40>>
-				<<set _immigrants = 40>>
-			<</if>>
+		<<if $docks || $railway < 4>>
+			<<set _weatherFreeze = 1>>
+		<<else>>
+			<<set _weatherFreeze = 0>>
 		<</if>>
-		<<if $garrison.waterwayTime > 0>>
-			The damage caused to the water supply of the arcology discourages immigration and causes the death of some of the poorest residents.
-			It will still take <<if $garrison.waterwayTime > 1>>$garrison.waterwayTime weeks<<else>>a week<</if>> to finish repair works.
-			 <<set _immigrants = Math.clamp(_immigrants - random(40,60), 0 , _immigrants)>>
-			 <<set $ACitizens -= random(10,20), $ASlaves -= random(10,20)>>
-			 <<set $garrison.waterwayTime-->>
-			 <<set $PC.engineering += .1>>
+	<<elseif $antiWeatherFreeze < 2>>
+		<<set _weatherFreeze = 1>>
+	<<else>>
+		<<set _weatherFreeze = 0>>
+	<</if>>
+<<elseif $weatherToday.severity > 2>>
+	<<if $secExp == 1>>
+		<<if $docks || $railway < 3>>
+			<<set _weatherFreeze = 1>>
+		<<else>>
+			<<set _weatherFeeze = 0>>
 		<</if>>
+	<<elseif $antiWeatherFreeze < 1>>
+		<<set _weatherFreeze = 1>>
+	<<else>>
+		<<set _weatherFreeze = 0>>
+	<</if>>
+<<else>>
+	<<set _weatherFreeze = 0>>
+<</if>>
+
+/*Bunch of visitor stuff*/
+<<if _weatherFreeze == 0>>
+<<set _FSScore = _FSScore / $FSCreditCount>>
+<<if $secExp == 1>>
+	<<if $docks > 0>>
+		<<set _transportHub = 0.7 + $docks / 10 + $airport / 10>>
+	<<elseif $railway > 0>>
+		<<set _transportHub = 0.7 + $railway / 10 + $airport / 10>>
+	<<else>>
+		<<set _transportHub = 0.7>>
 	<</if>>
+<<else>>
+	<<set _transportHub = 1>>
 <</if>>
-<<if !isInt(_immigrants)>>
-	<br>@@.red;Error: immigrants is outside accepted range, please report this issue@@
+<<if $secExp == 1>>
+	<<set _crime = (100 - $crime) / 100 + 0.2>>
+<<else>>
+	<<set _crime = 0.8>>
 <</if>>
-<<set $ACitizens += _immigrants>>
-<<if $ACitizens <= 100>>
-		Your arcology is home to an extremely small number of very wealthy citizens; wealth is as concentrated as possible and the citizen population will not decrease further.
-		<<set $ACitizens = 100>>
+<<if $terrain == "urban">>
+	<<set _terrain = 1.2>>
+<<elseif $terrain == "rural" || "marine">>
+	<<set _terrain = 1>>
+<<else>>
+	<<set _terrain = 0.8>>
 <</if>>
 
-<<if $ASlaves >= $ASlaveLimit>>
-	<<set $ASlaves = $ASlaveLimit>>
-	The living areas of the arcology are packed with sex slaves; your citizens cannot find space for any more.
-<<else>>
-	<<set $ASlaves -= random(1,10)+Math.trunc(10*(1-$slaveCostFactor))>>
-	<<if $slaveCostFactor >= 1.1>>
-		With the price of slaves so high, some of your citizens make money by selling a few of their girls.
-	<<elseif $slaveCostFactor <= 0.9>>
-		With the price of slaves so low, some of your citizens gratify themselves with new purchases.
-	<</if>>
-	<<if $ASlaves < $ASlaveLimit*0.8>>
-		<<if $ASlaves < $ASlaveLimit*0.6>>
-			Since there's a lot of space for sex slaves in the living areas, it's fashionable for your citizens to buy up cheap girls and fill their apartments.
-			<<set $ASlaves += random(1,10)+Math.trunc($arcologies[0].prosperity/5)>>
-		<<else>>
-			Since the living areas can comfortably house more sex slaves, it's fashionable for your citizens to buy more girls.
-			<<set $ASlaves += random(1,10)+Math.trunc($arcologies[0].prosperity/10)>>
-		<</if>>
-		<<if $arcologies[0].prosperity > 200>>
-			$arcologies[0].name is extremely prosperous, and they can afford to buy many of the best.
-		<<elseif $arcologies[0].prosperity > 100>>
-			$arcologies[0].name is quite prosperous, and they can afford to buy many pretty slaves.
+<<set _honeymoon = 0>>
+<<if $arcologies[0].honeymoon > 0>>
+	<<set _honeymoon = 10 * $arcologies[0].honeymoon>>
+<</if>>
+<<set $visitors = Math.trunc((($arcologies[0].prosperity + _FSScore * 5 + _honeymoon) * _transportHub * _terrain * _crime) * ($localEcon / 100))>>
+<br>@@.green;<<print $visitors>> Traders and tourists@@ visited your arcology this week.
+
+/*slaves*/
+/*Demand for simple labor*/
+<<set _LSCD = Math.trunc(($LSCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 4) + (($middleClass + $visitors * 0.6) * 1.5) + (($upperClass + $visitors * 0.2) * 3.5) + ($topClass * 18)),
+/*Demand for owning slaves*/
+_SCD = Math.trunc(($upperClass * ($slaveDemandU + _slaveDemandU)) + ($topClass * ($slaveDemandT + _slaveDemandT)))>>
+/*More slaves than there is work*/
+<<if $NPCSlaves > _LSCD / $slaveProductivity>>
+	<<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity)),
+	$NPCSlaves = Math.trunc(_LSCD / ($slaveProductivity + _slaveProductivity))>>
+/*More slaves than they know what to do with*/
+<<elseif $NPCSlaves > _SCD * 1.6>>
+	<<set $menialDemandFactor -= $NPCSlaves - Math.trunc(_SCD * 1.6),
+	$NPCSlaves = Math.trunc(_SCD * 1.6)>>
+/*Cutting back on slaves*/
+<<elseif $NPCSlaves > _SCD * 1.4>>
+	<<if $slaveCostFactor > 0.95>>
+		<<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4),
+		$NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>>
+	<</if>>
+/*Selling excess slaves for profit*/
+<<elseif $NPCSlaves > _SCD * 1.2>>
+	<<if $slaveCostFactor > 1.1>>
+		<<set $menialDemandFactor -= Math.trunc(($NPCSlaves - _SCD) * 0.4),
+		$NPCSlaves -= Math.trunc(($NPCSlaves - _SCD) * 0.4)>>
+	<</if>>
+<</if>>
+/*Buying slaves because they are really cheap*/
+<<if $slaveCostFactor < 0.8>>
+	<<if $NPCSlaves < _SCD * 1.5>>
+		<<set $menialSupplyFactor -= Math.trunc(_SCD * 0.05),
+		$NPCSlaves += Math.trunc(_SCD * 0.05)>>
+	<</if>>
+<</if>>
+
+/*Lower Class Citizens*/
+/*Work left for lower class citizens*/
+<<set _LCD = Math.trunc((($LSCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 4) + _lowerClass + (($middleClass + $visitors * 0.6) * 1.5) + (($upperClass + $visitors * 0.2) * 3.5) + ($topClass * 18) - ($NPCSlaves + $helots) * ($slaveProductivity + _slaveProductivity)) * $rentEffectL * _lowerClassP)>>
+<<if _LCD < 0>>
+	<<set _LCD = 0>>
+<</if>>
+/*Changing population depending on work available*/
+<<if $lowerClass < _LCD>>
+	<<set _LCImmigration = Math.trunc((_LCD - $lowerClass) * (0.3 * _terrain)) + 1,
+	$lowerClass += _LCImmigration>>
+	<<if _LCImmigration > 1>>
+		<br>@@.green;<<print _LCImmigration>> Lower class citizens@@ moved to your arcology.
+	<<elseif _LCImmigration > 0>>
+		<br>@@.green;One lower class citizen@@ moved to your arcology.
+	<</if>>
+<<elseif $lowerClass > _LCD>>
+	<<set _LCEmigration = Math.trunc(($lowerClass - _LCD) * 0.6) + 1,
+	_enslavedEmigrants = Math.trunc((($lowerClass - _LCD) * 0.6) * $enslaveChance),
+	$lowerClass -= _LCEmigration,
+	_enslaved += _enslavedEmigrants>>
+	<<if _LCEmigration > 1>>
+		<br>@@.red;<<print _LCEmigration>> Lower class citizens@@ had no work and tried to leave your arcology.
+		<<if _enslavedEmigrants > 1>>
+			@@.green;<<print _enslavedEmigrants>> Of them were enslaved instead.@@
+		<<elseif _enslavedEmigrants > 0>>
+			@@.green;One of them was enslaved instead.@@
 		<</if>>
+	<<elseif _LCEmigration > 0>>
+		<br>@@.red;One lower class citizen@@ left your arcology due to a lack of work.
 	<</if>>
-	<<if $liveTargets == 1>>
-		Disobedient slaves are used as live targets in the shooting ranges of the arcology<<if $secBarracks != 0>> and the barracks.<<else>>.<</if>>
-		<<set $ASlaves -= random(10,20)>>
+<</if>>
+<<if _enslaved > 0>>
+	<<if _enslaved < 4>>
+		<<set _enslavedPC = 1,
+		_enslavedNPC = _enslaved - 1>>
+	<<else>>
+		<<set _enslavedPC = Math.trunc(_enslaved / 4),
+		_enslavedNPC = _enslaved - _enslavedPC>>
 	<</if>>
-	<<if $ASlaves <= 1000>><<set $ASlaves = 1000>><</if>>
+<</if>>
+<<set $helots += _enslavedPC,
+$NPCSlaves += _enslavedNPC>>
+<<if _enslaved > 1>>
+	<br>In total @@.green;<<print _enslaved>> Lower class citizens@@ were enslaved for failing to pay their debts.
+	<br> @@.green;You enslaved <<print _enslavedPC>>@@ of them while other debtholders in the arcology enslaved the remaining <<print _enslavedNPC>>.
+<<elseif _enslaved > 0>>
+	<br>@@.green;As arcology owner you claimed the slave.@@
+<</if>>
+/*Need more slaves still*/
+<<if $NPCSlaves < _SCD>>
+	<<set $menialSupplyFactor -= Math.trunc((_SCD - $NPCSlaves) * 0.75) + 1,
+	$NPCSlaves += Math.trunc((_SCD - $NPCSlaves) * 0.75) + 1>>
 <</if>>
 
-<<if !isInt($ACitizens)>>
-	<br>@@.red;Error: ACitizens is outside accepted range, please report this issue@@
+/*Middle Class Citizens*/
+/*Demand for Middle Class*/
+<<set _MCD = Math.trunc((($MCBase * ($localEcon / 100)) + $arcologies[0].prosperity + _middleClass + ($NPCSlaves * 0.15) + ($lowerClass * 0.1) + (($upperClass + $visitors * 0.2) * 0.5) + ($topClass * 2.5)) * $rentEffectM * _middleClassP)>>
+/*Middle Class Citizens immigrating*/
+<<if $middleClass < _MCD>>
+	<<set _MCImmigration = Math.trunc((_MCD - $middleClass) * (0.3 * _terrain)) + 1,
+	$middleClass += _MCImmigration>>
+	<<if _MCImmigration > 1>>
+		<br>@@.green;<<print _MCImmigration>> Middle class citizens@@ moved to your arcology.
+	<<elseif _MCImmigration > 0>>
+		<br>@@.green;One middle class citizen@@ moved to your arcology.
+	<</if>>
+/*Middle Class Citizens emigrating*/
+<<elseif $middleClass > _MCD>>
+	<<set _MCEmigration = Math.trunc(($middleClass - _MCD) * 0.6),
+	$middleClass -= _MCEmigration>>
+	<<if _MCEmigration > 1>>
+		<br>@@.red;<<print _MCEmigration>> Middle class citizens@@ left your arcology.
+	<<elseif _MCEmigration > 0>>
+		<br>@@.red;One middle class citizen@@ left your arcology.
+	<</if>>
 <</if>>
-<<if !isInt($ASlaves)>>
-	<br>@@.red;Error: ASlaves is outside accepted range, please report this issue@@
+
+/*Upper Class Citizens*/
+/*Demand for Upper Class*/
+<<set _UCD = Math.trunc((($UCBase * ($localEcon / 100)) + ($arcologies[0].prosperity * 0.2) + _upperClass + ($NPCSlaves * 0.02) + ($lowerClass * 0.025) + (($middleClass + $visitors * 0.6) * 0.05) + ($topClass * 0.3)) * $rentEffectU * _upperClassP)>>
+/*Upper Class Citizens immigrating*/
+<<if $upperClass < _UCD>>
+	<<set _UCImmigration = Math.trunc((_UCD - $upperClass) * (0.3 * _terrain)) + 1,
+	$upperClass += _UCImmigration>>
+	<<if _UCImmigration > 1>>
+		<br>@@.green;<<print _UCImmigration>> Upper class citizens@@ moved to your arcology.
+	<<elseif _UCImmigration > 0>>
+		<br>@@.green;One upper class citizen@@ moved to your arcology.
+	<</if>>
+/*Upper Class Citizens Emigrating*/
+<<elseif $upperClass > _UCD>>
+	<<set _UCEmigration = Math.trunc(($upperClass - _UCD) * 0.6),
+	$upperClass -= _UCEmigration>>
+	<<if _UCEmigration > 1>>
+		<br>@@.red;<<print _UCEmigration>> Upper class citizens@@ left your arcology.
+	<<elseif _UCEmigration > 0>>
+		<br>@@.red;One upper class citizen@@ left your arcology.
+	<</if>>
 <</if>>
 
-<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$helots+$slaves.length)>> slaves now live in your arcology.
-<<if $arcologies[0].FSSupremacistLawME == 1>>The citizenry is entirely $arcologies[0].FSSupremacistRace.<</if>>
+/*Top Class Citizens*/
+/*Setting GDP depending on population*/
+<<set $GDP = Math.trunc((($NPCSlaves + $helots) * 0.35 * $slaveProductivity) + ($lowerClass * 0.35) + ($middleClass * 0.75) + ($upperClass * 2) + ($topClass * 10)) / 10,
+/*Top Class Interest in living in your arcology*/
+_TCD = Math.trunc(($GDP / 15 + _topClass) * $rentEffectT * _topClassP + $TCBase)>>
+/*Top Class Citizens immigrating*/
+<<if $topClass < _TCD>>
+	<<set _TCImmigration = Math.trunc((_TCD - $topClass) * (0.3 * _terrain)) + 1,
+	$topClass += _TCImmigration>>
+	<<if _TCImmigration > 1>>
+		<br>@@.green;<<print _TCImmigration>> Millionaires@@ moved to your arcology. /*Fat Cat? One-Percenter?*/
+	<<elseif _TCImmigration > 0>>
+		<br>@@.green;One millionaire@@ moved to your arcology.
+	<</if>>
+/*Top Class Citizens emigrating*/
+<<elseif $topClass > _TCD>>
+	<<set _TCEmigration = Math.trunc(($topClass - _TCD) * 0.6) + 1,
+	$topClass -= _TCEmigration>>
+	<<if _TCEmigration > 1>>
+		<br>@@.red;<<print _TCEmigration>> Millionaires@@ left your arcology.
+	<<elseif _TCEmigration > 0>>
+		<br>@@.red;One millionaire@@ left your arcology.
+	<</if>>
+<</if>>
+<</if>> /*ends _weatherFreeze*/
+<<set $ACitizens = $lowerClass + $middleClass + $upperClass + $topClass,
+$ASlaves = $NPCSlaves + $helots + $fuckdolls + $menialBioreactors,
+_percACitizens = Math.trunc(($ACitizens / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percASlaves = Math.trunc(($ASlaves / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percLowerClass = Math.trunc(($lowerClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percMiddleClass = Math.trunc(($middleClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percUpperClass = Math.trunc(($upperClass / ($ACitizens + $ASlaves)) * 1000) / 10,
+_percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10>>
+<<if $cheatMode == 1>>
+	<br><br><<print $arcologies[0].prosperity>> Prosperity | <<print _FSScore>> FS Score | <<print _honeymoon>> Honeymoon | <<print _transportHub>> Transporthub | <<print _terrain>> Terrain | <<print _crime>> Crime
+	<br><<print _LSCD>> Lower + Slave Class Demand | <<print _SCD>> Slave Class Demand | <<print _slaveProductivity>> Slave Productivity
+	<br><<print _LCD>> Lower Class Demand | <<print _lowerClassP>> LC Multiplier
+	<br><<print _MCD>> Middle Class Demand | <<print _middleClassP>> MC Multiplier
+	<br><<print _UCD>> Upper Class Demand | <<print _upperClassP>> UC Multiplier
+	<br><<print _TCD>> Top Class Demand | <<print _topClassP>> TC Multiplier
+<</if>>
+<br>
+<br>
+<<print $arcologies[0].name>> is home to the following:
+<br>Lower Class Citizens  | <<print $lowerClass>> | <<print _percLowerClass>>%
+<br>Middle Class Citizens | <<print $middleClass>> | <<print _percMiddleClass>>%
+<br>Upper Class Citizens  | <<print $upperClass>> | <<print _percUpperClass>>%
+<br>Millionaires          | <<print $topClass>> | <<print _percTopClass>>%
+<br>Slaves                | <<print $ASlaves>> | <<print _percASlaves>>%
+<br>
+<br><<if $arcologies[0].FSSupremacistLawME == 1>>The citizenry is entirely $arcologies[0].FSSupremacistRace.<</if>>
 <<if $arcologies[0].FSRomanRevivalistLaw == 1>>The citizens take pride in their martial duties, preferring to wear utilitarian clothing even when off duty.<</if>>
 <<if $arcologies[0].FSGenderRadicalistDecoration == 100>>Every single one of the slaves is female by virtue of her fuckable asshole.
 <<elseif $arcologies[0].FSGenderFundamentalistSMR == 1>>Almost every citizen is an upstanding man, while the slave population is almost completely female.<</if>>
@@ -226,85 +873,55 @@ This week, <<if _flux >= 20>>many<<elseif _flux >= 5>>some<<else>>few to none<</
 
 <br>
 
-<<set _rents = random(1,100)>>
-<<for _i = 1; _i < $sectors.length; _i++>>
-	<<if $sectors[_i].ownership == 1>>
-		<<if $sectors[_i].type != "Brothel">>
-		<<if $sectors[_i].type != "Club">>
-		<<if $sectors[_i].type != "Arcade">>
-		<<if $sectors[_i].type != "Dairy">>
-		<<if $sectors[_i].type != "Pit">>
-		<<if $sectors[_i].type != "Sweatshops">>
-		<<if $sectors[_i].type != "Pens">>
-		<<if $sectors[_i].type != "Barracks">>
-		<<if $sectors[_i].type != "weapManu">>
-			<<set _rents += $arcologies[0].prosperity*10>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-		<</if>>
-	<</if>>
-<</for>>
-<<set $rentalMultiplier = 1>>
+<<set _rentMultiplier = 1>>
 <<if $arcologies[0].FSPaternalistLaw == 1>>
-	<<set $rentalMultiplier -= 0.1>>
+	<<set _rentMultiplier *= 0.95>>
 	Tenants who can prove that they abstain from certain practices are given a reduction to their rent.
 <</if>>
 <<if $arcologies[0].FSYouthPreferentialistLaw == 1>>
-	<<set $rentalMultiplier -= 0.1>>
+	<<set _rentMultiplier *= 0.95>>
 	Younger citizens are offered subsidized rent to encourage young people to join the free population of your arcology.
-<</if>>
-<<if $arcologies[0].FSMaturityPreferentialistLaw == 1>>
-	<<set $rentalMultiplier -= 0.1>>
+<<elseif $arcologies[0].FSMaturityPreferentialistLaw == 1>>
+	<<set _rentlMultiplier *= 0.95>>
 	Older citizens are offered subsidized rent to encourage mature people to join the free population of your arcology.
 <</if>>
 <<if $arcologies[0].FSRepopulationFocusLaw == 1>>
-	<<set $rentalMultiplier -= 0.1>>
+	<<set _rentMultiplier *= 0.95>>
 	Pregnant citizens are offered subsidized rent to encourage free women to become pregnant and pregnant women to join the free population of your arcology.
 <<elseif $arcologies[0].FSRestartLaw == 1>>
-	<<set $rentalMultiplier += 0.1>>
+	<<set _rentMultiplier *= 1.05>>
 	Non-elite citizens who refuse to be sterilized face a moderate tax and the looming possibility of expulsion or enslavement.
 <</if>>
 <<if $arcologies[0].FSHedonisticDecadenceLaw == 1>>
-	<<set $rentalMultiplier -= 0.1>>
+	<<set _rentMultiplier *= 0.95>>
 	Food vendors are offered subsidized rent and operating expenses to set up shop in your arcology.
 <</if>>
-<<if $alternativeRents == 1>>
+<<if $alternativeRents == 1>> /*A silly policy*/
 	Your citizens are allowed to pay their rents in slaves rather than cash and a few financially challenged individuals make use of this.
-	<<set $rentalMultiplier -= 0.1>>
+	<<set _rentMultiplier *= 0.95>>
 	<<set $helots += random(0,3)>>
 <</if>>
 <<if $discountMercenaries == 1>>
 	Mercenaries willing to come to your arcology are given a discount on rent.
-	<<set $rentalMultiplier -= 0.05>>
+	<<set _rentMultiplier *= 0.98>>
 <</if>>
 <<if $militiaSoldierPrivilege == 1>>
 	Citizens in the militia are exempt from rent payment.
-	<<set $rentalMultiplier -= 0.05>>
+	<<set _rentMultiplier *= 0.98>>
 <</if>>
 <<if $arcologies[0].FSArabianRevivalistLaw == 1>>
-	<<set $rentalMultiplier += 0.1>>
+	<<set _rentMultiplier *= 1.05>>
 	Those of your citizens who have not yet subscribed to the society you are building are permitted to live and do business here, but must pay a moderate jizya tax for the privilege as part of their rent.
 <</if>>
-<<set _rents = Math.trunc(_rents*$rentalMultiplier)>>
+<<set _rents = Math.trunc(($lowerClass * $LCRent + $middleClass * $MCRent + $upperClass * $UCRent + $topClass * $TCRent) * _rentMultiplier / 25)>>
 <<if !isInt(_rents)>>
 	<br>@@.red;Error: rents is outside accepted range, please report this issue@@
 <</if>>
 <<set $cash += _rents>>
 
-This week, rents from $arcologies[0].name came to
-<<if _rents > 0>>
-	@@.yellowgreen;<<print cashFormat(_rents)>>.@@
-<<else>>
-	@@.red;<<print cashFormat(_rents)>>.@@
-<</if>>
+This week, rents from $arcologies[0].name came to @@.yellowgreen;<<print cashFormat(_rents)>>.@@
 <<if $difficultySwitch == 0>>
-	<<if $economy < 100>>
+	<<if $localEcon < 100>>
 		<<set _bribes = ($week*100)+random(-100,100)>>
 		<<if $cash > 1000>>
 			<<set _bribes += Math.trunc($cash*0.02)>>
@@ -346,47 +963,6 @@ You own
 earning you @@.yellowgreen;<<print cashFormat(_earnings)>>.@@
 <</if>>
 
-<<set _refugees = 0>>
-<<if $terrain == "urban">>
-	<<set _refugees += random(0,5)>>
-<<elseif $terrain == "rural">>
-	<<set _refugees += random(0,3)>>
-<<elseif $terrain == "marine">>
-	<<set _refugees += random(0,1)>>
-<</if>>
-<<if $ProRefugees == 1>>
-	<<set _refugees += random(0,1)>>
-<</if>>
-<<for $i = 0; $i < 3; $i++>>
-	<<if $rep > random(0,30000)>>
-	<<set _refugees += 1>>
-	<</if>>
-<</for>>
-<<if _refugees > 0>>
-	Some desperate people filtered into the arcology during the
-	<<if $propCampaign >= 1 && $propFocus == "enslavement">>
-		week, many attracted by your advertisement campaigns.
-		<<if $RecuriterOffice == 0 || $Recruiter == 0>>
-			<<if $propCampaignBoost == 1>>
-				<<set _refugees += random(0,4)>>
-			<<else>>
-				<<set _refugees += random(0,2)>>
-			<</if>>
-		<<else>>
-			''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your self-enslavement campaign from her PR hub office.
-			<<if $propCampaignBoost == 1>>
-				<<set _refugees += random(0,5+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32))>>
-			<<else>>
-				<<set _refugees += random(0,3+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32))>>
-			<</if>>
-		<</if>>
-	<<else>>
-		week.
-	<</if>>
-	As owner, you were able to enslave _refugees of them.
-	<<set $helots += _refugees>>
-<</if>>
-
 <<set _AWeekGrowth = $AGrowth>>
 <<if _AWeekGrowth+$arcologies[0].prosperity > $AProsperityCap>>
 	@@.yellow;$arcologies[0].name is at its maximum prosperity, so rents will not increase until it is improved.@@
diff --git a/src/uncategorized/arcologyDescription.tw b/src/uncategorized/arcologyDescription.tw
index 26c9630f5d51c32f8ff1cde362d10130b8bee9cd..f6d34edeefd31c3d991b5146c31f9a9c5c0f99b8 100644
--- a/src/uncategorized/arcologyDescription.tw
+++ b/src/uncategorized/arcologyDescription.tw
@@ -633,7 +633,7 @@ Its<<if $weatherCladding == 2>> glorious<<elseif $weatherCladding > 0>> dull<<el
 	The noise in the thriving open space is almost oppressive, with the sounds of drunken merriment, traditional music, and distant intercourse forming an omnipresent hum.
 <</if>>
 
-<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$helots+$slaves.length)>> slaves live in $arcologies[0].name.
+<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$slaves.length)>> slaves live in $arcologies[0].name.
 <<if $arcologies[0].FSSupremacistLawME == 1>>The citizenry is entirely $arcologies[0].FSSupremacistRace.<</if>>
 <<if $arcologies[0].FSRomanRevivalistLaw == 1>>Every citizen has military responsibilities, which are a point of pride to many, with most opting to wear utilitarian clothing even when off duty.<</if>>
 <<if $arcologies[0].FSAztecRevivalistLaw == 1>>Most citizens wear satin loincloths and cloaks, distinguished from those of slaves by the richness of their adornments.<</if>>
diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw
index e798d04b03a442929c2eb6dacb8e79aec9ab301e..9d59311731bb31721ab6f9666fac6b60d4c64b50 100644
--- a/src/uncategorized/buildingWidgets.tw
+++ b/src/uncategorized/buildingWidgets.tw
@@ -209,7 +209,7 @@ Selling this sector would relinquish a 4% interest in $arcologies[0].name. Such
 
 /%
  Call as <<SectorCounts>>
- Updates $ACitizenLimit, $ASlaveLimit, $AProsperityCap, $Sweatshops.
+ Updates $AProsperityCap, $Sweatshops.
 %/
 <<widget "SectorCounts">>
 
@@ -226,25 +226,25 @@ Selling this sector would relinquish a 4% interest in $arcologies[0].name. Such
 <<else>>
 	<<set $AProsperityCap = 150>>
 <</if>>
-<<set $ACitizenLimit = 0, $ASlaveLimit = 0, $Sweatshops = 0>>
+<<set $Sweatshops = 0>>
 <<if $arcologyUpgrade.spire == 1>>
 	<<for _i = 1; _i <= 4; _i++>>
 		<<if $sectors[_i].type == "DenseApartments">>
-			<<set $ACitizenLimit += 600, $ASlaveLimit += 1000, $AProsperityCap += 10>>
+			<<set $AProsperityCap += 10>>
 		<<elseif $sectors[_i].type == "LuxuryApartments">>
-			<<set $ACitizenLimit += 400, $ASlaveLimit += 2000, $AProsperityCap += 15>>
+			<<set $AProsperityCap += 15>>
 		<<else>>
-			<<set $ACitizenLimit += 400, $ASlaveLimit += 1000, $AProsperityCap += 10>>
+			<<set $AProsperityCap += 10>>
 		<</if>>
 	<</for>>
 <</if>>
 <<for _i = 8; _i <= 19; _i++>>
 	<<if $sectors[_i].type == "DenseApartments">>
-		<<set $ACitizenLimit += 600, $ASlaveLimit += 1000, $AProsperityCap += 10>>
+		<<set $AProsperityCap += 10>>
 	<<elseif $sectors[_i].type == "LuxuryApartments">>
-		<<set $ACitizenLimit += 400, $ASlaveLimit += 2000, $AProsperityCap += 15>>
+		<<set $AProsperityCap += 15>>
 	<<else>>
-		<<set $ACitizenLimit += 400, $ASlaveLimit += 1000, $AProsperityCap += 10>>
+		<<set $AProsperityCap += 10>>
 	<</if>>
 <</for>>
 <<for _i = 25; _i <= 29; _i++>>
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index b5b576f40a49e6ec4147b33c4cf7dc8f7b01d95c..110d803ea6362ac519cb11b1755d5915447ce6b6 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -13,7 +13,7 @@ Since you are
 <<else>>
 	used to a fairly normal life,
 <</if>>
-your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+(50000/$economy))))>>.
+your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+(50000/$localEcon))))>>.
 
 <<if $arcologies[0].FSRepopulationFocusLaw == 1 && $PC.pregKnown == 1>>
 	<br>Rent promotion for being a pregnant citizen under ''Universal Pregnancy Subsidy:'' <<print cashFormat(500)>>
@@ -160,6 +160,10 @@ your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+
 	<<set _DRUUpkeep = Math.trunc($disasterResponse * 200000 / $localEcon)>>
 	<br>__Disaster Response Unit__ expenses: <<print cashFormat(_DRUUpkeep)>>
 <</if>>
+<<if $antiWeatherFreeze > 0>>
+	<<set _AWFUpkeep = Math.trunc($antiWeatherFreeze * 200000 / $localEcon)>>
+	<br>__Passenger Upgrades__ expenses: <<print cashFormat(_AWFUpkeep)>>
+<</if>>
 <<if $FSSpending != 0>>
 	<br>__Society Shaping__ expenses: <<print cashFormat($FSSpending)>>
 <</if>>
diff --git a/src/uncategorized/policies.tw b/src/uncategorized/policies.tw
index 50ae50e60e0ee5187bebc68d995169d26275f21e..4ed933854939160cdb8e1bfcde19f80d41c61bd8 100644
--- a/src/uncategorized/policies.tw
+++ b/src/uncategorized/policies.tw
@@ -129,8 +129,13 @@
 	<br>''Public Arcade Retirement:'' once reaching mandatory retirement age, slaves are placed in cheap public arcades to be used until useless.
 	[[Repeal|Policies][$ArcadeRetirement = 0]]
 <<elseif $CitizenRetirement == 1>>
-	<br>''Citizen Retirement:'' all slaveowners are required to pay into accounts to support their slaves as lower-class citizens in retirement.
-	[[Repeal|Policies][$CitizenRetirement = 0, $SexMilestoneRetirement = 0, $MilkMilestoneRetirement = 0, $CumMilestoneRetirement = 0, $BirthsMilestoneRetirement = 0, $KillsMilestoneRetirement = 0]]
+	<<if $CitizenRetirementTrigger == 0>>
+		<br>''Citizen Retirement:'' all slaveowners are required to pay into accounts to support their slaves as lower-class citizens in retirement.
+		[[Repeal|Policies][$CitizenRetirement = 0, $SexMilestoneRetirement = 0, $MilkMilestoneRetirement = 0, $CumMilestoneRetirement = 0, $BirthsMilestoneRetirement = 0, $KillsMilestoneRetirement = 0, $CitizenRetirementTrigger = 1]]
+	<<else>>
+		<br>''Citizen Retirement:'' all slaveowners are required to pay into accounts to support their slaves as lower-class citizens in retirement.
+		[[Repeal|Policies][$CitizenRetirement = 0, $SexMilestoneRetirement = 0, $MilkMilestoneRetirement = 0, $CumMilestoneRetirement = 0, $BirthsMilestoneRetirement = 0, $KillsMilestoneRetirement = 0]]
+	<</if>>
 <<else>>
 	<br>''Menial Retirement:'' in the absence of a clear slave retirement policy, overaged sex slaves will become menial slaves.
 <</if>>
@@ -244,7 +249,7 @@
 	<</if>>
 
 	<<if $AntiImmigrationRep == 1>>
-		<br>''Citizen Input on Immigration:'' you are selectively turn away potential immigrants to the arcology based on the recommendations of citizens.
+		<br>''Citizen Input on Immigration:'' you are selectively turning away potential immigrants to the arcology based on the recommendations of citizens.
 		[[Repeal|Policies][$AntiImmigrationRep = 0]]
 	<</if>>
 
@@ -1217,9 +1222,13 @@
 
 	<<if $arcologies[0].FSSupremacist >= 90>>
 		<<if $arcologies[0].FSSupremacistLawME == 0>>
-			<br>''@@.lime;Universal Enslavement of the Impure:@@'' will force anyone not of the $arcologies[0].FSSupremacistRace to emigrate or accept enslavement, and make sex with non-$arcologies[0].FSSupremacistRace people such an expectation that the appetite for all such slaves will increase slightly.
-			[[Implement|Policies][$arcologies[0].FSSupremacistLawME = 1, $cash -=5000, $rep -= 1000]]
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will affect the slave markets in unpredictable ways//
+			<br>''@@.lime;Universal Enslavement of the Impure:@@'' will force anyone not of the $arcologies[0].FSSupremacistRace race to emigrate or accept enslavement, and make sex with non-$arcologies[0].FSSupremacistRace people such an expectation that the appetite for all such slaves will increase slightly.
+			<<if $FSSupLawTrigger == 0>>
+				[[Implement|Policies][$arcologies[0].FSSupremacistLawME = 1, $FSSupLawTrigger = 1, $cash -= 5000, $rep -= 1000]]
+			<<else>>
+				[[Implement|Policies][$arcologies[0].FSSupremacistLawME = 1, $cash -= 5000, $rep -= 1000]]
+			<</if>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will affect the slave market and arcology drastically//
 		<</if>>
 	<</if>>
 
@@ -1236,8 +1245,12 @@
 	<<if $arcologies[0].FSSubjugationist >= 90>>
 		<<if $arcologies[0].FSSubjugationistLawME == 0>>
 			<br>''@@.lime;Universal Enslavement of Subhumans:@@'' will force slavery on all $arcologies[0].FSSubjugationistRace subhumans in your arcology, and make sex with $arcologies[0].FSSubjugationistRace people such an expectation that the appetite for all such slaves will increase slightly.
-			[[Implement|Policies][$arcologies[0].FSSubjugationistLawME = 1, $cash -=5000, $rep -= 1000]]
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will affect the slave markets in unpredictable ways//
+			<<if $FSSubLawTrigger == 0>>
+				[[Implement|Policies][$arcologies[0].FSSubjugationistLawME = 1, $FSSubLawTrigger = 1, $cash -= 5000, $rep-= 1000]]
+			<<else>>
+				[[Implement|Policies][$arcologies[0].FSSubjugationistLawME = 1, $cash -= 5000, $rep -= 1000]]
+			<</if>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will affect the slave market and arcology drastically//
 		<</if>>
 	<</if>>
 
diff --git a/src/uncategorized/saServeThePublic.tw b/src/uncategorized/saServeThePublic.tw
index bdf3b8fd8a298a670582ed9720ba7628c2495790..22299fd36a0aa3f5752fb18ab770ef2d892b9ca7 100644
--- a/src/uncategorized/saServeThePublic.tw
+++ b/src/uncategorized/saServeThePublic.tw
@@ -12,25 +12,25 @@
 <<if ($slaves[$i].releaseRules == "restrictive") && ($slaves[$i].standardReward !== "orgasm")>>
 	<<set $FResult += 2>>
 <</if>>
-<<if $ACitizens > $ASlaves*2>>
+<<if $ACitizens > $ASlaves*4>>
 	<<set $FResult = Math.trunc($FResult*1.1)>>
-<<elseif $ACitizens > $ASlaves>>
+<<elseif $ACitizens > $ASlaves*2>>
 	<<set $FResult = Math.trunc($FResult*1)>>
-<<elseif $ACitizens > $ASlaves*0.5>>
+<<elseif $ACitizens > $ASlaves>>
 	<<set $FResult = Math.trunc($FResult*0.95)>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $FResult = Math.trunc($FResult*0.9)>>
 <<else>>
 	<<set $FResult = Math.trunc($FResult*0.85)>>
 <</if>>
 <<set $beauty = Beauty($slaves[$i])>>
-<<if $ACitizens > $ASlaves*2>>
+<<if $ACitizens > $ASlaves*4>>
 	<<set $beauty = Math.trunc($beauty*1.1)>>
-<<elseif $ACitizens > $ASlaves>>
+<<elseif $ACitizens > $ASlaves*2>>
 	<<set $beauty = Math.trunc($beauty*1)>>
-<<elseif $ACitizens > $ASlaves*0.5>>
+<<elseif $ACitizens > $ASlaves>>
 	<<set $beauty = Math.trunc($beauty*0.95)>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $beauty = Math.trunc($beauty*0.9)>>
 <<else>>
 	<<set $beauty = Math.trunc($beauty*0.85)>>
diff --git a/src/uncategorized/saWhore.tw b/src/uncategorized/saWhore.tw
index c82e30a182d22e7cf729c206273a9b90458c872d..949c1bec05e9c68d0323927b12174a00218facf9 100644
--- a/src/uncategorized/saWhore.tw
+++ b/src/uncategorized/saWhore.tw
@@ -7,25 +7,25 @@
 <<if ($slaves[$i].releaseRules == "restrictive") && ($slaves[$i].standardReward !== "orgasm")>>
 	<<set $FResult += 2>>
 <</if>>
-<<if $ACitizens > $ASlaves*2>>
+<<if $ACitizens > $ASlaves*4>>
 	<<set $FResult = Math.trunc($FResult*1.1)>>
-<<elseif $ACitizens > $ASlaves>>
+<<elseif $ACitizens > $ASlaves*2>>
 	<<set $FResult = Math.trunc($FResult*1)>>
-<<elseif $ACitizens > $ASlaves*0.5>>
+<<elseif $ACitizens > $ASlaves>>
 	<<set $FResult = Math.trunc($FResult*0.95)>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $FResult = Math.trunc($FResult*0.9)>>
 <<else>>
 	<<set $FResult = Math.trunc($FResult*0.85)>>
 <</if>>
 <<set $beauty = Beauty($slaves[$i])>>
-<<if $ACitizens > $ASlaves*2>>
+<<if $ACitizens > $ASlaves*4>>
 	<<set $beauty = Math.trunc($beauty*1.1)>>
-<<elseif $ACitizens > $ASlaves>>
+<<elseif $ACitizens > $ASlaves*2>>
 	<<set $beauty = Math.trunc($beauty*1)>>
-<<elseif $ACitizens > $ASlaves*0.5>>
+<<elseif $ACitizens > $ASlaves>>
 	<<set $beauty = Math.trunc($beauty*0.95)>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $beauty = Math.trunc($beauty*0.9)>>
 <<else>>
 	<<set $beauty = Math.trunc($beauty*0.85)>>
diff --git a/src/uncategorized/saWorkAGloryHole.tw b/src/uncategorized/saWorkAGloryHole.tw
index bf578017a650863998672b01bdf99725eece17ca..d7099e659673f94ba3019ae085d37af6488b3145 100644
--- a/src/uncategorized/saWorkAGloryHole.tw
+++ b/src/uncategorized/saWorkAGloryHole.tw
@@ -10,13 +10,13 @@
 <</if>>
 <<if $arcologies[0].FSDegradationistLaw == 1>>
 	<<set $beauty = Math.trunc($beauty*1.5)>>
-<<elseif $ACitizens > $ASlaves*2>>
+<<elseif $ACitizens > $ASlaves*4>>
 	<<set $beauty = Math.trunc($beauty*1.1)>>
-<<elseif $ACitizens > $ASlaves>>
+<<elseif $ACitizens > $ASlaves*2>>
 	<<set $beauty = Math.trunc($beauty*1)>>
-<<elseif $ACitizens > $ASlaves*0.5>>
+<<elseif $ACitizens > $ASlaves>>
 	<<set $beauty = Math.trunc($beauty*0.95)>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $beauty = Math.trunc($beauty*0.9)>>
 <<else>>
 	<<set $beauty = Math.trunc($beauty*0.85)>>
@@ -24,9 +24,9 @@
 <<if $beauty < 10>>
 	<<set $beauty = 10>>
 <</if>>
-<<if $ACitizens > $ASlaves*0.5>>
+<<if $ACitizens > $ASlaves>>
 	<<set $FResult = 3>>
-<<elseif $ACitizens > $ASlaves*0.25>>
+<<elseif $ACitizens > $ASlaves*0.5>>
 	<<set $FResult = 2>>
 <<else>>
 	<<set $FResult = 1>>