diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js
index 823ba44a6101232d754af721a5b85db845e3e847..fe70f9f725f05e12ade016aa225fe5d6967f5008 100644
--- a/src/Mods/SecExp/js/secExp.js
+++ b/src/Mods/SecExp/js/secExp.js
@@ -252,9 +252,7 @@ App.SecExp.upkeep = (function() {
 			value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.crime).reduce((a, b) => a + b);
 			value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.readiness).reduce((a, b) => a + b);
 			value += upgrade * Object.values(V.SecExp.buildings.secHub.upgrades.intel).reduce((a, b) => a + b);
-			if (V.SecExp.edicts.SFSupportLevel >= 5) {
-				value += 1000;
-			}
+			value += V.SecExp.edicts.SFSupportLevel >= 5 ? 1000 : 0;
 		}
 		if (V.SecExp.buildings.barracks) {
 			value += base + upgrade* Object.values(V.SecExp.buildings.barracks).reduce((a, b) => a + b);
@@ -296,7 +294,7 @@ App.SecExp.battle = (function() {
 	function deployedUnits(input = '') {
 		let bots = 0, militiaC = 0, slavesC = 0, mercsC = 0, init = 0;
 		if (V.slaveRebellion !== 1 && V.citizenRebellion !== 1) { // attack
-			if(V.secBots.isDeployed > 0) {
+			if (V.secBots.isDeployed > 0) {
 				bots++;
 			}
 			if (V.SF.Toggle && V.SF.Active >= 1 && V.SFIntervention) {
@@ -307,13 +305,13 @@ App.SecExp.battle = (function() {
 			slavesC += V.slaveUnits.filter((u) => u.isDeployed === 1).length;
 			mercsC += V.mercUnits.filter((u) => u.isDeployed === 1).length;
 		} else { // rebellion
-			if(V.secBots.active > 0) {
+			if (V.secBots.active > 0) {
 				bots++;
 			}
 			if (V.SF.Toggle && V.SF.Active >= 1) {
 				init++;
 			}
-			if(V.irregulars > 0) {
+			if (V.irregulars > 0) {
 				militiaC++;
 			}
 
@@ -324,13 +322,13 @@ App.SecExp.battle = (function() {
 
 		if(input === '') {
 			return bots+militiaC+slavesC+mercsC+init;
-		} else if(input === 'bots') {
+		} else if (input === 'bots') {
 			return bots;
-		} else if(input === 'militia') {
+		} else if (input === 'militia') {
 			return militiaC;
-		} else if(input === 'slaves') {
+		} else if (input === 'slaves') {
 			return slavesC;
-		} else if(input === 'mercs') {
+		} else if (input === 'mercs') {
 			return mercsC;
 		}
 	}
@@ -406,35 +404,32 @@ App.SecExp.battle = (function() {
 	 */
 	function deployableUnits() {
 		let init = 2 * App.SecExp.battle.deploySpeed();
-		if(V.secBots.isDeployed > 0) {
+		if (V.secBots.isDeployed > 0) {
 			init--;
 		}
 
 		const Militia = V.militiaUnits.length;
-		for(let i = 0; i < Militia; i++) {
-			if(V.militiaUnits[i].isDeployed > 0) {
+		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) {
+		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) {
+		for (let i = 0; i < Mercs; i++) {
+			if (V.mercUnits[i].isDeployed > 0) {
 				init--;
 			}
 		}
 
-		if(init < 0) {
-			init = 0;
-		}
-		return init;
+		return Math.max(0, init);
 	}
 
 	/** Get total active units
@@ -448,15 +443,14 @@ App.SecExp.battle = (function() {
 	 * @returns {number}
 	 */
 	function maxUnits() {
+		let max = 0;
 		if (V.SecExp.buildings.barracks) {
-			let max = 8 + (V.SecExp.buildings.barracks.size * 2);
+			max = 8 + (V.SecExp.buildings.barracks.size * 2);
 			if(App.SecExp.battle.deploySpeed() === 10) {
 				max += 2;
 			}
-			return max;
-		} else {
-			return 0;
 		}
+		return max;
 	}
 
 	/** Get recon score (scale 0-3)
@@ -484,11 +478,8 @@ App.SecExp.battle = (function() {
 		} else {
 			cost = 30000 + baseBribePerAttacker * V.attackTroops;
 		}
-		if (V.majorBattle > 0) {
-			cost *= 3;
-		}
-		cost = Math.trunc(Math.clamp(cost, 0, 1000000));
-		return cost;
+		cost *= V.majorBattle > 0 ? 3 : 1;
+		return Math.trunc(Math.clamp(cost, 0, 1000000));
 	}
 })();
 
@@ -583,12 +574,8 @@ App.SecExp.Check = (function() {
 			if (V.SecExp.buildings.secHub.upgrades.readiness.earlyWarn === 1) {
 				Req += 10;
 			}
-			if (V.SecExp.edicts.SFSupportLevel >= 1) {
-				Req -= 5 * V.SecExp.edicts.SFSupportLevel;
-			}
-			if (V.SecExp.buildings.secHub.coldstorage >= 1) {
-				Req -= 10 * V.SecExp.buildings.secHub.coldstorage;
-			}
+			Req -= 5 * V.SecExp.edicts.SFSupportLevel;
+			Req -= 10 * V.SecExp.buildings.secHub.coldstorage;
 		}
 		return Req;
 	}
diff --git a/src/Mods/SecExp/securityReport.tw b/src/Mods/SecExp/securityReport.tw
index ea45546ebdbbacea135bae3bf173ad313249ea78..c1db669cabda57deb23959b57167d31db3f1803a 100644
--- a/src/Mods/SecExp/securityReport.tw
+++ b/src/Mods/SecExp/securityReport.tw
@@ -186,16 +186,12 @@
 	<<if $SecExp.edicts.SFSupportLevel >= 1>>
 		Providing your Security Department with equipment from $SF.Lower slightly boosts the security of your arcology.
 	<</if>>
-	<<if $SecExp.edicts.SFSupportLevel >= 1>>
-		<<set _secGrowth *= 1+($SecExp.edicts.SFSupportLevel/10)>>
-	<</if>>
+	<<set _secGrowth *= 1+($SecExp.edicts.SFSupportLevel/10)>>
 <</if>>
 
 /* resting point */
-<<set _secRest = App.SecExp.Check.secRestPoint() * $SecExp.buildings.secHub ? (Math.clamp($SecExp.buildings.secHub.menials,0,App.SecExp.Check.reqMenials()) / App.SecExp.Check.reqMenials()) : 1>>
-<<if _secRest < 0>>
-	<<set _secRest = 20>>
-<</if>>
+<<set _secRest = App.SecExp.Check.secRestPoint() * (Math.clamp($SecExp.buildings.secHub ? $SecExp.buildings.secHub.menials : 0 ,0 , App.SecExp.Check.reqMenials()) / App.SecExp.Check.reqMenials())>>
+<<if _secRest < 0>> <<set _secRest = 20>> <</if>>
 <<if _secRest < App.SecExp.Check.reqMenials() && $SecExp.buildings.secHub>>
 	The limited staff assigned to the HQ hampered the improvements to security achieved this week.
 <<elseif _secRest < App.SecExp.Check.reqMenials()>>
@@ -214,9 +210,7 @@ The security level of the arcology is
 	<<set _secGrowth *= 0.3>>
 <<else>>
 	near its effective resting point, this severely limits the influence of external factors on the change achievable this week.
-	<<if _secGrowth < 0>>
-		<<set _secGrowth *= 0.3>>
-	<</if>>
+	<<if _secGrowth < 0>> <<set _secGrowth *= 0.3>> </if>>
 <</if>>
 <<set _restGrowth = (_secRest - $SecExp.core.security) * 0.2>>
 <<set _newSec = Math.trunc($SecExp.core.security + _secGrowth + _restGrowth)>>
@@ -318,7 +312,7 @@ Due to the deterioration of the old world countries, organized crime focuses mor
 <</if>>
 
 /* crime cap */
-<<set _crimeCap = Math.trunc(Math.clamp(App.SecExp.Check.crimeCap() + (App.SecExp.Check.crimeCap() - App.SecExp.Check.crimeCap() * $SecExp.buildings.secHub ? ($SecExp.buildings.secHub.menials / App.SecExp.Check.reqMenials()) : 0),0,100))>>
+<<set _crimeCap = Math.trunc(Math.clamp(App.SecExp.Check.crimeCap() + (App.SecExp.Check.crimeCap() - App.SecExp.Check.crimeCap() * ($SecExp.buildings.secHub ? $SecExp.buildings.secHub.menials : 0 / App.SecExp.Check.reqMenials())), 0, 100))>>
 <<if _crimeCap > App.SecExp.Check.crimeCap() && $SecExp.buildings.secHub>>
 	The limited staff assigned to the HQ allows more space for criminals to act.
 <</if>>