diff --git a/src/SecExp/SecExpBackwardCompatibility.tw b/src/SecExp/SecExpBackwardCompatibility.tw
index c515fc8f45efe99baeec9930356389b77d9082ac..314dacaaa7e0bab716bed6a5ae3e2c2336c79795 100644
--- a/src/SecExp/SecExpBackwardCompatibility.tw
+++ b/src/SecExp/SecExpBackwardCompatibility.tw
@@ -32,18 +32,12 @@
 <<if ndef $PClossStreak>>
 	<<set $PClossStreak = 0>>
 <</if>>
-<<if ndef $oldFlux>>
-	<<set $oldFlux = 0>>
-<</if>>
 <<if ndef $wasToggledBefore>>
 	<<set $wasToggledBefore = 0>>
 <</if>>
 <<if ndef $foughtThisWeek>>
 	<<set $foughtThisWeek = 0>>
 <</if>>
-<<if ndef $battlesEnabledOceanic>>
-	<<set $battlesEnabledOceanic = 0>>
-<</if>>
 
 /* edicts */
 <<if ndef $alternativeRents>>
@@ -73,9 +67,6 @@
 <<if ndef $openBorders>>
 	<<set $openBorders = 0>>
 <</if>>
-<<if ndef $limitSubhumans>>
-	<<set $limitSubhumans = 0>>
-<</if>>
 <<if ndef $slavesOfficers>>
 	<<set $slavesOfficers = 0>>
 <</if>>
@@ -162,19 +153,6 @@
 <<if ndef $secHQ>>
 	<<set $secHQ = 0>>
 <</if>>
-<<if ndef $secBarracks>>
-	<<set $secBarracks = 0>>
-<</if>>
-<<if ndef $secBarracksUpgrades>>
-	<<set $secBarracksUpgrades ={
-	size: 0,
-	luxury: 0,
-	training: 0,
-	loyaltyMod:0 }>>
-<</if>>
-<<if ndef $secBarracksUpgrades.loyaltyMod>>
-	<<set $secBarracksUpgrades.loyaltyMod = 0>>
-<</if>>
 <<if ndef $secMenials>>
 	<<set $secMenials = $secHelots || 0>>
 	<<unset $secHelots>>
@@ -207,33 +185,6 @@
 	pathways: 0,
 	rapidVehicles: 0}>>
 <</if>>
-<<if ndef $propHub>>
-	<<set $propHub = 0>>
-<</if>>
-<<if ndef $propCampaign>>
-	<<set $propCampaign = 0>>
-<</if>>
-<<if ndef $propFocus>>
-	<<set $propFocus = "none">>
-<</if>>
-<<if ndef $miniTruth>>
-	<<set $miniTruth = 0>>
-<</if>>
-<<if ndef $fakeNews>>
-	<<set $fakeNews = 0>>
-<</if>>
-<<if ndef $controlLeaks>>
-	<<set $controlLeaks = 0>>
-<</if>>
-<<if ndef $secretService>>
-	<<set $secretService = 0>>
-<</if>>
-<<if ndef $blackOps>>
-	<<set $blackOps = 0>>
-<</if>>
-<<if ndef $marketInfiltration>>
-	<<set $marketInfiltration = 0>>
-<</if>>
 <<if ndef $riotCenter>>
 	<<set $riotCenter = 0>>
 <</if>>
@@ -456,9 +407,6 @@
 <<if ndef $rebellingUnits>>
 	<<set $rebellingUnits = []>>
 <</if>>
-<<if ndef $notInvolved>>
-	<<set $notInvolved = 0>>
-<</if>>
 <<if ndef $engageRule>>
 	<<set $engageRule = 0>>
 <</if>>
@@ -480,9 +428,6 @@
 <<if ndef $arcRepairTime>>
 	<<set $arcRepairTime = 0>>
 <</if>>
-<<if ndef $rebelDefeatAftermath>>
-	<<set $rebelDefeatAftermath = 0>>
-<</if>>
 <<if ndef $garrison>>
 	<<set $garrison = {
 	penthouse: 0,
@@ -603,9 +548,6 @@
 <</if>>
 
 /* battle relevant vars */
-<<if ndef $troopCount>>
-	<<set $troopCount = 0>>
-<</if>>
 <<if ndef $slaveVictories>>
 	<<set $slaveVictories = []>>
 <</if>>
@@ -633,18 +575,6 @@
 <<if ndef $attackEquip>>
 	<<set $attackEquip = 0>>
 <</if>>
-<<if ndef $deployingBots>>
-	<<set $deployingBots = 0>>
-<</if>>
-<<if ndef $deployingMilitia>>
-	<<set $deployingMilitia = 0>>
-<</if>>
-<<if ndef $deployingSlaves>>
-	<<set $deployingSlaves = 0>>
-<</if>>
-<<if ndef $deployingMercs>>
-	<<set $deployingMercs = 0>>
-<</if>>
 <<if ndef $battleTerrain>>
 	<<set $battleTerrain = "none">>
 <</if>>
@@ -663,9 +593,6 @@
 <<if ndef $battleTurns>>
 	<<set $battleTurns = 0>>
 <</if>>
-<<if ndef $bribeCost>>
-	<<set $bribeCost = 0>>
-<</if>>
 <<if ndef $tacticsSuccessful>>
 	<<set $tacticsSuccessful = 0>>
 <</if>>
@@ -710,9 +637,6 @@
 <</if>>
 
 /* statistics */
-<<if ndef $baseBribePerAttacker>>
-	<<set $baseBribePerAttacker = 5>>
-<</if>>
 <<if ndef $equipMod>>
 	<<set $equipMod = 0.15>>
 <</if>>
@@ -881,4 +805,4 @@
 <<recalcBaseStats>>
 <<set $wasToggledBefore = 1>>
 
-<br>Missing Security Expansion variables set. All done!
\ No newline at end of file
+<br>Missing Security Expansion variables set. All done!
diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw
index 6554cca0b83fdced5cad8dcdced9d8277256bbfb..0a3b0b7c65d205a947becb2c5f46256919fef510 100644
--- a/src/SecExp/attackGenerator.tw
+++ b/src/SecExp/attackGenerator.tw
@@ -1,8 +1,8 @@
 :: attackGenerator [nobr]
 
 /* _attackChance value is the chance out of 100 of an attack happening this week */
-/* attacks are deactivated if battles are not enabled, the arcology is in the middle of the ocean, security drones are not around yet, there is not a rebellion this week or the last attack/rebellion happened within 3 weeks */
-<<if $SecExp.settings.battle.enabled == 0 || ($terrain == "oceanic" && $battlesEnabledOceanic == 0) || $arcologyUpgrade.drones != 1 || $lastAttackWeeks <= 3 || $citizenRebellion == 1 || $slaveRebellion == 1 || $lastRebellionWeeks <= 3>>
+/* attacks are deactivated if the arcology is in the middle of the ocean, security drones are not around yet, there is not a rebellion this week or the last attack/rebellion happened within 3 weeks */
+<<if $terrain == "oceanic" || $arcologyUpgrade.drones != 1 || $lastAttackWeeks <= 3 || $citizenRebellion == 1 || $slaveRebellion == 1 || $lastRebellionWeeks <= 3>>
 	<<set _attackChance = 0>>
 <<else>>
 	<<if $week < 30>>
@@ -174,12 +174,12 @@
 		<</if>>
 	<</if>>
 
-	<<set $estimatedMen = Math.round($attackTroops * (1 + either(-1,1) * (random(3,4) - $SecExp.battle.recon) * 0.1))>>
-	<<if $SecExp.battle.recon == 3>>
+	<<set $estimatedMen = Math.round($attackTroops * (1 + either(-1,1) * (random(3,4) - App.SecExp.battle.recon()) * 0.1))>>
+	<<if App.SecExp.battle.recon() == 3>>
 		<<set $expectedEquip = $attackEquip + random(-1,1)>>
-	<<elseif $SecExp.battle.recon == 2>>
+	<<elseif App.SecExp.battle.recon() == 2>>
 		<<set $expectedEquip = $attackEquip + random(-1,2)>>
-	<<elseif $SecExp.battle.recon == 1>>
+	<<elseif App.SecExp.battle.recon() == 1>>
 		<<set $expectedEquip = $attackEquip + random(-2,2)>>
 	<<else>>
 		<<set $expectedEquip = $attackEquip + random(-2,3)>>
diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw
index 0c486e85308cb18f5a97ce9ee9a4898a946f72fc..120408ce82b0e6f74f311010d4d50ac8d597b730 100644
--- a/src/SecExp/attackHandler.tw
+++ b/src/SecExp/attackHandler.tw
@@ -2,26 +2,6 @@
 
 <<set $nextButton = " ", $nextLink = "attackReport", $showEncyclopedia = 0>>
 
-/* updates deployed flags */
-<<for _i = 0; _i < $militiaUnits.length; _i++>>
-	<<if $militiaUnits[_i].isDeployed == 1>>
-		<<set $deployingMilitia = 1>>
-		<<break>>
-	<</if>>
-<</for>>
-<<for _i = 0; _i < $slaveUnits.length; _i++>>
-	<<if $slaveUnits[_i].isDeployed == 1>>
-		<<set $deployingSlaves = 1>>
-		<<break>>
-	<</if>>
-<</for>>
-<<for _i = 0; _i < $mercUnits.length; _i++>>
-	<<if $mercUnits[_i].isDeployed == 1>>
-		<<set $deployingMercs = 1>>
-		<<break>>
-	<</if>>
-<</for>>
-
 <<if $battleResult == 1 || $battleResult == -1>>	/* bribery/surrender check */
 	<<if $SecExp.settings.showStats == 1>>
 		bribery chosen
@@ -897,7 +877,7 @@
 	<</if>>
 
 	/* calculates PC army stats */
-	<<if $secBots.isDeployed == 1>>
+	<<if App.SecExp.conflict.deployedUnits('bots')>>
 		<<set _attack += ($secBotsBaseAttack + $secBotsBaseAttack * $secBots.equip * $equipMod) * _atkMod>>
 		<<set _defense += ($secBotsBaseDefense + $secBotsBaseDefense * $secBots.equip * $equipMod) * _defMod>>
 		<<set _hp += $secBotsBaseHp * $secBots.troops>>
@@ -1007,14 +987,12 @@
 		<<set _SFMod = 1.5>>
 	<</if>>
 
-	<<set $troopCount = 0>>
-	<<calcTroopCount>>
-	<<set _moraleTroopMod = Math.clamp($troopCount / 100,1,5)>>
+	<<set _moraleTroopMod = Math.clamp(App.SecExp.conflict.troopCount() / 100,1,5)>>
 
-	<<set _morale = ($secBotsMorale * $deployingBots + $militiaBaseMorale * _militiaMod * $deployingMilitia + $slaveBaseMorale * _slaveMod * $deployingSlaves + $mercBaseMorale * _mercMod * $deployingMercs + $SFBaseMorale * $SFIntervention * _SFMod) / ($deployingBots + $deployingMilitia +$deployingSlaves + $deployingMercs + $SFIntervention)>>
-	<<set _morale = _morale + _morale * $secBarracksUpgrades.luxury * 0.05>>	/* barracks bonus */
+	<<set _morale = ($secBotsMorale * $secBots.isDeployed + $militiaBaseMorale * _militiaMod * App.SecExp.conflict.deployedUnits('militia') + $slaveBaseMorale * _slaveMod * App.SecExp.conflict.deployedUnits('slaves') + $mercBaseMorale * _mercMod * App.SecExp.conflict.deployedUnits('mercs') + $SFBaseMorale * $SFIntervention * _SFMod) / ($secBots.isDeployed + App.SecExp.conflict.deployedUnits('militia') +App.SecExp.conflict.deployedUnits('slaves') + App.SecExp.conflict.deployedUnits('mercs') + $SFIntervention)>>
+	<<set _morale = _morale + _morale * $SecExp.buildings.barracks.upgrades.luxury * 0.05>>	/* barracks bonus */
 	<<set _morale *= _moraleTroopMod>>
-	<<set _baseHp = ($secBotsBaseHp * $deployingBots + $militiaBaseHp * $deployingMilitia + $slaveBaseHp * $deployingSlaves + $mercBaseHp * $deployingMercs + $SFBaseHp * $SFIntervention) / ($deployingBots + $deployingMilitia +$deployingSlaves + $deployingMercs + $SFIntervention)>>
+	<<set _baseHp = ($secBotsBaseHp * $secBots.isDeployed + $militiaBaseHp * App.SecExp.conflict.deployedUnits('militia') + $slaveBaseHp * App.SecExp.conflict.deployedUnits('slaves') + $mercBaseHp * App.SecExp.conflict.deployedUnits('mercs') + $SFBaseHp * $SFIntervention) / ($secBots.isDeployed + App.SecExp.conflict.deployedUnits('militia') +App.SecExp.conflict.deployedUnits('slaves') + App.SecExp.conflict.deployedUnits('mercs') + $SFIntervention)>>
 
 	/* calculates enemy army stats */
 	<<if $week <= 30>>
@@ -1105,7 +1083,7 @@
 		<<set _slaveMod = Math.round(_slaveMod * 100)>>
 		<<set _SFMod = Math.round(_SFMod * 100)>>
 		<<set _enemyMod = Math.round(_enemyMod * 100)>>
-		<<set _barracksBonus = $secBarracksUpgrades.luxury * 5>>
+		<<set _barracksBonus = $SecExp.buildings.barracks.upgrades.luxury * 5>>
 		<<set _moraleTroopMod = Math.round(_moraleTroopMod * 100)>>
 		<<set _enemyMoraleTroopMod = Math.round(_enemyMoraleTroopMod * 100)>>
 		<<set _difficulty *= 100>>
@@ -1128,7 +1106,7 @@
 		<br>
 		<br>
 		__Army__:
-		<br>troops: <<print num(Math.round($troopCount))>>
+		<br>troops: <<print num(Math.round(App.SecExp.conflict.troopCount()))>>
 		<br>attack: <<print num(Math.round(_attack))>>
 		<br>defense: <<print num(Math.round(_defense))>>
 		<br>hp: <<print num(Math.round(_hp))>>
@@ -1142,7 +1120,7 @@
 		<<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 		<br>special force morale modifier: <<if _SFMod > 0>>+<</if>>_SFMod%
 		<</if>>
-		<<if $secBarracksUpgrades.luxury >= 1>>
+		<<if $SecExp.buildings.barracks.upgrades.luxury >= 1>>
 		<br>Barracks bonus morale modifier: +<<print _barracksBonus>>%
 		<</if>>
 		<<if _moraleTroopMod>>
@@ -1255,4 +1233,4 @@
 		<<goto "attackReport">>
 	<</if>>
 
-<</if>> /* closes check for bribery */
\ No newline at end of file
+<</if>> /* closes check for bribery */
diff --git a/src/SecExp/attackOptions.tw b/src/SecExp/attackOptions.tw
index cef3841d9d7241ce92c34b134d27defd0305b5b3..ea6d257994616625be6d3accc59261f2bae8ca97 100644
--- a/src/SecExp/attackOptions.tw
+++ b/src/SecExp/attackOptions.tw
@@ -1,7 +1,17 @@
 :: attackOptions [nobr]
 
+<<if ndef $SecExp.settings.unitDescriptions>>
+	<<set $SecExp.settings.unitDescriptions = 0>>
+<</if>>
 <<set $nextButton = " ", $nextLink = "attackOptions", $showEncyclopedia = 1, $encyclopedia = "Battles">>
 
+<<options $SecExp.settings.unitDescriptions>>
+	Unit descriptions are
+	<<option 1 "Abbreviated">>
+	<<option 0 "Summarized">>
+<</options>>
+<br>
+
 <<if $majorBattle == 0>>
 	<strong>Attack Imminent</strong>
 <<else>>
@@ -12,7 +22,7 @@
 	<<if $hasFoughtOnce == 1>>
 		The ominous message dominates the screens of your office, <<print $assistantName>> quickly gathers all information available to prepare for battle.
 		<<if $attackType == "raiders">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A disorganized horde of raiders is coming to your city. To such jackals your arcology surely looks like an appetizing morsel.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -21,7 +31,7 @@
 			<br>
 			Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of Free Cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers.
 		<<elseif $attackType == "free city">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A menacing column of slavers and hired mercenaries is coming to your city. Another free city is ready to use their best tools to hit a dangerous competitor where it hurts.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -30,7 +40,7 @@
 			<br>
 			Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have on average good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness however is their relatively low numbers.
 		<<elseif $attackType == "freedom fighters">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -39,7 +49,7 @@
 			<br>
 			Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the Free Cities and their way of life. Lacking the strength to assault one directly they fight guerrilla style slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly.
 		<<elseif $attackType == "old world">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A disciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -56,7 +66,7 @@
 	<<if $hasFoughtMajorBattleOnce == 1>>
 		The ominous message dominates the screens of your office, <<print $assistantName>> quickly gathers all information available to prepare for battle.
 		<<if $attackType == "raiders">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, disorganized horde of raiders is coming to your city. It seems a warlord of the wastelands amassed enough men to try and obtain a slice of territory of his own; if he's not defeated there won't be a tomorrow for the arcology.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -65,7 +75,7 @@
 			<br>
 			Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of Free Cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers.
 		<<elseif $attackType == "free city">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, menacing column of slavers and hired mercenaries is coming to your city. The quantity of money invested in this assault is staggering; it seems you made some very powerful enemies. If they're not defeated your story will end this day.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -74,7 +84,7 @@
 			<br>
 			Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have, on average, good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness, however, is their low numbers.
 		<<elseif $attackType == "freedom fighters">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, dangerous army of guerrillas is gathering just outside the arcology. A huge ocean of fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire once and for all. And this time they won't stop until your body is burnt to a crisp.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -83,7 +93,7 @@
 			<br>
 			Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the Free Cities and their way of life. Lacking the strength to assault one directly, they fight guerrilla style, slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly.
 		<<elseif $attackType == "old world">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, disciplined old world army is approaching the confines of your arcology. It seems one of the nations of the old world is determined to put your arcology to rest once and for all or die trying.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -97,7 +107,7 @@
 		<br>
 		<br>
 		<<if $attackType == "raiders">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, disorganized horde of raiders is coming to your city. It seems a warlord of the wastelands amassed enough men to try and obtain a slice of territory of his own; if he's not defeated there won't be a tomorrow for the arcology.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -106,7 +116,7 @@
 			<br>
 			Raiders are roaming gangs of bandits, preying on the vulnerable supply lines of Free Cities and old world nations. They are rarely equipped with decent armaments and even more rarely have any formal military training, but they make up for that with high mobility and numbers.
 		<<elseif $attackType == "free city">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, menacing column of slavers and hired mercenaries is coming to your city. The quantity of money invested in this assault is staggering; it seems you made some very powerful enemies. If they're not defeated your story will end this day.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -115,7 +125,7 @@
 			<br>
 			Free City expeditions are usually composed of mercenaries hired to take down sensible supplies or infrastructure in order to damage the enemies of their contractor. They have, on average, good equipment and training, together with decent mobility, making them a formidable force. Their biggest weakness, however, is their relatively low numbers.
 		<<elseif $attackType == "freedom fighters">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, dangerous army of guerrillas is gathering just outside the arcology. A huge ocean of fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire once and for all. And this time they won't stop until your body is burnt to a crisp.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -124,7 +134,7 @@
 			<br>
 			Freedom Fighters are groups of individuals fighting to rid the planet of "evils" such as the Free Cities and their way of life. Lacking the strength to assault one directly, they fight guerrilla style, slowly starving to death their enemies. They are rarely well equipped, but with good training and mobility they are not a threat that can be taken lightly.
 		<<elseif $attackType == "old world">>
-			<<if $SecExp.battle.recon >= 1>>
+			<<if App.SecExp.battle.recon() >= 1>>
 				A massive, disciplined old world army is approaching the confines of your arcology. It seems one of the nations of the old world is determined to put your arcology to rest once and for all or die trying.
 				Fortunately you knew of their coming, thanks to your recon systems.
 			<<else>>
@@ -158,11 +168,11 @@ It seems your troops and your adversary will fight
 <<else>>
 	<br>@@.red;Error: failed to read terrain.@@ battleTerrain reads "<<print $battleTerrain>>".
 <</if>>
-<<if $SecExp.battle.recon == 3>>
+<<if App.SecExp.battle.recon() == 3>>
 	Your recon capabilities are top notch. The information collected will be most likely correct or very close to be so:
-<<elseif $SecExp.battle.recon == 2>>
+<<elseif App.SecExp.battle.recon() == 2>>
 	Your recon capabilities are decent. The information collected will be mostly close to the truth:
-<<elseif $SecExp.battle.recon == 1>>
+<<elseif App.SecExp.battle.recon() == 1>>
 	Your recon capabilities are fairly low. The information collected will be quite inaccurate:
 <<else>>
 	Your recon capabilities are almost non-existent. The information collected will be wild guesses at best:
@@ -186,19 +196,19 @@ __Battle Plan__:
 
 <<switch $leadingTroops>>
 <<case "PC">>
-	<<set _leader = $PC.name>>
+	<<set _leader = "Personally">>
 <<case "assistant">>
-	<<set _leader = $assistantName>>
+	<<set _leader = "$assistantName will">>
 <<case "bodyguard">>
-	<<set _leader = $Bodyguard.slaveName>>
+	<<set _leader = "$Bodyguard.slaveName will">>
 <<case "headGirl">>
-	<<set _leader = $HeadGirl.slaveName>>
+	<<set _leader = "$HeadGirl.slaveName will">>
 <<case "citizen">>
-	<<set _leader = "The citizens' militia commander">>
+	<<set _leader = "The citizens' militia commander will">>
 <<case "mercenary">>
-	<<set _leader = "The mercenary commander">>
+	<<set _leader = "The mercenary commander will">>
 <<case "colonel">>
-	<<set _leader = $SF.Caps +"'s Colonel">>
+	<<set _leader = $SF.Caps +"'s Colonel will">>
 <</switch>>
 
 /* leader assignment */
@@ -251,146 +261,157 @@ __Battle Plan__:
 		|
 		<<link "Let The Colonel lead the troops">>
 			<<set $leadingTroops = "colonel">>
-			<<set _leader = $SF.Lower +"'s Colonel will">>
+			<<set _leader = $SF.Caps +"'s Colonel will">>
 			<<replace "#leader">><strong><<print _leader>></strong><</replace>>
 		<</link>>
 	<</if>>
 
 /* troop deployment */
 <br><br>
-<<if App.SecExp.Check.deployableUnits() > 0>>
-	With your current readiness level you can send an additional <strong><<print App.SecExp.Check.deployableUnits()>></strong> units out of a possible <strong><<print App.SecExp.Check.activeUnits()>></strong>.
+<<if App.SecExp.battle.deployableUnits() > 0>>
+	With your current readiness level you can send an additional <strong><<print App.SecExp.battle.deployableUnits()>></strong> units.
 <</if>>
 <<set _mL = $militiaUnits.length>>
 <<set _sL = $slaveUnits.length>>
 <<set _meL = $mercUnits.length>>
-<<if App.SecExp.Check.deployableUnits() > 0>> <br>
+
+<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.Options)>>
+
+<<if App.SecExp.battle.deployableUnits() > 0>> <br>
 	<<if $secBots.active == 1 && $secBots.isDeployed == 0 && $secBots.troops > 0>>
-		<br>
-		<<secBotsDescription>>
-		<br>
+		<br> <<= App.SecExp.unit.dec($secBots, "Bots")>> <br>
 		<<link "Deploy the unit" "attackOptions">>
-			<<set $secBots.isDeployed = 1>>
-			<<set $deployingBots = 1>>
-			<<set $saveValid = 0>>
+			<<set $secBots.isDeployed = 1, $saveValid = 0>>
 		<</link>>
+		<br><br>
 	<</if>>
-	<<for _i = 0; _i < _mL; _i++>>
-		<<capture _i>>
-		<<if $militiaUnits[_i].active == 1 && $militiaUnits[_i].isDeployed == 0 && $militiaUnits[_i].troops > 0>>
-			<br>
-			<<militiaUnitsDescription $militiaUnits[_i]>>
-			<br>
-			<<link "Deploy the unit" "attackOptions">>
-				<<set $militiaUnits[_i].isDeployed = 1>>
-				<<set $saveValid = 0>>
-			<</link>>
-		<</if>>
-		<</capture>>
-	<</for>>
-	<<for _i = 0; _i < _sL; _i++>>
-		<<capture _i>>
-		<<if $slaveUnits[_i].active == 1 && $slaveUnits[_i].isDeployed == 0 && $slaveUnits[_i].troops > 0>>
-			<br>
-			<<slaveUnitsDescription $slaveUnits[_i]>>
-			<br>
-			<<link "Deploy the unit" "attackOptions">>
-				<<set $slaveUnits[_i].isDeployed = 1>>
-				<<set $saveValid = 0>>
-			<</link>>
-		<</if>>
-		<</capture>>
-	<</for>>
-	<<for _i = 0; _i < _meL; _i++>>
-		<<capture _i>>
-		<<if $mercUnits[_i].active == 1 && $mercUnits[_i].isDeployed == 0 && $mercUnits[_i].troops > 0>>
-			<br>
-			<<mercUnitsDescription $mercUnits[_i]>>
-			<br>
-			<<link "Deploy the unit" "attackOptions">>
-				<<set $mercUnits[_i].isDeployed = 1>>
-				<<set $saveValid = 0>>
-			<</link>>
-		<</if>>
-		<</capture>>
-	<</for>>
+
+	<<if $militiaUnits.length > 0 && App.SecExp.battle.deployableUnits() > 0>>
+		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'militia')" id="tab militia">Militia: ($militiaUnits.length)</button>
+	<</if>>
+	<<if $slaveUnits.length > 0 && App.SecExp.battle.deployableUnits() > 0>>
+		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'slaves')" id="tab slaves">Slaves: ($slaveUnits.length)</button>
+	<</if>>
+	<<if $mercUnits.length > 0 && App.SecExp.battle.deployableUnits() > 0>>
+		<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'mercs')" id="tab mercs">Mercs: ($mercUnits.length)</button>
+	<</if>>
+
+	<div id="militia" class="tabcontent">
+		<div class="content">
+			<<for _i = 0; _i < _mL; _i++>>
+				<<capture _i>>
+				<<if $militiaUnits[_i].active == 1 && $militiaUnits[_i].isDeployed == 0 && $militiaUnits[_i].troops > 0>>
+					<<= App.SecExp.unit.dec($militiaUnits[_i], "Militia")>>
+					<br>
+					<<link "Deploy the unit" "attackOptions">>
+						<<set $militiaUnits[_i].isDeployed = 1, $saveValid = 0>>
+					<</link>>
+					<br>
+				<</if>>
+				<</capture>>
+			<</for>>
+		</div>
+	</div>
+
+	<div id="slaves" class="tabcontent">
+		<div class="content">
+			<<for _i = 0; _i < _sL; _i++>>
+			<<capture _i>>
+			<<if $slaveUnits[_i].active == 1 && $slaveUnits[_i].isDeployed == 0 && $slaveUnits[_i].troops > 0>>
+				<<= App.SecExp.unit.dec($slaveUnits[_i], "Slaves")>>
+				<br>
+				<<link "Deploy the unit" "attackOptions">>
+					<<set $slaveUnits[_i].isDeployed = 1, $saveValid = 0>>
+				<</link>>
+				<br>
+			<</if>>
+			<</capture>>
+			<</for>>
+		</div>
+	</div>
+
+	<div id="mercs" class="tabcontent">
+		<div class="content">
+			<<for _i = 0; _i < _meL; _i++>>
+			<<capture _i>>
+			<<if $mercUnits[_i].active == 1 && $mercUnits[_i].isDeployed == 0 && $mercUnits[_i].troops > 0>>
+				<<= App.SecExp.unit.dec($mercUnits[_i], "Mercs")>>
+				<br>
+				<<link "Deploy the unit" "attackOptions">>
+					<<set $mercUnits[_i].isDeployed = 1, $saveValid = 0>>
+				<</link>>
+				<br>
+			<</if>>
+			<</capture>>
+			<</for>>
+		</div>
+	</div>
 <<else>>
 	<strong>Unit roster full.</strong>
 <</if>>
 
-<<if App.SecExp.Check.deployedUnits() > 0>> <br>
-		<<if $secBots.isDeployed == 1>>
-			<br>
-			<<secBotsDescription>>
+<<if App.SecExp.conflict.deployedUnits() > 0>> <br>
+		<<if App.SecExp.conflict.deployedUnits('bots')>>
+			<<= App.SecExp.unit.dec($secBots, "Bots")>>
 			<br>
 			<<link "Remove the unit" "attackOptions">>
-				<<set $secBots.isDeployed = 0>>
-				<<set $deployingBots = 0>>
-				<<set $saveValid = 0>>
+				<<set $secBots.isDeployed = 0, $saveValid = 0>>
 			<</link>>
+			<br>
 		<</if>>
 	<<for _i = 0; _i < _mL; _i++>>
 		<<capture _i>>
 		<<if $militiaUnits[_i].isDeployed == 1>>
-			<br>
-			<<militiaUnitsDescription $militiaUnits[_i]>>
+			<<= App.SecExp.unit.dec($militiaUnits[_i], "Militia")>>
 			<br>
 			<<link "Remove the unit" "attackOptions">>
-				<<set $militiaUnits[_i].isDeployed = 0>>
-				<<set $saveValid = 0>>
+				<<set $militiaUnits[_i].isDeployed = 0, $saveValid = 0>>
 			<</link>>
+			<br>
 		<</if>>
 		<</capture>>
 	<</for>>
 	<<for _i = 0; _i < _sL; _i++>>
 		<<capture _i>>
 		<<if $slaveUnits[_i].isDeployed == 1>>
-			<br>
-			<<slaveUnitsDescription $slaveUnits[_i]>>
+			<<= App.SecExp.unit.dec($slaveUnits[_i], "Slaves")>>
 			<br>
 			<<link "Remove the unit" "attackOptions">>
-				<<set $slaveUnits[_i].isDeployed = 0>>
-				<<set $saveValid = 0>>
+				<<set $slaveUnits[_i].isDeployed = 0, $saveValid = 0>>
 			<</link>>
+			<br>
 		<</if>>
 		<</capture>>
 	<</for>>
 	<<for _i = 0; _i < _meL; _i++>>
 		<<capture _i>>
 		<<if $mercUnits[_i].isDeployed == 1>>
-			<br>
-			<<mercUnitsDescription $mercUnits[_i]>>
+			<<= App.SecExp.unit.dec($mercUnits[_i], "Mercs")>>
 			<br>
 			<<link "Remove the unit" "attackOptions">>
-				<<set $mercUnits[_i].isDeployed = 0>>
-				<<set $saveValid = 0>>
+				<<set $mercUnits[_i].isDeployed = 0, $saveValid = 0>>
 			<</link>>
+			<br>
 		<</if>>
 		<</capture>>
 	<</for>>
 <</if>>
 
-<<if $SF.Toggle && $SF.Active >= 1 && $majorBattle>> <br><br>
-	The size of the incoming attack warrants the intervention of the special force in its full force.
-	<<if !$SFIntervention>>
-		<<link "Let $SF.Lower intervene" "attackOptions">>
-			<<set $SFIntervention = 1>>
-		<</link>>
-	<<else>>
-		<<link "Do not let $SF.Lower intervene" "attackOptions">>
-			<<set $SFIntervention = 0>>
-		<</link>>
-	<</if>>
-	<br>//Some upgrades will be able to support the troops even if the special force does not intervene directly in the fight.//
+<<if $SF.Toggle && $SF.Active >= 1 && $majorBattle>> <br>
+	<<options $SFIntervention>>
+		The incoming attack's scale warrants deploying the special force.
+		<<option 1 "Green light">>
+		<<option 0 "Red light">>
+		<<comment>>
+			//Some upgrades will be able to support your troops even if the special force is not deployed in the fight.//
+	<</options>>
 <</if>>
 
-<br><br>
-<<if $lastSelection.length > 0>>
+<<if $lastSelection.length > 0>> <br>
 	<<link "Restore saved roster" "attackOptions">>
 		<<for _i = 0; _i < $lastSelection.length; _i++>>
 			<<if $lastSelection[_i] == -1>>
 				<<set $secBots.isDeployed = 1>>
-				<<set $deployingBots = 1>>
 			<<else>>
 				<<for _j = 0; _j < $militiaUnits.length; _j++>>
 					<<if $lastSelection[_i] == $militiaUnits[_j].ID>>
@@ -420,7 +441,7 @@ __Battle Plan__:
 |
 <<if $saveValid != 1>>
 	<<link "Save current roster" "attackOptions">>
-		<<if $secBots.isDeployed == 1>>
+		<<if App.SecExp.conflict.deployedUnits('bots')>>
 			<<set _tmp = -1>>
 			<<set $lastSelection.push(_tmp)>>
 		<</if>>
@@ -445,7 +466,7 @@ __Battle Plan__:
 	Save current roster
 <</if>>
 |
-<<if App.SecExp.Check.deployedUnits() > 0>>
+<<if App.SecExp.conflict.deployedUnits() > 0>>
 	<<link "Clear current roster" "attackOptions">>
 		<<set $secBots.isDeployed = 0>>
 		<<for _i = 0; _i < $militiaUnits.length; _i++>>
@@ -477,61 +498,68 @@ __Battle Plan__:
 <br><br>
 /* tactics */
 For this battle you choose to follow <span id="tactic"><strong><<print $chosenTactic>></strong></span> tactics.
-<br><br>
-Defensive tactics
-<br>
-<<link "Bait and Bleed">>
-	<<set $chosenTactic = "Bait and Bleed">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Combines bait and switch tactics with guerrilla style assaults, with the objective of slowly bleed the enemy.//
-<br>
-<<link "Guerrilla">>
-	<<set $chosenTactic = "Guerrilla">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and small fast attacks to hinder and weaken the enemy.//
-<br>
-<<link "Choke Points">>
-	<<set $chosenTactic = "Choke Points">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and strong fortifications in order to stop the enemy on its track.//
-<br>
-<<link "Interior Lines">>
-	<<set $chosenTactic = "Interior Lines">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves exploiting a defender's shorter logistics lines and redeployment times in order to keep the enemy pressured.//
-<br>
-<<link "Pincer Maneuver">>
-	<<set $chosenTactic = "Pincer Maneuver">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy push back the center in order to envelop their formation.//
-<br>
-<<link "Defense In Depth">>
-	<<set $chosenTactic = "Defense In Depth">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy gain terrain to gain tactical superiority by alternating between delaying actions and small counterattacks.//
-<br>
-Offensive Tactics
-<br>
-<<link "Blitzkrieg">>
-	<<set $chosenTactic = "Blitzkrieg">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves breaking the front of the enemy with a fast armored force concentrated into a small area.//
-<br>
-<<link "Human Wave">>
-	<<set $chosenTactic = "Human Wave">>
-	<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
-<</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves assaulting the enemy with large numbers of infantry to overwhelm their lines.//
 <br>
+<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'defensiveTactics')" id="tab defensive tactics">Defensive tactics</button>
+<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'offensiveTactics')" id="tab offensiveTactics">Offensive Tactics</button>
+
+<div id="defensiveTactics" class="tabcontent">
+	<div class="content">
+		<<link "Bait and Bleed">>
+			<<set $chosenTactic = "Bait and Bleed">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Combines bait and switch tactics with guerrilla style assaults, with the objective of slowly bleed the enemy.//
+		<br>
+		<<link "Guerrilla">>
+			<<set $chosenTactic = "Guerrilla">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and small fast attacks to hinder and weaken the enemy.//
+		<br>
+		<<link "Choke Points">>
+			<<set $chosenTactic = "Choke Points">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves using terrain knowledge and strong fortifications in order to stop the enemy on its track.//
+		<br>
+		<<link "Interior Lines">>
+			<<set $chosenTactic = "Interior Lines">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves exploiting a defender's shorter logistics lines and redeployment times in order to keep the enemy pressured.//
+		<br>
+		<<link "Pincer Maneuver">>
+			<<set $chosenTactic = "Pincer Maneuver">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy push back the center in order to envelop their formation.//
+		<br>
+		<<link "Defense In Depth">>
+			<<set $chosenTactic = "Defense In Depth">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves letting the enemy gain terrain to gain tactical superiority by alternating between delaying actions and small counterattacks.//
+	</div>
+</div>
+
+<div id="offensiveTactics" class="tabcontent">
+	<div class="content">
+		<<link "Blitzkrieg">>
+			<<set $chosenTactic = "Blitzkrieg">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves breaking the front of the enemy with a fast armored force concentrated into a small area.//
+		<br>
+		<<link "Human Wave">>
+			<<set $chosenTactic = "Human Wave">>
+			<<replace "#tactic">><strong><<print $chosenTactic>></strong><</replace>>
+		<</link>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Involves assaulting the enemy with large numbers of infantry to overwhelm their lines.//
+	</div>
+</div>
+
 <br>
-<<if App.SecExp.Check.deployedUnits() > 0>>
+<<if App.SecExp.conflict.deployedUnits() > 0>>
 	<<link "Send your orders" "attackHandler">>
 		<<set $battleResult = 4>>						/* sets $battleResult value outside accepted range to avoid evaluation problems */
 		<<if $hasFoughtOnce == 0>>
@@ -552,8 +580,9 @@ Offensive Tactics
 <</link>>
 <br>
 
+<<set $bribeCost = App.SecExp.battle.bribeCost()>>
+
 /* calculates bribe cost */
-<<calcBribe>>
 <<link "Attempt to bribe" "attackHandler">>
 	<<set $battleResult = 1>>
 	<<if $hasFoughtOnce == 0>>
@@ -561,4 +590,4 @@ Offensive Tactics
 	<</if>>
 	<<set $foughtThisWeek = 1>>
 <</link>>
-<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will cost around <<print cashFormat(Math.round($bribeCost * (1 + either(-1,1) * random(2) * 0.1)))>> (estimate).//
\ No newline at end of file
+<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will cost around <<print cashFormat(Math.round($bribeCost * (1 + either(-1,1) * random(2) * 0.1)))>> (estimate).//
diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw
index 1d87d1c82123a6e042ac6e0e70dec171a87d82e2..5b2bfa775cac68294996949870d8f248ce2c148e 100644
--- a/src/SecExp/attackReport.tw
+++ b/src/SecExp/attackReport.tw
@@ -132,7 +132,7 @@
 <<if $attackType == "raiders">>
 	Today, the _day of _month _year, our arcology was attacked by a band of wild raiders, <<print num(Math.trunc($attackTroops))>> men strong.
 	<<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>>
-		Our defense forces, <<print num(Math.trunc($troopCount))>> strong, clashed with them
+		Our defense forces, <<print num(Math.trunc(App.SecExp.conflict.troopCount()))>> strong, clashed with them
 		<<if $battleTerrain == "urban">>
 			in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>,
 			<<elseif $battleTerrain == "rural">>
@@ -194,7 +194,7 @@
 <<elseif $attackType == "free city">>
 	Today, the _day of _month _year, our arcology was attacked by a contingent of mercenaries hired by a competing free city, <<print num(Math.trunc($attackTroops))>> men strong.
 	<<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>>
-		Our defense forces, <<print num(Math.trunc($troopCount))>> strong, clashed with them
+		Our defense forces, <<print num(Math.trunc(App.SecExp.conflict.troopCount()))>> strong, clashed with them
 		<<if $battleTerrain == "urban">>
 			in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>,
 		<<elseif $battleTerrain == "rural">>
@@ -256,7 +256,7 @@
 <<elseif $attackType == "freedom fighters">>
 	Today, the _day of _month _year, our arcology was attacked by a group of freedom fighters bent on the destruction of the institution of slavery, <<print num(Math.trunc($attackTroops))>> men strong.
 	<<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>>
-		Our defense forces, <<print num(Math.trunc($troopCount))>> strong, clashed with them
+		Our defense forces, <<print num(Math.trunc(App.SecExp.conflict.troopCount()))>> strong, clashed with them
 		<<if $battleTerrain == "urban">>
 			in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>,
 		<<elseif $battleTerrain == "rural">>
@@ -318,7 +318,7 @@
 <<elseif $attackType == "old world">>
 	Today, the _day of _month _year, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, <<print num(Math.trunc($attackTroops))>> men strong.
 	<<if $battleResult != 1 && $battleResult != 0 && $battleResult != -1>>
-		Our defense forces, <<print num(Math.trunc($troopCount))>> strong, clashed with them
+		Our defense forces, <<print num(Math.trunc(App.SecExp.conflict.troopCount()))>> strong, clashed with them
 		<<if $battleTerrain == "urban">>
 			in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>,
 		<<elseif $battleTerrain == "rural">>
@@ -428,7 +428,7 @@
 		@@.yellowgreen;wealth worthy of the mightiest warlord.@@
 		<<set _loot += 20000 * _majorBattleMod>>
 	<</if>>
-	<<if $mercSoldierPrivilege == 1 && $deployingMercs == 1>>
+	<<if $mercSoldierPrivilege == 1 && App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 		Part of the loot is distributed to your mercenaries.
 		<<set _captives = Math.trunc(_captives * 0.6)>>
 		<<set _loot = Math.trunc(_loot * 0.6)>>
@@ -538,7 +538,7 @@
 		@@.yellowgreen;a great amount of cash.@@
 		<<set _loot += 10000 * _majorBattleMod>>
 	<</if>>
-	<<if $mercSoldierPrivilege == 1 && $deployingMercs == 1>>
+	<<if $mercSoldierPrivilege == 1 && App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 		Part of the loot is distributed to your mercenaries.
 		<<set _loot = Math.trunc(_loot * 0.6)>>
 	<</if>>
@@ -776,7 +776,7 @@
 	<<if $leadingTroops == "PC">>
 		<<setPlayerPronouns>>
 		You decided to personally lead the defense of your arcology.
-		<<if $deployingMilitia == 1>>
+		<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 			<<if _oldRep <= 2500>>
 				<<if _oldRep > 1000>>
 					You're not particularly popular between the inhabitants of your arcology, so your presence does little to reassure the volunteers.
@@ -813,7 +813,7 @@
 				<</if>>
 			<</if>>
 		<</if>>
-		<<if $deployingSlaves == 1>>
+		<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			<<if _oldAuth <= 2500>>
 				<<if _oldAuth > 1000>>
 					Your slave soldiers do not feel bound to you as much as they should, as your authority is far from absolute.
@@ -846,7 +846,7 @@
 				<</if>>
 			<</if>>
 		<</if>>
-		<<if $deployingMercs == 1>>
+		<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 			<<if $mercLoyalty <= 25>>
 				<<if $mercLoyalty <= 10>>
 					Your mercenaries barely bother to pretend being loyal; their battle performance is obviously barely passable.
@@ -913,7 +913,7 @@
 	<<elseif $leadingTroops == "assistant">>
 		<<setAssistantPronouns>>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> let your personal assistant lead the troops.
-		<<if $deployingMercs == 1 || $deployingMilitia == 1 || $deployingSlaves == 1>>
+		<<if App.SecExp.conflict.deployedUnits('mercs') >= 1 || App.SecExp.conflict.deployedUnits('militia') >= 1 || App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			No soldier trusts a computer to be their commander,
 			<<if _oldRep < 10000 && _oldAuth < 10000>>
 				no algorithm can substitute experience, <<if $assistantPower == 0>>and as expected, <<else>>however, <</if>>
@@ -935,7 +935,7 @@
 	<<elseif $leadingTroops == "bodyguard">>
 		<<setLocalPronouns $Bodyguard>>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> decided it will be your bodyguard that leads the troops.
-		<<if $deployingSlaves == 1>>
+		<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			<<if $Bodyguard.devotion < -20>>
 				$His low devotion has a negative impact on the morale of your slave soldiers.
 			<<elseif $Bodyguard.devotion > 51>>
@@ -943,61 +943,61 @@
 			<</if>>
 		<</if>>
 		<<if _oldRep < 10000 && _oldAuth < 10000 || $Bodyguard.prestige < 1>>
-			<<if $deployingMilitia == 1>>
-				Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a
-				<<if $SF.Toggle && $SF.Active >= 1 && $deployingMercs == 1 && $SFIntervention>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
+				Your volunteers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a
+				<<if $SF.Toggle && $SF.Active >= 1 && App.SecExp.conflict.deployedUnits('mercs') == 1 && $SFIntervention>>
 					commander, and neither are your mercenaries or your soldiers.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					commander, and neither are your mercenaries.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your soldiers.
 				<<else>>
 					commander.
 				<</if>>
-			<<elseif $SF.Toggle && $SF.Active >= 1 && $deployingMercs == 1 && $SFIntervention>>
-				Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
-			<<elseif $deployingMercs == 1>>
-				Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+			<<elseif $SF.Toggle && $SF.Active >= 1 && App.SecExp.conflict.deployedUnits('mercs') == 1 && $SFIntervention>>
+				Your mercenaries and soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
+				Your mercenaries <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+				Your soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
 			<</if>>
 		<<elseif $Bodyguard.prestige >= 2>>
-			<<if $deployingMilitia == 1>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 				Your
-				<<if $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+				<<if App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<<else>>
 					volunteers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<</if>>
-			<<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 				Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
-			<<elseif $deployingMercs == 1>>
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 				Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 				Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 			<</if>>
 		<<else>>
-			<<if $deployingMilitia == 1>>
-				Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a
-				<<if $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
+				Your volunteers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a
+				<<if App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your mercenaries and soldiers, but they trust you enough not to question your decision.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					commander, and neither are your mercenaries, but they trust you enough not to question your decision.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your soldiers, but they trust you enough not to question your decision.
 				<<else>>
 					commander, but they trust you enough not to question your decision.
 				<</if>>
-			<<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your mercenaries and soldiers <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
-			<<elseif $deployingMercs == 1>>
-				Your mercenaries <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+				Your mercenaries and soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
+				Your mercenaries <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your soldiers <<if $deployingSlaves == 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+				Your soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however,<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
 			<</if>>
 		<</if>>
 		<<if (setup.bodyguardCareers.includes($Bodyguard.career) || setup.HGCareers.includes($Bodyguard.career) || setup.secExCombatPrestige.includes($Bodyguard.prestigeDesc)) && $Bodyguard.intelligence+$Bodyguard.intelligenceImplant > 95>>
@@ -1072,7 +1072,7 @@
 	<<elseif $leadingTroops == "headGirl">>
 		<<setLocalPronouns $HeadGirl>>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> decided it will be your Head Girl that leads the troops.
-		<<if $deployingSlaves == 1>>
+		<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			<<if $HeadGirl.devotion < -20>>
 				$His low devotion has a negative impact on the morale of your slave soldiers.
 			<<elseif $HeadGirl.devotion > 51>>
@@ -1080,61 +1080,61 @@
 			<</if>>
 		<</if>>
 		<<if _oldRep < 10000 && _oldAuth < 10000 || $HeadGirl.prestige < 1>>
-			<<if $deployingMilitia == 1>>
-				Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a
-				<<if $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
+				Your volunteers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a
+				<<if App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your mercenaries or your soldiers.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					commander, and neither are your mercenaries.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your soldiers.
 				<<else>>
 					commander.
 				<</if>>
-			<<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
-			<<elseif $deployingMercs == 1>>
-				Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+				Your mercenaries and soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
+				Your mercenaries <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander.
+				Your soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander.
 			<</if>>
 		<<elseif $HeadGirl.prestige >= 2>>
-			<<if $deployingMilitia == 1>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 				Your
-				<<if $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+				<<if App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					volunteers, your mercenaries and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					volunteers and your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					volunteers and your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<<else>>
 					volunteers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 				<</if>>
-			<<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 				Your mercenaries and soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
-			<<elseif $deployingMercs == 1>>
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 				Your mercenaries are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 				Your soldiers are delighted to have such a prestigious individual as their commander, almost forgetting $he is a slave.
 			<</if>>
 		<<else>>
-			<<if $deployingMilitia == 1>>
-				Your volunteers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a
-				<<if $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
+				Your volunteers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a
+				<<if App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your mercenaries and soldiers, but they trust you enough not to question your decision.
-				<<elseif $deployingMercs == 1>>
+				<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 					commander, and neither are your mercenaries, but they trust you enough not to question your decision.
 				<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 					commander, and neither are your soldiers, but they trust you enough not to question your decision.
 				<<else>>
 					commander, but they trust you enough not to question your decision.
 				<</if>>
-			<<elseif $deployingMercs == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your mercenaries and soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
-			<<elseif $deployingMercs == 1>>
-				Your mercenaries <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') == 1 && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
+				Your mercenaries and soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+			<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
+				Your mercenaries <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
 			<<elseif $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-				Your soldiers <<if $deployingSlaves == 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
+				Your soldiers <<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>however<</if>> are not enthusiastic to have a slave as a commander, but they trust you enough not to question your decision.
 			<</if>>
 		<</if>>
 		<<if (setup.bodyguardCareers.includes($HeadGirl.career) || setup.HGCareers.includes($HeadGirl.career) || setup.secExCombatPrestige.includes($HeadGirl.prestigeDesc)) && $HeadGirl.intelligence+$HeadGirl.intelligenceImplant > 95>>
@@ -1209,30 +1209,30 @@
 	<<elseif $leadingTroops == "citizen">>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> decided to appoint one of your volunteers as the commander.
 		<<if $arcologies[0].FSDegradationist == "unset" && $arcologies[0].FSPaternalist == "unset">>
-			<<if $deployingMilitia == 1>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 				Your volunteers are honored and pleased that one of their own is leading the defense force of the city.
 			<</if>>
-			<<if $deployingSlaves == 1>>
-				Your slaves<<if $deployingMilitia == 1>>, however,<</if>> are not thrilled by the news.
+			<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
+				Your slaves<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>, however,<</if>> are not thrilled by the news.
 			<</if>>
 		<<elseif $arcologies[0].FSPaternalist != "unset">>
-			<<if $deployingMilitia == 1>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 				Your volunteers are honored and pleased that one of their own is leading the defense force of the city.
 			<</if>>
-			<<if $deployingSlaves == 1>>
+			<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 				Thanks to your paternalistic society, your slave soldiers trust your chosen citizen to treat them as more than cannon fodder.
 			<</if>>
 		<<elseif $arcologies[0].FSDegradationist != "unset">>
-			<<if $deployingMilitia == 1>>
+			<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 				Your volunteers are honored and pleased that one of their own is leading the defense force of the city.
 			<</if>>
-			<<if $deployingSlaves == 1>>
-				Because of your degradationist society,<<if $deployingMilitia == 1>> however,<</if>> your slave soldiers are deeply distrustful of the new leader.
+			<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
+				Because of your degradationist society,<<if App.SecExp.conflict.deployedUnits('militia') >= 1>> however,<</if>> your slave soldiers are deeply distrustful of the new leader.
 			<</if>>
 		<</if>>
-		<<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMercs == 1>>
+		<<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 			Since you decided to revive old Rome, many of your citizens took on themselves to educate themselves in martial matters, because of this your mercenaries feel safe enough in the hands of one of your volunteers.
-		<<elseif $deployingMercs == 1>>
+		<<elseif App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 			You mercenaries are not thrilled to be lead by a civilian without any formal martial training or education.
 		<</if>>
 		<<if $arcologies[0].FSRomanRevivalist != "unset" && $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
@@ -1245,18 +1245,18 @@
 		<</if>>
 	<<elseif $leadingTroops == "mercenary">>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> decided to appoint one of your mercenary officers as the commander.
-		<<if $deployingMercs == 1>>
+		<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 			Your mercenaries of course approve of your decision.
 		<</if>>
 		<<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 			Your soldiers feel more confident going into battle with an experienced commander.
 		<</if>>
-		<<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>>
+		<<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.conflict.deployedUnits('militia') >= 1>>
 			Since you decided to revive old Rome, your volunteers are more willing to trust one of your mercenaries as their leader.
-		<<elseif $deployingMilitia == 1>>
+		<<elseif App.SecExp.conflict.deployedUnits('militia') >= 1>>
 			Your volunteers are not enthusiastic at the prospect of being commanded around by a gun for hire.
 		<</if>>
-		<<if $arcologies[0].FSDegradationist != "unset" && $deployingSlaves == 1>>
+		<<if $arcologies[0].FSDegradationist != "unset" && App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			Because of your degradationist society, your slave soldiers are highly distrustful of the gun for hire you forced them to accept as leader.
 		<</if>>
 		<<if $leaderWounded == 1>>
@@ -1264,18 +1264,18 @@
 		<</if>>
 	<<elseif $leadingTroops == "colonel">>
 		<<if $auto == 1>>$assistantName<<else>>You<</if>> decided to appoint The Colonel as the commander.
-		<<if $deployingMercs == 1>>
+		<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 			Your mercenaries approve of such decisions, as they feel more confident by having a good, experienced commander.
 		<</if>>
 		<<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
 			The soldiers of $SF.Lower obviously approved of your decision.
 		<</if>>
-		<<if $arcologies[0].FSRomanRevivalist != "unset" && $deployingMilitia == 1>>
+		<<if $arcologies[0].FSRomanRevivalist != "unset" && App.SecExp.conflict.deployedUnits('militia') >= 1>>
 			Since you decided to revive old Rome, your volunteers are more willing to trust one of your soldiers as their leader.
-		<<elseif $deployingMilitia == 1>>
+		<<elseif App.SecExp.conflict.deployedUnits('militia') >= 1>>
 			Your volunteers are not enthusiastic at the prospect of being commanded around by an old style military officer.
 		<</if>>
-		<<if $arcologies[0].FSDegradationist != "unset" && $deployingSlaves == 1>>
+		<<if $arcologies[0].FSDegradationist != "unset" && App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 			Because of your degradationist society, your slave soldiers are highly distrustful of the soldier you forced them to accept as leader.
 		<</if>>
 		<<if $leaderWounded == 1>>
@@ -1582,6 +1582,7 @@
 <</if>>
 
 /* resets variables */
+<<run delete $bribeCost>>
 <<set $leaderWounded = 0>>
 <<set $gainedWarfare = 0>>
 <<set $slaveIncreasedPrestige = 0>>
@@ -1592,10 +1593,6 @@
 <<set $leadingTroops = "none">>
 <<set $attackTroops = 0>>
 <<set $attackEquip = 0>>
-<<set $deployingBots = 0>>
-<<set $deployingMilitia = 0>>
-<<set $deployingSlaves = 0>>
-<<set $deployingMercs = 0>>
 <<set $battleTerrain = "none">>
 <<set $attackThisWeek = 0>>
 <<set $enemyLosses = 0>>
@@ -1612,4 +1609,4 @@
 <</for>>
 <<for _i = 0; _i < $mercUnits.length; _i++>>
 	<<set $mercUnits[_i].isDeployed = 0>>
-<</for>>
\ No newline at end of file
+<</for>>
diff --git a/src/SecExp/authorityReport.tw b/src/SecExp/authorityReport.tw
index 4ee83a5385be1ac6a06c33d84cb948bc9081b88b..bd629714c6aa3056d4160041f16060a64ed12e32 100644
--- a/src/SecExp/authorityReport.tw
+++ b/src/SecExp/authorityReport.tw
@@ -95,15 +95,15 @@ Your authority is
 	<<set _authGrowth -= (5 * Math.trunc($arcologies[0].ownership / 10))>>
 <</if>>
 
-<<if App.SecExp.Check.activeUnits() >= 9>>
+<<if App.SecExp.battle.activeUnits() >= 9>>
 	Your military is massive; commanding so many troops greatly increases your authority.
-<<elseif App.SecExp.Check.activeUnits() >= 7>>
+<<elseif App.SecExp.battle.activeUnits() >= 7>>
 	Your military is huge; commanding such a number of soldiers increases your authority.
-<<elseif App.SecExp.Check.activeUnits() >= 4>>
+<<elseif App.SecExp.battle.activeUnits() >= 4>>
 	Your military is at a decent size; commanding a small army increases your authority.
 <</if>>
-<<if App.SecExp.Check.activeUnits() >= 4>>
-	<<set _authGrowth += (12 * App.SecExp.Check.activeUnits())>>
+<<if App.SecExp.battle.activeUnits() >= 4>>
+	<<set _authGrowth += (12 * App.SecExp.battle.activeUnits())>>
 <</if>>
 
 <<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>>
@@ -143,14 +143,14 @@ Your authority is
 	<<set _authGrowth -= $arcologies[0].FSNull>>
 <</if>>
 
-<<if $miniTruth >= 1>>
+<<if $SecExp.buildings.pr.miniTruth >= 1>>
 	Your authenticity department works tirelessly to impose your authority in all of the arcology.
-	<<set _authGrowth += (15 * $miniTruth)>>
+	<<set _authGrowth += (15 * $SecExp.buildings.pr.miniTruth)>>
 <</if>>
 
-<<if $secretService >= 1>>
+<<if $SecExp.buildings.pr.SS >= 1>>
 	Your secret services constantly keep under surveillance any potential threat, intervening when necessary. Rumors of the secretive security service and mysterious disappearances make your authority increase.
-	<<set _authGrowth += (15 * $secretService)>>
+	<<set _authGrowth += (15 * $SecExp.buildings.pr.SS)>>
 <</if>>
 
 <<if App.SecExp.upkeep('edictsAuth') > 0>>
@@ -171,7 +171,5 @@ This week
 <<set $SecExp.core.authority = Math.trunc(Math.clamp($SecExp.core.authority, 0, 20000))>>
 
 <<if $SecExp.settings.rebellion.enabled == 1>>
-/* rebellions */
-	<br><br>
-	<<include "rebellionGenerator">>
+	<br><br> <<include "rebellionGenerator">> /* rebellions */
 <</if>>
\ No newline at end of file
diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw
index 8173b08f77abb871ca68d40e2f9b446c97beb98d..e4bcf7e5da8bad2c38e2bfb9ed875fec2db612cb 100644
--- a/src/SecExp/edicts.tw
+++ b/src/SecExp/edicts.tw
@@ -250,7 +250,7 @@
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;//Will generate income dependent on the amount of upgrades installed in the security HQ, but will cost a small amount of authority each week.//
 <</if>>
 
-<<if $propHub == 1>>
+<<if $SecExp.buildings.pr.active == 1>>
 	<<if $propCampaignBoost == 0>>
 		<br>''Obligatory educational material:'' force residents to read curated educational material about the arcology.
 		<<if $SecExp.core.authority >= 1000>>
diff --git a/src/SecExp/proclamations.tw b/src/SecExp/proclamations.tw
index 2597c51ade5b5d884bfad95709940fef20e12a07..132c296e2950c879a6ca2a5a60b984338b58bd2b 100644
--- a/src/SecExp/proclamations.tw
+++ b/src/SecExp/proclamations.tw
@@ -2,12 +2,10 @@
 
 <<set $nextButton = "Back to Main", $nextLink = "Main">>
 
-<<if ndef $SecExp.proclamation.cooldown>>
+<<if $SecExp.proclamation.cooldown == 0>>
 	__Issue a proclamation:__
 	<br>You can dedicate the week to issuing a proclamation, a powerful tool that will have an immediate noticeable effect on the arcology.
-	<<if (def $SecExp.proclamation.currency && def $SecExp.proclamation.type)>>
-		You will use $SecExp.proclamation.currency to enact it and will be about $SecExp.proclamation.type.
-	<</if>>
+	<br>You will use $SecExp.proclamation.currency to enact it and will be about $SecExp.proclamation.type.
 	<br>Use:
 	<<if $SecExp.core.authority >= 2000>>
 		<<link "authority" "Personal Attention Select">>
@@ -32,20 +30,18 @@
 	<<else>>
 		//Requires at least <<print cashFormat(8000)>> in cash//
 	<</if>>
-	<<if def $SecExp.proclamation.currency>>
-		<br><br>
-		<<link "Issue a proclamation about security" "Main">>
-			<<set $personalAttention = "proclamation", $SecExp.proclamation.type = "security">>
-		<</link>>
-		<br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">> vast financial means<</if>>
-		to force citizens to give up on sensitive information for the good of the arcology.//
-		<br>
-		<<link "Issue a proclamation about crime" "Main">>
-			<<set $personalAttention = "proclamation", $SecExp.proclamation.type = "crime">>
-		<</link>>
-		<br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">> vast financial means<</if>>
-		to force the arrest of suspected citizens without passing through the normal legal procedures.//
-	<</if>>
+	<br><br>
+	<<link "Issue a proclamation about security" "Main">>
+		<<set $personalAttention = "proclamation", $SecExp.proclamation.type = "security">>
+	<</link>>
+	<br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">> vast financial means<</if>>
+	to force citizens to give up on sensitive information for the good of the arcology.//
+	<br>
+	<<link "Issue a proclamation about crime" "Main">>
+		<<set $personalAttention = "proclamation", $SecExp.proclamation.type = "crime">>
+	<</link>>
+	<br>//You will use your <<if $SecExp.proclamation.currency == "authority">>control over the arcology<<elseif $SecExp.proclamation.currency == "reputation">>great influence<<elseif $SecExp.proclamation.currency == "cash">> vast financial means<</if>>
+	to force the arrest of suspected citizens without passing through the normal legal procedures.//
 <<else>>
 	It's too early to issue another proclamation. Another will be available in <<if $SecExp.proclamation.cooldown == 1>> one week.<<else>> $SecExp.proclamation.cooldown weeks.<</if>>
-<</if>>
\ No newline at end of file
+<</if>>
diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw
index 7ff7f61c50ee0895aeb86d6fed356ef3aace265e..401bb4d0dcd979187af691d24a2ebee44fd8d01b 100644
--- a/src/SecExp/propagandaHub.tw
+++ b/src/SecExp/propagandaHub.tw
@@ -21,79 +21,79 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 <<if $Recruiter != 0>>
 	<<setLocalPronouns $Recruiter>>
 	<br><br>
-	<<if $RecuriterOffice == 0>>
+	<<if $SecExp.buildings.pr.recuriterOffice == 0>>
 		<<link "Give ''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' an office.""propagandaHub">>
-			<<set $RecuriterOffice = 1>>
+			<<set $SecExp.buildings.pr.recuriterOffice = 1>>
 		<</link>>
 	<<else>>
 		<<link "Remove ''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' from $his office.""propagandaHub">>
-			<<set $RecuriterOffice = 0>>
+			<<set $SecExp.buildings.pr.recuriterOffice = 0>>
 		<</link>>
 	<</if>>
 <</if>>
 /* classic propaganda */
-<br><br><<if $propCampaign == 0>>
+<br><br><<if $SecExp.buildings.pr.campaign == 0>>
 	<<link "Set up a propaganda campaign" "propagandaHub">>
-		<<set $propCampaign += 1>>
+		<<set $SecExp.buildings.pr.campaign += 1>>
 		<<run cashX(forceNeg(5000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
-		<<set $propFocus = "social engineering">>
+		<<set $SecExp.buildings.pr.focus = "social engineering">>
 	<</link>>
 	<br>Set up a propaganda campaign to align your citizens with your goals.
 	<br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount))>>. Will provide the focused resource each week, but will cost reputation in upkeep.//
 <<else>>
 	You have set up a team of trained slaves and expert propagandists, ready to spread the message of your choosing to the population.
 	<br>Focus on:
-	<<if $propFocus == "social engineering">>
+	<<if $SecExp.buildings.pr.focus == "social engineering">>
 		social engineering
 	<<else>>
 		<<link "social engineering" "propagandaHub">>
-			<<set $propFocus = "social engineering">>
+			<<set $SecExp.buildings.pr.focus = "social engineering">>
 		<</link>>
 	<</if>>
 	|
-	<<if $propFocus == "immigration">>
+	<<if $SecExp.buildings.pr.focus == "immigration">>
 	immigration
 	<<else>>
 		<<link "immigration" "propagandaHub">>
-			<<set $propFocus = "immigration">>
+			<<set $SecExp.buildings.pr.focus = "immigration">>
 		<</link>>
 	<</if>>
 	|
-	<<if $propFocus == "enslavement">>
+	<<if $SecExp.buildings.pr.focus == "enslavement">>
 		 enslavement
 	<<else>>
 		<<link "enslavement" "propagandaHub">>
-			<<set $propFocus = "enslavement">>
+			<<set $SecExp.buildings.pr.focus = "enslavement">>
 		<</link>>
 	<</if>>
 	|
-	<<if $propFocus == "recruitment">>
+	<<if $SecExp.buildings.pr.focus == "recruitment">>
 		recruitment
 	<<else>>
 		<<link "recruitment" "propagandaHub">>
-			<<set $propFocus = "recruitment">>
+			<<set $SecExp.buildings.pr.focus = "recruitment">>
 		<</link>>
 	<</if>>
 	<br>
 	You are concentrating your propaganda efforts towards
-	<<if $propFocus == "social engineering">>
+	<<if $SecExp.buildings.pr.focus == "social engineering">>
 		increasing the acceptance of your chosen future societies.
-	<<elseif $propFocus == "immigration">>
+	<<elseif $SecExp.buildings.pr.focus == "immigration">>
 		convincing more people to immigrate to your arcology.
-	<<elseif $propFocus == "enslavement">>
+	<<elseif $SecExp.buildings.pr.focus == "enslavement">>
 		convincing more people to voluntarily enslave themselves.
-	<<elseif $propFocus == "recruitment">>
+	<<elseif $SecExp.buildings.pr.focus == "recruitment">>
 		convincing more citizens to enter the militia.
 	<</if>>
 	<br>
-	<<if $propCampaign < 5>>
+	<<if $SecExp.buildings.pr.campaign < 5>>
 		<<link "Invest more resources in the propaganda machine" "propagandaHub">>
-			<<run cashX(forceNeg(5000 * $upgradeMultiplierArcology * ($propCampaign + 1) * _HistoryDiscount*$HackingSkillMultiplier), "capEx")>>
-			<<set $propCampaign += 1>>
+			<<run cashX(forceNeg(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.pr.campaign + 1) * _HistoryDiscount*$HackingSkillMultiplier), "capEx")>>
+			<<set $SecExp.buildings.pr.campaign += 1>>
 			<<= IncreasePCSkills('hacking', 0.5)>>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
-		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($propCampaign + 1) * _HistoryDiscount*$HackingSkillMultiplier))>>. Will provide more of the focused resource each week but increase reputation upkeep.//
+		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.pr.campaign + 1) * _HistoryDiscount*$HackingSkillMultiplier))>>. Will provide more of the focused resource each week but increase reputation upkeep.//
 	<<else>>
 		You upgraded your propaganda machine to its limits.
 	<</if>>
@@ -103,46 +103,46 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 <br>
 
 /* ministry of truth */
-<<if $miniTruth == 0>>
+<<if $SecExp.buildings.pr.miniTruth == 0>>
 	<<link "Set up the authenticity department" "propagandaHub">>
-		<<set $miniTruth += 1>>
+		<<set $SecExp.buildings.pr.miniTruth += 1>>
 		<<run cashX(forceNeg(5000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
 	<</link>>
 	<br>Set up a department tasked with guaranteeing the authenticity of all information available in the arcology. Of course if reality is against what is best for the arcology, then it should be redacted as well.
 	<br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology * _HistoryDiscount))>>. Will provide authority and unlock special upgrades, but will increase upkeep.//
 <<else>>
-	<<if $miniTruth < 5>>
+	<<if $SecExp.buildings.pr.miniTruth < 5>>
 		<<link "Enlarge the authenticity department" "propagandaHub">>
-			<<run cashX(forceNeg(5000*$upgradeMultiplierArcology * ($miniTruth + 1) * _HistoryDiscount), "capEx")>>
-			<<set $miniTruth += 1>>
+			<<run cashX(forceNeg(5000*$upgradeMultiplierArcology * ($SecExp.buildings.pr.miniTruth + 1) * _HistoryDiscount), "capEx")>>
+			<<set $SecExp.buildings.pr.miniTruth += 1>>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
-		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($miniTruth + 1) * _HistoryDiscount))>>. Will provide more authority each week, but increases upkeep.//
+		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.pr.miniTruth + 1) * _HistoryDiscount))>>. Will provide more authority each week, but increases upkeep.//
 	<<else>>
 		You have upgraded the authenticity department to its maximum.
 	<</if>>
 	<br>
-	<<if $fakeNews == 0>>
+	<<if $SecExp.buildings.pr.fakeNews > 0>>
 		<<link "Install a news generator" "propagandaHub">>
-			<<set $fakeNews = 1>>
+			<<set $SecExp.buildings.pr.fakeNews = 1>>
 			<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
 		<</link>>
 		<br>Install an automatic news generator, able to fabricate thousands of plausible sounding news every day.
 		<br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount))>>. The authenticity dept. now provides a small amount of reputation as well as authority, but increases upkeep.//
 	<<else>>
-		You have installed an automatic news generator. [[Remove news generator|propagandaHub][$fakeNews = 0]]
+		You have installed an automatic news generator. [[Remove news generator|propagandaHub][$SecExp.buildings.pr.fakeNews = 0]]
 	<</if>>
 	<br>
-	<<if $controlLeaks == 0>>
+	<<if $SecExp.buildings.pr.controlLeaks == 0>>
 		<<link "Institute controlled leaks protocols" "propagandaHub">>
-			<<set $controlLeaks = 1>>
+			<<set $SecExp.buildings.pr.controlLeaks = 1>>
 			<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx")>>
 			<<= IncreasePCSkills('hacking', 1)>>
 		<</link>>
 		<br>Institute a system able to release erroneous, but plausible, information about your business, leading your competitors to prepared financial traps.
 		<br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount*$HackingSkillMultiplier))>>. The authenticity dept. now slightly increases prosperity each week as well as authority, but increases upkeep.//
 	<<else>>
-		You have instituted controlled leaks protocols, able to create fabricated leaks of sensible information. [[Shut down leak protocols|propagandaHub][$controlLeaks = 0]]
+		You have instituted controlled leaks protocols, able to create fabricated leaks of sensible information. [[Shut down leak protocols|propagandaHub][$SecExp.buildings.pr.controlLeaks = 0]]
 	<</if>>
 <</if>>
 
@@ -150,30 +150,30 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 <br>
 
 /* secret police */
-<<if $secretService == 0>>
+<<if $SecExp.buildings.pr.SS == 0>>
 	<<link "Set up personal secret service" "propagandaHub">>
-		<<set $secretService += 1>>
+		<<set $SecExp.buildings.pr.SS += 1>>
 		<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
 	<</link>>
 	<br>Set up a department tasked with the protection of your person, as well as operations requiring a delicate approach.
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology * _HistoryDiscount))>>. Will provide authority and unlock special upgrades, but will increase upkeep.//
 <<else>>
-	<<if $secretService < 5 && $rep >= ($secretService * 1000) + 5000>>
+	<<if $SecExp.buildings.pr.SS < 5 && $rep >= ($SecExp.buildings.pr.SS * 1000) + 5000>>
 		<<link "Expand the secret service" "propagandaHub">>
-			<<set $secretService += 1>>
-			<<run cashX(forceNeg(5000*$upgradeMultiplierArcology * ($secretService + 1) * _HistoryDiscount), "capEx")>>
+			<<set $SecExp.buildings.pr.SS += 1>>
+			<<run cashX(forceNeg(5000*$upgradeMultiplierArcology * ($SecExp.buildings.pr.SS + 1) * _HistoryDiscount), "capEx")>>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
-		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($secretService + 1) * _HistoryDiscount))>>. Will provide more authority each week, but increases upkeep.//
-	<<elseif $secretService < 5>>
+		<br>//Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierArcology * ($SecExp.buildings.pr.SS + 1) * _HistoryDiscount))>>. Will provide more authority each week, but increases upkeep.//
+	<<elseif $SecExp.buildings.pr.SS < 5>>
 		You lack the reputation to further expand operations.
 	<<else>>
 		You have upgraded the secret service to its maximum.
 	<</if>>
 	<br>
-	<<if $blackOps == 0>>
+	<<if $SecExp.buildings.pr.blackOps == 0>>
 		<<link "Create a black ops team" "propagandaHub">>
-			<<set $blackOps = 1>>
+			<<set $SecExp.buildings.pr.blackOps = 1>>
 			<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
 		<</link>>
 		<br>Create a black ops team, ready to carry out corporate sabotage and sensitive operations to further your goals.
@@ -182,15 +182,15 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		You have created a black ops team.
 	<</if>>
 	<br>
-	<<if $marketInfiltration == 0>>
+	<<if $SecExp.buildings.pr.marketInfiltration == 0>>
 		<<link "Infiltrate" "propagandaHub">>
-			<<set $marketInfiltration = 1>>
+			<<set $SecExp.buildings.pr.marketInfiltration = 1>>
 			<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount), "capEx")>>
 		<</link>>
 		the black market in order to manipulate it.
-		 
+
 		<br>//Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierArcology * _HistoryDiscount))>>. The secret services now provides cash as well as authority each week, but will increase crime growth.//
 	<<else>>
-		You have infiltrated the black market and are now in partial control of it. [[Withdraw from the black market|propagandaHub][$marketInfiltration = 0]]
+		You have infiltrated the black market and are now in partial control of it. [[Withdraw from the black market|propagandaHub][$SecExp.buildings.pr.marketInfiltration = 0]]
 	<</if>>
-<</if>>
\ No newline at end of file
+<</if>>
diff --git a/src/SecExp/rebellionHandler.tw b/src/SecExp/rebellionHandler.tw
index 8dba35a7b6f3888ec40d716259770e29d8881f67..ba51781277990c62ec70b7be511378fe2fd27a6b 100644
--- a/src/SecExp/rebellionHandler.tw
+++ b/src/SecExp/rebellionHandler.tw
@@ -44,7 +44,6 @@
 	<<set _irregularMod = $irregulars / 20>>
 <</if>>
 <<if $irregulars > 0>>
-	<<set $deployingMilitia = 1>>
 	<<set _irregularMod = Math.trunc(_irregularMod)>>
 	<<set _attack += (($militiaBaseAttack - $humanUpgrade.attack) + ($militiaBaseAttack - $humanUpgrade.attack) * $attackEquip * $equipMod) * _irregularMod * 0.80>>
 	<<set _defense += (($militiaBaseDefense - $humanUpgrade.defense) + ($militiaBaseDefense - $humanUpgrade.defense) * $attackEquip * $equipMod) * _irregularMod * 0.80>>
@@ -59,7 +58,6 @@
 
 <<for _i = 0; _i < $militiaUnits.length; _i++>>
 	<<if $militiaUnits[_i].active == 1 && $loyalID.includes($militiaUnits[_i].ID)>>
-		<<set $deployingMilitia = 1>>
 		<<if $militiaUnits[_i].training <= 10>>
 			<<set _expBonus = 0>>
 		<<elseif $militiaUnits[_i].training <= 33>>
@@ -85,7 +83,6 @@
 <</for>>
 <<for _i = 0; _i < $slaveUnits.length; _i++>>
 	<<if $slaveUnits[_i].active == 1 && $loyalID.includes($slaveUnits[_i].ID)>>
-		<<set $deployingSlaves = 1>>
 		<<if $slaveUnits[_i].training <= 33>>
 			<<set _expBonus = 0>>
 		<<elseif $slaveUnits[_i].training <= 66>>
@@ -109,7 +106,6 @@
 <</for>>
 <<for _i = 0; _i < $mercUnits.length; _i++>>
 	<<if $mercUnits[_i].active == 1 && $loyalID.includes($mercUnits[_i].ID)>>
-		<<set $deployingMercs = 1>>
 		<<if $mercUnits[_i].training <= 33>>
 			<<set _expBonus = 0>>
 		<<elseif $mercUnits[_i].training <= 66>>
@@ -167,15 +163,13 @@
 	<<set _hp *= 0.95>>
 <</if>>
 
-<<set $troopCount = 0>>
-<<calcTroopCount>>
-<<set _moraleTroopMod = Math.clamp($troopCount / 100,1,10)>>
+<<set _moraleTroopMod = Math.clamp(App.SecExp.conflict.troopCount() / 100,1,10)>>
 
 /* morale and baseHp calculation */
-<<set _morale = ($secBotsMorale * $secBots.active + $militiaBaseMorale * $deployingMilitia + $slaveBaseMorale * $deployingSlaves + $mercBaseMorale * $deployingMercs + $SFBaseMorale * $SF.Active) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $SF.Active)>>
-<<set _morale = _morale + _morale * $secBarracksUpgrades.luxury * 0.05>>	/* barracks bonus */
+<<set _morale = ($secBotsMorale * $secBots.active + $militiaBaseMorale * App.SecExp.conflict.deployedUnits('militia') + $slaveBaseMorale * App.SecExp.conflict.deployedUnits('slaves') + $mercBaseMorale * App.SecExp.conflict.deployedUnits('mercs') + $SFBaseMorale * $SF.Active) / ($secBots.active + App.SecExp.conflict.deployedUnits('militia') +App.SecExp.conflict.deployedUnits('slaves') + App.SecExp.conflict.deployedUnits('mercs') + $SF.Active)>>
+<<set _morale = _morale + _morale * $SecExp.buildings.barracks.upgrades.luxury * 0.05>>	/* barracks bonus */
 <<set _morale *= _moraleTroopMod>>
-<<set _baseHp = ($secBotsBaseHp * $secBots.active + $militiaBaseHp * $deployingMilitia + $slaveBaseHp * $deployingSlaves + $mercBaseHp * $deployingMercs + $SFBaseHp * $SF.Active) / ($secBots.active + $deployingMilitia +$deployingSlaves + $deployingMercs + $SF.Active)>>
+<<set _baseHp = ($secBotsBaseHp * $secBots.active + $militiaBaseHp * App.SecExp.conflict.deployedUnits('militia') + $slaveBaseHp * App.SecExp.conflict.deployedUnits('slaves') + $mercBaseHp * App.SecExp.conflict.deployedUnits('mercs') + $SFBaseHp * $SF.Active) / ($secBots.active + App.SecExp.conflict.deployedUnits('militia') +App.SecExp.conflict.deployedUnits('slaves') + App.SecExp.conflict.deployedUnits('mercs') + $SF.Active)>>
 
 /* calculates rebelling army stats */
 <<if $week <= 30>>
@@ -316,7 +310,7 @@ __Difficulty__:
 <br>
 <br>
 __Army__:
-<br>troops: <<print num(Math.round($troopCount))>>
+<br>troops: <<print num(Math.round(App.SecExp.conflict.troopCount()))>>
 <br>attack: <<print num(Math.round(_attack))>>
 <br>defense: <<print num(Math.round(_defense))>>
 <br>engagement rule modifier: <<if _engageMod > 0>>+<</if>><<print _engageMod>>%
@@ -415,4 +409,4 @@ __Rebels__:
 	<</link>>
 <<else>>
 	<<goto "rebellionReport">>
-<</if>>
\ No newline at end of file
+<</if>>
diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw
index ad1ffa862bf26442e7aceeb866356bc2ae765109..5ba0c72e5950911945b4767b52361cc0a07f4b90 100644
--- a/src/SecExp/rebellionReport.tw
+++ b/src/SecExp/rebellionReport.tw
@@ -980,9 +980,6 @@
 <<set $losses = 0>>
 <<set $battleTurns = 0>>
 <<set $irregulars = 0>>
-<<set $deployingMilitia = 0>>
-<<set $deployingSlaves = 0>>
-<<set $deployingMercs = 0>>
 <<if $slaveRebellion == 1>>
 	<<set $slaveProgress = 0>>
 	<<set $citizenProgress = Math.clamp($citizenProgress - random(50,100), 0, 100)>>
@@ -992,4 +989,4 @@
 <</if>>
 <<set $slaveRebellion = 0>>
 <<set $citizenRebellion = 0>>
-<<set $tension = Math.clamp($tension - random(50,100), 0, 100)>>
\ No newline at end of file
+<<set $tension = Math.clamp($tension - random(50,100), 0, 100)>>
diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw
index d27e96ec7740b4865a21c313fc6a6684d22fc67d..ebe740450ca412a1755b915699bc46d0aecccb00 100644
--- a/src/SecExp/secBarracks.tw
+++ b/src/SecExp/secBarracks.tw
@@ -12,77 +12,77 @@ The Barracks
 __Upgrades__
 <br>
 While this a sore sight for many citizens of $arcologies[0].name, the barracks stand proud before you.
-<<if $secBarracksUpgrades.size == 0>>
+<<if $SecExp.buildings.barracks.upgrades.size == 0>>
 	The building is relatively small and able to house a limited number of units.
-<<elseif $secBarracksUpgrades.size == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.size == 1>>
 	The building has been expanded and can now house more units comfortably.
-<<elseif $secBarracksUpgrades.size == 2>>
+<<elseif $SecExp.buildings.barracks.upgrades.size == 2>>
 	The building has been further expanded and can now house a high number of units.
-<<elseif $secBarracksUpgrades.size == 3>>
+<<elseif $SecExp.buildings.barracks.upgrades.size == 3>>
 	The building has been greatly expanded and can now house a sizable military.
-<<elseif $secBarracksUpgrades.size == 4>>
+<<elseif $SecExp.buildings.barracks.upgrades.size == 4>>
 	The building has been greatly expanded and can now house a small army.
 <<else>>
 	The building has been greatly expanded and can now house an army worthy of an old world nation.
 <</if>>
-<<if $secBarracksUpgrades.luxury == 0>>
+<<if $SecExp.buildings.barracks.upgrades.luxury == 0>>
 	The barracks are a spartan building, with little to make the day to day lives of your soldiers pleasant.
-<<elseif $secBarracksUpgrades.luxury == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 1>>
 	The barracks have been made more comfortable by installing high tech furniture.
-<<elseif $secBarracksUpgrades.luxury == 2>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 2>>
 	The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities.
-<<elseif $secBarracksUpgrades.luxury == 3>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 3>>
 	The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media.
 <<else>>
 	The barracks have been made more comfortable by installing high tech furniture and advanced kitchen facilities. It also provides free access to any digital media. A small limited-access brothel has been added to the structure.
 <</if>>
-<<if $secBarracksUpgrades.training == 0>>
+<<if $SecExp.buildings.barracks.upgrades.training == 0>>
 	The building lacks the space and the equipment to train your units.
-<<elseif $secBarracksUpgrades.training == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.training == 1>>
 	A training facility has been set up, allowing your units to better their skills with time.
 <<else>>
 	The training facility has been filled with specialized equipment and skilled trainers.
 <</if>>
-<<if $secBarracksUpgrades.loyaltyMod == 0>>
+<<if $SecExp.buildings.barracks.upgrades.loyaltyMod == 0>>
 	The barracks lack an indoctrination facility.
-<<elseif $secBarracksUpgrades.loyaltyMod == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.loyaltyMod == 1>>
 	The barracks have been fitted with an indoctrination facility.
 <<else>>
 	The barracks have been fitted with an advanced indoctrination facility.
 <</if>>
 <br>
 <br>
-<<if $secBarracksUpgrades.size < 5>>
+<<if $SecExp.buildings.barracks.upgrades.size < 5>>
 	<<link "Increase the size of the barracks" "secBarracks">>
-		<<run cashX(forceNeg(Math.trunc((5000 * ($secBarracksUpgrades.size + 1))*$upgradeMultiplierArcology)), "capEx")>>
-		<<set $secBarracksUpgrades.size += 1>>
+		<<run cashX(forceNeg(Math.trunc((5000 * ($SecExp.buildings.barracks.upgrades.size + 1))*$upgradeMultiplierArcology)), "capEx")>>
+		<<set $SecExp.buildings.barracks.upgrades.size += 1>>
 	<</link>>
-	<br>//Costs <<print cashFormat((5000 * ($secBarracksUpgrades.size + 1))*$upgradeMultiplierArcology)>> and will increase the maximum number of units by 2.//
+	<br>//Costs <<print cashFormat((5000 * ($SecExp.buildings.barracks.upgrades.size + 1))*$upgradeMultiplierArcology)>> and will increase the maximum number of units by 2.//
 <<else>>
 	You've expanded the barracks to their maximum.
 <</if>>
 <br>
-<<if $secBarracksUpgrades.luxury == 0>>
+<<if $SecExp.buildings.barracks.upgrades.luxury == 0>>
 	<<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances." "secBarracks">>
-		<<set $secBarracksUpgrades.luxury += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.luxury += 1>>
 		<<run cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierTrade)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale.//
-<<elseif $secBarracksUpgrades.luxury == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 1>>
 	<<link "Further increase the quality of life of your soldiers by installing advanced kitchen equipment and hiring skilled chefs." "secBarracks">>
-		<<set $secBarracksUpgrades.luxury += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.luxury += 1>>
 		<<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierTrade)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale, for a total of +10%.//
-<<elseif $secBarracksUpgrades.luxury == 2>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 2>>
 	<<link "Further increase the quality of life of your soldiers by providing high speed, free access to digital media" "secBarracks">>
-		<<set $secBarracksUpgrades.luxury += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.luxury += 1>>
 		<<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierTrade)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierTrade))>> and will provide a 5% bonus to morale, for a total of +15%.//
-<<elseif $secBarracksUpgrades.luxury == 3>>
+<<elseif $SecExp.buildings.barracks.upgrades.luxury == 3>>
 	<<link "Further increase the quality of life of your soldiers by adding and staffing an exclusive brothel to the structure" "secBarracks">>
-		<<set $secBarracksUpgrades.luxury += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.luxury += 1>>
 		<<run cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>> and will provide a 5% bonus to morale, for a total of +20%.//
@@ -90,15 +90,15 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s
 	You've made life in your barracks as good as it can get.
 <</if>>
 <br>
-<<if $secBarracksUpgrades.training == 0>>
+<<if $SecExp.buildings.barracks.upgrades.training == 0>>
 	<<link "Add a training facility to the barracks" "secBarracks">>
-		<<set $secBarracksUpgrades.training += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.training += 1>>
 		<<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will allow units to accumulate some experience each week.//
-<<elseif $secBarracksUpgrades.training == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.training == 1>>
 	<<link "Improve the training facility with modern equipment and skilled personnel" "secBarracks">>
-		<<set $secBarracksUpgrades.training += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.training += 1>>
 		<<run cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierTrade)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierTrade))>> and will allow units to accumulate experience each week.//
@@ -106,15 +106,15 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s
 	You have improved the training facility to the limit.
 <</if>>
 <br>
-<<if $secBarracksUpgrades.loyaltyMod == 0>>
+<<if $SecExp.buildings.barracks.upgrades.loyaltyMod == 0>>
 	<<link "Add an indoctrination facility to the barracks" "secBarracks">>
-		<<set $secBarracksUpgrades.loyaltyMod += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.loyaltyMod += 1>>
 		<<run cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will slowly raise loyalty of all units//
-<<elseif $secBarracksUpgrades.loyaltyMod == 1>>
+<<elseif $SecExp.buildings.barracks.upgrades.loyaltyMod == 1>>
 	<<link "Improve the indoctrination facility with advanced equipment and skilled personnel" "secBarracks">>
-		<<set $secBarracksUpgrades.loyaltyMod += 1>>
+		<<set $SecExp.buildings.barracks.upgrades.loyaltyMod += 1>>
 		<<run cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierTrade)), "capEx")>>
 	<</link>>
 	<br>//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierTrade))>> and will raise loyalty of all units faster.//
@@ -125,8 +125,14 @@ While this a sore sight for many citizens of $arcologies[0].name, the barracks s
 <hr>
 __Units__
 <br>
-Your current maximum number of units is <<print App.SecExp.Check.maxUnits()>> (<<print num($secBots.maxTroops+(50*App.SecExp.Check.maxUnits()))>> troops), <<print App.SecExp.Check.activeUnits()>> (<<print num($secBots.maxTroops+($slavesEmployedManpower)+($militiaEmployedManpower)+($mercEmployedManpower))>> troops) are active and <<print (2 * App.SecExp.Check.deploySpeed())>> units can be deployed. <<if $secBarracksUpgrades.luxury > 0>>The barracks provides <<print $secBarracksUpgrades.luxury * 5>>% bonus morale when battle occurs.<</if>> <<if $secBarracksUpgrades.training > 0>>The training facility will increase the effectiveness of your units with time.<</if>>
-<<if App.SecExp.Check.activeUnits() >= App.SecExp.Check.maxUnits()>>
+Your current maximum number of units is <<print App.SecExp.battle.maxUnits()>> (<<print num($secBots.maxTroops+(50*App.SecExp.battle.maxUnits()))>> troops), <<print App.SecExp.battle.activeUnits()>> (<<print num($secBots.maxTroops+($slavesEmployedManpower)+($militiaEmployedManpower)+($mercEmployedManpower))>> troops) are active and <<print (2 * App.SecExp.battle.deploySpeed())>> units can be deployed. <<if $SecExp.buildings.barracks.upgrades.luxury > 0>>The barracks provides <<print $SecExp.buildings.barracks.upgrades.luxury * 5>>% bonus morale when battle occurs.<</if>> <<if $SecExp.buildings.barracks.upgrades.training > 0>>The training facility will increase the effectiveness of your units with time.<</if>>
+<br>
+<<options $SecExp.settings.unitDescriptions>>
+	Unit descriptions are
+	<<option 1 "Abbreviated">>
+	<<option 0 "Summarized">>
+<</options>>
+<<if App.SecExp.battle.activeUnits() >= App.SecExp.battle.maxUnits()>>
 	<br>You have reached the maximum number of units. You'll have to disband one or enlarge the barracks before forming a new unit.
 <</if>>
 <<if $arcologies[0].FSRomanRevivalist != "unset" || $arcologies[0].FSChineseRevivalist != "unset" || $arcologies[0].FSArabianRevivalist != "unset" || $arcologies[0].FSEdoRevivalist != "unset" || $arcologies[0].FSEgyptianRevivalist != "unset" || $arcologies[0].FSAztecRevivalist != "unset">>
@@ -137,7 +143,7 @@ Your current maximum number of units is <<print App.SecExp.Check.maxUnits()>> (<
 <br>__Security Drones__
 /* drones */
 <br>
-<<secBotsDescription>>
+<<= App.SecExp.unit.dec($secBots, "Bots")>>
 <br>
 <<if $secBots.active == 1>>
 	<<link "Review Equipment and upgrades" "seeUnit">>
@@ -183,7 +189,7 @@ You are free to organize your menial slaves into fighting units. Currently you h
 <</if>>
 <br>
 <<set _sL = $slaveUnits.length>>
-<<if $menials > 0 && App.SecExp.Check.activeUnits() < App.SecExp.Check.maxUnits()>>
+<<if $menials > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>>
 	<br>
 	<<link "Form a new unit" "secBarracks">>
 		<<set _newUnit = {
@@ -211,8 +217,7 @@ You are free to organize your menial slaves into fighting units. Currently you h
 	<<capture _i>>
 	<<if $slaveUnits[_i].active == 1>>
 		<br>
-		<br>
-		<<slaveUnitsDescription $slaveUnits[_i]>>
+		<<= App.SecExp.unit.dec($slaveUnits[_i], "Slaves")>>
 		<br>
 		<<link "Disband the unit" "secBarracks">>
 			<<set $menials += $slaveUnits[_i].troops>>
@@ -297,7 +302,7 @@ __Militia__
 	<</if>>
 	Your current total manpower is <<print num($militiaTotalManpower)>>, of which <<print num($militiaEmployedManpower)>> is in active duty. You lost in total <<print num($militiaTotalCasualties)>> citizens, leaving you with <<print num($militiaFreeManpower)>> available citizens.
 	<<set _mL = $militiaUnits.length>>
-	<<if $militiaFreeManpower > 0 && App.SecExp.Check.activeUnits() < App.SecExp.Check.maxUnits()>>
+	<<if $militiaFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>>
 		<br><br>
 		<<link "Form a new unit" "secBarracks">>
 			<<set _newUnit = {
@@ -325,8 +330,7 @@ __Militia__
 		<<capture _i>>
 		<<if $militiaUnits[_i].active == 1>>
 			<br>
-			<br>
-			<<militiaUnitsDescription $militiaUnits[_i]>>
+			<<= App.SecExp.unit.dec($militiaUnits[_i], "Militia")>>
 			<br>
 			<<link "Disband the unit" "secBarracks">>
 				<<set $militiaFreeManpower += $militiaUnits[_i].troops>>
@@ -408,7 +412,7 @@ __Mercenaries__
 	With the installation of a mercenary company in the arcology, many other are attracted to your free city, hoping to land a contract with you.
 	You are able to organize them in units to use in the defense of the arcology. Excluding the defense force you set up, there are <<print num($mercTotalManpower)>> mercenaries in your arcology, of which <<print num($mercEmployedManpower)>> actively employed and <<print $mercFreeManpower>> not yet under contract. In total <<print num($mercTotalCasualties)>> mercenaries have died defending your arcology.
 	<<set _meL = $mercUnits.length>>
-	<<if $mercFreeManpower > 0 && App.SecExp.Check.activeUnits() < App.SecExp.Check.maxUnits()>>
+	<<if $mercFreeManpower > 0 && App.SecExp.battle.activeUnits() < App.SecExp.battle.maxUnits()>>
 		<br><br>
 		<<link "Form a new unit" "secBarracks">>
 			<<set _newUnit = {
@@ -436,8 +440,7 @@ __Mercenaries__
 		<<capture _i>>
 		<<if $mercUnits[_i].active == 1>>
 			<br>
-			<br>
-			<<mercUnitsDescription $mercUnits[_i]>>
+			<<= App.SecExp.unit.dec($mercUnits[_i], "Mercs")>>
 			<br>
 			<<link "Disband the unit" "secBarracks">>
 				<<set $mercFreeManpower += $mercUnits[_i].troops>>
diff --git a/src/SecExp/secExp.js b/src/SecExp/secExp.js
index 82223e1638e56f5646e22b8f3bce7f978ed15eff..c28d27a842fe4ab34dba8f0d89251a36fc4a95bf 100755
--- a/src/SecExp/secExp.js
+++ b/src/SecExp/secExp.js
@@ -1,4 +1,10 @@
 // V = SugarCube.State.variables, T = SugarCube.State.temporary;
+/* App.SecExp.battle = (function() {
+	"use strict";
+	return {
+		battle:battle,
+	};
+})(); */
 // App.SecExp.Check.gen()- > conflcitOptions -> conflcitHandler -> conflcitReport -> Scheduled Event
 /* TODO:
  * Merge tradeLegalAid + taxTrade into a single varaible
@@ -13,7 +19,7 @@ App.SecExp.upkeep = function(input = '') {
 		'legionTradition', 'pharaonTradition', 'eagleWarriors', 'ronin',
 		'mamluks', 'sunTzu', 'tradeLegalAid', 'propCampaignBoost'];
 			for(let i = 0; i < vars.length; i++) {
-				if(jsDef(V[vars[i]]) && V[vars[i]] > 0) {
+				if (jsDef(V[vars[i]]) && V[vars[i]] > 0) {
 					value += 1000;
 				}
 			}
@@ -21,20 +27,20 @@ App.SecExp.upkeep = function(input = '') {
 			if(V.enslavementRights > 0) {
 				value += 10;
 			}
-			if (V.sellData == 1) {
+			if (V.sellData === 1) {
 				value += 10;
 			}
-			if (V.slaveSoldierPrivilege == 1) {
+			if (V.slaveSoldierPrivilege === 1) {
 				value += 10;
 			}
-			if (V.weaponsLaw == 0) {
+			if (V.weaponsLaw === 0) {
 				value += 30;
-			} else if (V.weaponsLaw == 2) {
+			} else if (V.weaponsLaw === 2) {
 				value += 10;
-			} else if (V.weaponsLaw == 1) {
+			} else if (V.weaponsLaw === 1) {
 				value += 20;
 			}
-			if (V.slavesOfficers == 1) {
+			if (V.slavesOfficers === 1) {
 				value += 10;
 			}
 		} else if(input === 'SF') {
@@ -58,13 +64,13 @@ App.SecExp.upkeep = function(input = '') {
 				let buildingUgradePool = [];
 				if (V.propHub > 0) {
 					value += base;
-					buildingUgradePool.push(V.propCampaign);
-					buildingUgradePool.push(V.miniTruth);
-					buildingUgradePool.push(V.fakeNews);
-					buildingUgradePool.push(V.controlLeaks);
-					buildingUgradePool.push(V.secretService);
-					buildingUgradePool.push(V.blackOps);
-					buildingUgradePool.push(V.marketInfiltration);
+					buildingUgradePool.push(V.SecExp.buildings.pr.campaign);
+					buildingUgradePool.push(V.SecExp.buildings.pr.miniTruth);
+					buildingUgradePool.push(V.SecExp.buildings.pr.fakeNews);
+					buildingUgradePool.push(V.SecExp.buildings.pr.controlLeaks);
+					buildingUgradePool.push(V.SecExp.buildings.pr.SS);
+					buildingUgradePool.push(V.SecExp.buildings.pr.blackOps);
+					buildingUgradePool.push(V.SecExp.buildings.pr.marketInfiltration);
 					for(let i = 0; i < buildingUgradePool; i++) {
 						if(i > 0) {
 							value += upgrade*buildingUgradePool[i];
@@ -88,7 +94,7 @@ App.SecExp.upkeep = function(input = '') {
 				}
 				if (V.secBarracks > 0) {
 					value += base;
-					buildingUgradePool.push(V.secBarracksUpgrades);
+					buildingUgradePool.push(V.SecExp.buildings.barracks.upgrades);
 					for(let i = 0; i < buildingUgradePool; i++) {
 						if(i > 0) {
 							value += upgrade*buildingUgradePool[i];
@@ -115,6 +121,280 @@ App.SecExp.upkeep = function(input = '') {
 		return value;
 }; // Closes upkeep function.
 
+App.SecExp.conflict = (function() {
+	"use strict";
+	return {
+		deployedUnits:deployedUnits,
+		troopCount:troopCount,
+	};
+
+	function deployedUnits(input = '') {
+		const V = State.variables;
+		let bots = 0, militiaC = 0, slavesC = 0, mercsC = 0, init = 0;
+		if(V.secBots.isDeployed > 0) {
+			bots++;
+		}
+		if(passage() !== "attackOptions") {
+			if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) { // battle
+				init++;
+			}
+		}
+		if(V.slaveRebellion+V.citizenRebellion > 0) {
+			if (V.SF.Toggle && V.SF.Active >= 1) { // rebellion
+				init++;
+			}
+			if(V.irregulars > 0) {
+				militiaC++;
+			}
+		}
+
+		const Militia = V.militiaUnits.length;
+		for(let i = 0; i < Militia; i++) {
+			if(V.militiaUnits[i].isDeployed > 0) {
+				militiaC++;
+			}
+		}
+
+		const Slaves = V.slaveUnits.length;
+		for(let i = 0; i < Slaves; i++) {
+			if(V.slaveUnits[i].isDeployed > 0) {
+				slavesC++;
+			}
+		}
+
+		const Mercs = V.mercUnits.length;
+		for(let i = 0; i < Mercs; i++) {
+			if(V.mercUnits[i].isDeployed > 0) {
+				mercsC++;
+			}
+		}
+
+		if(input === '') {
+			return bots+militiaC+slavesC+mercsC+init;
+		} else if(input === 'bots') {
+			return bots;
+		} else if(input === 'militia') {
+			return militiaC;
+		} else if(input === 'slaves') {
+			return slavesC;
+		} else if(input === 'mercs') {
+			return mercsC;
+		}
+	}
+
+	function troopCount() {
+		const V = State.variables;
+		let troops = 0;
+		/*
+		if (jsDef(V.SecExp.conflict) && jsDef(V.SecExp.conflict.type)) {
+			for (let i = 0; i < V.SecExp.army.unitPool.length; i++) {
+				if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]]) && V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads.lenth > 0) {
+					for (let x = 0; x < V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads.lenth; x++) {
+						if (V.SecExp.conflict.type >= 2) {
+							if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].isDeployed)) {
+								V.SecExp.conflict.army.troops += V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].troops;
+							}
+						} else {
+							if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].active) && V.SecExp.conflict.loyal.includes(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].name)) {
+								V.SecExp.conflict.army.troops += V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].troops;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		if (input === 'manpower') {
+				if (V.mercenaries === 1) {
+					V.mercFreeManpower=jsRandom(5,20);
+				} else if (V.mercenaries > 1) {
+					V.mercFreeManpower=jsRandom(10,30);
+				}
+			function CorrectEmployedCount(target) {
+				let correctEmployedMP=0;
+				for (let i=0;i<V.target.length;i++) {
+					correctEmployedMP += V.target[i].troops;
+				}
+				var name=target;
+				name=name.replace('Units','');
+				name=nameEmployedManpower;
+				if (V.name !== correctEmployedMP) {
+					V.name=correctEmployedMP;
+				}
+			}
+			V.militiaTotalManpower=V.militiaEmployedManpower + V.militiaFreeManpower;
+			V.mercTotalManpower=V.mercEmployedManpower + V.mercFreeManpower;
+		}
+		*/
+		if (V.attackThisWeek === 1) {
+			if (V.secBots.isDeployed === 1) {
+				troops += V.secBots.troops;
+			}
+			for(let i = 0; i < V.militiaUnits.length; i++) {
+				if (V.militiaUnits[i].isDeployed === 1) {
+					troops += V.militiaUnits[i].troops;
+				}
+			}
+			for(let i = 0; i < V.slaveUnits.length; i++) {
+				if (V.slaveUnits[i].isDeployed === 1) {
+					troops += V.slaveUnits[i].troops;
+				}
+			}
+			for(let i = 0; i < V.mercUnits.length; i++) {
+				if (V.mercUnits[i].isDeployed === 1) {
+					troops += V.mercUnits[i].troops;
+				}
+			}
+			if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) {
+				troops += V.carriableSoldiers;
+			}
+		} else if (V.slaveRebellion === 1 || V.citizenRebellion === 1) {
+			if (V.irregulars > 0) {
+				troops += V.irregulars;
+			}
+			if (V.secBots.active === 1) {
+				troops += V.secBots.troops;
+			}
+			for(let i = 0; i < V.militiaUnits.length; i++) {
+				if (V.militiaUnits[i].active === 1 && V.loyalID.includes(V.militiaUnits[i].ID)) {
+					troops += V.militiaUnits[i].troops;
+				}
+			}
+			for(let i = 0; i < V.slaveUnits.length; i++) {
+				if (V.slaveUnits[i].active === 1 && V.loyalID.includes(V.slaveUnits[i].ID)) {
+					troops += V.slaveUnits[i].troops;
+				}
+			}
+			for(let i = 0; i < V.mercUnits.length; i++) {
+				if (V.mercUnits[i].active === 1 && V.loyalID.includes(V.mercUnits[i].ID)) {
+					troops += V.mercUnits[i].troops;
+				}
+			}
+			if (V.SF.Toggle && V.SF.Active >= 1) {
+				troops += V.carriableSoldiers;
+			}
+		}
+		return troops;
+	}
+})();
+
+App.SecExp.battle = (function() {
+	"use strict";
+	return {
+		deploySpeed:deploySpeed,
+		deployableUnits:deployableUnits,
+		activeUnits:activeUnits,
+		maxUnits:maxUnits,
+		recon:recon,
+		bribeCost:bribeCost,
+	};
+
+	function deploySpeed() {
+		const V = State.variables;
+		let init = 1;
+		if(V.readinessUpgrades.pathways > 0) {
+			init += 1;
+		}
+		if(V.readinessUpgrades.rapidVehicles > 0) {
+			init += 2;
+		}
+		if(V.readinessUpgrades.rapidPlatforms > 0) {
+			init += 2;
+		}
+		if(V.readinessUpgrades.earlyWarn > 0) {
+			init += 2;
+		}
+		if( V.SF.Toggle && V.SF.Active >= 1 && jsDef(V.sectionInFirebase)) {
+			init += 2;
+		}
+		return init;
+	}
+
+	function deployableUnits() {
+		const V = State.variables;
+		let init = 2 * App.SecExp.battle.deploySpeed();
+		if(V.secBots.isDeployed > 0) {
+			init--;
+		}
+
+		const Militia = V.militiaUnits.length;
+		for(let i = 0; i < Militia; i++) {
+			if(V.militiaUnits[i].isDeployed > 0) {
+				init--;
+			}
+		}
+
+		const Slaves = V.slaveUnits;
+		for(let i = 0; i < Slaves; i++) {
+			if(V.slaveUnits[i].isDeployed > 0) {
+				init--;
+			}
+		}
+
+		const Mercs = V.mercUnits.length;
+		for(let i = 0; i < Mercs; i++) {
+			if(V.mercUnits[i].isDeployed > 0) {
+				init--;
+			}
+		}
+
+		if(init < 0) {
+			init = 0;
+		}
+		return init;
+	}
+
+	function activeUnits() {
+		const V = State.variables;
+		return V.secBots.isDeployed + V.militiaUnits.length + V.slaveUnits.length + V.mercUnits.length;
+	}
+
+	function maxUnits() {
+		const V = State.variables;
+		let max = 8 + (V.SecExp.buildings.barracks.upgrades.size * 2);
+		if(App.SecExp.battle.deploySpeed() === 10) {
+			max += 2;
+		}
+		return max;
+	}
+
+	function recon() {
+		const V = State.variables;
+		let recon = 0;
+		if (V.intelUpgrades.sensors > 0) {
+			recon++;
+		}
+		if (V.intelUpgrades.signalIntercept > 0) {
+			recon++;
+		}
+		if (V.intelUpgrades.radar > 0) {
+			recon++;
+		}
+		return recon;
+	}
+
+	function bribeCost() {
+		const V = State.variables;
+		let cost; const baseBribePerAttacker = 5;
+		if (V.week <= 30) {
+			cost = 5000 + baseBribePerAttacker * V.attackTroops;
+		} else if (V.week <= 30) {
+			cost = 10000 + baseBribePerAttacker * V.attackTroops;
+		} else if (V.week <= 30) {
+			cost = 15000 + baseBribePerAttacker * V.attackTroops;
+		} else if (V.week <= 30) {
+			cost = 20000 + baseBribePerAttacker * V.attackTroops;
+		} else if (V.week <= 30) {
+			cost = 25000 + baseBribePerAttacker * V.attackTroops;
+		}
+		if (V.majorBattle > 0) {
+			cost *= 3;
+		}
+		cost = Math.trunc(Math.clamp(cost, 0, 1000000));
+		return cost;
+	}
+})();
+
 App.SecExp.Check = (function() {
 	"use strict";
 	return {
@@ -122,14 +402,7 @@ App.SecExp.Check = (function() {
 		secRestPoint:secRestPoint,
 		crimeCap:crimeCap,
 		reqMenials:reqMenials,
-		initialTrade:initialTrade,
-		maxUnits:maxUnits,
-		activeUnits:activeUnits,
-		deploySpeed:deploySpeed,
-		deployableUnits:deployableUnits,
-		deployedUnits:deployedUnits,
-		/* troopCount:troopCount,
-		fixBrokenStats:fixBrokenStats,
+		/* fixBrokenStats:fixBrokenStats,
 		baseStats:baseStats,
 		units:units,
 		// fixBrokenUnits:fixBrokenUnits,
@@ -140,13 +413,25 @@ App.SecExp.Check = (function() {
 		const V = State.variables;
 		/* function jsDel(input) {
 			for(let i = 0; i < input.length; i++) {
-				if(jsDef(input[i] === true)) {
+				if (jsDef(input[i] === true)) {
 					delete input[i];
 				}
 			}
 		} */
 
 		V.secExpEnabled = V.secExpEnabled || 0;
+		if (jsDef(V.secExp)) {
+			if (V.secExpEnabled !== 1) {
+				V.secExpEnabled = V.secExp;
+			}
+			delete V.secExp;
+		}
+		if (jsDef(V.SecExp.settings.active)) {
+			if (V.secExpEnabled !== 1) {
+				V.secExpEnabled = V.SecExp.settings.active;
+			}
+			delete V.SecExp.settings.active;
+		}
 		V.SecExp = V.SecExp || {};
 		V.SecExp.settings = V.SecExp.settings || {};
 
@@ -157,20 +442,32 @@ App.SecExp.Check = (function() {
 		}
 
 		if (passage() === "init" || passage() === "New Game Plus") {
-			V.SecExp = { settings:{show:V.SecExp.settings.show} };
+			V.SecExp = {settings:{show:V.SecExp.settings.show}};
 		}
 
 		if (V.secExpEnabled > 0) {
-		 V.SecExp.core = V.SecExp.core || {};
-		 V.SecExp.army = V.SecExp.army || {};
-		 /*
+			V.SecExp.core = V.SecExp.core || {};
+			V.SecExp.army = V.SecExp.army || {};
+			/*
 		 V.SecExp.army.units = V.SecExp.army.units || {};
 			V.SecExp.army.unitPool = ['Bots', 'Slaves', 'Militia', 'Mercs'];
 			V.SecExp.core.equipMod = 0.15;
 			*/
 			V.SecExp.core.trade = V.SecExp.core.trade || 0;
-			if (V.SecExp.core.trade === 0 || V.SecExp.core.trade === null) {
-				V.SecExp.core.trade = App.SecExp.Check.initialTrade();
+			if (passage() === "Acquisition" || V.SecExp.core.trade === 0) {
+				const V = State.variables;
+				let init = jsRandom(20, 30);
+				if (V.terrain === "urban") {
+					init += jsRandom(10, 10);
+				} else if (V.terrain === "ravine") {
+					init -= jsRandom(5, 5);
+				}
+				if (["wealth", "capitalist", "celebrity", "BlackHat"].includes(V.PC.career)) {
+					init += jsRandom(5, 5);
+				} else if (["escort", "servant", "gang"].includes(V.PC.career)) {
+					init -= jsRandom(5, 5);
+				}
+				V.SecExp.core.trade = init;
 			}
 			if (jsDef(V.trade)) {
 				V.SecExp.core.trade = V.trade;
@@ -244,29 +541,25 @@ App.SecExp.Check = (function() {
 					}
 				};
 
-				battle:{
-					oceanic:V.battlesEnabledOceanic
-				}
-
 			V.SecExp.army.max = V.SecExp.army.max || 30;
-			if(jsDef(V.maxTroops)) {
+			if (jsDef(V.maxTroops)) {
 				V.SecExp.army.max = V.maxTroops;
 			}
 
 			V.SecExp.army.totalKills = V.SecExp.army.totalKills || 0;
-			if(jsDef(V.totalKills)) {
+			if (jsDef(V.totalKills)) {
 				V.SecExp.army.totalKills = V.totalKills;
 			}
 			*/
 			V.SecExp.settings.battle = V.SecExp.settings.battle || {};
 			V.SecExp.settings.battle.enabled = V.SecExp.settings.battle.enabled || 1;
-			if(jsDef(V.battlesEnabled)) {
+			if (jsDef(V.battlesEnabled)) {
 				V.SecExp.settings.battle.enabled = V.battlesEnabled;
 				delete V.battlesEnabled;
 			}
-			// if(V.SecExp.settings.battle.enabled > 0) {
-			 V.SecExp.battle = V.SecExp.battle || {};
-			 // V.SecExp.battle.major = V.SecExp.battle.major || {};
+			// if (V.SecExp.settings.battle.enabled > 0) {
+				V.SecExp.battle = V.SecExp.battle || {};
+				// V.SecExp.battle.major = V.SecExp.battle.major || {};
 			/*
 				V.SecExp.battle.savedRoster = V.SecExp.battle.savedRoster || {};
 				V.SecExp.battle.savedRoster.leader = V.SecExp.battle.savedRoster.leader || "none";
@@ -280,39 +573,36 @@ App.SecExp.Check = (function() {
 					V.SecExp.battle.savedRoster.lastSelection = V.lastSelection;
 				}
 				*/
-			 V.SecExp.settings.battle.major = V.SecExp.settings.battle.major || {};
-			 V.SecExp.settings.battle.frequency = V.SecExp.settings.battle.frequency || 1;
-				if(jsDef(V.battleFrequency)) {
+				V.SecExp.settings.battle.major = V.SecExp.settings.battle.major || {};
+				V.SecExp.settings.battle.frequency = V.SecExp.settings.battle.frequency || 1;
+				if (jsDef(V.battleFrequency)) {
 					V.SecExp.settings.battle.frequency = V.battleFrequency;
 					delete V.battleFrequency;
 				}
-				V.SecExp.settings.battle.force = V.SecExp.settings.battle.force || 1;
-				if(jsDef(V.forceBattle)) {
+				V.SecExp.settings.battle.force = V.SecExp.settings.battle.force || 0;
+				if (jsDef(V.forceBattle)) {
 					V.SecExp.settings.battle.force = V.forceBattle;
 					delete V.forceBattle;
 				}
 
-				if(jsDef(V.readiness)) {
+				if (jsDef(V.readiness)) {
 					if(V.readiness === 10) {
 						V.sectionInFirebase = 1;
 					}
 					delete V.readiness;
 				}
-				V.SecExp.battle.recon = V.SecExp.battle.recon || 0;
-				if(jsDef(V.recon)) {
-					V.SecExp.battle.recon = V.recon;
-					delete V.recon;
-				}
+
+				V.SecExp.settings.unitDescriptions = V.SecExp.settings.unitDescriptions || 0;
 
 				V.SecExp.settings.battle.allowSlavePrestige = V.SecExp.settings.battle.allowSlavePrestige || 1;
-				if(jsDef(V.allowPrestigeFromBattles)) {
+				if (jsDef(V.allowPrestigeFromBattles)) {
 					V.SecExp.settings.battle.allowSlavePrestige = V.allowPrestigeFromBattles;
 					delete V.allowPrestigeFromBattles;
 				}
 				/*
-				if(V.SecExp.settings.battle.allowSlavePrestige > 0) {
+				if (V.SecExp.settings.battle.allowSlavePrestige > 0) {
 					V.SecExp.battle.slaveVictories = V.SecExp.battle.slaveVictories || [];
-					if(jsDef(V.slaveVictories)) {
+					if (jsDef(V.slaveVictories)) {
 						V.SecExp.battle.slaveVictories = V.slaveVictories;
 						delete V.slaveVictories;
 					}
@@ -323,25 +613,25 @@ App.SecExp.Check = (function() {
 				}
 				*/
 				V.SecExp.settings.battle.major.enabled = V.SecExp.settings.battle.major.enabled || 1;
-				if(jsDef(V.majorBattlesEnabled)) {
+				if (jsDef(V.majorBattlesEnabled)) {
 					V.SecExp.settings.battle.major.enabled = V.majorBattlesEnabled;
 					delete V.majorBattlesEnabled;
 				}
 
-				if(V.SecExp.settings.battle.major.enabled > 0) {
+				if (V.SecExp.settings.battle.major.enabled > 0) {
 					V.SecExp.settings.battle.major.gameOver = V.SecExp.settings.battle.major.gameOver || 1;
-					if(jsDef(V.majorBattleGameOver)) {
+					if (jsDef(V.majorBattleGameOver)) {
 						V.SecExp.settings.battle.major.gameOver = V.majorBattleGameOver;
 						delete V.majorBattleGameOver;
 					}
 					V.SecExp.settings.battle.major.force = V.SecExp.settings.battle.major.force || 0;
-					if(jsDef(V.forceMajorBattle)) {
+					if (jsDef(V.forceMajorBattle)) {
 						V.SecExp.settings.battle.major.force = V.forceMajorBattle;
 						delete V.forceMajorBattle;
 					}
 
 					V.SecExp.settings.battle.major.mult = V.SecExp.settings.battle.major.mult || 1;
-					if(jsDef(V.majorBattleMult)) {
+					if (jsDef(V.majorBattleMult)) {
 						V.SecExp.settings.battle.major.mult = V.majorBattleMult;
 						delete V.majorBattleMult;
 					}
@@ -352,7 +642,7 @@ App.SecExp.Check = (function() {
 					V.SecExp.battle.major = 0;
 					const vars = ['hasFoughtOnce', 'battlesCount', 'hasFoughtMajorBattleOnce', 'majorBattlesCount'];
 					for(let i = 0; i < vars.length; i++) {
-						if(jsDef(V[vars[i]]) && V[vars[i]] > 0) {
+						if (jsDef(V[vars[i]]) && V[vars[i]] > 0) {
 							V.SecExp.battle.count += V[vars[i]];
 							if(vars[i] === 'hasFoughtMajorBattleOnce' || vars[i] === 'majorBattlesCount') {
 								V.SecExp.battle.major += V[vars[i]];
@@ -360,10 +650,10 @@ App.SecExp.Check = (function() {
 						}
 						delete V[vars[i]];
 					}
-					if(V.SecExp.battle.count === 0) {
+					if (V.SecExp.battle.count === 0) {
 						delete V.SecExp.battle.count;
 					}
-					if(V.SecExp.battle.major === 0) {
+					if (V.SecExp.battle.major === 0) {
 						delete V.SecExp.battle.major;
 					}
 				}
@@ -382,7 +672,7 @@ App.SecExp.Check = (function() {
 					V.SecExp.battle.defeatStreak = V.PClossStreak;
 				}
 
-				if(jsDef(V.lastAttackWeeks) && V.lastAttackWeeks > 0) {
+				if (jsDef(V.lastAttackWeeks) && V.lastAttackWeeks > 0) {
 					V.SecExp.battle.weeksSinceLast = V.lastAttackWeeks;
 				}
 
@@ -488,14 +778,14 @@ App.SecExp.Check = (function() {
 			/*
 			if (V.SecExp.settings.rebellion.enabled > 0) {
 			 V.SecExp.rebellion = V.SecExp.rebellion || {};
-				if(jsDef(V.lastRebellionWeeks) && V.lastRebellionWeeks > 0) {
+				if (jsDef(V.lastRebellionWeeks) && V.lastRebellionWeeks > 0) {
 					V.SecExp.rebellion.weeksSinceLast = V.lastRebellionWeeks;
 				}
 
-				if(jsDef(V.PCrebWon) && V.PCrebWon > 0) {
+				if (jsDef(V.PCrebWon) && V.PCrebWon > 0) {
 					V.SecExp.rebellion.victory = V.PCrebWon;
 				}
-				if(jsDef(V.PCrebLoss) && V.PCrebLoss > 0) {
+				if (jsDef(V.PCrebLoss) && V.PCrebLoss > 0) {
 					V.SecExp.rebellion.defeat = V.PCrebLoss;
 				}
 
@@ -503,12 +793,12 @@ App.SecExp.Check = (function() {
 					V.SecExp.rebellion.count = 0;
 					const vars = ['hasRebelledOnce', 'rebellionsCount'];
 					for(let i = 0; i < vars.length; i++) {
-						if(jsDef(V[vars[i]]) && V[vars[i]] > 0) {
+						if (jsDef(V[vars[i]]) && V[vars[i]] > 0) {
 							V.SecExp.rebellion.count += V[vars[i]];
 						}
 						delete V[vars[i]];
 					}
-					if(V.SecExp.rebellion.count === 0) {
+					if (V.SecExp.rebellion.count === 0) {
 						delete V.SecExp.rebellion.count;
 					}
 				}
@@ -518,16 +808,16 @@ App.SecExp.Check = (function() {
 				}
 
 				V.SecExp.rebellion.tension = V.SecExp.rebellion.tension || 0;
-				if(jsDef(V.tension)) {
+				if (jsDef(V.tension)) {
 					V.SecExp.rebellion.tension = V.tension;
 				}
 
 				V.SecExp.rebellion.slave = V.SecExp.rebellion.slave || 0;
-				if(jsDef(V.slaveProgress)) {
+				if (jsDef(V.slaveProgress)) {
 					V.SecExp.rebellion.slave = V.slaveProgress;
 				}
 				V.SecExp.rebellion.rabble = V.SecExp.rebellion.rabble || 0;
-				if(jsDef(V.citizenProgress)) {
+				if (jsDef(V.citizenProgress)) {
 					V.SecExp.rebellion.rabble = V.citizenProgress;
 				}
 				*/
@@ -552,7 +842,7 @@ App.SecExp.Check = (function() {
 				if (jsDef(V.garrison)) {
 					const vars = ['reactor', 'reactorTime', 'waterway', 'waterwayTime', 'assistant', 'assistantTime', 'penthouse'];
 					for(let i = 0; i < vars.length; i++) {
-						if(jsDef(V[vars[i]]) && V[vars[i]] > 0) {
+						if (jsDef(V[vars[i]]) && V[vars[i]] > 0) {
 							V.SecExp.rebellion.garrison[vars[i]] = V[vars[i]];
 						}
 						delete V[vars[i]];
@@ -562,12 +852,12 @@ App.SecExp.Check = (function() {
 			*/
 			if (V.SecExp.settings.battle.enabled + V.SecExp.settings.rebellion.enabled > 0) {
 				V.SecExp.settings.showStats = V.SecExp.settings.showStats || 0;
-				if(jsDef(V.showBattleStatistics)) {
+				if (jsDef(V.showBattleStatistics)) {
 					V.SecExp.settings.showStats = V.showBattleStatistics;
 					delete V.showBattleStatistics;
 				}
 			}
-			/*
+
 			V.SecExp.buildings = V.SecExp.buildings || {};
 			V.SecExp.buildings.pr = V.SecExp.buildings.pr || {};
 			V.SecExp.buildings.pr.active = V.SecExp.buildings.pr.active || 0;
@@ -575,33 +865,46 @@ App.SecExp.Check = (function() {
 				V.SecExp.buildings.pr.active = V.propHub; delete V.propHub;
 			}
 
-			if(V.SecExp.buildings.pr.active > 0) {
+			if (V.SecExp.buildings.pr.active > 0) {
+				V.SecExp.buildings.pr.recuriterOffice = V.SecExp.buildings.pr.recuriterOffice || 0;
+		
 				V.SecExp.buildings.pr.campaign = V.SecExp.buildings.pr.campaign || 0;
 				if (jsDef(V.propCampaign)) {
 					V.SecExp.buildings.pr.campaign = V.propCampaign;
+					delete V.propCampaign;
 				}
 
 				V.SecExp.buildings.pr.miniTruth = V.SecExp.buildings.pr.miniTruth || 0;
 				if (jsDef(V.miniTruth)) {
 					V.SecExp.buildings.pr.miniTruth = V.miniTruth;
+					delete V.miniTruth;
 				}
 
 				V.SecExp.buildings.pr.SS = V.SecExp.buildings.pr.SS || 0;
 				if (jsDef(V.secretService)) {
 					V.SecExp.buildings.pr.SS = V.secretService;
+					delete V.secretService;
 				}
 
-				V.SecExp.buildings.pr.focus = V.SecExp.buildings.pr.focus || "none";
-				if (jsDef(V.propFocus)) {
-					V.SecExp.buildings.pr.focus = V.propFocus;
+				if (V.SecExp.buildings.pr.campaign >= 1) {
+					V.SecExp.buildings.pr.focus = V.SecExp.buildings.pr.focus || "social engineering";
+					if (jsDef(V.propFocus) && V.propFocus !== "none") {
+						V.SecExp.buildings.pr.focus = V.propFocus;
+					}
 				}
-
-				const vars = ['RecuriterOffice', 'fakeNews', 'controlLeaks', 'marketInfiltration', 'blackOps'];
+				
+				if (jsDef(V.RecuriterOffice)) {
+					V.recuriterOffice = V.RecuriterOffice;
+					delete V.RecuriterOffice;
+				}
+				const vars = ['recuriterOffice', 'fakeNews', 'controlLeaks', 'marketInfiltration', 'blackOps'];
 				for(let i = 0; i < vars.length; i++) {
-					if(jsDef(V[vars[i]]) && V[vars[i]] > 0) {
+					if (jsDef(V[vars[i]]) && V[vars[i]] > 0) {
 						V.SecExp.buildings.pr[vars[i]] = V[vars[i]];
+						delete V[vars[i]];
+					} else {
+						V.SecExp.buildings.pr[vars[i]] = V.SecExp.buildings.pr[vars[i]] || 0;
 					}
-					delete V[vars[i]];
 				}
 			}
 
@@ -619,9 +922,10 @@ App.SecExp.Check = (function() {
 				V.SecExp.buildings.barracks.upgrades.loyaltyMod = V.SecExp.buildings.barracks.upgrades.loyaltyMod || 0;
 				if (jsDef(V.secBarracksUpgrades)) {
 					V.SecExp.buildings.barracks.upgrades = V.secBarracksUpgrades;
+					delete V.secBarracksUpgrades;
 				}
 			}
-
+			/*
 			V.SecExp.security.hq = V.SecExp.security.hq || {};
 			V.SecExp.security.hq.active = V.SecExp.security.hq.active || 0;
 			if (jsDef(V.secHQ)) {
@@ -794,7 +1098,7 @@ App.SecExp.Check = (function() {
 			V.SecExp.smilingMan.progress = V.SecExp.smilingMan.progress || 0;
 			if (jsDef(V.smilingManProgress)) {
 				V.SecExp.smilingMan.progress = V.smilingManProgress;
-				if(V.SecExp.smilingMan.progress < 4) {
+				if (V.SecExp.smilingMan.progress < 4) {
 					V.SecExp.smilingMan.relationship = V.relationshipLM;
 					V.SecExp.smilingMan.investedFunds = V.investedFunds;
 				}
@@ -865,7 +1169,7 @@ App.SecExp.Check = (function() {
 					}
 
 				for(let i = 0; i < vars.length; i++) {
-					if(jsDef(V[vars[i]])) {
+					if (jsDef(V[vars[i]])) {
 						if (vars[i] === 'soldierWages' || vars[i] === 'weaponsLaw') {
 							V.SecExp.edicts[vars[i]] = V[vars[i]];
 						} else if(V[vars[i]] > 0) {
@@ -878,39 +1182,48 @@ App.SecExp.Check = (function() {
 			}
 			*/
 			V.SecExp.proclamation = V.SecExp.proclamation || {};
-			if (jsDef(V.proclamationsCooldown) && V.proclamationsCooldown > 0) {
+			V.SecExp.proclamation.cooldown = V.SecExp.proclamation.cooldown || 0;
+			if (jsDef(V.proclamationsCooldown)) {
 				V.SecExp.proclamation.cooldown = V.proclamationsCooldown;
 				delete V.proclamationsCooldown;
 			}
+			V.SecExp.proclamation.currency = V.SecExp.proclamation.currency || "cash";
 			if (jsDef(V.proclamationCurrency)) {
 				V.SecExp.proclamation.currency = V.proclamationCurrency;
 				delete V.proclamationCurrency;
 			}
-			if (jsDef(V.proclamationType) && V.proclamationType !== "none") {
-				V.SecExp.proclamation.type = V.proclamationType;
+			V.SecExp.proclamation.type = V.SecExp.proclamation.type || "crime";
+			if (jsDef(V.proclamationType)) {
+				if (V.proclamationType !== "none") {
+					V.SecExp.proclamation.type = V.proclamationType;
+				}
 				delete V.proclamationType;
 			}
 			/*
 			// recalculation widgets
 			fixBrokenUnits();
 			fixBrokenStats();
-			App.SecExp.Check.troopCount();
 			App.SecExp.Check.baseStats();
 			*/
-		} else if (V.secExpEnabled === 0) {
-			V.SecExp.core.crimeLow = 0; V.SecExp.security.cap = 0;
-			if (V.SecExp.core.trade === null || 0) {
-				delete V.SecExp.core.trade;
-			}
 		}
 
-		if (jsDef(V.secRestPoint) || jsDef(V.SecExp.security.low)) {
+		if (jsDef(V.secRestPoint) || jsDef(V.SecExp.security)) {
 			delete V.secRestPoint; delete V.SecExp.security.low;
 		}
-		if (jsDef(V.crimeCap) || jsDef(V.SecExp.core.crimeCap)) {
+		if (jsDef(V.crimeCap) || jsDef(V.SecExp.core)) {
 			delete V.crimeCap; delete V.SecExp.core.crimeCap;
 		}
-		delete V.reqMenials;
+		if (jsDef(V.recon) || jsDef(V.SecExp.battle)) {
+			delete V.recon; delete V.SecExp.battle.recon;
+		}
+
+		delete V.battlesEnabledOceanic;
+		delete V.baseBribePerAttacker; delete V.bribeCost;
+
+		delete V.deployingBots;
+
+
+		delete V.reqMenials; delete V.troopCount;
 		delete V.maxUnits; delete V.deployableUnits;
 		delete V.deployedUnits; delete V.activeUnits;
 
@@ -960,7 +1273,6 @@ App.SecExp.Check = (function() {
 		delete V.citizenRebellionEventFires;
 
 		delete V.irregulars;
-		delete V.troopCount;
 
 		delete V.hasFoughtOnce; delete V.battlesCount;
 		delete V.hasFoughtMajorBattleOnce; delete V.majorBattlesCount;
@@ -1030,11 +1342,6 @@ App.SecExp.Check = (function() {
 
 		delete V.PCWounded;
 
-		delete V.rebellionsEnabled;
-
-		delete V.forceRebellion;
-		delete V.rebellionGameOver;
-		delete V.rebellionSpeed;
 		delete V.garrison;
 
 		delete V.PCvictories;
@@ -1045,7 +1352,6 @@ App.SecExp.Check = (function() {
 		delete V.secBots.isDeployed;
 		delete V.secBots;
 		delete V.secBotsCost;
-		delete V.deployingBots;
 
 		delete V.militiaTotalManpower;
 		delete V.militiaFreeManpower;
@@ -1072,16 +1378,8 @@ App.SecExp.Check = (function() {
 
 		jsDel([V.wasToggledBefore]);
 		jsDel([V.lastAttackWeeks]);
-		jsDel([V.battlesEnabledOceanic]);
 			delete V.slaveVictories;
 
-		jsDel([V.propCampaign, V.propFocus, V.miniTruth,
-			V.RecuriterOffice]);
-		jsDel([V.fakeNews, V.controlLeaks, V.secretService, V.blackOps,
-			V.marketInfiltration]);
-
-		jsDel([V.secBarracksUpgrades]);
-
 		jsDel([V.secMenials, V.secUpgrades, V.crimeUpgrades]);
 		jsDel([V.intelUpgrades, V.readinessUpgrades]);
 
@@ -1121,16 +1419,16 @@ App.SecExp.Check = (function() {
 			rest += 20;
 		}
 		*/
-		if(V.secUpgrades.nanoCams == 1) {
+		if(V.secUpgrades.nanoCams === 1) {
 			rest += 15;
 		}
-		if(V.secUpgrades.cyberBots == 1) {
+		if(V.secUpgrades.cyberBots === 1) {
 			rest += 15;
 		}
-		if(V.secUpgrades.eyeScan == 1) {
+		if(V.secUpgrades.eyeScan === 1) {
 			rest += 20;
 		}
-		if(V.secUpgrades.cryptoAnalyzer == 1) {
+		if(V.secUpgrades.cryptoAnalyzer === 1) {
 			rest += 20;
 		}
 
@@ -1154,16 +1452,16 @@ App.SecExp.Check = (function() {
 			cap -= 15;
 		}
 		*/
-		if(V.crimeUpgrades.autoTrial == 1) {
+		if(V.crimeUpgrades.autoTrial === 1) {
 			cap -= 10;
 		}
-		if(V.crimeUpgrades.autoArchive == 1) {
+		if(V.crimeUpgrades.autoArchive === 1) {
 			cap -= 10;
 		}
-		if(V.crimeUpgrades.worldProfiler == 1) {
+		if(V.crimeUpgrades.worldProfiler === 1) {
 			cap -= 15;
 		}
-		if(V.crimeUpgrades.advForensic == 1) {
+		if(V.crimeUpgrades.advForensic === 1) {
 			cap -= 15;
 		}
 
@@ -1223,46 +1521,46 @@ App.SecExp.Check = (function() {
 			Req -= 10 * V.SecExp.security.hq.upgrades.coldstorage;
 		}
 		*/
-		if(V.secUpgrades.nanoCams == 1) {
+		if(V.secUpgrades.nanoCams === 1) {
 			Req += 5;
 		}
-		if(V.secUpgrades.cyberBots == 1) {
+		if(V.secUpgrades.cyberBots === 1) {
 			Req += 5;
 		}
-		if(V.secUpgrades.eyeScan == 1) {
+		if(V.secUpgrades.eyeScan === 1) {
 			Req += 10;
 		}
-		if(V.secUpgrades.cryptoAnalyzer == 1) {
+		if(V.secUpgrades.cryptoAnalyzer === 1) {
 			Req += 10;
 		}
-		if(V.crimeUpgrades.autoTrial == 1) {
+		if(V.crimeUpgrades.autoTrial === 1) {
 			Req += 5;
 		}
-		if(V.crimeUpgrades.autoArchive == 1) {
+		if(V.crimeUpgrades.autoArchive === 1) {
 			Req += 5;
 		}
-		if(V.crimeUpgrades.worldProfiler == 1) {
+		if(V.crimeUpgrades.worldProfiler === 1) {
 			Req += 10;
 		}
-		if(V.crimeUpgrades.advForensic == 1) {
+		if(V.crimeUpgrades.advForensic === 1) {
 			Req += 10;
 		}
-		if(V.intelUpgrades.sensors == 1) {
+		if(V.intelUpgrades.sensors === 1) {
 			Req += 5;
 		}
-		if(V.intelUpgrades.signalIntercept == 1) {
+		if(V.intelUpgrades.signalIntercept === 1) {
 			Req += 5;
 		}
-		if(V.intelUpgrades.radar == 1) {
+		if(V.intelUpgrades.radar === 1) {
 			Req += 10;
 		}
-		if(V.readinessUpgrades.rapidVehicles == 1) {
+		if(V.readinessUpgrades.rapidVehicles === 1) {
 			Req += 5;
 		}
-		if(V.readinessUpgrades.rapidPlatforms == 1) {
+		if(V.readinessUpgrades.rapidPlatforms === 1) {
 			Req += 10;
 		}
-		if(V.readinessUpgrades.earlyWarn == 1) {
+		if(V.readinessUpgrades.earlyWarn === 1) {
 			Req += 10;
 		}
 		if(V.SFSupportLevel >= 1) {
@@ -1275,176 +1573,7 @@ App.SecExp.Check = (function() {
 		return Req;
 	}
 
-	function initialTrade() {
-		const V = State.variables;
-		let initialTrade = jsRandom(20, 30);
-		if (V.terrain === "urban") {
-			initialTrade += jsRandom(10);
-		}
-		if (V.terrain === "ravine") {
-			initialTrade -= jsRandom(5);
-		}
-		if (["wealth", "capitalist", "celebrity", "BlackHat"].includes(V.PC.career)) {
-			initialTrade += jsRandom(5);
-		} else if (["escort", "servant", "gang"].includes(V.PC.career)) {
-			initialTrade -= jsRandom(5);
-		}
-		return initialTrade;
- }
-
- function maxUnits() {
-		const V = State.variables;
-		let max = 8 + (V.secBarracksUpgrades.size * 2);
-		if(App.SecExp.Check.deploySpeed() === 10) {
-			max += 2;
-		}
-		return max;
-	}
-
-	function activeUnits() {
-		const V = State.variables;
-		return V.militiaUnits.length + V.slaveUnits.length + V.mercUnits.length;
-	}
-
-	function deploySpeed() {
-		const V = State.variables;
-		let init = 1;
-		if(V.readinessUpgrades.pathways > 0) {
-			init += 1;
-		}
-		if(V.readinessUpgrades.rapidVehicles > 0) {
-			init += 2;
-		}
-		if(V.readinessUpgrades.rapidPlatforms > 0) {
-			init += 2;
-		}
-		if(V.readinessUpgrades.earlyWarn > 0) {
-			init += 2;
-		}
-		if( V.SF.Toggle && V.SF.Active >= 1 && jsDef(V.sectionInFirebase)) {
-			init += 2;
-		}
-		return init;
-	}
-
-	function deployableUnits() {
-		const V = State.variables;
-		let init = 2 * App.SecExp.Check.deploySpeed();
-		if(V.secBots.isDeployed > 0) {
-			init--;
-		}
-
-		const Militia = V.militiaUnits.length;
-		for(let i = 0; i < Militia; i++) {
-			if(V.militiaUnits[i].isDeployed > 0) {
-				init--;
-			}
-		}
-
-		const Slaves = V.slaveUnits;
-		for(let i = 0; i < Slaves; i++) {
-			if(V.slaveUnits[i].isDeployed > 0) {
-				init--;
-			}
-		}
-
-		const Mercs = V.mercUnits.length;
-		for(let i = 0; i < Mercs; i++) {
-			if(V.mercUnits[i].isDeployed > 0) {
-				init--;
-			}
-		}
-
-		if(init < 0) {
-			init = 0;
-		}
-		return init;
-	}
-
-	function deployedUnits() {
-		const V = State.variables;
-		let init = 0;
-		if(V.secBots.isDeployed > 0) {
-			init++;
-		}
-		if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) { // battle
-			init++;
-		}
-		if(V.slaveRebellion+V.citizenRebellion > 0) {
-			if (V.SF.Toggle && V.SF.Active >= 1) { // rebellion
-				init++;
-			}
-		}
-		if(V.irregulars > 0) {
-			init++;
-		}
-		const Militia = V.militiaUnits.length;
-		for(let i = 0; i < Militia; i++) {
-			if(V.militiaUnits[i].isDeployed > 0) {
-				init++;
-			}
-		}
-
-		const Slaves = V.slaveUnits.length;
-		for(let i = 0; i < Slaves; i++) {
-			if(V.slaveUnits[i].isDeployed > 0) {
-				init++;
-			}
-		}
-
-		const Mercs = V.mercUnits.length;
-		for(let i = 0; i < Mercs; i++) {
-			if(V.mercUnits[i].isDeployed > 0) {
-				init++;
-			}
-		}
-
-		return init;
-	}
 	/*
-	function troopCount() {
-		const V = State.variables;
-		if(jsDef(V.SecExp.conflict) && jsDef(V.SecExp.conflict.type)) {
-		for (let i = 0; i < V.SecExp.army.unitPool.length; i++) {
-			if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]]) && V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads.lenth > 0) {
-				for (let x = 0; x < V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads.lenth; x++) {
-					if (V.SecExp.conflict.type >= 2) {
-						if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].isDeployed)) {
-							V.SecExp.conflict.army.troops += V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].troops;
-						}
-					} else {
-						if (jsDef(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].active) && V.SecExp.conflict.loyal.includes(V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].name)) {
-							V.SecExp.conflict.army.troops += V.SecExp.army.units[V.SecExp.army.unitPool[i]].squads[x].troops;
-						}
-					}
-				}
-			}
-		}
-	}
-
-		if (input === 'manpower') {
-				if (V.mercenaries === 1) {
-					V.mercFreeManpower=jsRandom(5,20);
-				} else if (V.mercenaries > 1) {
-					V.mercFreeManpower=jsRandom(10,30);
-				}
-			function CorrectEmployedCount(target) {
-				let correctEmployedMP=0;
-				for (let i=0;i<V.target.length;i++) {
-					correctEmployedMP += V.target[i].troops;
-				}
-				var name=target;
-				name=name.replace('Units','');
-				name=nameEmployedManpower;
-				if (V.name !== correctEmployedMP) {
-					V.name=correctEmployedMP;
-				}
-			}
-			V.militiaTotalManpower=V.militiaEmployedManpower + V.militiaFreeManpower;
-			V.mercTotalManpower=V.mercEmployedManpower + V.mercFreeManpower;
-		}
-	}
-
 	function fixBrokenStats() {
 		const V = State.variables;
 		if (!isInt(V.SecExp.army.totalKills)) {
@@ -1463,7 +1592,7 @@ App.SecExp.Check = (function() {
 					V.SecExp.army.units[V.SecExp.army.unitPool[i]].employed = 0;
 				}
 
-				if(V.SecExp.army.unitPool[i] !== "Slaves") {
+				if (V.SecExp.army.unitPool[i] !== "Slaves") {
 					if(!isInt(V.SecExp.army.units[V.SecExp.army.unitPool[i]].free)) {
 						V.SecExp.army.units[V.SecExp.army.unitPool[i]].free = 0;
 					}
@@ -1803,7 +1932,7 @@ App.SecExp.Check = (function() {
 					V.SecExp.conflict.attacker.type = "freedom fighters";
 				}
 			} else {
-				if(jsDef(V.SecExp.battle.weeksSinceLast)) {
+				if (jsDef(V.SecExp.battle.weeksSinceLast)) {
 					V.SecExp.battle.weeksSinceLast++;
 				} else {
 					V.SecExp.battle.weeksSinceLast = 1;
@@ -2272,7 +2401,7 @@ App.SecExp.Check = (function() {
 				r += `\nThis week <span class='yellow'>tensions did not change.</span>`;
 			} else if (V.SecExp.rebellion.tension > oldTension) {
 				r += `\nThis week <span class='red'>tension rose</span>`;
-				if(jsDef(V.SecExp.conflict.rebellionEvents)) {
+				if (jsDef(V.SecExp.conflict.rebellionEvents)) {
 					r += ` and <span class='red'> ${V.SecExp.conflict.rebellionEvents} malcontent increased.</span>`;
 				} else {
 					r += `.`;
@@ -2407,7 +2536,7 @@ App.SecExp.report = (function() {
 			tradeChange -= 2;
 		}
 
-		if(V.SecExp.settings.battle.enabled > 0 && jsDef(V.SecExp.battle.count) && jsDef(V.SecExp.battle.weeksSinceLast)) {
+		if (V.SecExp.settings.battle.enabled > 0 && jsDef(V.SecExp.battle.count) && jsDef(V.SecExp.battle.weeksSinceLast)) {
 			if (V.SecExp.battle.weeksSinceLast < 2) {
 				r += `The recent attack has a negative effect on the trade of the arcology.`;
 				tradeChange -= 1;
@@ -2417,7 +2546,7 @@ App.SecExp.report = (function() {
 			}
 		}
 
-		if(V.SecExp.settings.rebellion.enabled > 0 && jsDef(V.SecExp.rebellion.count)) {
+		if (V.SecExp.settings.rebellion.enabled > 0 && jsDef(V.SecExp.rebellion.count)) {
 			if (V.SecExp.rebellion.weeksSinceLast < 2) {
 				r += `The recent rebellion has a negative effect on the trade of the arcology.`;
 				tradeChange -= 1;
@@ -2711,7 +2840,7 @@ App.SecExp.report = (function() {
 			r += `Your military is the size of a small army. Security is easier to maintain with such forces at your disposal.`;
 			secGrowth += 0.5;
 		}
-		if(jsDef(V.SecExp.battle.count) && jsDef(V.SecExp.battle.weeksSinceLast)) {
+		if (jsDef(V.SecExp.battle.count) && jsDef(V.SecExp.battle.weeksSinceLast)) {
 			if (V.SecExp.battle.weeksSinceLast < 3) {
 				r += `The recent attack has a negative effect on the security of the arcology.`;
 				secGrowth -= 1;
@@ -3520,31 +3649,31 @@ App.SecExp.report = (function() {
 		const V = State.variables; let r = ``;
 		if (V.SecExp.conflict.attacker.equip <= 0) {
 			r += `<strong>poorly armed</strong>.`;
-			if(V.SecExp.conflict.type >= 2) {
+			if (V.SecExp.conflict.type >= 2) {
 				r += ` Old rusty small arms are the norm with just a few barely working civilian vehicles.`;
 			}
 		} else if (V.SecExp.conflict.attacker.equip === 1) {
 			r += `<strong>lightly armed</strong>`;
-			if(V.SecExp.conflict.type >= 2) {
+			if (V.SecExp.conflict.type >= 2) {
 				r += `, mostly wth small arms and some repurposed civilian vehicles with scattered machine gun support. There's no sign of heavy vehicles, artillery or aircraft.`;
 			} else {
 				r += `.`;
 			}
 		} else if (V.SecExp.conflict.attacker.equip === 2) {
 			r += `<strong>decently armed</strong>.`;
-			if(V.SecExp.conflict.type >= 2) {
+			if (V.SecExp.conflict.type >= 2) {
 				r += ` with good quality small arms, machine guns and a few mortars. There appear to be some heavy military vehicles coming as well.`;
 			} else {
 				r += `.`;
 			}
 		} else if (V.SecExp.conflict.attacker.equip === 3) {
 			r += `<strong>well armed</strong>.`;
-			if(V.SecExp.conflict.type >= 2) {
+			if (V.SecExp.conflict.type >= 2) {
 				r += ` with high quality small arms, snipers, demolitions teams, heavy duty machine guns and mortars. Heavy military vehicles are numerous and a few artillery pieces are accompanying the detachment.`;
 			}
 		} else if (V.SecExp.conflict.attacker.equip >= 4) {
 			r += `<strong>extremely well armed</strong>.`;
-			if(V.SecExp.conflict.type >= 2) {
+			if (V.SecExp.conflict.type >= 2) {
 				r += `with excellent small arms and specialized teams with heavy duty infantry support weapons. Heavy presence of armored military vehicles, artillery pieces and even some attack helicopters.`;
 			} else {
 				r += `.`;
@@ -3620,9 +3749,9 @@ App.SecExp.report = (function() {
 		}
 		r += `Today, the ${day} of ${month} ${year}, our arcology was `;
 
-		if(V.SecExp.conflict.type >= 2) {
+		if (V.SecExp.conflict.type >= 2) {
 			r += `attacked by a`;
-			if(V.SecExp.conflict.battle.event.attacker === "raiders") {
+			if (V.SecExp.conflict.battle.event.attacker === "raiders") {
 				r += ` band of wild raiders`;
 			} else if (V.SecExp.conflict.battle.event.attacker === "free city") {
 				r += ` contingent of mercenaries hired by a competing free city`;
@@ -3637,7 +3766,7 @@ App.SecExp.report = (function() {
 		}
 
 		r += `, ${num(Math.trunc(V.SecExp.conflict.battle.event.attacker.troops))} `;
-		if(V.SecExp.conflict.type >= 2) {
+		if (V.SecExp.conflict.type >= 2) {
 			r += `men strong.`;
 		} else {
 			r += `rebels from all over the structure dared rise up `;
@@ -3650,120 +3779,180 @@ App.SecExp.report = (function() {
 		return r;
 	}
 })(); // Closes report function.
-
+*/
 App.SecExp.unit = (function() {
 	return {
 		dec:description,
-		gen:generateNew,
+		/* gen:generateNew,
 		rm:remove, // App.SecExp.removeUnits
-		idGen:generateUnitID,
+		idGen:generateUnitID,*/
 	};
 
-	function description(input) {
+	function description(input, unitType = '') {
 		const V = State.variables; let r = ``;
-		if(jsDef(input.active)) {
-		 r += `<strong>${input.platoonName}</strong>`;
-		 if(jsDef(input.battlesFought)) {
-		  if(input.battlesFought > 1) {
-		   r += `participated in ${input.battlesFought} battles and is ready to face the enemy once more at your command`;
-		  } else if (input.battlesFought === 1) {
-		   r += `is ready to face the enemy once more at your command`;
-		  } else {
-		   r += `is ready to face the enemy in battle`;
-		  }
-		 }
+		if (V.SecExp.settings.unitDescriptions === 0) {
+			if (unitType !== "Bots") {
+				r += `\n<strong>${input.platoonName}</strong> `;
+			} else {
+				r += `\nThe drone unit is made up of ${input.troops} drones.`;
+			}
+			if (jsDef(input.active) || input.active > 0) {
+				if (unitType !== "Bots") {
+						if(input.battlesFought > 1) {
+							r += `has participated in ${input.battlesFought} battles and is ready to face the enemy once more at your command.`;
+						} else if (input.battlesFought === 1) {
+							r += `is ready to face the enemy once more at your command.`;
+						} else {
+							r += `is ready to face the enemy in battle.`;
+						}
+					r += `\nIt's ${input.troops} `;
+				}
 
-		 r += `.\nIts ${input.troops} `;
-		 if(input !== "Bots") {
-		 	r += `men and women are `;
-				if(input === "Militia") {
-					r += `all proud citizens of your arcology, willing to put their lives on the line to protect their home.`;
-				} else if (input === "Slaves") {
-					r += `slaves in your possession, tasked with the protection of their owner and their arcology.`;
-				} else if (input === "Mercs") {
-				r += `mercenaries contracted to defend the arcology against external threats.`;
+				if(unitType !== "Bots") {
+					r += `men and women are `;
+					if(unitType === "Militia") {
+						r += `all proud citizens of your arcology, willing to put their lives on the line to protect their home.`;
+					} else if (unitType === "Slaves") {
+						r += `slaves in your possession, tasked with the protection of their owner and their arcology.`;
+					} else if (unitType === "Mercs") {
+					r += `mercenaries contracted to defend the arcology against external threats.`;
+					}
+				} else {
+					r += ` All of which are assembled in an ordered line in front of you, absolutely silent and ready to receive their orders.`;
 				}
-			} else {
-			 r += `are assembled in an ordered line in front of you, absolutely silent and ready to receive their orders.`;
-			}
 
-		 if(input.troops < input.maxTroops) {
-		  r += `The unit is not at its full strength of $args[0].maxTroops operatives.`;
-		 }
+				if(input.troops < input.maxTroops) {
+					r += `The unit is not at its full strength of ${input.maxTroops} operatives.`;
+				}
 
-		 if(input !== "Bots") {
-		  if(input.equip === 0) {
-		   r += `They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.`;
-		  } else if (input.equip === 1) {
-		   r += `They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.`;
-		  } else if (input.equip === 2) {
-		   r += `They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars.`;
-		  } else {
-		   r += `They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.`;
-		  }
-		 } else {
-		  if(input.equip === 0) {
-		   r += `They are equipped with light weaponry, mainly anti-riot nonlethal weapons. Not particularly effective in battle.`;
-		  } else if (input.equip === 1) {
-		   r += `They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective.`;
-		  } else if (input.equip === 2) {
-		   r += `They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon.`;
-		  } else {
-		   r += `They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers.`;
-		  }
-		 }
+				if(unitType !== "Bots") {
+					if(input.equip === 0) {
+						r += ` They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.`;
+					} else if (input.equip === 1) {
+						r += ` They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.`;
+					} else if (input.equip === 2) {
+						r += ` They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars.`;
+					} else {
+						r += ` They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.`;
+					}
+				} else {
+					if(input.equip === 0) {
+						r += ` They are equipped with light weaponry, mainly anti-riot nonlethal weapons. Not particularly effective in battle.`;
+					} else if (input.equip === 1) {
+						r += ` They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective.`;
+					} else if (input.equip === 2) {
+						r += ` They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon.`;
+					} else {
+						r += ` They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers.`;
+					}
+				}
 
-		 if(input !== "Bots") {
-		  if(input.training <= 33) {
-		   r += `They lack the experience to be considered professionals, but `;
-		  if (input === "Militia") {
-		   r += `their eagerness to defend the arcology makes up for it.`;
-		  	} else if (input === "Slaves") {
-		  	 r += `their eagerness to prove themselves makes up for it.`;
-		  	} else if (input === "Mercs") {
-		    r += `they're trained more than enough to still be an effective unit.`;
-		   }
-		  } else if (input.training <= 66) {
-		   r += `They have trained `;
-		   if (input.battlesFought > 0) {
-		    r += `and fought `;
-		   }
-		   r += `enough to be considered disciplined, professional soldiers, ready to face the battlefield.`;
-		  } else {
-		   r += `They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.`;
-		  }
+				if(unitType !== "Bots") {
+					if(input.training <= 33) {
+						r += ` They lack the experience to be considered professionals, but `;
+					if (input === "Militia") {
+						r += ` their eagerness to defend the arcology makes up for it.`;
+						} else if (unitType === "Slaves") {
+							r += ` their eagerness to prove themselves makes up for it.`;
+						} else if (unitType === "Mercs") {
+							r += ` they're trained more than enough to still be an effective unit.`;
+						}
+					} else if (input.training <= 66) {
+						r += ` They have trained `;
+						if (input.battlesFought > 0) {
+							r += `and fought `;
+						}
+						r += `enough to be considered disciplined, professional soldiers, ready to face the battlefield.`;
+					} else {
+						r += `They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.`;
+					}
 
-		  if(input.loyalty < 10) {
-		   r += `The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.`;
-		  } else if (input.loyalty < 33) {
-		   r += `Their loyalty is low. Careful monitoring of their activities and relationships is advised.`;
-		  } else if (input.loyalty < 66) {
-		   r += `Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.`;
-		  } else if (input.loyalty < 90) {
-		   r += `Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent.`;
-		  } else {
-		   r += `The unit is fanatically loyal. They would prefer death over betrayal.`;
-		  }
+					if(input.loyalty < 10) {
+						r += ` The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.`;
+					} else if (input.loyalty < 33) {
+						r += ` Their loyalty is low. Careful monitoring of their activities and relationships is advised.`;
+					} else if (input.loyalty < 66) {
+						r += ` Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.`;
+					} else if (input.loyalty < 90) {
+						r += ` Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent.`;
+					} else {
+						r += ` The unit is fanatically loyal. They would prefer death over betrayal.`;
+					}
 
-		  if(jsDef(input.cyber)) {
-		   r += `The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power.`;
-		  }
-		  if(jsDef(input.medics)) {
-		   r += `The unit has a dedicated squad of medics that will follow them in battle.`;
-		  }
-		  if(V.SF.Toggle && V.F.Active >= 1 && jsDef(input.SF)) {
-		   r += `The unit has attached advisors from ${V.SF.Lower} that will help the squad remain tactically aware and active.`;
-		  }
-		 }
-		} else {
-		 r += `${input.platoonName} lost too many operatives`;
-		 if(jsDef(input.battlesFought)) {
-		  r += ` in the ${input.battlesFought} it fought`;
-		 }
-		 r += ` and can no longer be considered a unit at all.`;
+					if (jsDef(input.cyber) || input.cyber > 0) {
+						r += ` The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power.`;
+					}
+					if (jsDef(input.medics) || input.medics > 0) {
+						r += ` The unit has a dedicated squad of medics that will follow them in battle.`;
+					}
+					if(V.SF.Toggle && V.SF.Active >= 1 && jsDef(input.SF) || input.SF > 0) {
+						r += ` The unit has attached "advisors" from ${V.SF.Lower} that will help the squad remain tactically aware and active.`;
+					}
+				}
+			} else {
+				r += `This unit has lost too many operatives`;
+				if (jsDef(input.battlesFought)) {
+					r += ` in the ${input.battlesFought} it fought`;
+				}
+				r += ` and can no longer be considered a unit at all.`;
+			}
+		} else if (V.SecExp.settings.unitDescriptions > 0) {
+			if (unitType !== "Bots") {
+				r += `\n${input.platoonName}.`;
+			} else {
+				r += `Drone squad.`;
+			}
+			r += ` Unit size: ${input.troops}. `;
+			r += `Equipment quality: `;
+			if (input.equip === 0) {
+				r += `basic.`;
+			} else if (input.equip === 1) {
+				r += `average.`;
+			} else if (input.equip === 2) {
+				r += `high.`;
+			} else {
+				r += `advanced.`;
+			}
+			if (jsDef(input.battlesFought)) {
+				r += ` Battles fought: ${input.battlesFought}. `;
+			}
+			if (jsDef(input.training)) {
+				r += `\nTraining: `;
+				if (input.training <= 33) {
+					r += `low.`;
+				} else if(input.training <= 66) {
+					r += `medium.`;
+				} else {
+					r += `high.`;
+				}
+			}
+			if (jsDef(input.loyalty)) {
+				r += ` Loyalty: `;
+				if(input.loyalty < 10) {
+						r += `extremely disloyal.`;
+					} else if (input.loyalty < 33) {
+						r += `low.`;
+					} else if (input.loyalty < 66) {
+						r += `medium.`;
+					} else if (input.loyalty < 90) {
+						r += `high.`;
+					} else {
+						r += `fanatical.`;
+					}
+			}
+			if (jsDef(input.cyber) && input.cyber > 0) {
+				r += `\nHave been cyberaugmentated.`;
+			}
+			if (jsDef(input.medics) && input.medics > 0) {
+				r += ` Has a medic squad attached.`;
+			}
+			if(V.SF.Toggle && V.SF.Active >= 1 && jsDef(input.SF) || input.SF > 0) {
+				r += ` ${V.SF.Caps} "advisors" are attached.`;
+			}
 		}
+		return r;
 	}
-
+/*
 	function generateNew(input) {
 		const V = State.variables;
 		if (V.SecExp.battle[input] === undefined) {
@@ -3811,10 +4000,10 @@ App.SecExp.unit = (function() {
 		newUnit.platoonName = `${ordinalSuffix(V.SecExp.battle.input.created++)} ${text} platoon`;
 
 		V.SecExp.battle[input].squads.push(newUnit);
-		if(jsDef(V.SecExp.battle[input].free)) {
+		if (jsDef(V.SecExp.battle[input].free)) {
 		 V.SecExp.battle[input].free -= newUnit.troops;
 		}
-		if(jsDef(V.SecExp.battle[input].employed)) {
+		if (jsDef(V.SecExp.battle[input].employed)) {
 		 V.SecExp.battle[input].employed += newUnit.troops;
 		}
 
@@ -3855,8 +4044,9 @@ App.SecExp.unit = (function() {
 		}
 		// V.args[0].ID = newID;
 	}
+*/
 })();
-
+/*
 App.SecExp.encyclopedia = (function() {
 	return {
 		main:main,
@@ -3948,4 +4138,4 @@ App.SecExp.encyclopedia = (function() {
 		return r;
 	}
 })();
-*/
\ No newline at end of file
+*/
diff --git a/src/SecExp/secInit.tw b/src/SecExp/secInit.tw
index a71fe12db56d144378249a0febad0490c4f50ec8..66b4548ab802b8f62abb5e27258d95a5c866c329 100644
--- a/src/SecExp/secInit.tw
+++ b/src/SecExp/secInit.tw
@@ -14,9 +14,7 @@
 <<set $PCvictories = 0>>
 <<set $PClossStreak = 0>>
 <<set $PClosses = 0>>
-<<set $oldFlux = 0>>
 <<set $foughtThisWeek = 0>>
-<<set $battlesEnabledOceanic = 0>>
 
 /* edicts */
 <<set $alternativeRents = 0>>
@@ -28,7 +26,6 @@
 <<set $subsidyChurch = 0>>
 <<set $limitImmigration = 0>>
 <<set $openBorders = 0>>
-<<set $limitSubhumans = 0>>
 <<set $slavesOfficers = 0>>
 <<set $martialSchool = 0>>
 <<set $discountMercenaries = 0>>
@@ -59,12 +56,6 @@
 
 /* buildings */
 <<set $secHQ = 0>>
-<<set $secBarracks = 0>>
-<<set $secBarracksUpgrades ={
-	size: 0,
-	luxury: 0,
-	training: 0,
-	loyaltyMod: 0}>>
 <<set $secMenials = 0>>
 <<set $secUpgrades = {
 	nanoCams: 0,
@@ -86,15 +77,6 @@
 	rapidPlatforms: 0,
 	pathways: 0,
 	rapidVehicles: 0}>>
-<<set $propHub = 0>>
-<<set $propCampaign = 0>>
-<<set $propFocus = "none">>
-<<set $miniTruth = 0>>
-<<set $fakeNews = 0>>
-<<set $controlLeaks = 0>>
-<<set $secretService = 0>>
-<<set $blackOps = 0>>
-<<set $marketInfiltration = 0>>
 <<set $riotCenter = 0>>
 <<set $riotUpgrades = {
 	freeMedia: 0,
@@ -158,7 +140,6 @@
 <<set $slaveRebellion = 0>>
 <<set $citizenRebellion = 0>>
 <<set $rebellingUnits = []>>
-<<set $notInvolved = 0>>
 <<set $irregulars = 0>>
 <<set $engageRule = 0>>
 <<set $rebellingMilitia = 0>>
@@ -166,7 +147,6 @@
 <<set $rebellingMercs = 0>>
 <<set $repairTime = 3>>
 <<set $arcRepairTime = 0>>
-<<set $rebelDefeatAftermath = 0>>
 <<set $garrison = {
 	penthouse: 0,
 	reactor: 0,
@@ -211,7 +191,6 @@
 <</if>>
 
 /* battle relevant variables */
-<<set $troopCount = 0>>
 <<set $slaveVictories = []>>
 <<set $slaveIncreasedPrestige = 0>>
 <<set $totalKills = 0>>
@@ -221,17 +200,12 @@
 <<set $leadingTroops = "none">>
 <<set $attackTroops = 0>>
 <<set $attackEquip = 0>>
-<<set $deployingBots = 0>>
-<<set $deployingMilitia = 0>>
-<<set $deployingSlaves = 0>>
-<<set $deployingMercs = 0>>
 <<set $battleTerrain = "none">>
 <<set $maxTurns = 10>>
 <<set $battleResult = 4>> /* sets $battleResult value outside accepted range (-3,3) to avoid evaluation problems */
 <<set $losses = 0>>
 <<set $enemyLosses = 0>>
 <<set $battleTurns = 0>>
-<<set $bribeCost = 0>>
 <<set $tacticsSuccessful = 0>>
 <<set $leaderWounded = 0>>
 <<set $woundType = 0>> /* 0=no wound, 1=mute, 2=blind, 3=amputee, 4<=health */
@@ -249,7 +223,6 @@
 <<set $lastSelection = []>>
 
 /* statistics */
-<<set $baseBribePerAttacker = 5>>
 <<set $equipMod = 0.15>>
 <<set $secBotsBaseAttack = 7>>
 <<set $secBotsBaseDefense = 3>>
@@ -304,4 +277,4 @@
 <<set $SFSupportLevel = 0>>
 <<set $SFGear = 0>>
 <<set $SavedLeader = "none">>
-<<set $SavedSFI = 0>>
\ No newline at end of file
+<<set $SavedSFI = 0>>
diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw
index 397d175709325bf2a162dc777bc84c04dbccea9a..5707ba116e18030c54288e4b27ac748f4165d946 100644
--- a/src/SecExp/securityHQ.tw
+++ b/src/SecExp/securityHQ.tw
@@ -311,11 +311,11 @@ Considering the current upgrades the maximum level of crime is <<print App.SecEx
 
 /* intelligence */
 
-<<if $SecExp.battle.recon == 0>>
+<<if App.SecExp.battle.recon() == 0>>
 	Your reconnaissance capabilities are very limited. Very little information will be available if the arcology is attacked.
-<<elseif $SecExp.battle.recon == 1>>
+<<elseif App.SecExp.battle.recon() == 1>>
 	You have limited reconnaissance capabilities. You'll have limited intel available in case of an attack.
-<<elseif $SecExp.battle.recon == 2>>
+<<elseif App.SecExp.battle.recon() == 2>>
 	You have good reconnaissance capabilities. Good, reliable intel will be available if the arcology is attacked.
 <<else>>
 	You have great reconnaissance capabilities. You'll have very accurate information on the enemy if the arcology is attacked.
@@ -325,14 +325,14 @@ Considering the current upgrades the maximum level of crime is <<print App.SecEx
 <br>
 
 <<if $intelUpgrades.sensors == 0>>
-	[[Install perimeter sensors|securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.sensors = 1, $SecExp.battle.recon += 1, $PC.hacking += 1]]
+	[[Install perimeter sensors|securityHQ][cashX(-Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.sensors = 1, $PC.hacking += 1]]
 	<br>//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealling with crime.//
 <<else>>
 	You have installed perimeter seismic sensors able to detect movement with high accuracy.
 <</if>>
 <br>
 <<if $intelUpgrades.signalIntercept == 0>>
-	[[Create signal interception hub|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.signalIntercept = 1, $SecExp.battle.recon += 1, $PC.hacking += 1]]
+	[[Create signal interception hub|securityHQ][cashX(-Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.signalIntercept = 1, $PC.hacking += 1]]
 	<br>//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 5 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealling with crime.//
 <<else>>
 	You have installed advanced signal interception equipment.
@@ -340,7 +340,7 @@ Considering the current upgrades the maximum level of crime is <<print App.SecEx
 <br>
 <<if $SecExp.core.authority > 10000>>
 	<<if $intelUpgrades.radar == 0>>
-		[[Install advanced radar equipment|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.radar = 1, $SecExp.battle.recon += 1, $PC.hacking += 1]]
+		[[Install advanced radar equipment|securityHQ][cashX(-Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx"), $intelUpgrades.radar = 1, $PC.hacking += 1]]
 		<br>//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier))>>. Will increase recon capabilities, but will require 10 extra slaves in the headquarters and increases upkeep. The remaining slaves will be more efficient in dealling with crime.//
 	<<else>>
 		You have installed sophisticated radar equipment.
@@ -354,11 +354,11 @@ Considering the current upgrades the maximum level of crime is <<print App.SecEx
 
 /* readiness */
 
-<<if App.SecExp.Check.deploySpeed() == 1>>
+<<if App.SecExp.battle.deploySpeed() == 1>>
 	You have low readiness. You won't be able to mobilize many troops in time in case of an attack.
-<<elseif App.SecExp.Check.deploySpeed() == 2>>
+<<elseif App.SecExp.battle.deploySpeed() == 2>>
 	You have decent readiness. You will be able to muster up sufficient forces to handle an average attack.
-<<elseif App.SecExp.Check.deploySpeed() == 3>>
+<<elseif App.SecExp.battle.deploySpeed() == 3>>
 	You have good readiness. You will be able to mobilize a lot of troops in case of an attack.
 <<else>>
 	You have great readiness. You can mobilize a small army in very little time.
diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw
index 12b5e3bab5654925354ad2027a188b3604266cd5..1631b245d0de11971a46347f648db2c8eb20d33f 100644
--- a/src/SecExp/securityReport.tw
+++ b/src/SecExp/securityReport.tw
@@ -146,7 +146,7 @@
 	The absolute authority you hold on the arcology makes the security department's work a lot easier.
 	<<set _secGrowth += 1>>
 <</if>>
-<<if App.SecExp.Check.activeUnits() >= 6>>
+<<if App.SecExp.battle.activeUnits() >= 6>>
 	Your military is the size of a small army. Security is easier to maintain with such forces at your disposal.
 	<<set _secGrowth += 0.5>>
 <</if>>
@@ -175,7 +175,7 @@
 	<</if>>
 <</if>>
 
-<<if $blackOps == 1>>
+<<if $SecExp.buildings.pr.blackOps > 0>>
 	Your black ops team proves to be a formidable tool against anyone threatening the security of your arcology.
 	<<set _secGrowth += 0.5 * random(1,2)>>
 <</if>>
@@ -325,7 +325,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 	Your great wealth acts as a beacon for the greediest criminals, calling them to your arcology as moths to a flame.
 	<<set _crimeGrowth += 0.5>>
 <</if>>
-<<if $marketInfiltration == 1>>
+<<if $SecExp.buildings.pr.active > 0 && $SecExp.buildings.pr.marketInfiltration ? 0>>
 	<<set _crimeGrowth += 0.5 * random(1,2)>>
 <</if>>
 
@@ -351,27 +351,29 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 <</if>>
 <<set $SecExp.core.crimeLow = Math.clamp(_newCrime,0,100)>>
 
-<<if $militiaFounded == 1 || App.SecExp.Check.activeUnits() >= 1>>
+<<if $militiaFounded == 1 || App.SecExp.battle.activeUnits() >= 1>>
 	<br><br>
 	<strong> Military</strong>: /* militia */
 	<<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>>
 		Having a powerful special force attracts a lot of citizens, hopeful that they may be able to fight along side it.
 	<<set _recruitsMultiplier *= 1 + (random(1, (Math.round($SF.Size / 10))) / 20)>> /* not sure how high $SF.Size goes, so I hope this makes sense */
 	<</if>>
-	<<if $propCampaign >= 1 && $propFocus == "recruitment">>
-		<<if $RecuriterOffice == 0 || $Recruiter == 0>>
-			<<if $propCampaignBoost == 1>>
-				<<set _recruitsMultiplier *= 1.1>>
-			<<else>>
-				<<set _recruitsMultiplier *= 1.05>>
-			<</if>>
-		<<else>>
-			<<setLocalPronouns $Recruiter>>
-			''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your militia recruitment campaign from $his PR hub office.
-			<<if $propCampaignBoost == 1>>
-				<<set _recruitsMultiplier *= 1.2+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/650)>>
-			<<else>>
-				<<set _recruitsMultiplier *= 1.15+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/650)>>
+	<<if $SecExp.buildings.pr.active > 0>>
+		<<if $SecExp.buildings.pr.campaign >= 1 && $SecExp.buildings.pr.focus == "recruitment">>
+			<<if $SecExp.buildings.pr.recuriterOffice === 0 || $Recruiter == 0>>
+				<<if $propCampaignBoost == 1>>
+					<<set _recruitsMultiplier *= 1.1>>
+				<<else>>
+					<<set _recruitsMultiplier *= 1.05>>
+				<</if>>
+			<<elseif SecExp.buildings.pr.recuriterOffice > 0 && $Recruiter > 0>>
+				<<setLocalPronouns $Recruiter>>
+				''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your militia recruitment campaign from $his PR hub office.
+				<<if $propCampaignBoost == 1>>
+					<<set _recruitsMultiplier *= 1.2+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/650)>>
+				<<else>>
+					<<set _recruitsMultiplier *= 1.15+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/650)>>
+				<</if>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -525,15 +527,15 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 		<br>
 	<</if>>
 
-	<<if App.SecExp.Check.activeUnits() > 0>>
+	<<if App.SecExp.battle.activeUnits() > 0>>
 		/* loyalty and training */
 		<<set _sL = $slaveUnits.length>>
 		<<for _i = 0; _i < _sL; _i++>>
 			<<set _loyaltyChange = 0>>
 			<br>
 			<br> $slaveUnits[_i].platoonName:
-			<<if $secBarracksUpgrades.loyaltyMod >= 1>>
-				<<set _loyaltyChange += 2 * $secBarracksUpgrades.loyaltyMod>>
+			<<if $SecExp.buildings.barracks.upgrades.loyaltyMod >= 1>>
+				<<set _loyaltyChange += 2 * $SecExp.buildings.barracks.upgrades.loyaltyMod>>
 				is periodically sent to the indoctrination facility in the barracks for thought correction therapy.
 			<</if>>
 			<<if $slaveUnits[_i].commissars >= 1>>
@@ -562,9 +564,9 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 				The loyalty of this unit @@.red;decreased@@ this week.
 			<</if>>
 			<<set $slaveUnits[_i].loyalty = Math.clamp($slaveUnits[_i].loyalty + _loyaltyChange,0,100)>>
-			<<if $slaveUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
+			<<if $slaveUnits[_i].training < 100 && $SecExp.buildings.barracks.upgrades.training >= 1>>
 				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
-				<<set $slaveUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
+				<<set $slaveUnits[_i].training += random(2,4) * 1.5 * $SecExp.buildings.barracks.upgrades.training>>
 			<</if>>
 		<</for>>
 		<<set _mL = $militiaUnits.length>>
@@ -572,8 +574,8 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 			<br>
 			<br>$militiaUnits[_i].platoonName:
 			<<set _loyaltyChange = 0>>
-			<<if $secBarracksUpgrades.loyaltyMod >= 1>>
-				<<set _loyaltyChange += 2 * $secBarracksUpgrades.loyaltyMod>>
+			<<if $SecExp.buildings.barracks.upgrades.loyaltyMod >= 1>>
+				<<set _loyaltyChange += 2 * $SecExp.buildings.barracks.upgrades.loyaltyMod>>
 				is periodically sent to the indoctrination facility in the barracks for thought correction therapy.
 			<</if>>
 			<<if $militiaUnits[_i].commissars >= 1>>
@@ -602,9 +604,9 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 				The loyalty of this unit @@.red;decreased@@ this week.
 			<</if>>
 			<<set $militiaUnits[_i].loyalty = Math.clamp($militiaUnits[_i].loyalty + _loyaltyChange,0,100)>>
-			<<if $militiaUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
+			<<if $militiaUnits[_i].training < 100 && $SecExp.buildings.barracks.upgrades.training >= 1>>
 				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
-				<<set $militiaUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
+				<<set $militiaUnits[_i].training += random(2,4) * 1.5 * $SecExp.buildings.barracks.upgrades.training>>
 			<</if>>
 		<</for>>
 		<<set _meL = $mercUnits.length, _loyaltyTotal = 0>>
@@ -612,8 +614,8 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 			<br>
 			<br>$mercUnits[_i].platoonName:
 			<<set _loyaltyChange = 0>>
-			<<if $secBarracksUpgrades.loyaltyMod >= 1>>
-				<<set _loyaltyChange += 2 * $secBarracksUpgrades.loyaltyMod>>
+			<<if $SecExp.buildings.barracks.upgrades.loyaltyMod >= 1>>
+				<<set _loyaltyChange += 2 * $SecExp.buildings.barracks.upgrades.loyaltyMod>>
 				is periodically sent to the indoctrination facility in the barracks for thought correction therapy.
 			<</if>>
 			<<if $mercUnits[_i].commissars >= 1>>
@@ -643,9 +645,9 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 			<</if>>
 			<<set $mercUnits[_i].loyalty = Math.clamp($mercUnits[_i].loyalty + _loyaltyChange,0,100)>>
 			<<set _loyaltyTotal += $mercUnits[_i].loyalty>>
-			<<if $mercUnits[_i].training < 100 && $secBarracksUpgrades.training >= 1>>
+			<<if $mercUnits[_i].training < 100 && $SecExp.buildings.barracks.upgrades.training >= 1>>
 				<br>The unit is able to make use of the training facilities to better prepare its soldiers, slowly increasing their experience level.
-				<<set $mercUnits[_i].training += random(2,4) * 1.5 * $secBarracksUpgrades.training>>
+				<<set $mercUnits[_i].training += random(2,4) * 1.5 * $SecExp.buildings.barracks.upgrades.training>>
 			<</if>>
 		<</for>>
 		<<if _meL > 0>>
@@ -749,4 +751,4 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 		It will be finished in <<if $currentUpgrade.time == 1>> one week.<<else>><<print $currentUpgrade.time>> weeks.<</if>>
 	<</if>>
 <</if>>
-<br>
\ No newline at end of file
+<br>
diff --git a/src/SecExp/seeUnit.tw b/src/SecExp/seeUnit.tw
index cd80ff326e8ac5f36bbbea6ab1c2a6f6a1b452ad..e8130c37634b5fe313ac160e264bf7fefa1be652 100644
--- a/src/SecExp/seeUnit.tw
+++ b/src/SecExp/seeUnit.tw
@@ -7,7 +7,7 @@
 <</if>>
 
 <<if $targetUnit == "secBots">>
-	<<secBotsDescription>>
+	<<= App.SecExp.unit.dec($secBots, "Bots")>>
 	<<if $secBots.maxTroops > $secBots.troops>>
 		<br>
 		<<link "Replenish the unit" "seeUnit">>
@@ -58,7 +58,7 @@
 		<br>Security drones base morale: $secBotsMorale
 	<</if>>
 <<elseif $targetUnit == "militiaUnits">>
-	<<militiaUnitsDescription $militiaUnits[$targetIndex]>>
+	<<= App.SecExp.unit.dec($militiaUnits[$targetIndex], "Militia")>>
 	<br>
 	Rename unit <<textbox "$militiaUnits[$targetIndex].platoonName" $militiaUnits[$targetIndex].platoonName "seeUnit">>
 	<<if $militiaUnits[$targetIndex].maxTroops > $militiaUnits[$targetIndex].troops && $militiaFreeManpower > 0>>
@@ -200,9 +200,9 @@
 		<<if $militiaUnits[$targetIndex].SF > 0>>
 			<br>Special Force advisors bonus: +20%
 		<</if>>
-		<br>Militia base morale: $militiaBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($militiaBaseMorale + $militiaBaseMorale * $secBarracksUpgrades.luxury * 0.05)>>)
-		<<if $secBarracksUpgrades.luxury > 0>>
-			<br>Barracks bonus: + <<print $secBarracksUpgrades.luxury * 5>>%
+		<br>Militia base morale: $militiaBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($militiaBaseMorale + $militiaBaseMorale * $SecExp.buildings.barracks.upgrades.luxury * 0.05)>>)
+		<<if $SecExp.buildings.barracks.upgrades.luxury > 0>>
+			<br>Barracks bonus: + <<print $SecExp.buildings.barracks.upgrades.luxury * 5>>%
 		<</if>>
 		<br>Militia base hp: $militiaBaseHp <<if $humanUpgrade.hp > 0>> + $humanUpgrade.hp <</if>>(<<print Math.round($militiaBaseHp + $militiaUnits[$targetIndex].cyber + $militiaBaseHp * $militiaUnits[$targetIndex].medics * 0.25)>>)
 		<<if $militiaUnits[$targetIndex].medics > 0>>
@@ -210,7 +210,7 @@
 		<</if>>
 	<</if>>
 <<elseif $targetUnit == "slaveUnits">>
-	<<slaveUnitsDescription $slaveUnits[$targetIndex]>>
+	<<= App.SecExp.unit.dec($slaveUnits[$targetIndex], "Slaves")>>
 	<br>
 	Rename unit <<textbox "$slaveUnits[$targetIndex].platoonName" $slaveUnits[$targetIndex].platoonName "seeUnit">>
 	<<if $slaveUnits[$targetIndex].maxTroops > $slaveUnits[$targetIndex].troops && $menials > 0>>
@@ -350,9 +350,9 @@
 		<<if $slaveUnits[$targetIndex].SF > 0>>
 			<br>Special Force advisors bonus: +20%
 		<</if>>
-		<br>Slaves base morale: $slaveBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($slaveBaseMorale + $slaveBaseMorale * $secBarracksUpgrades.luxury * 0.05)>>)
-		<<if $secBarracksUpgrades.luxury > 0>>
-			<br>Barracks bonus: + <<print $secBarracksUpgrades.luxury * 5>>%
+		<br>Slaves base morale: $slaveBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($slaveBaseMorale + $slaveBaseMorale * $SecExp.buildings.barracks.upgrades.luxury * 0.05)>>)
+		<<if $SecExp.buildings.barracks.upgrades.luxury > 0>>
+			<br>Barracks bonus: + <<print $SecExp.buildings.barracks.upgrades.luxury * 5>>%
 		<</if>>
 		<br>Slaves base hp: $slaveBaseHp <<if $humanUpgrade.hp > 0>> + $humanUpgrade.hp <</if>>(<<print Math.round($slaveBaseHp + $slaveUnits[$targetIndex].cyber + $slaveBaseHp * $slaveUnits[$targetIndex].medics * 0.25)>>)
 		<<if $slaveUnits[$targetIndex].medics > 0>>
@@ -360,7 +360,7 @@
 		<</if>>
 	<</if>>
 <<elseif $targetUnit == "mercUnits">>
-	<<mercUnitsDescription $mercUnits[$targetIndex]>>
+	<<= App.SecExp.unit.dec($mercUnits[$targetIndex], "Mercs")>>
 	<br>
 	Rename unit <<textbox "$mercUnits[$targetIndex].platoonName" $mercUnits[$targetIndex].platoonName "seeUnit">>
 	<<if $mercUnits[$targetIndex].troops < $mercUnits[$targetIndex].maxTroops && $mercFreeManpower > 0>>
@@ -498,9 +498,9 @@
 		<<if $mercUnits[$targetIndex].SF > 0>>
 			<br>Special Force advisors bonus: +20%
 		<</if>>
-		<br>Mercenaries base morale: $mercBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($mercBaseMorale + $mercBaseMorale * $secBarracksUpgrades.luxury * 0.05)>>)
-		<<if $secBarracksUpgrades.luxury > 0>>
-			<br>Barracks bonus: + <<print $secBarracksUpgrades.luxury * 5>>%
+		<br>Mercenaries base morale: $mercBaseMorale <<if $humanUpgrade.morale > 0>> + $humanUpgrade.morale <</if>>(<<print Math.round($mercBaseMorale + $mercBaseMorale * $SecExp.buildings.barracks.upgrades.luxury * 0.05)>>)
+		<<if $SecExp.buildings.barracks.upgrades.luxury > 0>>
+			<br>Barracks bonus: + <<print $SecExp.buildings.barracks.upgrades.luxury * 5>>%
 		<</if>>
 		<br>Mercenaries base hp: $mercBaseHp <<if $humanUpgrade.hp > 0>> + $humanUpgrade.hp <</if>>(<<print Math.round($mercBaseHp + $mercBaseHp * $mercUnits[$targetIndex].medics * 0.25 + $mercUnits[$targetIndex].cyber)>>)
 		<<if $mercUnits[$targetIndex].medics > 0>>
diff --git a/src/SecExp/unitsBattleReport.tw b/src/SecExp/unitsBattleReport.tw
index 981b4f5084ccb35b34a38f2ba1764712e2a38fe2..1ed2d3523ad16ad0a8ec703273498f762842d1d6 100644
--- a/src/SecExp/unitsBattleReport.tw
+++ b/src/SecExp/unitsBattleReport.tw
@@ -1,7 +1,7 @@
 :: unitsBattleReport [nobr]
 
 <<if $losses == 0>>
-	<<if $deployingBots == 1>>
+	<<if App.SecExp.conflict.deployedUnits('bots')>>
 		<br>
 		Security Drones: no casualties.
 	<</if>>
@@ -9,7 +9,7 @@
 		<br>
 		<<print num($SF.Squad.Troops)>> soldiers from $SF.Lower joined the battle: no casualties suffered.
 	<</if>>
-	<<if $deployingMilitia == 1>>
+	<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 		<<for _j = 0; _j < $militiaUnits.length; _j++>>
 			<<if $militiaUnits[_j].isDeployed == 1>>
 				<br>
@@ -23,7 +23,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingSlaves == 1>>
+	<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 		<<for _j = 0; _j < $slaveUnits.length; _j++>>
 			<<if $slaveUnits[_j].isDeployed == 1>>
 				<br>
@@ -37,7 +37,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingMercs == 1>>
+	<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 		<<for _j = 0; _j < $mercUnits.length; _j++>>
 			<<if $mercUnits[_j].isDeployed == 1>>
 				<br>
@@ -56,10 +56,10 @@
 	/* if the losses are more than zero */
 	/* generates a list of randomized losses, from which each unit picks one at random */
 	<<set _losses = $losses>>
-	<<set _averageLosses = Math.trunc(_losses / App.SecExp.Check.deployedUnits())>>
+	<<set _averageLosses = Math.trunc(_losses / App.SecExp.conflict.deployedUnits())>>
 	<<set _lossesList = []>>
 	<<set _validityCount = 0>>
-	<<for _i = 0; _i < App.SecExp.Check.deployedUnits(); _i++>>
+	<<for _i = 0; _i < App.SecExp.conflict.deployedUnits(); _i++>>
 		<<set _assignedLosses = Math.trunc(Math.clamp(_averageLosses + random(-5,5), 0, 100))>>
 		<<if _assignedLosses > _losses>>
 			<<set _assignedLosses = _losses>>
@@ -93,7 +93,7 @@
 	<</if>>
 
 	/* assigns the losses and notify the player */
-	<<if $deployingBots == 1>>
+	<<if App.SecExp.conflict.deployedUnits('bots')>>
 		<br>
 		<<set _loss = _lossesList.pluck()>>
 		<<set _loss = Math.clamp(_loss,0,$secBots.troops)>>
@@ -139,7 +139,7 @@
 		<<set $SF.Squad.Troops -= _loss>>
 		<br>
 	<</if>>
-	<<if $deployingMilitia == 1>>
+	<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 		<<for _j = 0; _j < $militiaUnits.length; _j++>>
 			<<if $militiaUnits[_j].isDeployed == 1>>
 				<br>
@@ -182,7 +182,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingSlaves == 1>>
+	<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 		<<for _j = 0; _j < $slaveUnits.length; _j++>>
 			<<if $slaveUnits[_j].isDeployed == 1>>
 				<br>
@@ -225,7 +225,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingMercs == 1>>
+	<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 		<<for _j = 0; _j < $mercUnits.length; _j++>>
 			<<if $mercUnits[_j].isDeployed == 1>>
 				<br>
@@ -270,4 +270,4 @@
 	<</if>>
 <<else>>
 	<br>@@.red;Error: losses are a negative number or NaN@@
-<</if>> /* closes check for more than zero casualties */
\ No newline at end of file
+<</if>> /* closes check for more than zero casualties */
diff --git a/src/SecExp/unitsRebellionReport.tw b/src/SecExp/unitsRebellionReport.tw
index 84e1c7ca5593caa5163a91c540b05ae11a2061c0..6c976429d918da3f032b74fe5eb925bd951d59e0 100644
--- a/src/SecExp/unitsRebellionReport.tw
+++ b/src/SecExp/unitsRebellionReport.tw
@@ -4,7 +4,7 @@
 	<<if $irregulars > 0>>
 		The volunteering citizens were quickly organized into an irregular militia unit and deployed in the arcology. No casualties suffered.
 	<</if>>
-	<<if $deployingBots == 1>>
+	<<if App.SecExp.conflict.deployedUnits('bots')>>
 		<br>
 		Security drones: no casualties suffered.
 	<</if>>
@@ -253,9 +253,9 @@
 <<elseif $losses > 0>>
 	/* if the losses are more than zero */
 	/* generates a list of randomized losses, from which each unit picks one at random */
-	<<set _averageLosses = Math.trunc($losses / App.SecExp.Check.deployedUnits())>>
+	<<set _averageLosses = Math.trunc($losses / App.SecExp.conflict.deployedUnits())>>
 	<<set _lossesList = []>>
-	<<for _i = 0; _i < App.SecExp.Check.deployedUnits(); _i++>>
+	<<for _i = 0; _i < App.SecExp.conflict.deployedUnits(); _i++>>
 		<<set _assignedLosses = Math.trunc(Math.clamp(_averageLosses + random(-5,5), 0, 100))>>
 		<<if _assignedLosses > $losses>>
 			<<set _assignedLosses = $losses>>
@@ -375,7 +375,7 @@
 		<</if>>
 		suffered.
 	<</if>>
-	<<if $deployingMilitia == 1>>
+	<<if App.SecExp.conflict.deployedUnits('militia') >= 1>>
 		<<for _j = 0; _j < $militiaUnits.length; _j++>>
 			<<if $militiaUnits[_j].active == 1 && $loyalID.includes($militiaUnits[_j].ID)>>
 				<br><br>
@@ -418,7 +418,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingSlaves == 1>>
+	<<if App.SecExp.conflict.deployedUnits('slaves') >= 1>>
 		<<set _med = 0>>
 		<<for _j = 0; _j < $slaveUnits.length; _j++>>
 			<<if $slaveUnits[_j].active == 1 && $loyalID.includes($slaveUnits[_j].ID)>>
@@ -466,7 +466,7 @@
 			<</if>>
 		<</for>>
 	<</if>>
-	<<if $deployingMercs == 1>>
+	<<if App.SecExp.conflict.deployedUnits('mercs') >= 1>>
 		<<for _j = 0; _j < $mercUnits.length; _j++>>
 			<<if $mercUnits[_j].active == 1 && $loyalID.includes($mercUnits[_j].ID)>>
 				<br><br>
@@ -716,4 +716,4 @@
 	<</if>>
 <<else>>
 	<br>@@.red;Error: losses are a negative number or NaN@@
-<</if>>
\ No newline at end of file
+<</if>>
diff --git a/src/SecExp/widgets/battleWidgets.tw b/src/SecExp/widgets/battleWidgets.tw
index 183ca80de9af834dd8e2574bac6db1a6be6978cb..b139522c22592f369405f855e33f56055472e43c 100644
--- a/src/SecExp/widgets/battleWidgets.tw
+++ b/src/SecExp/widgets/battleWidgets.tw
@@ -60,81 +60,4 @@
 		<</if>>
 	<</for>>
 	<<set $mercUnits = _newMerc>>
-<</widget>>
-
-<<widget "calcTroopCount">>
-	<<set _troops = 0>>
-	<<if $attackThisWeek == 1>>
-		<<if $deployingBots == 1>>
-			<<set _troops += $secBots.troops>>
-		<</if>>
-		<<for _i = 0; _i < $militiaUnits.length; _i++>>
-			<<if $militiaUnits[_i].isDeployed == 1>>
-				<<set _troops += $militiaUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<for _i = 0; _i < $slaveUnits.length; _i++>>
-			<<if $slaveUnits[_i].isDeployed == 1>>
-				<<set _troops += $slaveUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<for _i = 0; _i < $mercUnits.length; _i++>>
-			<<if $mercUnits[_i].isDeployed == 1>>
-				<<set _troops += $mercUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<if $SF.Toggle && $SF.Active >= 1 && $SFIntervention>>
-			<<set _troops += $carriableSoldiers>>
-		<</if>>
-		<<set $troopCount = _troops>>
-
-	<<elseif $slaveRebellion == 1 || $citizenRebellion == 1>>
-
-		<<if $irregulars > 0>>
-			<<set _troops += $irregulars>>
-		<</if>>
-		<<if $secBots.active == 1>>
-			<<set _troops += $secBots.troops>>
-		<</if>>
-		<<for _i = 0; _i < $militiaUnits.length; _i++>>
-			<<if $militiaUnits[_i].active == 1 && $loyalID.includes($militiaUnits[_i].ID)>>
-				<<set _troops += $militiaUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<for _i = 0; _i < $slaveUnits.length; _i++>>
-			<<if $slaveUnits[_i].active == 1 && $loyalID.includes($slaveUnits[_i].ID)>>
-				<<set _troops += $slaveUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<for _i = 0; _i < $mercUnits.length; _i++>>
-			<<if $mercUnits[_i].active == 1 && $loyalID.includes($mercUnits[_i].ID)>>
-				<<set _troops += $mercUnits[_i].troops>>
-			<</if>>
-		<</for>>
-		<<if $SF.Toggle && $SF.Active >= 1>>
-			<<set _troops += $carriableSoldiers>>
-		<</if>>
-		<<set $troopCount = _troops>>
-
-	<<else>>
-		<br>@@.red;Error: widget called outside battle@@
-	<</if>>
-<</widget>>
-
-<<widget "calcBribe">>
-	<<if $week <= 30>>
-		<<set $bribeCost = 5000 + $baseBribePerAttacker * $attackTroops>>
-	<<elseif $week <= 30>>
-		<<set $bribeCost = 10000 + $baseBribePerAttacker * $attackTroops>>
-	<<elseif $week <= 30>>
-		<<set $bribeCost = 15000 + $baseBribePerAttacker * $attackTroops>>
-	<<elseif $week <= 30>>
-		<<set $bribeCost = 20000 + $baseBribePerAttacker * $attackTroops>>
-	<<elseif $week <= 30>>
-		<<set $bribeCost = 25000 + $baseBribePerAttacker * $attackTroops>>
-	<</if>>
-	<<if $majorBattle == 1>>
-		<<set $bribeCost *= 3>>
-	<</if>>
-	<<set $bribeCost = Math.trunc(Math.clamp($bribeCost,0,1000000))>>
 <</widget>>
\ No newline at end of file
diff --git a/src/SecExp/widgets/unitsWidgets.tw b/src/SecExp/widgets/unitsWidgets.tw
index bbe7a6a9d0717a7832aead23aec9d8389412aa1b..9cdc494ef7b54a3bff4d8cdc138d7408d0bc3489 100644
--- a/src/SecExp/widgets/unitsWidgets.tw
+++ b/src/SecExp/widgets/unitsWidgets.tw
@@ -1,161 +1,5 @@
 :: unitsWidgets [widget nobr]
 
-<<widget "militiaUnitsDescription">>
-	<<if $args[0].active == 1>>
-		<strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
-		Its $args[0].troops men and women are all proud citizens of your arcology, willing to put their lives on the line to protect their home.
-		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
-		<<if $args[0].equip == 0>>
-			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
-		<<elseif $args[0].equip == 1>>
-			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
-		<<elseif $args[0].equip == 2>>
-			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars.
-		<<else>>
-			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
-		<</if>>
-		<<if $args[0].training <= 33>>
-			They lack the experience to be considered consummate professionals, but their eagerness to defend the arcology makes up for it.
-		<<elseif $args[0].training <= 66>>
-			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
-		<<else>>
-			They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
-		<</if>>
-		<<if $args[0].loyalty < 10>>
-			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
-		<<elseif $args[0].loyalty < 33>>
-			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
-		<<elseif $args[0].loyalty < 66>>
-			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
-		<<elseif $args[0].loyalty < 90>>
-			Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent.
-		<<else>>
-			The unit is fanatically loyal. They would prefer death over betrayal.
-		<</if>>
-		<<if $args[0].cyber == 1>>
-			The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power.
-		<</if>>
-		<<if $args[0].medics == 1>>
-			The unit has a dedicated squad of medics that will follow them in battle.
-		<</if>>
-		<<if $SF.Toggle && $SF.Active >= 1 && $args[0].SF>>
-			The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active.
-		<</if>>
-	<<else>>
-		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
-	<</if>>
-<</widget>>
-
-<<widget "slaveUnitsDescription">>
-	<<if $args[0].active == 1>>
-		<strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
-		Its $args[0].troops men and women are slaves in your possession, tasked with the protection of their owner and their arcology.
-		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
-		<<if $args[0].equip == 0>>
-			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
-		<<elseif $args[0].equip == 1>>
-			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
-		<<elseif $args[0].equip == 2>>
-			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars.
-		<<else>>
-			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
-		<</if>>
-		<<if $args[0].training <= 33>>
-			They lack the experience to be considered professionals, but their eagerness to prove themselves makes up for it.
-		<<elseif $args[0].training <= 66>>
-			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
-		<<else>>
-			They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
-		<</if>>
-		<<if $args[0].loyalty < 10>>
-			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
-		<<elseif $args[0].loyalty < 33>>
-			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
-		<<elseif $args[0].loyalty < 66>>
-			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
-		<<elseif $args[0].loyalty < 90>>
-			Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent.
-		<<else>>
-			The unit is fanatically loyal. They would prefer death over betrayal.
-		<</if>>
-		<<if $args[0].cyber == 1>>
-			The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power.
-		<</if>>
-		<<if $args[0].medics == 1>>
-			The unit has a dedicated squad of medics that will follow them in battle.
-		<</if>>
-		<<if $SF.Toggle && $SF.Active >= 1 && $args[0].SF>>
-			The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active.
-		<</if>>
-	<<else>>
-		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
-	<</if>>
-<</widget>>
-
-<<widget "mercUnitsDescription">>
-	<<if $args[0].active == 1>>
-		<strong>$args[0].platoonName</strong> <<if $args[0].battlesFought > 1>> participated in $args[0].battlesFought battles and is ready to face the enemy once more at your command.<<elseif $args[0].battlesFought == 1>>is ready to face the enemy once more at your command.<<else>>is ready to face the enemy in battle.<</if>>
-		Its $args[0].troops men and women are mercenaries contracted to defend the arcology against external threats.
-		<<if $args[0].troops < $args[0].maxTroops>> The unit is not at its full strength of $args[0].maxTroops operatives.<</if>>
-		<<if $args[0].equip == 0>>
-			They are issued with simple, yet effective equipment: firearms, a few explosives and standard uniforms, nothing more.
-		<<elseif $args[0].equip == 1>>
-			They are issued with good, modern equipment: firearms, explosives and a few specialized weapons like sniper rifles and machine guns. They also carry simple body armor.
-		<<elseif $args[0].equip == 2>>
-			They are issued with excellent, high tech equipment: modern firearms, explosives, specialized weaponry and modern body armor. They are also issued with modern instruments like night vision and portable radars.
-		<<else>>
-			They are equipped with the best the modern world has to offer: modern firearms, explosives, specialized weaponry, experimental railguns, adaptive body armor and high tech recon equipment.
-		<</if>>
-		<<if $args[0].training <= 33>>
-			They lack the experience to be considered professionals, but they're trained more than enough to still be an effective unit.
-		<<elseif $args[0].training <= 66>>
-			They have trained <<if $args[0].battlesFought > 0>>and fought<</if>> enough to be considered disciplined, professional soldiers, ready to face the battlefield.
-		<<else>>
-			They are consummate veterans, with a wealth of experience and perfectly trained. On the battlefield they are a well oiled war machine capable of facing pretty much anything.
-		<</if>>
-		<<if $args[0].loyalty < 10>>
-			The unit is extremely disloyal. Careful monitoring of their activities and relationships should be implemented.
-		<<elseif $args[0].loyalty < 33>>
-			Their loyalty is low. Careful monitoring of their activities and relationships is advised.
-		<<elseif $args[0].loyalty < 66>>
-			Their loyalty is not as high as it can be, but they are not actively working against their arcology owner.
-		<<elseif $args[0].loyalty < 90>>
-			Their loyalty is high and strong. The likelihood of this unit betraying the arcology is low to non-existent.
-		<<else>>
-			The unit is fanatically loyal. They would prefer death over betrayal.
-		<</if>>
-		<<if $args[0].cyber == 1>>
-			The soldiers of the unit have been enhanced with numerous cyberaugmentations which greatly increase their raw power.
-		<</if>>
-		<<if $args[0].medics == 1>>
-			The unit has a dedicated squad of medics that will follow them in battle.
-		<</if>>
-		<<if $SF.Toggle && $SF.Active >= 1 && $args[0].SF>>
-			The unit has attached advisors from $SF.Lower that will help the squad remain tactically aware and active.
-		<</if>>
-	<<else>>
-		$args[0].platoonName lost too many operatives in the $args[0].battlesFought it fought and can no longer be considered a unit at all.
-	<</if>>
-<</widget>>
-
-<<widget "secBotsDescription">>
-	<<if $secBots.active == 1>>
-		<strong>The <<print $secBots.troops>> security drones</strong> are assembled in an ordered line in front of you, absolutely silent and ready to receive their orders.
-		<<if $secBots.troops < $secBots.maxTroops>> The unit is not at its full strength of $secBots.maxTroops drones.<</if>>
-		<<if $secBots.equip == 0>>
-			They are equipped with light weaponry, mainly anti-riot nonlethal weapons. Not particularly effective in battle.
-		<<elseif $secBots.equip == 1>>
-			They are equipped with light firearms, not an overwhelming amount of firepower, but with their mobility good enough to be effective.
-		<<elseif $secBots.equip == 2>>
-			They are equipped with powerful, modern firearms and simple armor mounted around their frames. They do not make for a pretty sight, but on the battlefield they are a dangerous weapon.
-		<<else>>
-			They are equipped with high energy railguns and adaptive armor. They are a formidable force on the battlefield, even for experienced soldiers.
-		<</if>>
-	<<else>>
-		There are too few security drones left to be able to deploy them on the battlefield.
-	<</if>>
-<</widget>>
-
 <<widget "generateUnitID">>
 	<<set _newID = 0>>
 
@@ -178,4 +22,4 @@
 	<</for>>
 
 	<<set $args[0].ID = _newID>>
-<</widget>>
+<</widget>>
\ No newline at end of file
diff --git a/src/SpecialForce/Firebase.tw b/src/SpecialForce/Firebase.tw
index e0c7b6ad0781ff7aaf484f1d5f82960def26c2d1..148000fef6ad19a1d0a9d7189aa498da91db6031 100644
--- a/src/SpecialForce/Firebase.tw
+++ b/src/SpecialForce/Firebase.tw
@@ -70,7 +70,7 @@
 			<br> <<if $SF.UC.Assign < 1>>''Zero''<<elseif $SF.UC.Assign < 2>>A ''small'' section<<else>>A ''large'' section<</if>> of the special force is assigned to undercover work, which will primarily advance your cultural goals. [[Re-allocate the units|Firebase][$SF.UC.Lock = 0]]
 		<</if>>
 
-		<<if $SF.Squad.Firebase > 5 && $secExpEnabled > 0 && $SFSupportLevel >= 4 && App.SecExp.Check.maxUnits() === 18 && App.SecExp.Check.deploySpeed() <= 10>>
+		<<if $SF.Squad.Firebase > 5 && $secExpEnabled > 0 && $SFSupportLevel >= 4 && App.SecExp.battle.maxUnits() === 18 && App.SecExp.battle.deploySpeed() <= 10>>
 			<br><br>[[Provide the security force with their own section.|Firebase][$sectionInFirebase = 1, cashX(forceNeg(Math.ceil((750000*(1.15+($SF.Size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env)), "capEx")]]
 			@@.red;<<print cashFormat(Math.ceil((750000*(1.15+($SF.Size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env))>>@@
 		<</if>>
diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw
index 1f5513337918f603e82a432ecf9470e8c5332f92..cf80209d6e7f38a3e07551f6da8dbd258d1985f4 100644
--- a/src/events/intro/introSummary.tw
+++ b/src/events/intro/introSummary.tw
@@ -855,7 +855,67 @@ __''Player Character''__
 			<<option "gang" "Gang leader">>
 		<</options>>
 	<</if>>
-	<br>
+	<br><br>
+	<<options $SecExp.settings.show>>
+		<<option 1 "Show Security Expansion changes">>
+		<<option 0 "Hide Security Expansion changes">>
+	<</options>>
+
+	<br>''A member of the idle wealthy'':
+	//Start with @@.yellowgreen;extra money.@@
+	<<if $SecExp.settings.show == 1>>
+		@@.red;Hard to maintain authority@@ but @@.yellowgreen;propaganda hub upgrades will be cheaper.@@
+	<</if>>
+
+	<br>''Business leader'':
+	//You will be more @@.green;effective at business pursuits.@@
+	<<if $SecExp.settings.show == 1>>
+		In addition, @@.yellowgreen;propaganda hub upgrades will be cheaper.@@
+	<</if>>
+
+	<br><br>''Mercenary'':
+	<<if $SecExp.settings.show == 1>>
+		@@.green;Security is easier maintain.@@ Also, @@.yellowgreen;Cheaper security HQ upgrades.@@
+	<</if>>
+
+	<br>''Slaver'':
+	<<if $SecExp.settings.show == 1>>
+		@@.green;Authority easier to maintain@@ and @@.yellowgreen;security HQ upgrades will be cheaper.@@
+	<</if>>
+
+	<br><br>''Engineer'':
+	//@@.yellowgreen;Cheaper arcology upgrades will be cheaper.@@ Also, @@.yellowgreen;Basic economic upgrades@@ will already installed.//
+
+	<br>''Doctor'':
+	//@@.yellowgreen;cheaper@@ and @@.green;healthier@@ Surgery. @@.yellowgreen;Cheaper drug upgrades.@@
+
+	<br><br>''Minor celebrity'':
+	//Start with @@.green;extra reputation.@@
+	<<if $SecExp.settings.show == 1>>
+		In addition, @@.yellowgreen;cheaper propaganda hub upgrades.@@
+	<</if>>
+	
+	<br>''High class escort'':
+	//@@.red;Hard to maintain reputation@@<<if $SecExp.settings.show == 1>>, @@.red;and authority@@<</if>>.
+	
+	<br><br>''Servant'':
+	//@@.red;Harder to maintain reputation@@<<if $SecExp.settings.show == 1>>, @@.red;and authority@@<</if>>.
+	You know how to @@.yellowgreen;lower your upkeep,@@ but @@.red;not much else.@@
+
+	<br>''Gang Leader'':
+	//Slaves will cost less.
+	<<if $SecExp.settings.show == 1>>
+		In addition, maintaining authority @@.green;will be easier@@ and @@.yellowgreen;security HQ upgrades will be cheaper.@@
+	<</if>>
+	@@.red;Hard maintain to reputation quite hard@@.
+
+	<br><br>''Incursion Specialist/Hacker'':
+	//@@.green;Certain upgrades will be cheaper@@ and you may find alternative approaches to problems.
+	<<if $SecExp.settings.show == 1>>
+		@@.red;Hard to maintain authority.@@
+	<</if>>
+
+	<br><br>
 	<<options $PC.rumor>>
 		It is rumored that you acquired your arcology through ''$PC.rumor'':
 		<<option "wealth" "Wealth">>
@@ -1355,7 +1415,7 @@ __''Mods''__
 	<<else>>
 		<<set $girls = 1>>
 	<</if>>
-	<<if $secExpEnabled == 1>>
+	<<if $secExpEnabled > 0>>
 		<<set $wasToggledBefore = 1>>
 	<</if>>
 	<<goto "init Nationalities">>
@@ -1366,4 +1426,4 @@ __''Mods''__
 <</if>>
 
 <br><br>
-[[Cheat Start|init Nationalities][cashX(1000000, "cheating"),$girls = 3,repX(20000, "cheating"),$dojo += 1,$cheatMode = 1,$seeDesk = 0, $seeFCNN = 0, $sortSlavesBy = "devotion",$sortSlavesOrder = "descending",$sortSlavesMain = 0,$rulesAssistantMain = 1,$abbreviateDevotion = 1,$abbreviateRules = 1,$abbreviateClothes = 2,$abbreviateHealth = 1,$abbreviateDiet = 1,$abbreviateDrugs = 1,$abbreviateRace = 1,$abbreviateNationality = 1,$abbreviateGenitalia = 1,$abbreviatePhysicals = 1,$abbreviateSkills = 1,$abbreviateMental = 2,$PC.trading = 100,$PC.warfare = 100,$PC.slaving = 100,$PC.engineering = 100,$PC.medicine = 100,$PC.hacking = 100]] | //Intended for debugging: may have unexpected effects//
\ No newline at end of file
+[[Cheat Start|init Nationalities][cashX(1000000, "cheating"),$girls = 3,repX(20000, "cheating"),$dojo += 1,$cheatMode = 1,$seeDesk = 0, $seeFCNN = 0, $sortSlavesBy = "devotion",$sortSlavesOrder = "descending",$sortSlavesMain = 0,$rulesAssistantMain = 1,$abbreviateDevotion = 1,$abbreviateRules = 1,$abbreviateClothes = 2,$abbreviateHealth = 1,$abbreviateDiet = 1,$abbreviateDrugs = 1,$abbreviateRace = 1,$abbreviateNationality = 1,$abbreviateGenitalia = 1,$abbreviatePhysicals = 1,$abbreviateSkills = 1,$abbreviateMental = 2,$PC.trading = 100,$PC.warfare = 100,$PC.slaving = 100,$PC.engineering = 100,$PC.medicine = 100,$PC.hacking = 100]] | //Intended for debugging: may have unexpected effects//
diff --git a/src/npc/acquisition.tw b/src/npc/acquisition.tw
index e0eecd859639c8d5f4053651df8faa3192d4a590..9fce0a013d5edf8a469c55d832977a91f8bbe4fc 100644
--- a/src/npc/acquisition.tw
+++ b/src/npc/acquisition.tw
@@ -1,5 +1,6 @@
 :: Acquisition [nobr]
 
+<<= App.SecExp.Check.general()>>
 <<unset $slaveWithoutBonuses, $startingGirlCopied, $startingGirlRelation>>
 
 <<set $fixedNationality = 0, $showEncyclopedia = 0>>
@@ -751,4 +752,4 @@ The previous owner seems to have left in something of a hurry.
 	<</if>>
 	<<script>>Save.autosave.save("Week Start Autosave")<</script>>
 	<<goto "Main">>
-<</link>>
+<</link>>
\ No newline at end of file
diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw
index 07b281d92625650de4057c52230a85cbb85f50fc..3fe4b57f53eb2a1a1ae5310c9125a775a917bfa9 100644
--- a/src/uncategorized/arcmgmt.tw
+++ b/src/uncategorized/arcmgmt.tw
@@ -1449,7 +1449,7 @@ You own
 			The fairly liberal flow of weapons in your arcology has a positive impact on its economy.
 			<<set _AWeekGrowth++>>
 		<</if>>
-		<<if $controlLeaks == 1>>
+		<<if $SecExp.buildings.pr.controlLeaks > 0>>
 			The authenticity department prepares extremely accurate, but false financial reports, misleading many of your competitors, allowing your arcology more space to grow undisturbed.
 			<<set _AWeekGrowth++>>
 		<</if>>
diff --git a/src/uncategorized/arcologyDescription.tw b/src/uncategorized/arcologyDescription.tw
index 28fa54b8824bd2bf68e32121c3fd0f3fcd52b37d..11a0dc519bfdf062a83139814795ef7aae313a8a 100644
--- a/src/uncategorized/arcologyDescription.tw
+++ b/src/uncategorized/arcologyDescription.tw
@@ -376,13 +376,13 @@ Its<<if $weatherCladding == 2>> glorious<<elseif $weatherCladding > 0>> dull<<el
 
 <<if $secExpEnabled == 1>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	<<if $propHub == 1>>
+	<<if $SecExp.buildings.pr.active == 1>>
 		A small street hides a surprisingly inconspicuous building, whose task is to manage your public image, protection and population control.
 	<</if>>
 	<<if $secHQ == 1>>
 		In a secure corner of the penthouse, the Security HQ silently works to build a safe and prosperous arcology.
 	<</if>>
-	<<if $secBarracks == 1>>
+	<<if $SecExp.buildings.barracks.active == 1>>
 		At the center of the structure the barracks can be found filling the halls with the noise of ballistic weapons and training troops.
 	<</if>>
 	<<if $weapManu == 1>>
diff --git a/src/uncategorized/economics.tw b/src/uncategorized/economics.tw
index 8eebb29da387381b254bb759c276520e1b36c3e6..66156b5798e437a4151285240c50ad3bd2dd5353 100644
--- a/src/uncategorized/economics.tw
+++ b/src/uncategorized/economics.tw
@@ -103,17 +103,19 @@
 	</div>
 <</if>>
 
-<div id="Authority" class="tabcontent">
-	<div class="content">
-		<<include "authorityReport">>
+<<if $secExpEnabled > 0>>
+	<div id="Authority" class="tabcontent">
+		<div class="content">
+			<<include "authorityReport">>
+		</div>
 	</div>
-</div>
 
-<div id="securityReport" class="tabcontent">
-	<div class="content">
-		<<include "securityReport">>
+	<div id="securityReport" class="tabcontent">
+		<div class="content">
+			<<include "securityReport">>
+		</div>
 	</div>
-</div>
+<</if>>
 
 <div id="Reputation" class="tabcontent">
 	<div class="content">
@@ -140,4 +142,4 @@
 </script>
 
 </body>
-<</if>>
+<</if>>
\ No newline at end of file
diff --git a/src/uncategorized/fsDevelopments.tw b/src/uncategorized/fsDevelopments.tw
index a9ed75003b135f3abd9a0cd6a4dd9f6d7a1a0057..0313d9b4bcf1f36a59ba4ac00458069c71e2c294 100644
--- a/src/uncategorized/fsDevelopments.tw
+++ b/src/uncategorized/fsDevelopments.tw
@@ -138,26 +138,28 @@
 		<<set _broadProgress += 1>>
 	<</if>>
 <</if>>
+
 <<if $secExpEnabled == 1>>
-	<<if $propCampaign >= 1 && $propFocus == "social engineering">>
+	<<if $SecExp.buildings.pr.active > 0 && $SecExp.buildings.pr.campaign >= 1 && $SecExp.buildings.pr.focus == "social engineering">>
 		Your propaganda campaign helps further your societal engineering efforts.
-		<<if $RecuriterOffice == 0 || $Recruiter == 0>>
+		<<if $SecExp.buildings.pr.recuriterOffice == 0 || $Recruiter == 0>>
 			<<if $propCampaignBoost == 1>>
 				<<set _broadProgress += 2>>
 			<<else>>
 				<<set _broadProgress += 1>>
 			<</if>>
-		<<else>>
+		<<elseif $SecExp.buildings.pr.recuriterOffice && $Recruiter > 0>>
 			<<setLocalPronouns $Recruiter>>
 			''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your societal engineering campaign from $his PR hub office.
 			<<if $propCampaignBoost == 1>>
-				<<set _broadProgress += $propCampaign + Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>>
+				<<set _broadProgress += $SecExp.buildings.pr.campaign + Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>>
 			<<else>>
 				<<set _broadProgress += 1 + Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>>
 			<</if>>
 		<</if>>
 	<</if>>
 <</if>>
+
 <<if $terrain == "urban">>
 	The @@.yellow;urban location@@ of the arcology naturally promotes cultural interchange, holding back $arcologies[0].name's cultural independence.
 	<<set _broadProgress -= 3>>
diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw
index 057bb448adc3ec8dc323772a3120e66685a8ce83..f2fe37ce9a4073909fa1501f5439d813f83ca2c8 100644
--- a/src/uncategorized/manageArcology.tw
+++ b/src/uncategorized/manageArcology.tw
@@ -95,9 +95,9 @@ __Construction__
 <<if $secExpEnabled == 1>>
 	<br><br>
 	__Security__
-	<<if $propHub == 0>>
+	<<if $SecExp.buildings.pr.active == 0>>
 		<br>
-		[[Set up the propaganda Hub|Manage Arcology][cashX(forceNeg(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier))), "capEx"), $propHub = 1, $PC.engineering += 1, $PC.hacking += 1,$RecuriterOffice = 0]]
+		[[Set up the propaganda Hub|Manage Arcology][cashX(forceNeg(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier))), "capEx"), $SecExp.buildings.pr.active = 1, $PC.engineering += 1, $PC.hacking += 1, App.SecExp.Check.general()]]
 		//Costs <<print cashFormat(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier)))>>.//
 		<br>//Building specialized in the management of authority.//
 	<<else>>
@@ -114,9 +114,9 @@ __Construction__
 		The [[security HQ|securityHQ]] is constantly working to protect your arcology.
 	<</if>>
 
-	<<if $secBarracks == 0>>
+	<<if $SecExp.buildings.barracks.active == 0>>
 		<br>
-		[[Set up the barracks|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $secBarracks = 1, $PC.engineering += 1]]
+		[[Set up the barracks|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $SecExp.buildings.barracks.active = 1, $PC.engineering += 1, App.SecExp.Check.general()]]
 		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
 		<br>//Building specialized in the management of armed forces.//
 	<<else>>
@@ -327,4 +327,4 @@ Your arcology is named <<textbox "$arcologies[0].name" $arcologies[0].name "Mana
 
 <<if $cheatMode == 1 && $seeExtreme == 1>>
 	<br><br>[[Host Dinner Party|Dinner Party Preparations]]
-<</if>>
+<</if>>
\ No newline at end of file
diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw
index ab832025b1f5363f82c8dc3148d65c66b4a75d8c..dc3398eb94a551ca1e0b1ef4ea4f24938136101d 100644
--- a/src/uncategorized/nextWeek.tw
+++ b/src/uncategorized/nextWeek.tw
@@ -367,17 +367,17 @@
 	<<set $playerSurgery-->>
 <</if>>
 
-<<if $foughtThisWeek == 1>>
-	<<set $foughtThisWeek = 0>>
-<</if>>
+<<if $secExpEnabled > 0>>
+	<<if $foughtThisWeek == 1>>
+		<<set $foughtThisWeek = 0>>
+	<</if>>
 
-<<if $sentUnitCooldown > 0>>
-	<<set $sentUnitCooldown-->>
-<</if>>
-<<if (def $SecExp.proclamation.cooldown) && $SecExp.proclamation.cooldown > 0>>
-	<<set $SecExp.proclamation.cooldown-->>
-<<else>>
-	<<run delete $SecExp.proclamation.cooldown>>
+	<<if $sentUnitCooldown > 0>>
+		<<set $sentUnitCooldown-->>
+	<</if>>
+	<<if $SecExp.proclamation.cooldown > 0>>
+		<<set $SecExp.proclamation.cooldown-->>
+	<</if>>
 <</if>>
 
 <<set _seed = random(1,10)>>
@@ -462,4 +462,4 @@
 	<<if ($rep > 17500)>> <<set $rep = 17500>> <</if>>
 <</if>>
 <<set $NaNArray = findNaN()>>
-<<goto "Main">>
\ No newline at end of file
+<<goto "Main">>
diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw
index 4fb5b3553a7711e6ab6301b934dd4ca262264089..67a5e230704cbaa47e760052932618d49ae8ffc2 100644
--- a/src/uncategorized/options.tw
+++ b/src/uncategorized/options.tw
@@ -569,7 +569,7 @@ This save was created using FC version $ver build $releaseID.
 			<</options>>
 		<</if>> //Prep for future content.//
 		*/
-		
+
 		<br>
 		<<options $secExpEnabled>>
 			The Security Expansion mod is
@@ -577,7 +577,7 @@ This save was created using FC version $ver build $releaseID.
 			<<option 0 "Disabled">>
 			<<comment>>
 			<br>The mod can be activated in any moment, but it may result in unbalanced gameplay if activated very late in the game.
-			<br>If you are enabling the mod mid game for the first time, run the main BC option.
+			<br>''If you are enabling the mod mid game for the first time, run the either the main or mod specific BC option listed near the top.''
 		<</options>>
 
 		<<if $secExpEnabled > 0>>
@@ -607,7 +607,13 @@ This save was created using FC version $ver build $releaseID.
 					<<option 0.75 "Easy">>
 					<<option 0.5 "Very easy">>
 				<</options>>
-				<br><br>
+				<br>
+				<<options $SecExp.settings.unitDescriptions>>
+					Unit descriptions are
+					<<option 1 "Abbreviated">>
+					<<option 0 "Summarized">>
+				<</options>>
+				<br>
 			<</if>>
 
 			<<options $SecExp.settings.battle.enabled>>
diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw
index ace47e487382062164a54d1963c2ff7cb4031ef2..7d2e296aba2206442ad225bab7fbda0380b3ca29 100644
--- a/src/uncategorized/persBusiness.tw
+++ b/src/uncategorized/persBusiness.tw
@@ -745,7 +745,7 @@
 		<</if>>
 	<</if>>
 
-	<<if $marketInfiltration == 1>>
+	<<if $SecExp.buildings.pr.active > 0 && $SecExp.buildings.pr.marketInfiltration > 0>>
 		<<set _blackMarket = random(7000,8000)>>
 		Your secret service makes use of black markets and illegal streams of goods to make a profit, making you @@.yellowgreen;<<print cashFormat(_blackMarket)>>.@@ This however allows @@.red;crime to flourish@@ in the underbelly of the arcology.
 		<<set $SecExp.core.crimeLow += random(1,3)>>
@@ -756,6 +756,59 @@
 		<<run cashX(-5000, "personalBusiness")>>
 		<<set $arcRepairTime--, IncreasePCSkills('engineering', 0.1)>>
 	<</if>>
+	
+	<<if $weapManu == 1>>
+		<br><br>
+		The weapons manufacturing complex produces armaments
+		<<if $weapProductivity <= 2>>
+			at a steady pace.
+		<<else>>
+			with great efficiency.
+		<</if>>
+		<<set _income = 0>>
+		<<set _price = Math.trunc(Math.clamp(random(1,2) + ($arcologies[0].prosperity / 15) - ($week / 30), 2, 8))>>
+		<<set _factoryMod = Math.round(1 + ($weapProductivity + $weapLab) / 2 + ($weapMenials / 100))>>
+		<<if $sellTo.citizen == 1>>
+			<<if $weaponsLaw == 3>>
+				Your lax regulations regarding weapons allows your citizens to buy much of what you are capable of producing.
+				<<set _income += Math.round(($ACitizens * 0.1) * _price * _factoryMod)>>
+			<<elseif $weaponsLaw >= 1>>
+				Your policies allow your citizen to buy your weaponry and they buy much of what you are capable of producing.
+				<<set _income += Math.round((($ACitizens * 0.1) * _price * _factoryMod) / (3 - $weaponsLaw))>>
+			<<else>>
+				Your policies do allow your citizen to buy weaponry, meaning all your income will come from exports.
+			<</if>>
+		<</if>>
+		<<if $sellTo.raiders == 1>>
+			Some weapons are sold to the various raider gangs infesting the wastelands.
+			<<set _income += Math.round($week / 3 * (_price / 2) * 10 * _factoryMod)>>
+		<</if>>
+		<<if $sellTo.oldWorld == 1>>
+			Part of our production is sold to some old world nations.
+			<<set _income += Math.round($week / 3 * _price * 10 * _factoryMod)>>
+		<</if>>
+		<<if $sellTo.raiders == 1>>
+			A share of our weapons production is sold to other Free Cities.
+			<<set _income += Math.round($week / 3 * _price * 10 * _factoryMod)>>
+		<</if>>
+		<<if $peacekeepers.strength >= 50>>
+			The peacekeeping force is always in need of new armaments and is happy to be supplied by their ally.
+			<<set _income += Math.round($peacekeepers.strength * _price * 10 * _factoryMod)>>
+		<</if>>
+		<<set _income = Math.trunc(_income * 0.5)>>
+		This week we made @@.yellowgreen;<<print cashFormat(_income)>>.@@
+		<<if !Number.isInteger(_income)>>
+			<br>@@.red;Error failed to calculate income@@
+		<<else>>
+			<<run cashX(_income, "personalBusiness")>>
+		<</if>>
+	<</if>>
+
+	<<if $taxTrade == 1>> <<set _tradeTax = Math.ceil($SecExp.core.trade * random(80,120))>>
+		<br>Fees on transitioning goods this week made @@.yellowgreen;<<print cashFormat(_tradeTax)>>.@@
+		<<run cashX(Math.ceil(_tradeTax), "personalBusiness")>>
+	<</if>>
+	<br>
 <</if>>
 
 Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@
@@ -811,61 +864,6 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@
 	<br>@@.red;Error, costs is NaN@@
 <</if>>
 
-<<if $secExpEnabled == 1>>
-	<<if $weapManu == 1>>
-		<br><br>
-		The weapons manufacturing complex produces armaments
-		<<if $weapProductivity <= 2>>
-			at a steady pace.
-		<<else>>
-			with great efficiency.
-		<</if>>
-		<<set _income = 0>>
-		<<set _price = Math.trunc(Math.clamp(random(1,2) + ($arcologies[0].prosperity / 15) - ($week / 30), 2, 8))>>
-		<<set _factoryMod = Math.round(1 + ($weapProductivity + $weapLab) / 2 + ($weapMenials / 100))>>
-		<<if $sellTo.citizen == 1>>
-			<<if $weaponsLaw == 3>>
-				Your lax regulations regarding weapons allows your citizens to buy much of what you are capable of producing.
-				<<set _income += Math.round(($ACitizens * 0.1) * _price * _factoryMod)>>
-			<<elseif $weaponsLaw >= 1>>
-				Your policies allow your citizen to buy your weaponry and they buy much of what you are capable of producing.
-				<<set _income += Math.round((($ACitizens * 0.1) * _price * _factoryMod) / (3 - $weaponsLaw))>>
-			<<else>>
-				Your policies do allow your citizen to buy weaponry, meaning all your income will come from exports.
-			<</if>>
-		<</if>>
-		<<if $sellTo.raiders == 1>>
-			Some weapons are sold to the various raider gangs infesting the wastelands.
-			<<set _income += Math.round($week / 3 * (_price / 2) * 10 * _factoryMod)>>
-		<</if>>
-		<<if $sellTo.oldWorld == 1>>
-			Part of our production is sold to some old world nations.
-			<<set _income += Math.round($week / 3 * _price * 10 * _factoryMod)>>
-		<</if>>
-		<<if $sellTo.raiders == 1>>
-			A share of our weapons production is sold to other Free Cities.
-			<<set _income += Math.round($week / 3 * _price * 10 * _factoryMod)>>
-		<</if>>
-		<<if $peacekeepers.strength >= 50>>
-			The peacekeeping force is always in need of new armaments and is happy to be supplied by their ally.
-			<<set _income += Math.round($peacekeepers.strength * _price * 10 * _factoryMod)>>
-		<</if>>
-		<<set _income = Math.trunc(_income * 0.5)>>
-		This week we made @@.yellowgreen;<<print cashFormat(_income)>>.@@
-		<<if !Number.isInteger(_income)>>
-			<br>@@.red;Error failed to calculate income@@
-		<<else>>
-			<<run cashX(_income, "personalBusiness")>>
-		<</if>>
-	<</if>>
-
-	<<if $taxTrade == 1>> <<set _tradeTax = Math.ceil($SecExp.core.trade * random(80,120))>>
-		<br>Fees on transitioning goods this week made @@.yellowgreen;<<print cashFormat(_tradeTax)>>.@@
-		<<run cashX(Math.ceil(_tradeTax), "personalBusiness")>>
-	<</if>>
-	<br>
-<</if>>
-
 /*Adding random changes to slave demand and supply*/
 /*Without events triggering and a relatively average supply/demand situation, the best case scenario is an increase/decrease in the price of slaves of 10 in one week. Chance of these conditions happening are 1/25. For demand or supply to go from average to their maximum will take 25 weeks if rolling highest growth each time a roll is made and all other luck is average. Because of the properties of the market and how it develops the likely prices one will encounter are distributed in a bell-shaped fashion, centered around 1000. Minimum possible price is 750, maximum 1250. At +/- 35000 chances of supply or demand getting even more extreme are reduced.*/
 <<set _demandSlaveVar = random(-10,10)*10>>
@@ -1072,4 +1070,4 @@ The RomanFS may need further tweaking (it probably got weaker). Could increase t
 <</if>>
 
 <<if $SF.Toggle && $SF.Active >= 1>> <<= App.SF.AAR()>> <</if>>
-<br>
\ No newline at end of file
+<br>
diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw
index eb76f9859d2571c3922b8707fb951bff93b8a913..4b4268b003c6402bd31a4ceb5283708f62d79317 100644
--- a/src/uncategorized/reputation.tw
+++ b/src/uncategorized/reputation.tw
@@ -712,11 +712,9 @@ On formal occasions, you are announced as $PCTitle.
 	<<run repX(500, "policies")>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
-	<<if $fakeNews == 1>>
-		The authenticity department produces and distributes copious amounts of plausible enough news and reports, @@.green;increasing your reputation.@@
-		<<run repX(10 * $miniTruth, "policies")>>
-	<</if>>
+<<if $secExpEnabled == 1 && $SecExp.buildings.pr.fakeNews > 0>>
+	The authenticity department produces and distributes copious amounts of plausible enough news and reports, @@.green;increasing your reputation.@@
+	<<run repX(10 * $SecExp.buildings.pr.miniTruth, "policies")>>
 <</if>>
 
 <br>
diff --git a/src/uncategorized/scheduledEvent.tw b/src/uncategorized/scheduledEvent.tw
index e3452f9de575458c02b2e7c466fb52ebfcc9da55..a1a32d5e88538ea7c8f7e5836dedefb2f965b22c 100644
--- a/src/uncategorized/scheduledEvent.tw
+++ b/src/uncategorized/scheduledEvent.tw
@@ -123,7 +123,7 @@
 	<<set $fcnn.push("...dozens upon dozens of mass graves in what were once city parks...")>>
 <</if>>
 
-<<if $secExpEnabled == 1>>
+<<if $secExpEnabled == 1 && $SecExp.settings.battle.enabled > 0>>
 	<<include "attackGenerator">>
 <</if>>
 
@@ -232,4 +232,4 @@
 <<else>>
 	<<run delete $JFCReorder>>
 	<<goto "Nonrandom Event">>
-<</if>>
+<</if>>
\ No newline at end of file
diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw
index d592dc5d82082843c29614c2cc31e4e572d2696a..2f4b3a43675d1ec8fab4f7c57ba3ed4554070b8f 100644
--- a/src/uncategorized/storyCaption.tw
+++ b/src/uncategorized/storyCaption.tw
@@ -29,7 +29,7 @@
 		</span> @@.cyan;[Z]@@
 	<</if>>
 
-	<<if $propHub > 0 && _Pass !== "propagandaHub">>
+	<<if $SecExp.buildings.pr.active > 0 && _Pass !== "propagandaHub">>
 		<span id="propHub"> <br>
 			<<link [[Manage PR|propagandaHub]]>><</link>>
 		</span> @@.cyan;[Shift+H]@@
@@ -40,7 +40,7 @@
 		</span> @@.cyan;[Shift+S]@@
 	<</if>>
 
-	<<if $secBarracks > 0 && _Pass !== "secBarracks">>
+	<<if $SecExp.buildings.barracks.active > 0 && _Pass !== "secBarracks">>
 		<span id="secBarracks"> <br>
 			<<link [[Manage Military|secBarracks]]>><</link>>
 		</span> @@.cyan;[Shift+A]@@
@@ -108,7 +108,7 @@
 	<span id="cost"><<SlaveCostDescription>></span> <br><br>
 <</if>>
 
-<<if $ui != "start" && _Pass !== "Encyclopedia">> 
+<<if $ui != "start" && _Pass !== "Encyclopedia">>
 	<<if $sideBarOptions.Cash > 0>> <br>
 		<<set $cash = Math.trunc($cash)>>
 		<span id="cash">
@@ -710,7 +710,7 @@
 			<</if>>
 
 			<span id="Security">
-			<<if $secExpEnabled > 0 && ($propHub > 0 || $secHQ > 0 || $secBarracks > 0 || $riotCenter > 0) || $SF.Toggle && $SF.Active >= 1>> <br>
+			<<if $secExpEnabled > 0 && ($SecExp.buildings.pr.active > 0 || $secHQ > 0 || $SecExp.buildings.barracks.active > 0 || $riotCenter > 0) || $SF.Toggle && $SF.Active >= 1>> <br>
 				<<link "Manage Security">> <<replace "#Security">>
 					<<security>>
 				<</replace>> <</link>>
@@ -728,13 +728,15 @@
 			<<if $organFarmUpgrade>> <br>[[Organ Farm]]<</if>>
 			<<if $ImplantProductionUpgrade>> <br>[[Implant Manufactory]]<</if>>
 			<<if $researchLab.level > 0>> <br>[[Prosthetic Lab]]<</if>>
-			<br>
+			<<if $geneticMappingUpgrade + $dispensary + $organFarmUpgrade + $ImplantProductionUpgrade + $researchLab.level > 0>>
+				<br>
+			<</if>>
 
-			<br> [[Wardrobe]] <br>
+			<br> [[Wardrobe]]
 			<<if $rep >= 10000>>
-				[[Black Market|The Black Market]]
-			<<elseif $rep > 7500>>
-				You lack the reputation to be invited to the underground Black Market.
+				<br>[[Black Market|The Black Market]]
+			<<else>>
+				<br>You lack the reputation to be invited to the underground Black Market.
 			<</if>>
 
 		<<elseif ["Dispensary", "Organ Farm", "Implant Manufactory", "Gene Lab", "Prosthetic Lab"].includes(_Pass)>>