diff --git a/src/SecExp/SecExpBackwardCompatibility.tw b/src/SecExp/SecExpBackwardCompatibility.tw
index 3f6352b73d178550a7393211c0d42d3a6141972c..a8ab834c8271466a7169b5518aea825760d26b8a 100644
--- a/src/SecExp/SecExpBackwardCompatibility.tw
+++ b/src/SecExp/SecExpBackwardCompatibility.tw
@@ -117,6 +117,18 @@
 <<if ndef $marketInfiltration>>
 	<<set $marketInfiltration = 0>>
 <</if>>
+<<if ndef $propHubUpkeep>>
+<<set $propHubUpkeep = $facilityCost>>
+<</if>>
+<<if ndef $secHQUpkeep>>
+<<set $secHQUpkeep = $facilityCost>>
+<</if>>
+<<if ndef $secBarracksUpkeep>>
+<<set $secBarracksUpkeep = $facilityCost>>
+<</if>>
+<<if ndef $upgradeUpkeep>>
+<<set $upgradeUpkeep = 40>>
+<</if>>
 
 /* armed forces stats */
 <<if ndef $targetUnit>>
@@ -188,7 +200,10 @@
 <<if ndef $mercLoyalty>>
 <<set $mercLoyalty = 0>>
 <</if>>
-	
+<<if ndef $soldierUpkeep>>
+<<set $soldierUpkeep = 10>>
+<</if>>
+
 /* upgrades */
 <<if ndef $riskSim>>
 	<<set $riskSim = 0>>
diff --git a/src/SecExp/edicts.tw b/src/SecExp/edicts.tw
new file mode 100644
index 0000000000000000000000000000000000000000..83137c28cb4cb4181bd9619848d47ca265ee2abb
--- /dev/null
+++ b/src/SecExp/edicts.tw
@@ -0,0 +1,21 @@
+:: edicts [nobr]
+
+''__Active Edicts__''
+
+
+
+<br>
+<br>
+
+
+
+''__Available policies__''
+<br>//Passing any law will cost ¤5000 and a small amount of reputation. More policies will become available as the arcology develops.//
+
+recruitment laws
+
+rents up
+
+helots as tributes
+
+more slaves to citizen, but more helots to player
\ No newline at end of file
diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw
index dae8d8ca087e31221a09bbb97e1560fe9a6d5fb8..98b9e408203431468b474967cfebd1585c1b5598 100644
--- a/src/SecExp/propagandaHub.tw
+++ b/src/SecExp/propagandaHub.tw
@@ -14,6 +14,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<set $propCampaign += 1>>
 		<<set $cash -= 5000*$upgradeMultiplierArcology>>
 		<<set $propFocus == "social engineering">>
+		<<set $propHubUpkeep += $upgradeUpkeep>>
 		<<goto "propagandaHub">>
 	<</link>>
 	<br>Set up a propaganda campaign to align your citizens with your goals.
@@ -71,6 +72,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Invest more resources in the propaganda machine">>
 			<<set $propCampaign += 1>>
 			<<set $cash -= 5000 * $upgradeMultiplierArcology * ($propCampaign + 1)>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
@@ -88,6 +90,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 	<<link "Set up the authenticity department">>
 		<<set $miniTruth += 1>>
 		<<set $cash -= 5000*$upgradeMultiplierArcology>>
+		<<set $propHubUpkeep += $upgradeUpkeep>>
 		<<goto "propagandaHub">>
 	<</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.
@@ -97,6 +100,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Enlarge the authenticity department">>
 			<<set $miniTruth += 1>>
 			<<set $cash -= 5000*$upgradeMultiplierArcology * ($miniTruth + 1)>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
@@ -109,6 +113,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Install a news generator">>
 			<<set $fakeNews = 1>>
 			<<set $cash -= 10000*$upgradeMultiplierArcology>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Install an automatic news generator, able to fabricate thousands of plausible sounding news every day.
@@ -121,6 +126,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Institute controlled leaks protocols">>
 			<<set $controlLeaks = 1>>
 			<<set $cash -= 10000*$upgradeMultiplierArcology>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Institute a system able to release erroneous, but plausible, information about your business, leading your competitors to prepared economical traps.
@@ -138,6 +144,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 	<<link "Set up personal secret service">>
 		<<set $secretService += 1>>
 		<<set $cash -= 10000*$upgradeMultiplierArcology>>
+		<<set $propHubUpkeep += $upgradeUpkeep>>
 		<<goto "propagandaHub">>
 	<</link>>
 	<br>Set up a department tasked with the protection of your person, as well as operations requiring a delicate approach.
@@ -147,6 +154,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Expand the secret service">>
 			<<set $secretService += 1>>
 			<<set $cash -= 5000*$upgradeMultiplierArcology * ($secretService + 1)>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
@@ -159,6 +167,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Create a black ops team">>
 			<<set $blackOps = 1>>
 			<<set $cash -= 10000*$upgradeMultiplierArcology>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Create a black ops team, ready to carry out corporate sabotage and sensible operations to furhter your goals.
@@ -171,6 +180,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Infiltrate the black market">>
 			<<set $marketInfiltration = 1>>
 			<<set $cash -= 10000*$upgradeMultiplierArcology>>
+			<<set $propHubUpkeep += $upgradeUpkeep>>
 			<<goto "propagandaHub">>
 		<</link>>
 		<br>Establish a presence on the black market in order to manipulate it.
diff --git a/src/SecExp/secBarracks.tw b/src/SecExp/secBarracks.tw
index 84af5992c8e0a155bc897cb45340661e14bb30b3..a7b03658771d45be41ba37f0e10ede788a8ef8ed 100644
--- a/src/SecExp/secBarracks.tw
+++ b/src/SecExp/secBarracks.tw
@@ -37,6 +37,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 		<<set $secBarracksUpgrades.size += 1>>
 		<<set $maxUnits += 2>>
 		<<set $cash -= 10000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤10000 and will increase the maximum number of units by 2.//
@@ -48,6 +49,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Increase the quality of life of your soldiers by installing high tech furniture and appliances.">>
 		<<set $secBarracksUpgrades.luxury += 1>>
 		<<set $cash -= 5000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤5000 and will provide a 5% bonus to morale.//
@@ -55,6 +57,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Further increase the quality of life of your soldiers by installing advanced kitchen equipment and hiring skilled chefs.">>
 		<<set $secBarracksUpgrades.luxury += 1>>
 		<<set $cash -= 10000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤10000 and will provide a 5% bonus to morale, for a total of +10%.//
@@ -62,6 +65,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Further increase the quality of life of your soldiers by providing high speed, free access to digital media">>
 		<<set $secBarracksUpgrades.luxury += 1>>
 		<<set $cash -= 10000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤10000 and will provide a 5% bonus to morale, for a total of +15%.//
@@ -69,6 +73,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Further increase the quality of life of your soldiers by adding and staffing an exclusive brothel to the structure">>
 		<<set $secBarracksUpgrades.luxury += 1>>
 		<<set $cash -= 15000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤15000 and will provide a 5% bonus to morale, for a total of +20%.//
@@ -80,6 +85,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Add a training facility to the barracks">>
 		<<set $secBarracksUpgrades.training += 1>>
 		<<set $cash -= 10000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤10000 and will allow units to accumulate some experience each week.//
@@ -87,6 +93,7 @@ While for many a sore sight in a free city, the barracks stand proud before you.
 	<<link "Improve the training facility with modern equipment and skilled personnel">>
 		<<set $secBarracksUpgrades.training += 1>>
 		<<set $cash -= 20000>>
+		<<set $secBarracksUpkeep += $upgradeUpkeep>>
 		<<goto "secBarracks">>
 	<</link>>
 	<br>//Costs ¤20000 and will allow units to accumulate experience each week.//
diff --git a/src/SecExp/secInit.tw b/src/SecExp/secInit.tw
index c575ffe1d120d074826cce71e312a0bcc9c5e318..f9c7e26e40468f10dc3a385bb96bc3710c32989f 100644
--- a/src/SecExp/secInit.tw
+++ b/src/SecExp/secInit.tw
@@ -19,8 +19,11 @@
 <<set $PClosses = 0>>
 
 /* buildings */
+<<set $upgradeUpkeep = 40>>
 <<set $secHQ = 0>>
+<<set $secHQUpkeep = $facilityCost>>
 <<set $secBarracks = 0>>
+<<set $secBarracksUpkeep = $facilityCost>>
 <<set $secBbarracksUpgrades ={
 	size: 0,
 	luxury: 0,
@@ -47,6 +50,7 @@
 	pathways: 0,
 	rapidVehicles: 0}>>
 <<set $propHub = 0>>
+<<set $propHubUpkeep = $facilityCost>>
 <<set $propCampaign = 0>>
 <<set $propFocus = "none">>
 <<set $miniTruth = 0>>
@@ -79,6 +83,7 @@
 <<set $militiaLoyalty = 0>>
 <<set $slaveArmyLoyalty = 0>>
 <<set $mercLoyalty = 0>>
+<<set $soldierUpkeep = 10>>
 
 /* enhancements and improvements */
 <<set $riskSim = 0>>
@@ -165,80 +170,6 @@
 	equip: 0} >>
 <</if>>
 
-<<if def $militiaUnits>>
-	<<set _mL = $militiaUnits.length>>
-	<<for _i = 0; _i < _mL; _i++>>
-		<<if _i == 0>>
-			<<set $militiaUnits[_i].platoonName = _i + "st citizens' platoon">>
-		<<elseif _i == 1>>
-			<<set $militiaUnits[_i].platoonName = _i + "nd citizens' platoon">>
-		<<elseif _i == 2>>
-			<<set $militiaUnits[_i].platoonName = _i + "rd citizens' platoon">>
-		<<else>>
-			<<set $militiaUnits[_i].platoonName = _i + "th citizens' platoon">>
-		<</if>>
-		<<set $militiaUnits[_i].active = 0>>
-		<<set $militiaUnits[_i].isDeployed = 0>>
-		<<set $militiaUnits[_i].troops = 0>>
-		<<set $militiaUnits[_i].maxTroops = 0>>
-		<<set $militiaUnits[_i].equip = 0>>
-		<<set $militiaUnits[_i].training = 0>>
-		<<set $militiaUnits[_i].loyalty = 0>>
-		<<set $militiaUnits[_i].medics = 0>>
-		<<set $militiaUnits[_i].battlesFought = 0>>
-	<</for>>
-<<else>>
-	<<set $militiaUnits = []>>
-<</if>>
-
-<<if def $slaveUnits>>
-	<<set _sL = $slaveUnits.length>>
-	<<for _i = 0; _i < _sL; _i++>>
-		<<if _i == 0>>
-			<<set $slaveUnits[_i].platoonName = _i + "st slave platoon">>
-		<<elseif _i == 1>>
-			<<set $slaveUnits[_i].platoonName = _i + "nd slave platoon">>
-		<<elseif _i == 2>>
-			<<set $slaveUnits[_i].platoonName = _i + "rd slave platoon">>
-		<<else>>
-			<<set $slaveUnits[_i].platoonName = _i + "th slave platoon">>
-		<</if>>
-		<<set $slaveUnits[_i].active = 0>>
-		<<set $slaveUnits[_i].isDeployed = 0>>
-		<<set $slaveUnits[_i].troops = 0>>
-		<<set $slaveUnits[_i].maxTroops = 0>>
-		<<set $slaveUnits[_i].equip = 0>>
-		<<set $slaveUnits[_i].training = 0>>
-		<<set $slaveUnits[_i].loyalty = 0>>
-		<<set $slaveUnits[_i].medics = 0>>
-		<<set $slaveUnits[_i].battlesFought = 0>>
-	<</for>>
-<<else>>
-	<<set $slaveUnits = []>>
-<</if>>
-
-<<if def $mercUnits>>
-	<<set _meL = $mercUnits.length>>
-	<<for _i = 0; _i < _meL; _i++>>
-		<<if _i == 0>>
-			<<set $mercUnits[_i].platoonName = _i + "st mercenary platoon">>
-		<<elseif _i == 1>>
-			<<set $mercUnits[_i].platoonName = _i + "nd mercenary platoon">>
-		<<elseif _i == 2>>
-			<<set $mercUnits[_i].platoonName = _i + "rd mercenary platoon">>
-		<<else>>
-			<<set $mercUnits[_i].platoonName = _i + "th mercenary platoon">>
-		<</if>>
-		<<set $mercUnits[_i].active = 0>>
-		<<set $mercUnits[_i].isDeployed = 0>>
-		<<set $mercUnits[_i].troops = 0>>
-		<<set $mercUnits[_i].maxTroops = 0>>
-		<<set $mercUnits[_i].equip = 0>>
-		<<set $mercUnits[_i].training = 0>>
-		<<set $mercUnits[_i].loyalty = 0>>
-		<<set $mercUnits[_i].medics = 0>>
-		<<set $mercUnits[_i].battlesFought = 0>>
-	<</for>>
-<<else>>
-	<<set $mercUnits = []>>
-<</if>>
\ No newline at end of file
+<<set $militiaUnits = []>>
+<<set $slaveUnits = []>>
+<<set $mercUnits = []>>
\ No newline at end of file
diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw
index 6752253c108816e5ac368ef1d845c2b8601724ab..7926241c6faacb50cdd532e12e906955ff5b9f7d 100644
--- a/src/SecExp/securityHQ.tw
+++ b/src/SecExp/securityHQ.tw
@@ -85,28 +85,28 @@ Considering the current upgrades the resting level for security is <<print $secR
 <br>
 
 <<if $secUpgrades.nanoCams == 0>>
-	[[Install a nano-camera system |securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secUpgrades.cctvCams = 1, $secRestPoint += 10, $reqHelots += 5]]
+	[[Install a nano-camera system |securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secUpgrades.cctvCams = 1, $secRestPoint += 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed all across the arcology closed circuit nano-cameras to keep the arcology under your watchful eye.
 <</if>>
 <br>
 <<if $secUpgrades.cyberBots == 0>>
-	[[Buy cybersecurity algorithms|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $secUpgrades.cyberBots = 1, $secRestPoint += 10, $reqHelots += 5]]
+	[[Buy cybersecurity algorithms|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $secUpgrades.cyberBots = 1, $secRestPoint += 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(7500*$upgradeMultiplierArcology)>>. Will raise rest point of security by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have bought advanced cybersecurity algorithms that will defend your arcology against hack attempts or cyber frauds.
 <</if>>
 <br>
 <<if $secUpgrades.eyeScan == 0>>
-	[[Install invisible eye scanners|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $secUpgrades.eyeScan = 1, $secRestPoint += 15, $reqHelots += 10]]
+	[[Install invisible eye scanners|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $secUpgrades.eyeScan = 1, $secRestPoint += 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>	
 	You have installed numerous hidden eye scanners that accurately register the movements of everyone inside the arcology.
 <</if>>
 <br>
 <<if $secUpgrades.cryptoAnalyzer == 0>>
-	[[Buy and install crypto analyzers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $secUpgrades.cryptoAnalyzer = 1, $secRestPoint += 15, $reqHelots += 10]]
+	[[Buy and install crypto analyzers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $secUpgrades.cryptoAnalyzer = 1, $secRestPoint += 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will raise rest point of security by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have bought and employed sophisticated crypto analyzing software to accurately track and archive every financial movement or transaction made inside the walls of your arcology.
@@ -118,11 +118,11 @@ Considering the current upgrades the resting level for security is <<print $secR
 /* crime level and upgrades */
 <<if $crime <= 20>>
 	Your crime level (@@.orangered;<<print $crime>>@@) is very low.
-<<elseif $crime <= 40>>
+<<elseif $crime <= $upgradeUpkeep>>
 	Your crime level (@@.orangered;<<print $crime>>@@) is low.
 <<elseif $crime <= 60>>
 	Your crime level (@@.orangered;<<print $crime>>@@) is average.
-<<elseif $crime <= 80>>
+<<elseif $crime <= $upgradeUpkeep>>
 	Your crime level (@@.orangered;<<print $crime>>@@) is high.
 <<else>>
 	Your crime level (@@.orangered;<<print $crime>>@@) is extremely high.
@@ -133,28 +133,28 @@ Considering the current upgrades the maximum level of crime is <<print $crimeCap
 <br>
 
 <<if $crimeUpgrades.advForensic == 0>>
-	[[Install advanced forensic equipment|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $crimeUpgrades.advForensic = 1, $crimeCap -= 10, $reqHelots += 5]]
+	[[Install advanced forensic equipment|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $crimeUpgrades.advForensic = 1, $crimeCap -= 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed advanced forensic equipment, able to extract every bit of precious information from any clue.
 <</if>>
 <br>
 <<if $crimeUpgrades.autoArchive == 0>>
-	[[Install auto-curating archiver|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $crimeUpgrades.autoArchive = 1, $crimeCap -= 10, $reqHelots += 5]]
+	[[Install auto-curating archiver|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $crimeUpgrades.autoArchive = 1, $crimeCap -= 10, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(7500*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 10 points, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed auto-curating archiver software, which will update in real time your data archives with any new relevant information on criminals residing in your arcology. 
 <</if>>
 <br>
 <<if $crimeUpgrades.autoTrial == 0>>
-	[[Install automated trials software|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $crimeUpgrades.autoTrial = 1, $crimeCap -= 15, $reqHelots += 10]]
+	[[Install automated trials software|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $crimeUpgrades.autoTrial = 1, $crimeCap -= 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed advanced legal algorithms that allows the handling of legal matters much quicker and much more accurately.
 <</if>>
 <br>
 <<if $crimeUpgrades.worldProfiler == 0>>
-	[[Install worldwide profilers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $crimeUpgrades.worldProfiler = 1, $crimeCap -= 15, $reqHelots += 10]]
+	[[Install worldwide profilers|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $crimeUpgrades.worldProfiler = 1, $crimeCap -= 15, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will bring down the crime level cap by 15 points, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed advanced profiler software, which will constantly scour every known data archive on the globe (legally or not) to gather as much information as possible on dangerous criminals.
@@ -179,21 +179,21 @@ Considering the current upgrades the maximum level of crime is <<print $crimeCap
 <br>
 
 <<if $intelUpgrades.sensors == 0>>
-	[[Install perimeter	sensors|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $intelUpgrades.sensors = 1, $recon += 1, $reqHelots += 5]]
+	[[Install perimeter	sensors|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $intelUpgrades.sensors = 1, $recon += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<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][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $intelUpgrades.signalIntercept = 1, $recon += 1, $reqHelots += 5]]
+	[[Create signal interception hub|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $intelUpgrades.signalIntercept = 1, $recon += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]
 	<br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed advanced signal interception equipment.
 <</if>>
 <br>
 <<if $intelUpgrades.radar == 0>>
-	[[Install advanced radar equipment|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $intelUpgrades.radar = 1, $recon += 1, $reqHelots += 10]]
+	[[Install advanced radar equipment|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $intelUpgrades.radar = 1, $recon += 1, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will increase recon capabilites, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have installed sophisticated radar equipment.
@@ -218,28 +218,28 @@ Considering the current upgrades the maximum level of crime is <<print $crimeCap
 <br>
 
 <<if $readinessUpgrades.pathways == 0>>
-	[[Build specialized pathways in the arcology|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $readinessUpgrades.pathways = 1, $readiness += 1, $reqHelots += 5]]
+	[[Build specialized pathways in the arcology|securityHQ][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $readinessUpgrades.pathways = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(5000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have built specialized pathways inside the arcology to quickly move troops around the structure.
 <</if>>
 <br>
 <<if $readinessUpgrades.rapidVehicles == 0>>
-	[[Buy rapid armored transport vehicles|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $readinessUpgrades.rapidVehicles = 1, $readiness += 1, $reqHelots += 5]]
+	[[Buy rapid armored transport vehicles|securityHQ][$cash -= Math.trunc(7500*$upgradeMultiplierArcology), $readinessUpgrades.rapidVehicles = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(75000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have bought rapid armored transport vehicles able to bring your troops to battle much quicker than before.
 <</if>>
 <br>
 <<if $readinessUpgrades.rapidPlatforms == 0>>
-	[[Build rapid deployment platforms|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $readinessUpgrades.rapidPlatforms = 1, $readiness += 1, $reqHelots += 5]]
+	[[Build rapid deployment platforms|securityHQ][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $readinessUpgrades.rapidPlatforms = 1, $readiness += 1, $reqHelots += 5, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 5 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have built rapid deployment platforms able to equip and deploy units within very limited time windows.
 <</if>>
 <br>
 <<if $readinessUpgrades.earlyWarn == 0>>
-	[[Institute early warning systems|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $readinessUpgrades.earlyWarn = 1, $readiness += 1, $reqHelots += 10]]
+	[[Institute early warning systems|securityHQ][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $readinessUpgrades.earlyWarn = 1, $readiness += 1, $reqHelots += 10, $secHQUpkeep += $upgradeUpkeep]]
 	<br>//Costs ¤<<print Math.trunc(15000*$upgradeMultiplierArcology)>>. Will increase readiness, but will require 10 extra slaves in the headquarters and increases upkeep.//
 <<else>>
 	You have created early warning systems that constantly analyze in real time data to determine the likeness of an attack.
diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw
index b2049889d2ea7679947c2332325b8a4bd2870278..c88c206b7bd955c90475e1bfa7bbc8c62925f4d8 100644
--- a/src/js/economyJS.tw
+++ b/src/js/economyJS.tw
@@ -19,8 +19,14 @@ window.getCost = function(array) {
 	var dairy = State.variables.dairy;
 	var servantsQuarters = State.variables.servantsQuarters;
 	var incubator = State.variables.incubator;
+	var propHQ = State.variables.propHub;
+	var secHQ = State.variables.secHQ;
+	var secBarracks = State.variables.secBarracks;
 	var mercCosts = State.variables.mercenaries * 2000;
 	var policyCost = State.variables.policyCost;
+	var militia = State.variables.militiaUnits;
+	var slaves = State.variables.slaveUnits;
+	var mercs = State.variables.mercUnits;
 	var costs = (State.variables.brothel * facilityCost)
 		+ (State.variables.arcade * facilityCost * 0.5)
 		+ (State.variables.club * facilityCost)
@@ -61,6 +67,32 @@ window.getCost = function(array) {
 		costs += 1000;
 	}
 	
+	//security expansion
+	if(propHQ > 0) {
+		costs += State.variables.propHubUpkeep;
+	}
+	if(secHQ > 0) {
+		costs += State.variables.secHQUpkeep + 20 * state.variables.secHelots;
+	}
+	if(secBarracks > 0) {
+		costs += State.variables.secBarracksUpkeep;
+	}
+	for (var i = 0; i < militia.length; i++) {
+		if( !(militia[i] === null) ){
+			costs += militia[i].troops * State.variables.soldierUpkeep;
+		}
+	}
+	for (var i = 0; i < slaves.length; i++) {
+		if( !(slaves[i] === null) ){
+			costs += slaves[i].troops * State.variables.soldierUpkeep * 0.5;
+		}
+	}
+	for (var i = 0; i < mercs.length; i++) {
+		if( !(mercs[i] === null) ){
+			costs += mercs[i].troops * State.variables.soldierUpkeep * 1.5;
+		}
+	}
+	
 	//general arcology costs
 	costs += (State.variables.girls * (250 + (economy * 500)));
 	
diff --git a/src/uncategorized/costs.tw b/src/uncategorized/costs.tw
index 129146db73d129a981defee0344e1f15c6ed95e9..64c60fec69cd064c77378f1c589a098056105c00 100644
--- a/src/uncategorized/costs.tw
+++ b/src/uncategorized/costs.tw
@@ -32,6 +32,30 @@
 	<<set $costs -= 500>>
 <</if>>
 
+/* security expansion */
+<<if $propHub != 0>>
+	<<set $costs += $propHubUpkeep>>
+<</if>>
+<<if $secHQ != 0>>
+	<<set $costs += ($secHQUpkeep)+(20*$secHelots)>>
+<</if>>
+<<if $secBarracks != 0>>
+	<<set $costs += $secBarracksUpkeep>>
+<</if>>
+
+<<set _mL = $militiaUnits.length>>
+<<for _i = 0; _i < _mL; _i++>>
+	<<set $costs += $militiaUnits[_i].troops*$soldierUpkeep>>
+<</for>>
+<<set _sL = $slaveUnits.length>>
+<<for _i = 0; _i < _sL; _i++>>
+	<<set $costs += $militiaUnits[_i].troops*$soldierUpkeep*0.5>>
+<</for>>	
+<<set _meL = $mercUnits.length>>
+<<for _i = 0; _i < _meL; _i++>>
+	<<set $costs += $militiaUnits[_i].troops*$soldierUpkeep*1.5>>
+<</for>>
+
 <<set $costs += $citizenOrphanageTotal*100>>
 <<set $costs += $privateOrphanageTotal*500>>
 <<if $breederOrphanageTotal > 0>>
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 6b931f3aa5475b2b09088beaafefcdb0ad745226..aba839b9c692937101beb64f16274957f7751b9d 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -94,6 +94,31 @@
 		<<if $researchLab.menials != 0>>&nbsp;__Menial slaves__: ¤<<print (100*$researchLab.menials)>><</if>>
 	<</if>>
 <</if>>
+
+/* security expansion */
+<<if $propHub != 0>>
+	<br>__Propaganda Hub__ maintenance: ¤<<print $propHubUpkeep>>
+<</if>>
+<<if $secHQ != 0>>
+	<br>__Security Headquarters__ maintenance: ¤<<print ($secHQUpkeep)+(20*$secHelots)>>
+<</if>>
+<<if $secBarracks != 0>>
+	<br>__Barracks__ maintenance: ¤<<print $secBarracksUpkeep>>
+<</if>>
+
+<<set _mL = $militiaUnits.length>>
+<<for _i = 0; _i < _mL; _i++>>
+	<br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep>>
+<</for>>
+<<set _sL = $slaveUnits.length>>
+<<for _i = 0; _i < _sL; _i++>>
+	<br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep*0.5>>
+<</for>>	
+<<set _meL = $mercUnits.length>>
+<<for _i = 0; _i < _meL; _i++>>
+	<br>__<<print $militiaUnits[_i].platoonName>>__ upkeep: ¤<<print $militiaUnits[_i].troops*$soldierUpkeep*1.5>>
+<</for>>
+
 <<if $FSSpending != 0>>
 	<br>__Society Shaping__ expenses: ¤$FSSpending
 <</if>>