diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt
index d1e805d9e435d2522ac85a90711fa5939d77dbe7..d6f3ec035339e40c3abb33882bb57edf59be3105 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;
@@ -34647,8 +34650,8 @@ window.Count = function() {
 	if (E > 100) {T.Env = 4;}
 	else if (E > 67) {T.Env = 3;}
 	else {T.Env = 2;}
-	T.ColonelCashBonus = 1000000;
-	T.TroopCashBonus = 100000*S.Troops;
+	T.ColonelCashBonus = 10000; T.inviTroop = 100;
+	T.TroopCashBonus = T.inviTroop*S.Troops;
 	T.SFCashBonus = ((T.ColonelCashBonus+(T.TroopCashBonus))*T.Env);
 };
 
@@ -35022,12 +35025,12 @@ window.progress = function(x,max) {
 
 window.SFInit = function() {
 	const V = State.variables;
-	V.SF = Object.assign({}, V.SF, {Active:1, Bonus:0, Depravity:0, Units:0, MWU:0, U:0, WG:0, SpecOps:0, SpecOpsLock:0, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1});
-	V.SFUnit = Object.assign({}, V.SFUnit, {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0});
-	V.SFColonel = Object.assign({}, V.SFColonel, {Core:"", Talk:0, Fun:0, Status:0});
-	V.SFTradeShow = Object.assign({}, V.SFTradeShow, {History:0, CanAttend:0, Income:0, Revenue:0, Helots:0, TotalHelots:0, Mercs:0, TotalMercs:0});
+	V.SF = {Active:1, Bonus:0, Depravity:0, Units:0, MWU:0, U:0, WG:0, SpecOps:0, SpecOpsLock:0, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1};
+	V.SFUnit = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0};
+	V.SFColonel = {Core:"", Talk:0, Fun:0, Status:0};
+	V.SFTradeShow = {History:0, CanAttend:0, Income:0, Revenue:0, Helots:0, TotalHelots:0, Mercs:0, TotalMercs:0};
 	V.SatLaunched = 0, V.arcologies[0].SFRaid = 1,V.arcologies[0].SFRaidTarget = -1;
-	V.SF.Facility = Object.assign({}, V.SF.Facility, {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]});
+	V.SF.Facility = {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]};
 };
 
 /*:: DebugJS [script]*/
@@ -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/SecExp/securityReport.tw b/src/SecExp/securityReport.tw
index fde67a7c45b63c9fcac5cb571fc098633b96e3f3..05d3353a575d901caa2186db88908c2a9a82ed93 100644
--- a/src/SecExp/securityReport.tw
+++ b/src/SecExp/securityReport.tw
@@ -410,6 +410,10 @@
 			Having a powerful special force attracts a lot of mercenaries, hopeful that they may be able to fight along side it.
 			<<set _newMercs += random(0,Math.round($SF.Units/10))>>
 		<</if>>
+		<<if $discountMercenaries > 0>>
+			More mercenaries are attracted to your archology as a result of the reduced rent.
+			<<set _newMercs += random(2,4)>>
+		<</if>>
 		<<set _newMercs = Math.trunc(_newMercs / 2)>>
 		<<if _newMercs > 0>>
 			<<set $mercTotalManpower += _newMercs>>
diff --git a/src/SpecialForce/JS.js b/src/SpecialForce/JS.js
index 0e6e4288acf04ec7f77cd1b6ceac0fb71d90cfce..ac4ddf2c6ec7ef3cdd63468e3633937966e18a64 100644
--- a/src/SpecialForce/JS.js
+++ b/src/SpecialForce/JS.js
@@ -76,8 +76,8 @@ window.Count = function() {
 	if (E > 100) {T.Env = 4;}
 	else if (E > 67) {T.Env = 3;}
 	else {T.Env = 2;}
-	T.ColonelCashBonus = 1000000;
-	T.TroopCashBonus = 100000*S.Troops;
+	T.ColonelCashBonus = 10000; T.inviTroop = 100;
+	T.TroopCashBonus = T.inviTroop*S.Troops;
 	T.SFCashBonus = ((T.ColonelCashBonus+(T.TroopCashBonus))*T.Env);
 };
 
@@ -451,10 +451,10 @@ window.progress = function(x,max) {
 
 window.SFInit = function() {
 	const V = State.variables;
-	V.SF = Object.assign({}, V.SF, {Active:1, Bonus:0, Depravity:0, Units:0, MWU:0, U:0, WG:0, SpecOps:0, SpecOpsLock:0, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1});
-	V.SFUnit = Object.assign({}, V.SFUnit, {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0});
-	V.SFColonel = Object.assign({}, V.SFColonel, {Core:"", Talk:0, Fun:0, Status:0});
-	V.SFTradeShow = Object.assign({}, V.SFTradeShow, {History:0, CanAttend:0, Income:0, Revenue:0, Helots:0, TotalHelots:0, Mercs:0, TotalMercs:0});
+	V.SF = {Active:1, Bonus:0, Depravity:0, Units:0, MWU:0, U:0, WG:0, SpecOps:0, SpecOpsLock:0, ROE:"hold", Target:"recruit", Regs:"strict", Caps:"The Special Force", Lower:"the special force", Subsidy:1};
+	V.SFUnit = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0, PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:0, GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0};
+	V.SFColonel = {Core:"", Talk:0, Fun:0, Status:0};
+	V.SFTradeShow = {History:0, CanAttend:0, Income:0, Revenue:0, Helots:0, TotalHelots:0, Mercs:0, TotalMercs:0};
 	V.SatLaunched = 0, V.arcologies[0].SFRaid = 1,V.arcologies[0].SFRaidTarget = -1;
-	V.SF.Facility = Object.assign({}, V.SF.Facility, {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]});
+	V.SF.Facility = {Toggle:0, Active:0, LC:0, Workers:0, Max:5, Caps:"Special force support facility", Lower:"special force support facility", Decoration:"standard", Speed:0, Upgrade:0, IDs:[]};
 };
\ No newline at end of file
diff --git a/src/SpecialForce/Report.tw b/src/SpecialForce/Report.tw
index 234126ee92bc7e904bad148fb3d132f5ed4063a4..893d80ee84dac0bd097e449103ae6dedc8eac689 100644
--- a/src/SpecialForce/Report.tw
+++ b/src/SpecialForce/Report.tw
@@ -114,9 +114,9 @@
 	<</if>>
 	<<if $secExp > 0>> <<set $authority += $SF.Units*10,$authority = Math.clamp($authority, 0, 20000)>> <</if>>
 
-	<<set _SFIncome = Math.ceil(_SFIncome*_troopMultiplier*_unitMultiplier*_actionMultiplier*_depravityMultiplier-_SFupkeep),$SFUnit.Troops += Math.round(_FNGs/2)>>
+	<<set _SFIncome = Math.ceil((_SFIncome*_troopMultiplier/10*_unitMultiplier/10*_actionMultiplier/10*_depravityMultiplier)-_SFupkeep),$SFUnit.Troops += Math.round(_FNGs/2)>>
 	/*Remove below line if hard mode ever gets fixed*/
-	<<if $economy < 100>> <<set _SFIncome = Math.ceil(_SFIncome*(1+($week/10)))>> <</if>>
+	<<if $economy < 100>> <<set _SFIncome = Math.ceil(_SFIncome*(1+($week/100)))>> <</if>>
 	<<if $SFUnit.Troops > 2000>> <<set $SFUnit.Troops = random(1955,1999)>> <</if>>
 	<<if $rep > 20000>> <<set $rep = 20000>> <</if>>
 	<<if $arcologies[0].prosperity > $AProsperityCap>>
@@ -190,9 +190,9 @@ $SF.Caps managed to recruit <<print Math.round(_FNGs/2)>> new soldiers this week
 	<<set _MenialSlaves = Math.ceil(random(1,((_TradeShowAttendes*_MenialSlavesPerAttendee)/10)))>>
 	<<set _TSProfit = Math.ceil(500000*(1+($SF.Units/1000))*(1+($arcologies[0].prosperity/1000))*_Env)>>
 	During a break, The Colonel managed to sell some generic schematics to the _TradeShowAttendes attendes, some decided to also give her some menial slaves as a bonus.<br>
-	<<set $helots = $helots+_MenialSlaves>>
+	<<set $helots += _MenialSlaves>>
 	<<set $SFTradeShow.Helots += _MenialSlaves,$SFTradeShow.TotalHelots += _MenialSlaves>>
-	<<set $cash = $cash+_TSProfit,$SFTradeShow.Income += _TSProfit>>
+	<<set $cash += _TSProfit,$SFTradeShow.Income += _TSProfit>>
 	<<set $SFTradeShow.Revenue += _TSProfit>>
 	<<if $secExp > 0 && $mercenaries > 0>> <<set $SFTradeShow.Mercs = 0>>
 		<<set _NewMercs = random(1,(_TradeShowAttendes/10))>>
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/forceFeeding.tw b/src/pregmod/forceFeeding.tw
index f35489e2e48ada342f632853e1e7998970d45e4e..163080eb1ba1dc1613f93a5ccecd060f4174a1c4 100644
--- a/src/pregmod/forceFeeding.tw
+++ b/src/pregmod/forceFeeding.tw
@@ -405,7 +405,7 @@ and a little jiggle from $his gut.
 		After a few minutes of rest,
 	<<elseif $activeSlave.devotion <= 50>>
 		$He sighs contently, hoping you'll give $him more attention.
-		$His meal attempts to come back up on $him several times, but $he holds $he dutifully holds it down.
+		$His meal attempts to come back up on $him several times, but $he dutifully holds it down.
 		After a few minutes of rest,
 	<<else>>
 		$He sighs contently, hoping you'll give $him more attention.
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..3c70f1940e2a8199f1e409820f53d982b93d6fa1 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()>>
 
@@ -3581,3 +3670,7 @@ Done!
 <<if ndef $postSexCleanUp>>
 	<<set $postSexCleanUp = 1>>
 <</if>>
+
+<<if def $individualCosts>>
+	<<unset $individualCosts>>
+<</if>>
diff --git a/src/uncategorized/PESS.tw b/src/uncategorized/PESS.tw
index 673780749af1ec53d3163cf5eed1148ea611020e..bbf99abbe3b4c1e662831704a29145eb7cbf53bc 100644
--- a/src/uncategorized/PESS.tw
+++ b/src/uncategorized/PESS.tw
@@ -160,7 +160,7 @@ $He sees you examining at $him, and looks back at you submissively, too tired to
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$activeSlave.slaveName stomps over to the drunken delinquent, who finds himself sobering up with each step the muscular woman makes in his direction. Soon he finds himself <<if ($activeSlave.height > 170)>>staring up at her $activeSlave.faceShape face<<elseif ($activeSlave.height > 150)>>eye to eye with her $activeSlave.faceShape face<<else>>looking down at her $activeSlave.faceShape face<</if>> as $he grips him by the shoulders and lifts him bodily off of the ground. The man squeals with terror as he begs forgiveness for his affront to you, but $activeSlave.slaveName simply tosses him away from your presence as if discharging him from a bar. Word of your herculean protector is soon @@.green;the talk of $arcologies[0].name and beyond@@, with many in the Old World mistakenly believing you are guarded by a warrior so strong $he can throw any man the breadth of a room in a single heave.
-	<<set $rep += 500>>
+	<<set $rep += 500>> <<if $activeSlave.prestige < 1>> <<set $activeSlave.prestige = 1,$activeSlave.prestigeDesc = "Word in the arcology is $he can throw a man the breadth of a room in a single heave.">> <</if>>
 	<</replace>>
 <</link>>
 <</if>> 
@@ -171,7 +171,7 @@ $He sees you examining at $him, and looks back at you submissively, too tired to
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$activeSlave.slaveName calmly strides over to the drunken delinquent and simply towers over him with a glower on her $activeSlave.faceShape face. The man quickly finds himself sobering up and moves to run from the scene with all the drunken haste he can muster. Unfortunately for him, $activeSlave.slaveName matches his pace with a brisk power-walk, and the citizen soon finds himself face down on the pavement after a swift strike to the back of the head. Word of your giant protector is soon @@.green;the talk of $arcologies[0].name and beyond@@, with many in the Old World mistakenly believing you are guarded by a warrior twice the height of any man.
-	<<set $rep += 500>>
+	<<set $rep += 500>> <<if $activeSlave.prestige < 1>> <<set $activeSlave.prestige = 1,$activeSlave.prestigeDesc = "Word in the arcology is $he is twice the height of any man.">> <</if>>
 	<</replace>>
 <</link>>
 <</if>> 
@@ -182,7 +182,7 @@ $He sees you examining at $him, and looks back at you submissively, too tired to
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$activeSlave.slaveName seductively saunters over to the drunken delinquent and poses alluringly nearby. The man can't help but become entranced by her gorgeous $activeSlave.faceShape face, and follows her like a lost puppy as $he beckons with one outstretched finger. $activeSlave.slaveName lures her prey into a nearby alley before slamming her fist into the unsuspecting drunkard's face, leaving him knocked out cold on the floor before returning to guard you. Word of your beautiful protector is soon @@.green;the talk of $arcologies[0].name and beyond@@, with many in the Old World mistakenly believing you are guarded by a warrior unmatched by any woman in the world in her good looks.
-	<<set $rep += 500>>
+	<<set $rep += 500>> <<if $activeSlave.prestige < 1>> <<set $activeSlave.prestige = 1,$activeSlave.prestigeDesc = "Word in the arcology is $his beauty is unmatched by any woman in the world.">> <</if>>
 	<</replace>>
 <</link>>
 <</if>> 
@@ -193,7 +193,7 @@ $He sees you examining at $him, and looks back at you submissively, too tired to
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$activeSlave.slaveName walks over to the man, puts an arm about his shoulders and explains to him <<if canTalk($activeSlave)>>in hushed whispers<<else>>with rapid sign language<</if>> the severity of the situation. The man sobers up quickly as the reality of his actions set in and he soon beats a hasty exit from the scene as $activeSlave.slaveName returns to guard your body. Word of your tactful protector is soon @@.green;the talk of $arcologies[0].name and beyond@@, with many in the Old World mistakenly believing you are guarded by a warrior whose silver tongue is the envy of many politicians.
-	<<set $rep += 500>>
+	<<set $rep += 500>> <<if $activeSlave.prestige < 1>> <<set $activeSlave.prestige = 1,$activeSlave.prestigeDesc = "$His silver tongue is the envy of many in the arcology.">> <</if>>
 	<</replace>>
 <</link>>
 <</if>> 
@@ -204,7 +204,7 @@ $He sees you examining at $him, and looks back at you submissively, too tired to
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$activeSlave.slaveName quickly maneuvers over to the man and strikes him low in the stomach, robbing him of breath in a single strike. The man sobers up somewhat and raises his arms to defend himself, but finds himself outmatched by $activeSlave.slaveName's skillful attacks. It doesn't take long for $activeSlave.slaveName to reduce the man to a battered heap on the ground with her hands alone, after which $he soon returns to you to guard your body. Word of your martial protector is soon @@.green;the talk of $arcologies[0].name and beyond@@, with many in the Old World mistakenly believing you are guarded by a warrior whose hands are deadlier than many weapons.
-	<<set $rep += 500>>
+	<<set $rep += 500>> <<if $activeSlave.prestige < 1>> <<set $activeSlave.prestige = 1,$activeSlave.prestigeDesc = "Word in the arcology is $his hands are deadlier than many weapons.">> <</if>>
 	<</replace>>
 <</link>>
 <</if>> 
diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw
index cd5c8b0f5d0573708dee067cb7fb018903db7eae..ab2983e786b526d4f2da5b611445b6080ee47b31 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 $helots += random(0,3)>>
+	<<set _rentMultiplier *= 0.95>>
+	<<set _movement = random(0,3), $helots += _movement, $ASlaves -= _movement>>
 <</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..82d1ee5bab8b8cabf59b64bdaf999925b3a9e69f 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -1,6 +1,6 @@
 :: Costs Report [nobr]
 
-<<set $nextButton = "Back to Main", $nextLink = "Main">>
+<<set $nextButton = "Back to Main", $nextLink = "Main",_archologyCosts = 0>>
 <<if $PCSlutContacts == 0>><<set $PCSlutContacts = 1>><</if>>
 
 //Your weekly costs are as follows.//
@@ -13,26 +13,55 @@ 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))))>>.
+<<set _archologyCosts += 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)>>
+	<<set _archologyCosts += 500>>
 <</if>>
 
 <<if $PC.preg == -1>>
 	<br>Your Contraceptives expenses: <<print cashFormat(25)>>
+	<<set _archologyCosts += 25>>
 <<elseif $PC.fertDrugs == 1>>
 	<br>Your fertility regimen: <<print cashFormat(50)>>
+	<<set _archologyCosts += 50>>
 <<elseif $PC.preg >= 16>>
 	<br>Increased living expenses due to being pregnant: <<print cashFormat(100)>>
+	<<set _archologyCosts += 100>>
 <</if>>
 <<if $PC.staminaPills == 1>>
 	<br>Your stamina pills: <<print cashFormat(50)>>
+	<<set _archologyCosts += 50>>
+<</if>>
+
+<<if $PC.actualAge >= $IsInPrimePC && $PC.actualAge < $IsPastPrimePC>>
+	<<if ($personalAttention == "trading") || ($personalAttention == "warfare") || ($personalAttention == "slaving") || ($personalAttention == "engineering") || ($personalAttention == "medicine") || ($personalAttention == "hacking")>>
+		<br><br>
+		<<set _cost = 10000*$AgeEffectOnTrainerPricingPC,_archologyCosts += _cost>>
+		<<switch $personalAttention>>
+			<<case trading>>
+				__Trading__
+			<<case warfare>>
+				__Warfare__
+			<<case slaving>>
+				__Slaving__
+			<<case engineering>>
+				__Engineering__
+			<<case medicine>>
+				__Medicine__
+			<<case hacking>>
+				__Hacking__
+		<</switch>>
+		trainer fees: <<print cashFormat(_cost)>>
+	<</if>>
 <</if>>
 
 <<if $breederOrphanageTotal > 0>><<set _breederTuition = 50>><<else>><<set _breederTuition = 0>><</if>>
 <<if $citizenOrphanageTotal+$privateOrphanageTotal+$breederOrphanageTotal > 0>>
 	<br> __Orphanage__ fee: @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition)>>@@
+	<<set _archologyCosts += $citizenOrphanageTotal*100+$privateOrphanageTotal*500+_breederTuition>>
 	<<if $citizenOrphanageTotal > 0>>
 		<br>&nbsp;Citizen: @@.yellowgreen;<<print cashFormat(100)>>@@ per child. Currently <<print commaNum($citizenOrphanageTotal)>> are being taught, bringing the total to @@.yellowgreen;<<print cashFormat($citizenOrphanageTotal*100)>>@@.
 	<</if>>
@@ -46,17 +75,20 @@ your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+
 
 <<if $peacekeepers != 0 && $peacekeepers.undermining != 0>>
 	<br> <<print cashFormat($peacekeepers.undermining)>> to undermine political support for the nearby old world peacekeeping mission.
+	<<set _archologyCosts += $peacekeepers.undermining>>
 <</if>>
 
 <<if $SF.Toggle && $SF.Active >= 1>>
 	<<if $SF.Subsidy>>
 		<br>__Finacinally supporting $SF.Lower unitll self sufficiency:__ <<print cashFormat(Math.ceil( (10000*($SFUnit.Troops/10))+(1+($arcologies[0].prosperity/100))+(1+($SF.Units/100)) ))>>
+		<<set _archologyCosts += Math.ceil( (10000*($SFUnit.Troops/10))+(1+($arcologies[0].prosperity/100))+(1+($SF.Units/100)) )>>
 	<</if>>
 	<<if $SF.Bonus>>
 		<<= Count()>>
 		<br>__Bonuses for basic FS acceptance amoungst $SF.Lower:__ <<print cashFormat(Math.ceil(_SFCashBonus))>>
 		<br>&nbsp;Colonel <<print cashFormat(_ColonelCashBonus*_Env)>>.
-		<br>&nbsp;<<print cashFormat(_TroopCashBonus)>> per solider, totalling <<print cashFormat(Math.ceil(_TroopCashBonus*_Env))>>.
+		&nbsp;Troop size: <<print commaNum($SFUnit.Troops)>> and each solider recives <<print cashFormat(_inviTroop*_Env)>>, totalling <<print cashFormat(Math.ceil(_TroopCashBonus*_Env))>>.
+		<<set _archologyCosts += _SFCashBonus>>
 	<</if>>
 <</if>>
 <<if $mercenaries > 0>>
@@ -66,76 +98,103 @@ your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+
 	<br>__Mercenary__ expenses: <<print cashFormat(_mercCosts)>>
 	<<if $barracks>><<else>>//@@.red;Increased by the lack of a barracks.@@//<</if>>
 	<<if ($PC.warfare >= 100) || ($PC.career == "arcology owner")>>//Reduced by your @@.springgreen;mercenary contacts.@@//<</if>>
+	<<set _archologyCosts += _mercCosts>>
 <</if>>
 
-<<if $brothel > 0>>
+<<if $brothel > 0 || $club > 0 || $arcade > 0 || $dairy > 0 || $farmyard > 0>>
+	<br>__Archology building maintenance__:
+	<<if $brothel > 0>>
 	<<set _advertising = 0>>
 	<<if $brothel > 0>>
 		<<set _advertising = $brothelAdsSpending>>
 	<</if>>
-	<br>__Brothel__ maintenance: <<print cashFormat(($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising)>>
+	Brothel: <<print cashFormat(($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising)>>
+	<<set _archologyCosts += ($brothel*$facilityCost)+(0.1*$brothelUpgradeDrugs*$brothel*$facilityCost)+_advertising>>
 <</if>>
-
-<<if $club > 0>>
-	<<set _advertising= 0>>
 	<<if $club > 0>>
-		<<set _advertising = $clubAdsSpending>>
+		<<set _advertising= 0>>
+		<<if $club > 0>>
+			<<set _advertising = $clubAdsSpending>>
+			<<set _archologyCosts += $clubAdsSpending>>
+		<</if>>
+		Club: <<print cashFormat(($club*$facilityCost)+(0.2*$clubUpgradePDAs*$club*$facilityCost)+_advertising)>>
+		<<set _archologyCosts += ($club*$facilityCost)+(0.2*$clubUpgradePDAs*$club*$facilityCost)+_advertising>>
+	<</if>>
+	<<if $arcade > 0>>
+		Arcade: <<print cashFormat((0.5*$arcade*$facilityCost)+(0.2*$arcadeUpgradeInjectors*$arcade*$facilityCost)+(0.2*$arcadeUpgradeCollectors*$arcade*$facilityCost))>>
+		<<set _archologyCosts += (0.5*$arcade*$facilityCost)+(0.2*$arcadeUpgradeInjectors*$arcade*$facilityCost)+(0.2*$arcadeUpgradeCollectors*$arcade*$facilityCost)>>
+	<</if>>
+	<<if $dairy > 0>>
+		<br>__Dairy__: <<print cashFormat(($dairy*$facilityCost)+(0.2*$dairyFeedersUpgrade*$dairy*$facilityCost)+(0.1*$dairyPregUpgrade*$dairy*$facilityCost))>>
+		<<set _archologyCosts += ($dairy*$facilityCost)+(0.2*$dairyFeedersUpgrade*$dairy*$facilityCost)+(0.1*$dairyPregUpgrade*$dairy*$facilityCost)>>
+		<<if $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren > 0>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional maintenance for milking machines upgraded with biological components: <<print cashFormat(($bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren)*100)>>
+			<<set _archologyCosts += ($bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren)*100>>
+		<</if>>
 	<</if>>
-	<br>__Club__ maintenance: <<print cashFormat(($club*$facilityCost)+(0.2*$clubUpgradePDAs*$club*$facilityCost)+_advertising)>>
-<</if>>
-<<if $arcade > 0>>
-	<br>__Arcade__ maintenance: <<print cashFormat((0.5*$arcade*$facilityCost)+(0.2*$arcadeUpgradeInjectors*$arcade*$facilityCost)+(0.2*$arcadeUpgradeCollectors*$arcade*$facilityCost))>>
-<</if>>
-<<if $dairy > 0>>
-	<br>__Dairy__ maintenance: <<print cashFormat(($dairy*$facilityCost)+(0.2*$dairyFeedersUpgrade*$dairy*$facilityCost)+(0.1*$dairyPregUpgrade*$dairy*$facilityCost))>>
-	<<if $bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren > 0>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional maintenance for milking machines upgraded with biological components: <<print cashFormat(($bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren)*100)>>
+	<<if $farmyard > 0>> /*TODO: this will also need to be expanded*/
+		__Farmyard__: <<print cashFormat($farmyard*$facilityCost)>>
+		<<set _archologyCosts += $farmyard*$facilityCost>>
 	<</if>>
 <</if>>
-<<if ($servantsQuarters > 0) && ($servantsQuartersUpgradeMonitoring > 0)>>
-	<br>__Servants' Quarters__ maintenance: <<print cashFormat((0.2*$servantsQuartersUpgradeMonitoring*$servantsQuarters*$facilityCost))>>
-<</if>>
-<<if $nursery > 0>>		/*TODO: this will definitely need to be expanded to take into account the number of children and other factors*/
-	<br>__Nursery maintenance: <<print cashFormat($nurseryNannies*$facilityCost)>>
-<</if>>
-<<if $farmyard > 0>>	/*TODO: this will also need to be expanded*/
-	<br>__Farmyard__ maintenance: <<print cashFormat($farmyard*$facilityCost)>>
-<</if>>
 
-<<if $incubator > 0>>
-	<br>__Incubation Facility__ maintenance and resource drain: <<print cashFormat((10*$incubator*$facilityCost)+(0.2*$incubatorUpgradeWeight*$incubator*$facilityCost)+(0.2*$incubatorUpgradeMuscles*$incubator*$facilityCost)+(0.2*$incubatorUpgradeReproduction*$incubator*$facilityCost)+(0.2*$incubatorUpgradeGrowthStims*$incubator*$facilityCost)+(0.5*$incubatorUpgradeSpeed*$incubator*$facilityCost))>>
-	<<if $incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting > 0>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional monitoring and maintenance costs for growing children: <<print cashFormat((($incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting+$incubatorGrowthStimsSetting)*500))>>
+<<if ($servantsQuarters > 0 && $servantsQuartersUpgradeMonitoring > 0) ||
+$nursery > 0 || $masterSuiteUpgradePregnancy > 0 || $incubator > 0 ||
+($cyberMod != 0 && $researchLab.built == "true")>>
+<br>__Penthouse facility maintenance__: 
+	<<if ($servantsQuarters > 0) && ($servantsQuartersUpgradeMonitoring > 0)>>
+		Servants' Quarters: <<print cashFormat((0.2*$servantsQuartersUpgradeMonitoring*$servantsQuarters*$facilityCost))>> 
+		<<set _archologyCosts += 0.2*$servantsQuartersUpgradeMonitoring*$servantsQuarters*$facilityCost>>
+	<</if>>
+	<<if $nursery > 0>> /*TODO: this will definitely need to be expanded to take into account the number of children and other factors*/
+		Nursery: <<print cashFormat($nursery*$facilityCost)>> 
+		<<set _archologyCosts += $nursery*$facilityCost>>
+	<</if>>
+	<<if ($masterSuiteUpgradePregnancy > 0)>>
+		Master Suite: <<print cashFormat(((500*$masterSuiteUpgradePregnancy) + (1000*$masterSuitePregnancyFertilitySupplements)))>>
+		<<set _archologyCosts += ((500*$masterSuiteUpgradePregnancy) + (1000*$masterSuitePregnancyFertilitySupplements))>>
+	<</if>>
+	<<if $incubator > 0>>
+		<br>__Incubation Facility__: <<print cashFormat((10*$incubator*$facilityCost)+(0.2*$incubatorUpgradeWeight*$incubator*$facilityCost)+(0.2*$incubatorUpgradeMuscles*$incubator*$facilityCost)+(0.2*$incubatorUpgradeReproduction*$incubator*$facilityCost)+(0.2*$incubatorUpgradeGrowthStims*$incubator*$facilityCost)+(0.5*$incubatorUpgradeSpeed*$incubator*$facilityCost))>>
+		<<set _archologyCosts += (10*$incubator*$facilityCost)+(0.2*$incubatorUpgradeWeight*$incubator*$facilityCost)+(0.2*$incubatorUpgradeMuscles*$incubator*$facilityCost)+(0.2*$incubatorUpgradeReproduction*$incubator*$facilityCost)+(0.2*$incubatorUpgradeGrowthStims*$incubator*$facilityCost)+(0.5*$incubatorUpgradeSpeed*$incubator*$facilityCost)>>
+		<<if $incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting > 0>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional monitoring and maintenance costs for growing children: <<print cashFormat((($incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting+$incubatorGrowthStimsSetting)*500))>>
+			<<set _archologyCosts += (($incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting+$incubatorGrowthStimsSetting)*500)>>
+		<</if>>
 	<</if>>
-<</if>>
-<<if ($masterSuiteUpgradePregnancy == 1)>>
-	<br>__Master Suite__ maintenance: <<print cashFormat(((500*$masterSuiteUpgradePregnancy) + (1000*$masterSuitePregnancyFertilitySupplements)))>>
-<</if>>
-<<if $cyberMod != 0>>
-	<<if ($researchLab.built == "true")>>
-		<br>__Research Lab__ maintenance: <<print cashFormat((100*$researchLab.maxSpace))>>
-		<<if $researchLab.hired != 0>>&nbsp;__Scientists__: <<print cashFormat((300*$researchLab.hired))>><</if>>
-		<<if $researchLab.menials != 0>>&nbsp;__Menial slaves__: <<print cashFormat((100*$researchLab.menials))>><</if>>
+	<<if $cyberMod != 0 && $researchLab.built == "true">>
+		<br>__Research Lab__: <<print cashFormat((100*$researchLab.maxSpace))>>
+		<<set _archologyCosts += 100*$researchLab.maxSpace>>
+		<<if $researchLab.hired != 0>>&nbsp;__Scientists__: <<print cashFormat((300*$researchLab.hired))>> <<set _archologyCosts += 300*$researchLab.hired>> <</if>>
+		<<if $researchLab.menials != 0>>&nbsp;__Menial slaves__: <<print cashFormat((100*$researchLab.menials))>> <<set _archologyCosts += 100*$researchLab.menials>> <</if>>
 	<</if>>
-<</if>>
+<</if>>	
 
 /* security expansion */
-<<if $secExp == 1>>
+<<if $secExp > 0>>
 	<br>
 	<<if $edictsUpkeep + $SFSupportUpkeep > 0>>
 		__Edicts Upkeep__: <<print cashFormat($edictsUpkeep + $SFSupportUpkeep)>>
+		<<set _archologyCosts += ($edictsUpkeep + $SFSupportUpkeep)>>
 	<</if>>
-	<<if $propHub != 0>>
-		<br>__Propaganda Hub__ maintenance: <<print cashFormat($propHubUpkeep)>>
-	<</if>>
-	<<if $secHQ != 0>>
-		<br>__Security Headquarters__ maintenance: <<print cashFormat(($secHQUpkeep)+(20*$secHelots))>>
-	<</if>>
-	<<if $secBarracks != 0>>
-		<br>__Barracks__ maintenance: <<print cashFormat($secBarracksUpkeep)>>
-	<</if>>
-	<<if $riotCenter != 0>>
-		<br>__Riot Control Center__ maintenance: <<print cashFormat($riotUpkeep)>>
+	<<if $propHub != 0 || $secHQ != 0 || $secBarracks != 0 || $riotCenter != 0>>
+		<br>__Security apartus maintenance costs__: 
+		<<if $propHub != 0>>
+			Propaganda Hub: @@.yellowgreen;<<print cashFormat($propHubUpkeep)>>@@ 
+			<<set _archologyCosts += $propHubUpkeep>>
+		<</if>>
+		<<if $secHQ != 0>>
+			Security Headquarters: @@.yellowgreen;<<print cashFormat(($secHQUpkeep)+(20*$secHelots))>>@@ 
+			<<set _archologyCosts += ($secHQUpkeep)+(20*$secHelots)>>
+		<</if>>
+		<<if $secBarracks != 0>>
+			Barracks: @@.yellowgreen;<<print cashFormat($secBarracksUpkeep)>>@@ 
+			<<set _archologyCosts += $secBarracksUpkeep>>
+		<</if>>
+		<<if $riotCenter != 0>>
+			Riot Control Center: @@.yellowgreen;<<print cashFormat($riotUpkeep)>>@@
+			<<set _archologyCosts += $riotUpkeep>>
+		<</if>>
 	<</if>>
 	
 	<<if $soldierWages == 0>>
@@ -145,462 +204,502 @@ your __personal living expenses__ are <<print cashFormat(Math.trunc($girls*(250+
 	<<else>>
 		<<set _soldierMod = 2>>
 	<</if>>
-	<<for _i = 0; _i < $militiaUnits.length; _i++>>
-		<br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: <<print cashFormat($militiaUnits[_i].troops*$soldierUpkeep * _soldierMod)>>
-	<</for>>
-	<<for _i = 0; _i < $slaveUnits.length; _i++>>
-		<br>__<<print $slaveUnits[_i].platoonName>>__ upkeep: <<print cashFormat($slaveUnits[_i].troops*$soldierUpkeep * 0.5 * _soldierMod)>>
-	<</for>>	
-	<<for _i = 0; _i < $mercUnits.length; _i++>>
-		<br>__<<print $mercUnits[_i].platoonName>>__ upkeep: <<print cashFormat($mercUnits[_i].troops*$soldierUpkeep * 1.5 * _soldierMod)>>
-	<</for>>
+	<<if $militiaUnits.length > 0>>
+		<br>__Militia platoon(s) upkeep__: 
+		<<set _milTotal = 0>>
+		<<for _i = 0; _i < $militiaUnits.length; _i++>>
+			 <i> <<print ordinalSuffix($militiaUnits.length-[_i])>>:</i> <<print cashFormat($militiaUnits[_i].troops*$soldierUpkeep * _soldierMod)>>
+			<<set _milTotal += $militiaUnits[_i].troops*$soldierUpkeep * _soldierMod>>
+		<</for>>
+		<br>&nbsp;__Total__: @@.yellowgreen;<<print cashFormat(_milTotal)>>@@
+	<</if>>
+	<<if $slaveUnits.length > 0>>
+		<br>__Slave platoon(s) upkeep__: 
+		<<set _slaveTotal = 0>>
+		<<for _i = 0; _i < $slaveUnits.length; _i++>>
+			 <i> <<print ordinalSuffix($slaveUnits.length-[_i])>>:</i> <<print cashFormat($slaveUnits[_i].troops*$soldierUpkeep * 0.5 * _soldierMod)>>
+			<<set _slaveTotal += $slaveUnits[_i].troops*$soldierUpkeep * 0.5 * _soldierMod>>
+		<</for>>
+		<br>&nbsp;__Total__: @@.yellowgreen;<<print cashFormat(_slaveTotal)>>@@
+	<</if>>
+	<<if $mercUnits.length > 0>>
+		<br>__Merc platoon(s) upkeep__: 
+		<<set _mercTotal = 0>>
+		<<for _i = 0; _i < $mercUnits.length; _i++>>
+			 <i> <<print ordinalSuffix($mercUnits.length-[_i])>>:</i> <<print cashFormat($mercUnits[_i].troops*$soldierUpkeep * 1.5 * _soldierMod)>>
+			<<set _mercTotal += $mercUnits[_i].troops*$soldierUpkeep * 1.5 * _soldierMod>>
+		<</for>>
+		<br>&nbsp;__Total__: @@.yellowgreen;<<print cashFormat(_mercTotal)>>@@
+		<br>__Total defense force__ upkeep: @@.yellowgreen;<<print cashFormat(_milTotal+_slaveTotal+_mercTotal)>>@@
+		<<set _archologyCosts += (_milTotal+_slaveTotal+_mercTotal)>>
+	<</if>>
 <</if>>
 
 <<if $econWeatherDamage && $disasterResponse > 0>>
 	<<set _DRUUpkeep = Math.trunc($disasterResponse * 200000 / $localEcon)>>
 	<br>__Disaster Response Unit__ expenses: <<print cashFormat(_DRUUpkeep)>>
+	<<set _archologyCosts += _DRUUpkeep>>
+<</if>>
+<<if $antiWeatherFreeze > 0>>
+	<<set _AWFUpkeep = Math.trunc($antiWeatherFreeze * 200000 / $localEcon)>>
+	<br>__Passenger Upgrades__ expenses: <<print cashFormat(_AWFUpkeep)>>
+	<<set _archologyCosts += _AWFUpkeep>>
 <</if>>
 <<if $FSSpending != 0>>
 	<br>__Society Shaping__ expenses: <<print cashFormat($FSSpending)>>
+	<<set _archologyCosts += $FSSpending>>
 <</if>>
 <<if $Recruiter != 0>>
 	<br>__Recruiting__ expenses: <<print cashFormat(250)>>
+	<<set _archologyCosts += 250>>
 <</if>>
-<<if $TSS.schoolPresent == 1>>
+<<if $TSS.schoolPresent > 0>>
 	<br>__The Slavegirl School__ branch campus upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $GRI.schoolPresent == 1>>
+<<if $GRI.schoolPresent > 0>>
 	<br>__Growth Research Institute__ subsidiary lab upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $SCP.schoolPresent == 1>>
+<<if $SCP.schoolPresent > 0>>
 	<br>__St. Claver Preparatory__ branch campus upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $LDE.schoolPresent == 1>>
+<<if $LDE.schoolPresent > 0>>
 	<br>__L'École des Enculées__ branch campus upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $TGA.schoolPresent == 1>>
+<<if $TGA.schoolPresent > 0>>
 	<br>__The Gymnasium-Academy__ branch campus upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $HA.schoolPresent == 1>>
+<<if $HA.schoolPresent > 0>>
 	<br>__The Hippolyta Academy__ branch campus upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if $TCR.schoolPresent == 1>>
+<<if $TCR.schoolPresent > 0>>
 	<br>__The Cattle Ranch__ local pasture upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
-<<if ($TFS.schoolPresent == 1) && (($PC.dick == 0) || ($PC.vagina == 0) || ($PC.boobs == 0))>>
+<<if ($TFS.schoolPresent > 0) && (($PC.dick < 1) || ($PC.vagina < 1) || ($PC.boobs < 1))>>
 	<br>__The Futanari Sisters__ community upkeep: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $TSS.subsidize != 0>>
 	<br>__The Slavegirl School__ branch campus influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $GRI.subsidize != 0>>
 	<br>__Growth Research Institute__ subsidiary lab influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $SCP.subsidize != 0>>
 	<br>__St. Claver Preparatory__ branch campus influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $LDE.subsidize != 0>>
 	<br>__L'École des Enculées__ branch campus influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $TGA.subsidize != 0>>
 	<br>__The Gymnasium-Academy__ branch campus influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $HA.subsidize != 0>>
 	<br>__The Hippolyta Academy__ branch campus influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $TCR.subsidize != 0>>
 	<br>__The Cattle Ranch__  local pasture influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 <<if $TFS.subsidize != 0>>
 	<br>__The Futanari Sisters__ community influence: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 
-<<if $alwaysSubsidizeGrowth == 1>>
-	<br>Weekly arcology growth subsidy: <<print cashFormat($policyCost)>>
-<</if>>
-<<if $alwaysSubsidizeRep == 1>>
-	<br>Weekly self-promotion budget: <<print cashFormat($policyCost)>>
-<</if>>
-<<if $RegularParties == 1>>
-	<br>Weekly social gatherings: <<print cashFormat($policyCost)>>
+<<if $alwaysSubsidizeGrowth > 0 || $alwaysSubsidizeRep > 0 || $RegularParties > 0>>
+	<br>__Weekly costs__:
+	<<if $alwaysSubsidizeGrowth > 0>>
+		&nbsp;arcology growth subsidy: @@.yellowgreen;<<print cashFormat($policyCost)>>@@ 
+		<<set _archologyCosts += $policyCost>>
+	<</if>>
+	<<if $alwaysSubsidizeRep > 0>>
+		self-promotion budget: @@.yellowgreen;<<print cashFormat($policyCost)>>@@ 
+		<<set _archologyCosts += $policyCost>>
+	<</if>>
+	<<if $RegularParties > 0>>
+		social gatherings: @@.yellowgreen;<<print cashFormat($policyCost)>>@@ 
+		<<set _archologyCosts += $policyCost>>
+	<</if>>
 <</if>>
 
 <<if $ProImmigrationCash == 1>>
 	<br>Pro-immigration promotion budget: <<print cashFormat($policyCost)>>
+	<<set _archologyCosts += $policyCost>>
 <</if>>
 <<if $AntiEnslavementCash == 1>>
 	<br>Anti-enslavement charity budget: <<print cashFormat($policyCost)>>
+	<<set _archologyCosts += $policyCost>>
 <</if>>
 
 <<if $CoursingAssociation == 1>>
 	<br>Coursing Association membership: <<print cashFormat(1000)>>
+	<<set _archologyCosts += 1000>>
 <</if>>
 
-<<if $PC.actualAge >= $IsInPrimePC && $PC.actualAge < $IsPastPrimePC>>
-<br><br>
-	<<if ($personalAttention == "trading") || ($personalAttention == "warfare") || ($personalAttention == "slaving") || ($personalAttention == "engineering") || ($personalAttention == "medicine") || ($personalAttention == "hacking")>>
-		<<set _cost = 10000*$AgeEffectOnTrainerPricingPC>>
-		<<switch $personalAttention>>
-		<<case trading>>
-			__Trading__
-		<<case warfare>>
-			__Warfare__
-		<<case slaving>>
-			__Slaving__
-		<<case engineering>>
-			__Engineering__
-		<<case medicine>>
-			__Medicine__
-		<<case hacking>>
-			__Hacking__
-		<</switch>>
-		trainer fees: <<print cashFormat(_cost)>>
-	<</if>>
-<</if>>
+<br>Overall archology costs: @@.yellowgreen;<<print cashFormat(_archologyCosts)>>@@
 
 <br><br>
 
-<<for $i = 0; $i < $slaves.length; $i++>>
-	<<set $individualCosts = 0>>
+<<set _total = 0>> <<set _SL = $slaves.length>>
+<<for $i = 0; $i < _SL; $i++>>
+<<set _individualCosts = 0>>
 	''$slaves[$i].slaveName'':
 	<<switch $slaves[$i].assignment>>
-	<<case "be confined in the arcade">>
-		<<set _livingExpense = ($rulesCost*.75)>>
-	<<case "work in the dairy">>
-		<<if $dairyRestraintsSetting >= 2>>
+		<<case "be confined in the arcade">>
 			<<set _livingExpense = ($rulesCost*.75)>>
-		<<elseif $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<elseif $dairyDecoration == "Degradationist">>
-			<<set _livingExpense = ($rulesCost*.9)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
-	<<case "work as a farmhand">>		/* TODO: this may need tweaking */
-		<<if $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
-	<<case "work in the brothel">>
-		<<if $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
-	<<case "serve in the club" "learn in the schoolroom">>
-		<<set _livingExpense = ($rulesCost*1.5)>>
-	<<case "get treatment in the clinic">>
-		<<if $slaves[$i].livingRules == "luxurious">>
-			<<set _livingExpense = ($rulesCost*2)>>
-		<<elseif $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
-	<<case "rest in the spa" "work as a nanny">>
-		<<if $slaves[$i].livingRules == "luxurious">>
-			<<set _livingExpense = ($rulesCost*1.75)>>
-		<<elseif $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
-	<<case "be a servant">>
-		<<if $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.5)>>
-		<<else>>
-			<<if $servantsQuartersDecoration == "Degradationist">>
+		<<case "work in the dairy">>
+			<<if $dairyRestraintsSetting >= 2>>
+				<<set _livingExpense = ($rulesCost*.75)>>
+			<<elseif $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
+			<<elseif $dairyDecoration == "Degradationist">>
 				<<set _livingExpense = ($rulesCost*.9)>>
 			<<else>>
 				<<set _livingExpense = $rulesCost>>
 			<</if>>
-		<</if>>
-	<<case "be confined in the cellblock">>
-		<<if $slaves[$i].livingRules == "normal">>
-			<<set _livingExpense = ($rulesCost*1.25)>>
-		<<else>>
-			<<set _livingExpense = ($rulesCost*.9)>>
-		<</if>>
-	<<case "be the Madam" "be the DJ" "be the Nurse" "be the Wardeness" "be the Attendant" "be the Matron" "be the Schoolteacher" "be the Stewardess" "be the Milkmaid" "be the Farmer">>
-		<<set _livingExpense = ($rulesCost*2)>>
-	<<default>>
-		<<if $slaves[$i].livingRules == "luxurious">>
-			<<if $slaves[$i].relationship >= 4>>
-				<<set _livingExpense = ($rulesCost*3)>>
+		<<case "work as a farmhand">>		/* TODO: this may need tweaking */
+			<<if $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
+			<<else>>
+				<<set _livingExpense = $rulesCost>>
+			<</if>>
+		<<case "work in the brothel">>
+			<<if $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
+			<<else>>
+				<<set _livingExpense = $rulesCost>>
+			<</if>>
+		<<case "serve in the club" "learn in the schoolroom">>
+			<<set _livingExpense = ($rulesCost*1.5)>>
+		<<case "get treatment in the clinic">>
+			<<if $slaves[$i].livingRules == "luxurious">>
+				<<set _livingExpense = ($rulesCost*2)>>
+			<<elseif $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
+			<<else>>
+				<<set _livingExpense = $rulesCost>>
+			<</if>>
+		<<case "rest in the spa" "work as a nanny">>
+			<<if $slaves[$i].livingRules == "luxurious">>
+				<<set _livingExpense = ($rulesCost*1.75)>>
+			<<elseif $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
+			<<else>>
+				<<set _livingExpense = $rulesCost>>
+			<</if>>
+		<<case "be a servant">>
+			<<if $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.5)>>
 			<<else>>
-				<<set _livingExpense = ($rulesCost*4)>>
+				<<if $servantsQuartersDecoration == "Degradationist">>
+					<<set _livingExpense = ($rulesCost*.9)>>
+				<<else>>
+					<<set _livingExpense = $rulesCost>>
+				<</if>>
 			<</if>>
-		<<elseif $slaves[$i].livingRules == "normal">>
+		<<case "be confined in the cellblock">>
+			<<if $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*1.25)>>
+			<<else>>
+				<<set _livingExpense = ($rulesCost*.9)>>
+			<</if>>
+		<<case "be the Madam" "be the DJ" "be the Nurse" "be the Wardeness" "be the Attendant" "be the Matron" "be the Schoolteacher" "be the Stewardess" "be the Milkmaid" "be the Farmer">>
 			<<set _livingExpense = ($rulesCost*2)>>
-		<<else>>
-			<<set _livingExpense = $rulesCost>>
-		<</if>>
+		<<default>>
+			<<if $slaves[$i].livingRules == "luxurious">>
+				<<if $slaves[$i].relationship >= 4>>
+					<<set _livingExpense = ($rulesCost*3)>>
+				<<else>>
+					<<set _livingExpense = ($rulesCost*4)>>
+				<</if>>
+			<<elseif $slaves[$i].livingRules == "normal">>
+				<<set _livingExpense = ($rulesCost*2)>>
+			<<else>>
+				<<set _livingExpense = $rulesCost>>
+			<</if>>
 	<</switch>>
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;Living expenses: <<print cashFormat(_livingExpense)>>
-	<<set $individualCosts += _livingExpense>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Living expenses:</i> <<print cashFormat(_livingExpense)>>
+	<<set _individualCosts += _livingExpense>>
 	
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;Basic slave food cost: <<print cashFormat($foodCost*4)>>
-	<<set $individualCosts += $foodCost*4>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Basic slave food cost:</i> <<print cashFormat($foodCost*4)>>
+	<<set _individualCosts += $foodCost*4>>
 	<<switch $slaves[$i].diet>>
-	<<case "fattening" "muscle building">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Heavy diet: <<print cashFormat($foodCost)>>
-		<<set $individualCosts += $foodCost>>
-	<<case "restricted" "slimming">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Light diet: //reduced by// <<print cashFormat($foodCost)>>
-		<<set $individualCosts -= $foodCost>>
+		<<case "fattening" "muscle building">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Heavy diet:</i> <<print cashFormat($foodCost)>>
+			<<set _individualCosts += $foodCost>>
+		<<case "restricted" "slimming">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Light diet: //reduced by//</i> <<print cashFormat($foodCost)>>
+			<<set _individualCosts -= $foodCost>>
 	<</switch>>
-	<<if $slaves[$i].weight > 130>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Caloric adjustment for heavy weight: <<print cashFormat($foodCost*2)>>
-		<<set $individualCosts += $foodCost*2>>
-	<<elseif $slaves[$i].weight > 50>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Caloric adjustment for high weight: <<print cashFormat($foodCost)>>
-		<<set $individualCosts += $foodCost>>
-	<<elseif $slaves[$i].weight < -50>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Caloric adjustment for light weight: //reduced by// <<print cashFormat($foodCost)>>
-		<<set $individualCosts -= $foodCost>>
+	<<if $slaves[$i].weight > 130 || $slaves[$i].weight > 50 || $slaves[$i].weight < -50>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Caloric adjustment for
+		<<if $slaves[$i].weight > 130>>
+			heavy weight:</i> <<print cashFormat($foodCost*2)>>
+			<<set _individualCosts += $foodCost*2>>
+		<<elseif $slaves[$i].weight > 50>>
+			high weight: <<print cashFormat($foodCost)>>
+			<<set _individualCosts += $foodCost>>
+		<<elseif $slaves[$i].weight < -50>>
+			light weight: //reduced by// <<print cashFormat($foodCost)>>
+			<<set _individualCosts -= $foodCost>>
+		<</if>>
 	<</if>>
 	<<if $slaves[$i].drugs == "appetite suppressors">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Food saved via suppressed appetite: //reduced by// <<print cashFormat($foodCost)>>
-		<<set $individualCosts -= $foodCost>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Food saved via suppressed appetite:</i> //reduced by// <<print cashFormat($foodCost)>>
+		<<set _individualCosts -= $foodCost>>
 	<</if>>
 	<<if $slaves[$i].lactation > 0>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Food to support
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Food to support
 		<<if $slaves[$i].lactation > 1>>heavy<<else>>natural<</if>> lactation from
-		<<if Math.trunc($slaves[$i].boobs/10000) > 2>>absurd udders<<elseif Math.trunc($slaves[$i].boobs/10000) > 1>>enormous boobs<<else>>reasonable breasts<</if>>:
+		<<if Math.trunc($slaves[$i].boobs/10000) > 2>>absurd udders<<elseif Math.trunc($slaves[$i].boobs/10000) > 1>>enormous boobs<<else>>reasonable breasts<</if>>:</i>
 		<<print cashFormat($foodCost*$slaves[$i].lactation*(1+Math.trunc($slaves[$i].boobs/10000)))>>
-		<<set $individualCosts += $foodCost*$slaves[$i].lactation*(1+Math.trunc($slaves[$i].boobs/10000))>>
+		<<set _individualCosts += $foodCost*$slaves[$i].lactation*(1+Math.trunc($slaves[$i].boobs/10000))>>
 	<</if>>
 	<<if $slaves[$i].preg > 5>>
 		<<if $slaves[$i].assignment == "work in the dairy" && $dairyFeedersSetting > 0>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Extra feeding costs to support pregnancy are covered by dairy feeders.
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Extra feeding costs to support pregnancy are covered by dairy feeders.</i>
 		<<elseif ($slaves[$i].assignment == "serve in the master suite" || $slaves[$i].assignment == "be your concubine") && $masterSuiteUpgradePregnancy == 1>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Extra feeding costs to support pregnancy are covered by $masterSuiteName luxuries.
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Extra feeding costs to support pregnancy are covered by $masterSuiteName luxuries.</i>
 		<<else>>
 			<<set _pAccMult = 1>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Extra feeding to support <<if $slaves[$i].pregControl == "speed up">>accelerated <<set _pAccMult = 3>><</if>>pregnancy: <<print cashFormat($foodCost*$slaves[$i].pregType*_pAccMult)>>
-			<<set $individualCosts += $foodCost*$slaves[$i].pregType*_pAccMult>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Extra feeding to support <<if $slaves[$i].pregControl == "speed up">>accelerated <<set _pAccMult = 3>><</if>>pregnancy:</i> <<print cashFormat($foodCost*$slaves[$i].pregType*_pAccMult)>>
+			<<set _individualCosts += $foodCost*$slaves[$i].pregType*_pAccMult>>
 			<<if $slaves[$i].pregType >= 10>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Specialized food blend to support multiples: <<print cashFormat($foodCost*$slaves[$i].pregType*2*_pAccMult)>>
-				<<set $individualCosts += $foodCost*$slaves[$i].pregType*_pAccMult>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specialized food blend to support multiples:</i> <<print cashFormat($foodCost*$slaves[$i].pregType*2*_pAccMult)>>
+				<<set _individualCosts += $foodCost*$slaves[$i].pregType*_pAccMult>>
 			<<elseif $slaves[$i].pregType >= 30>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Concentrated, quick to digest food blend to support extreme multiples: <<print cashFormat($foodCost*$slaves[$i].pregType*_pAccMult)>>
-				<<set $individualCosts += $foodCost*2*$slaves[$i].pregType*_pAccMult>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Concentrated, quick to digest food blend to support extreme multiples:</i> <<print cashFormat($foodCost*$slaves[$i].pregType*_pAccMult)>>
+				<<set _individualCosts += $foodCost*2*$slaves[$i].pregType*_pAccMult>>
 			<<elseif $slaves[$i].pregType >= 50>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Specialized dietary adjustments and concentrated, quick to digest food required to support absurd multiples: <<print cashFormat($foodCost*$slaves[$i].pregType*3*_pAccMult)>>
-				<<set $individualCosts += $foodCost*$slaves[$i].pregType*3*_pAccMult>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specialized dietary adjustments and concentrated, quick to digest food required to support absurd multiples:</i> <<print cashFormat($foodCost*$slaves[$i].pregType*3*_pAccMult)>>
+				<<set _individualCosts += $foodCost*$slaves[$i].pregType*3*_pAccMult>>
 			<<elseif $slaves[$i].pregType >= 100>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Specialized dietary requirements and feeding methods to support absurd multiples: <<print cashFormat($foodCost*$slaves[$i].pregType*5*_pAccMult)>>
-				<<set $individualCosts += $foodCost*$slaves[$i].pregType*5*_pAccMult>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specialized dietary requirements and feeding methods to support absurd multiples:</i> <<print cashFormat($foodCost*$slaves[$i].pregType*5*_pAccMult)>>
+				<<set _individualCosts += $foodCost*$slaves[$i].pregType*5*_pAccMult>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<switch $slaves[$i].diet>>
-	<<case "XX" "XY">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Hormone enriched diet: <<print cashFormat(25)>>
-		<<set $individualCosts += 25>>
-	<<case "XXY">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Specialized hermaphrodite diet: <<print cashFormat(75)>>
-		<<set $individualCosts += 75>>
-	<<case "cleansing">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Chemical cleansing diet: <<print cashFormat(50)>>
-		<<set $individualCosts += 50>>
-	<<case "fertility">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Specialized fertility diet: <<print cashFormat(25)>>
-		<<set $individualCosts += 50>>
+		<<case "XX" "XY">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Hormone enriched diet:</i> <<print cashFormat(25)>>
+			<<set _individualCosts += 25>>
+		<<case "XXY">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specialized hermaphrodite diet:</i> <<print cashFormat(75)>>
+			<<set _individualCosts += 75>>
+		<<case "cleansing">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Chemical cleansing diet:</i> <<print cashFormat(50)>>
+			<<set _individualCosts += 50>>
+		<<case "fertility">>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Specialized fertility diet:</i> <<print cashFormat(25)>>
+			<<set _individualCosts += 50>>
 	<</switch>>
 	<<if $boobAccessibility != 1>>
 		<<if ($slaves[$i].boobs > 20000)>>
 			<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to inconveniently huge boobs: <<print cashFormat(50)>>
-				<<set $individualCosts += 50>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to inconveniently huge boobs:</i> <<print cashFormat(50)>>
+				<<set _individualCosts += 50>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if $pregAccessibility != 1>>
 		<<if ($slaves[$i].belly >= 60000)>>
 			<<if ($slaves[$i].assignment != "labor in the production line") && ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to an inconveniently huge belly: <<print cashFormat(100)>>
-				<<set $individualCosts += 100>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to an inconveniently huge belly:</i> <<print cashFormat(100)>>
+				<<set _individualCosts += 100>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if $dickAccessibility != 1>>
 		<<if ($slaves[$i].dick > 45)>>
 			<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to an inconveniently huge penis: <<print cashFormat(50)>>
-				<<set $individualCosts += 50>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to an inconveniently huge penis:</i> <<print cashFormat(50)>>
+				<<set _individualCosts += 50>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if $ballsAccessibility != 1>>
 		<<if ($slaves[$i].balls > 90)>>
 			<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to inconveniently huge balls: <<print cashFormat(50)>>
-				<<set $individualCosts += 50>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to inconveniently huge balls:</i> <<print cashFormat(50)>>
+				<<set _individualCosts += 50>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if $buttAccessibility != 1>>
 		<<if ($slaves[$i].butt > 15)>>
 			<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to an inconveniently huge butt: <<print cashFormat(50)>>
-				<<set $individualCosts += 50>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to an inconveniently huge butt:</i> <<print cashFormat(50)>>
+				<<set _individualCosts += 50>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if !canSee($slaves[$i]) && ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to lack of sight: <<print cashFormat(50)>>
-		<<set $individualCosts += 50>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to lack of sight:</i> <<print cashFormat(50)>>
+		<<set _individualCosts += 50>>
 	<<elseif $slaves[$i].eyes <= -1 && $slaves[$i].eyewear != "corrective glasses" && $slaves[$i].eyewear != "corrective contacts">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to poor vision: <<print cashFormat(25)>>
-		<<set $individualCosts += 25>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to poor vision:</i> <<print cashFormat(25)>>
+		<<set _individualCosts += 25>>
 	<<elseif ($slaves[$i].eyewear == "blurring glasses") || ($slaves[$i].eyewear == "blurring contacts")>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to blurred vision: <<print cashFormat(25)>>
-		<<set $individualCosts += 25>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to blurred vision:</i> <<print cashFormat(25)>>
+		<<set _individualCosts += 25>>
 	<</if>>
 	<<if !canHear($slaves[$i]) && ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to lack of hearing: <<print cashFormat(20)>>
-		<<set $individualCosts += 20>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to lack of hearing:</i> <<print cashFormat(20)>>
+		<<set _individualCosts += 20>>
 	<<elseif $slaves[$i].hears <= -1 && $slaves[$i].earwear != "hearing aids">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to poor hearing: <<print cashFormat(5)>>
-		<<set $individualCosts += 5>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to poor hearing:</i> <<print cashFormat(5)>>
+		<<set _individualCosts += 5>>
 	<<elseif ($slaves[$i].earwear == "muffling ear plugs")>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to muffled hearing: <<print cashFormat(5)>>
-		<<set $individualCosts += 5>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to muffled hearing:</i> <<print cashFormat(5)>>
+		<<set _individualCosts += 5>>
 	<</if>>
 	<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($slaves[$i].assignment != "be confined in the arcade")>>
 		<<if ($slaves[$i].amp != 0)>>
 			<<if ($slaves[$i].amp == 1)>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to limblessness: <<print cashFormat($rulesCost)>>
-				<<set $individualCosts += $rulesCost>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to limblessness:</i> <<print cashFormat($rulesCost)>>
+				<<set _individualCosts += $rulesCost>>
 			<<else>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to prosthetics: <<print cashFormat($rulesCost/2)>>
-				<<set $individualCosts += $rulesCost/2>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to prosthetics:</i> <<print cashFormat($rulesCost/2)>>
+				<<set _individualCosts += $rulesCost/2>>
 			<</if>>
 		<<elseif !canWalk($slaves[$i])>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Increased living expenses due to immobility: <<print cashFormat($rulesCost)>>
-			<<set $individualCosts += $rulesCost>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Increased living expenses due to immobility:</i> <<print cashFormat($rulesCost)>>
+			<<set _individualCosts += $rulesCost>>
 		<</if>>
 	<</if>>
 	<<if $slaves[$i].boobs > 10000>>
 		<<if $slaves[$i].boobsImplantType == 1>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Maintenance cost for oversized string implants: <<print cashFormat(50)>>
-			<<set $individualCosts += 50>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Maintenance cost for oversized string implants:</i> <<print cashFormat(50)>>
+			<<set _individualCosts += 50>>
 		<</if>>
 	<</if>>
 	<<if $slaves[$i].butt > 10>>
 		<<if $slaves[$i].buttImplantType == 1>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Maintenance cost for oversized string implants: <<print cashFormat(50)>>
-			<<set $individualCosts += 50>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Maintenance cost for oversized string implants:</i> <<print cashFormat(50)>>
+			<<set _individualCosts += 50>>
 		<</if>>
 	<</if>>
 	<<if $slaves[$i].preg > 35>>
 		<<if $universalRulesBirthing == 1>>
 			<<if ($slaves[$i].assignment != "work in the dairy" || $dairyRestraintsSetting < 2)>>
-				<br>&nbsp;&nbsp;&nbsp;&nbsp;Coverage cost for daily pregnancy scanning: <<print cashFormat(50)>>
-				<<set $individualCosts += 50>>
+				<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Coverage cost for daily pregnancy scanning:</i> <<print cashFormat(50)>>
+				<<set _individualCosts += 50>>
 			<</if>>
 		<</if>>
 	<</if>>
 	<<if $CitizenRetirement == 1>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Retirement account payments: <<print cashFormat(250)>>
-		<<set $individualCosts += 250>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Retirement account payments:</i> <<print cashFormat(250)>>
+		<<set _individualCosts += 250>>
 	<</if>>
 	<<if ($slaves[$i].inflation == 3)>>
 		<<switch $slaves[$i].inflationType>>
 		<<case "water">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated water for enemas; 2 gallons: <<print cashFormat(100)>>
-			<<set $individualCosts += 100>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated water for enemas; 2 gallons:</i> <<print cashFormat(100)>>
+			<<set _individualCosts += 100>>
 		<<case "food">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of filler food for slave stuffing; 2 gallons: <<print cashFormat(($foodCost*4))>>
-			<<set $individualCosts += ($foodCost*4)>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of filler food for slave stuffing; 2 gallons:</i> <<print cashFormat(($foodCost*4))>>
+			<<set _individualCosts += ($foodCost*4)>>
 		<<case "curative" "aphrodisiac" "tightener">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated drug mixtures for enemas; 2 gallons: <<print cashFormat((100+($drugsCost*2)))>>
-			<<set $individualCosts += (100+($drugsCost*2))>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated drug mixtures for enemas; 2 gallons:</i> <<print cashFormat((100+($drugsCost*2)))>>
+			<<set _individualCosts += (100+($drugsCost*2))>>
 		<</switch>>
 	<<elseif ($slaves[$i].inflation == 2)>>
 		<<switch $slaves[$i].inflationType>>
 		<<case "water">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated water for enemas; 1 gallon: <<print cashFormat(50)>>
-			<<set $individualCosts += 50>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated water for enemas; 1 gallon:</i> <<print cashFormat(50)>>
+			<<set _individualCosts += 50>>
 		<<case "food">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of filler food for slave stuffing; 1 gallon: <<print cashFormat(($foodCost*2))>>
-			<<set $individualCosts += ($foodCost*4)>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of filler food for slave stuffing; 1 gallon:</i> <<print cashFormat(($foodCost*2))>>
+			<<set _individualCosts += ($foodCost*4)>>
 		<<case "curative" "aphrodisiac" "tightener">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated drug mixtures for enemas; 1 gallon: <<print cashFormat((50+($drugsCost*2)))>>
-			<<set $individualCosts += (50+($drugsCost*2))>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated drug mixtures for enemas; 1 gallon:</i> <<print cashFormat((50+($drugsCost*2)))>>
+			<<set _individualCosts += (50+($drugsCost*2))>>
 		<</switch>>
 	<<elseif ($slaves[$i].inflation == 1)>>
 		<<switch $slaves[$i].inflationType>>
 		<<case "water">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated water for enemas; 2 liters: <<print cashFormat(25)>>
-			<<set $individualCosts += 25>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated water for enemas; 2 liters:</i> <<print cashFormat(25)>>
+			<<set _individualCosts += 25>>
 		<<case "food">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of filler food for slave stuffing; 2 liters: <<print cashFormat(($foodCost))>>
-			<<set $individualCosts += ($foodCost)>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of filler food for slave stuffing; 2 liters:</i> <<print cashFormat(($foodCost))>>
+			<<set _individualCosts += ($foodCost)>>
 		<<case "curative" "aphrodisiac" "tightener">>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Costs of specially formulated drug mixtures for enemas; 2 liters: <<print cashFormat((25+($drugsCost*2)))>>
-			<<set $individualCosts += (25+($drugsCost*2))>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Costs of specially formulated drug mixtures for enemas; 2 liters:</i> <<print cashFormat((25+($drugsCost*2)))>>
+			<<set _individualCosts += (25+($drugsCost*2))>>
 		<</switch>>
 	<</if>>
 	<<switch $slaves[$i].drugs>>
 	<<case "anti-aging cream">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Anti-aging creams: <<print cashFormat(($drugsCost*10))>>
-		<<set $individualCosts += ($drugsCost*10)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Anti-aging creams:</i> <<print cashFormat(($drugsCost*10))>>
+		<<set _individualCosts += ($drugsCost*10)>>
 	<<case "female hormone injections" "male hormone injections">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Hormonal injections: <<print cashFormat(($drugsCost*5))>>
-		<<set $individualCosts += ($drugsCost*5)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Hormonal injections:</i> <<print cashFormat(($drugsCost*5))>>
+		<<set _individualCosts += ($drugsCost*5)>>
 	<<case "growth stimulants">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Growth stimulants: <<print cashFormat(($drugsCost*5))>>
-		<<set $individualCosts += ($drugsCost*5)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Growth stimulants:</i> <<print cashFormat(($drugsCost*5))>>
+		<<set _individualCosts += ($drugsCost*5)>>
 	<<case "intensive breast injections" "intensive butt injections" "intensive penis enhancement" "intensive testicle enhancement" "intensive lip injections" "hyper breast injections" "hyper butt injections" "hyper penis enhancement" "hyper testicle enhancement" "hyper lip injections">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Intensive drugs: <<print cashFormat($drugsCost*5)>>
-		<<set $individualCosts += $drugsCost*5>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Intensive drugs:</i> <<print cashFormat($drugsCost*5)>>
+		<<set _individualCosts += $drugsCost*5>>
 	<<case "sag-B-gone">>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Questionable infomercial creams: <<print cashFormat(Math.trunc($drugsCost/10))>>
-		<<set $individualCosts += ($drugsCost/10)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Questionable infomercial creams:</i> <<print cashFormat(Math.trunc($drugsCost/10))>>
+		<<set _individualCosts += ($drugsCost/10)>>
 	<<case "no drugs" "none">>
 	<<default>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Standard drugs: <<print cashFormat(($drugsCost*2))>>
-		<<set $individualCosts += ($drugsCost*2)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Standard drugs:</i> <<print cashFormat(($drugsCost*2))>>
+		<<set _individualCosts += ($drugsCost*2)>>
 	<</switch>>
 	<<if $slaves[$i].curatives == 1 && $slaves[$i].assignmentVisible != 1>>
 	<<elseif $slaves[$i].curatives > 0>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Health drugs: <<print cashFormat($drugsCost+($slaves[$i].curatives*$drugsCost))>>
-		<<set $individualCosts += $drugsCost+($slaves[$i].curatives*$drugsCost)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Health drugs:</i> <<print cashFormat($drugsCost+($slaves[$i].curatives*$drugsCost))>>
+		<<set _individualCosts += $drugsCost+($slaves[$i].curatives*$drugsCost)>>
 	<</if>>
 	<<if ($slaves[$i].aphrodisiacs !== 0)>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Aphrodisiacs/Anaphrodisiacs: <<print cashFormat(Math.trunc($drugsCost*Math.abs($slaves[$i].aphrodisiacs)))>>
-		<<set $individualCosts += $drugsCost*Math.abs($slaves[$i].aphrodisiacs)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Aphrodisiacs/Anaphrodisiacs:</i> <<print cashFormat(Math.trunc($drugsCost*Math.abs($slaves[$i].aphrodisiacs)))>>
+		<<set _individualCosts += $drugsCost*Math.abs($slaves[$i].aphrodisiacs)>>
 	<</if>>
 	<<if ($slaves[$i].hormones != 0)>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Hormones: <<print cashFormat((Math.trunc($drugsCost*Math.abs($slaves[$i].hormones)*0.5)))>>
-		<<set $individualCosts += Math.trunc($drugsCost*Math.abs($slaves[$i].hormones)*0.5)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Hormones:</i> <<print cashFormat((Math.trunc($drugsCost*Math.abs($slaves[$i].hormones)*0.5)))>>
+		<<set _individualCosts += Math.trunc($drugsCost*Math.abs($slaves[$i].hormones)*0.5)>>
 	<</if>>
 	<<if ($slaves[$i].bodySwap > 0)>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;JS-Suppressants: <<print cashFormat(($drugsCost*10*$slaves[$i].bodySwap))>>
-		<<set $individualCosts += Math.trunc($drugsCost*10*$slaves[$i].bodySwap)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>JS-Suppressants:</i> <<print cashFormat(($drugsCost*10*$slaves[$i].bodySwap))>>
+		<<set _individualCosts += Math.trunc($drugsCost*10*$slaves[$i].bodySwap)>>
 	<</if>>
 	<<if ($slaves[$i].preg == -1) && isFertile($slaves[$i])>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;Contraceptives: <<print cashFormat((Math.trunc($drugsCost*0.5)))>>
-		<<set $individualCosts += Math.trunc($drugsCost*0.5)>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Contraceptives:</i> <<print cashFormat((Math.trunc($drugsCost*0.5)))>>
+		<<set _individualCosts += Math.trunc($drugsCost*0.5)>>
 	<</if>>
 	<<if ($studio == 1)>>
 		<<if ($slaves[$i].pornFameSpending > 0)>>
-			<br>&nbsp;&nbsp;&nbsp;&nbsp;Publicity: <<print cashFormat($slaves[$i].pornFameSpending/$PCSlutContacts)>>
-			<<set $individualCosts += ($slaves[$i].pornFameSpending/$PCSlutContacts)>>
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;<i>Publicity:</i> <<print cashFormat($slaves[$i].pornFameSpending/$PCSlutContacts)>>
+			<<set _individualCosts += ($slaves[$i].pornFameSpending/$PCSlutContacts)>>
 		<</if>>
-	<</if>>
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__Total__: <<print cashFormat(Math.trunc($individualCosts))>>
+	<</if>> <<set _total += Math.trunc(_individualCosts)>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__Total__: <<print cashFormat(Math.trunc(_individualCosts))>>
 	<br>
 <</for>>
+Overall slave costs: @@.yellowgreen;<<print cashFormat(_total)>>@@.
+
+<br>Bringing the overall total pre reduction(s) to roughly @@.yellowgreen;<<print cashFormat(_archologyCosts+_total)>>@@.
 
 <<if $PC.career == "servant">>
 	<br>Using your prior experience, you managed to lower your home's upkeep by <<if $personalAttention == "upkeep">><<if $PC.belly >= 5000>>20%<<else>>25%<</if>><<else>>10%<</if>>.
 <</if>>
 
-<<if $secExp == 1>>
+<<if $secExp == 1>> <br>
 	<<if $terrain == "oceanic" || $terrain == "marine">>
 		<<if $docks > 0>>
 			<br>The infrastructure you've built eases the transportation and safe handling of the supplies required by the arcology. Upkeep is lowered by <<print $docks * 5>>%
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>>