diff --git a/src/Corporation/corporate-divisionBase.js b/src/Corporation/corporate-divisionBase.js
index 2e840b48f80c94e3e3a02558747df262728dcd4d..2951cc8ebfb68ca0c76a3c88af531c191de9b61a 100644
--- a/src/Corporation/corporate-divisionBase.js
+++ b/src/Corporation/corporate-divisionBase.js
@@ -4,6 +4,7 @@ App.Corporate.Init_DivisionBase = function(shared) {
         constructor({id, name, focusDescription, sizeCost, maintenance, founding, merger}) {
             this._const = {};
             this._const.id = id;
+            this._const.corpId = `corpDiv${capFirstChar(id)}`;
             this._const.cost = sizeCost;
             this._const.name = name;
             this._const.focusDescription = focusDescription;
@@ -198,8 +199,7 @@ App.Corporate.Init_DivisionBase = function(shared) {
         }
 
         //private helpers
-        get corpDiv() { return `corpDiv${this._const.id}`; }
-        getStored(key       ) { return V[this.corpDiv + key];  }
-        setStored(key, value) { V[this.corpDiv + key] = value; }
+        getStored(key       ) { return V[this._const.corpId + key];  }
+        setStored(key, value) { V[this._const.corpId + key] = value; }
     };
 }
diff --git a/src/Corporation/corporate.js b/src/Corporation/corporate.js
index 15d2135c865cbc1949f006e006329dd1360341c5..9a8b10438e6e6f7918885a7a63d49d0faf0d0699 100644
--- a/src/Corporation/corporate.js
+++ b/src/Corporation/corporate.js
@@ -63,41 +63,84 @@ App.Corporate.Init = function() {
             this.suffix = suffix;
             this.clear();
         }
-        get operations(     )  { return this.getStored('OpCost'            ); }
-        set operations(value)  { return this.setStored('OpCost'     , value); }
+        get operations(     )     { return this.getStored('OpCost'              ); }
+        set operations(value)     { return this.setStored('OpCost'       , value); }
 
-        get revenue(     )     { return this.getStored('Rev'               ); }
-        set revenue(value)     { return this.setStored('Rev'        , value); }
+        get localRevenue(     )   { return this.getStored('Rev'                 ); }
+        set localRevenue(value)   { return this.setStored('Rev'          , value); }
 
-        get development(     ) { return this.getStored('AssetsDev'         ); }
-        set development(value) { return this.setStored('AssetsDev'  , value); }
+        get development(     )    { return this.getStored('AssetsDev'           ); }
+        set development(value)    { return this.setStored('AssetsDev'    , value); }
 
-        get slaves(     )      { return this.getStored('AssetsSlave'       ); }
-        set slaves(value)      { return this.setStored('AssetsSlave', value); }
+        get slaves(     )         { return this.getStored('AssetsSlave'         ); }
+        set slaves(value)         { return this.setStored('AssetsSlave'  , value); }
 
-        get overhead(     )    { return this.getStored('Overhead'          ); }
-        set overhead(value)    { return this.setStored('Overhead'   , value); }
+        get overhead(     )       { return this.getStored('Overhead'            ); }
+        set overhead(value)       { return this.setStored('Overhead'     , value); }
+
+        get economicBoost(     )  { return this.getStored('EconBonus'           ); }
+        set economicBoost(value)  { return this.setStored('EconBonus'    , value); }
+
+        get economy(     )        { return this.getStored('Econ'           ); }
+        set economy(value)        { return this.setStored('Econ'    , value); }
+
+        get foreignRevenue(     ) { return this.getStored('NeighborBonus'       ); }
+        set foreignRevenue(value) { return this.setStored('NeighborBonus', value); }
 
         copy(ledger) {
-            this.operations  = ledger.operations;
-            this.revenue     = ledger.revenue;
-            this.development = ledger.development;
-            this.slaves      = ledger.slaves;
-            this.overhead    = ledger.overhead;
+            this.operations     = ledger.operations;
+            this.localRevenue   = ledger.localRevenue;
+            this.foreignRevenue = ledger.foreignRevenue;
+            this.development    = ledger.development;
+            this.slaves         = ledger.slaves;
+            this.overhead       = ledger.overhead;
+            this.economicBoost  = ledger.economicBoost;
+            this.economy        = ledger.economy;
         }
         clear() {
-            this.operations  = 0;
-            this.revenue     = 0;
-            this.development = 0;
-            this.slaves      = 0;
-            this.overhead    = 0;
+            this.operations     = 0;
+            this.localRevenue   = 0;
+            this.foreignRevenue = 0;
+            this.development    = 0;
+            this.slaves         = 0;
+            this.overhead       = 0;
+            this.economicBoost  = 0;
+            this.economy        = 0;
+        }
+        release() {
+            this.deleteStored('OpCost');
+            this.deleteStored('Rev');
+            this.deleteStored('AssetsDev');
+            this.deleteStored('AssetsSlave');
+            this.deleteStored('Overhead');
+            this.deleteStored('EconBonus');
+            this.deleteStored('Econ');
+            this.deleteStored('NeighborBonus');
+        }
+        get profit() {
+            return this.revenue + this.economicBoost
+                 - this.development - this.slaves - this.overhead - this.operations;
+        }
+        get revenue() {
+            return this.localRevenue + this.foreignRevenue;
+        }
+        setEconomy(economy) {
+            this.economy = economy;
+
+            //NOTE: Set economicBoost to 0 so it doesn't affect this.profit!
+            this.economicBoost = 0; // <-- DO NOT delete
+            this.economicBoost = Math.trunc(this.profit * (economy - 100) / 100);
         }
+        //private access
         getStored(key) {
             return this.corp.getStored(key + this.suffix);
         }
         setStored(key, value) {
             return this.corp.setStored(key + this.suffix, value);
         }
+        deleteStored(key){
+            this.corp.deleteStored(key + this.suffix);
+        }
     };
     const WeekProcessingEffeciencyLine = class {
         constructor() {
@@ -248,6 +291,10 @@ App.Corporate.Init = function() {
             this._var.divisions = {};
             this._var.maintenanceCategories = {};
             this._var.operatingCost = 0;
+            this._var.canExpandNow = false;
+            this._var.canSpecializeNow = false;
+            this._var.dividend = 0;
+            this._var.payout = 0;
         }
 
         getDivision(division) {
@@ -292,6 +339,19 @@ App.Corporate.Init = function() {
             }
             return Math.trunc(retval);
         }
+        get canExpandNow() { return this._var.canExpandNow; }
+        set canExpandNow(value) { this._var.canExpandNow = value; }
+
+        get hasDividend() { return this._var.dividend > 0; }
+        get dividend() { return this._var.dividend; }
+        set dividend(value) { this._var.dividend = value; }
+
+        get hasPayout() { return this._var.payout > 0; }
+        get payout() { return this._var.payout; }
+        set payout(value) { return this._var.payout; }
+
+        get canSpecializeNow() { return this._var.canSpecializeNow; }
+        set canSpecializeNow(value) { this._var.canSpecializeNow = value; }
     }
     App.Corporate.Division = {};
     const shared = {
@@ -415,8 +475,9 @@ App.Corporate.Init = function() {
         if(_.isObject(division)) return division;
         return App.Corporate.divisions[division];
     }
-    App.Corporate.getStored = function(key       ) { return V[`corp${key}`];  }
-    App.Corporate.setStored = function(key, value) { V[`corp${key}`] = value; }
+    App.Corporate.getStored    = function(key       ) { return V[`corp${key}`];  }
+    App.Corporate.setStored    = function(key, value) { V[`corp${key}`] = value; }
+    App.Corporate.deleteStored = function(key       ) { delete V[`corp${key}`];  }
 
     //Integer properties starting with corp
     const propertyToStoryInt = {
@@ -424,6 +485,8 @@ App.Corporate.Init = function() {
         numDivisions: 'Div',
         foundedDate: 'Founded',
         dividend: "Dividend",
+        specializations: "Spec",
+        specializationTokens: "SpecToken",
         specializationTimer: "SpecTimer",
     }
     for(const property in propertyToStoryInt) {
@@ -467,6 +530,10 @@ App.Corporate.Init = function() {
         get: function(     ) { return V.dividendRatio ;        },
         set: function(value) {        V.dividendRatio = value; }
     });
+    Object.defineProperty(App.Corporate, "dividendTimer", {
+        get: function(     ) { return V.dividendTimer ;        },
+        set: function(value) {        V.dividendTimer = value; }
+    });
     Object.defineProperty(App.Corporate, "payoutAfterCash", {
         get: function() {
             return Math.max(Math.trunc(this.payoutCorpValueMultiplier * this.value), this.payoutMinimumCash);
@@ -478,6 +545,7 @@ App.Corporate.Init = function() {
         set personal(value) {        V.personalShares = value; }
         get public()        { return V.publicShares   ;        }
         set public(value)   {        V.publicShares   = value; }
+        get total()         { return this.personal + this.public; }
     };
     App.Corporate.shares = new SharesType();
     App.Corporate.ledger = {
@@ -490,6 +558,10 @@ App.Corporate.Init = function() {
         clear: function() {
             this.old.clear();
             this.current.clear();
+        },
+        release: function() {
+            this.old.release();
+            this.current.release();
         }
     };
     App.Corporate.foundingCostToPlayer = function(division, personalShares, publicShares) {
@@ -531,9 +603,10 @@ App.Corporate.Init = function() {
         this.numDivisions = 0;
         this.expansionTokens = 0;
         this.setStored("Expand", 0);
-        this.setStored("Spec", 0);
-        this.setStored("SpecToken", 0);
+        this.specializations = 0;
+        this.specializationTokens = 0;
         this.setStored("SpecRaces", []);
+        this.ledger.release();
 
         // Some of these will need to be refactored into App.Corporate.Specialization
         const toDelete = [
@@ -542,15 +615,6 @@ App.Corporate.Init = function() {
             "publicShares",
             "corpDividend",
             "dividendTimer",
-            "corpRev",
-            "corpRevOld",
-            "corpAssetsDev",
-            "corpAssetsDevOld",
-            "corpAssetsSlave",
-            "corpAssetsSlaveOld",
-            "corpOverheadOld",
-            "corpOpCostOld",
-            "corpProfitOld",
             "corpSpecAccent",
             "corpSpecAge",
             "corpSpecAmputee",
@@ -590,17 +654,37 @@ App.Corporate.Init = function() {
     };
     App.Corporate.chargeAsset = function(cost, type) {
         if(!Number.isFinite(cost)) throw "The cost provided was not a real number";
-        if(!type in this.ledger.current) throw `Ledger doesn't record '${type}' category.`;
+        cost = Math.trunc(cost);
+        if(!(type in this.ledger.current)) throw `Ledger doesn't record '${type}' category.`;
         if(cost == 0) return;
 
         this.ledger.current[type] += cost;
         this.cash -= cost;
     };
-    App.Corporate.earnRevenue = function(cost) {
-        if(!Number.isFinite(cost)) throw "The cost provided was not real"
-        this.ledger.current.revenue += cost;
+    App.Corporate.earnRevenue = function(cost, locality) {
+        if(!Number.isFinite(cost)) throw "The cost provided was not real";
+        cost = Math.trunc(cost);
+        let current = this.ledger.current;
+        let key = `${locality}Revenue`;
+        if(!(key in current)) throw `Unknown locality '${locality}'`;
+        current[key] += cost;
         this.cash += cost;
     };
+    App.Corporate.chargeDividend = function(cost, weekLedger) {
+        if(!Number.isFinite(cost)) throw "The cost provided was not real";
+        cost = Math.trunc(cost);
+        if(weekLedger == null) {
+            debugger;
+            throw "No weekLedger provided";
+        }
+        this.dividend += cost;
+        this.cash -= cost;
+        weekLedger.dividend += cost;
+    }
+    App.Corporate.creditEconomy = function() {
+        this.ledger.current.setEconomy(V.localEcon);
+        this.cash += this.ledger.current.economicBoost;
+    }
     /* Need to prevent skipping intermediaries if they exist, ie break->surgery->train, you can skip surgery only if you don't have it.*/
     App.Corporate.ownsIntermediaryDivision = function(fromDivision, toDivision) {
         for(let intermediateDiv of toDivision.relatedDivisions
@@ -644,7 +728,7 @@ App.Corporate.Init = function() {
         if(division.heldSlaves < count) { throw "Attempted to sell more slaves than held."; }
 
         let sellPrice = this.slaveMarketSellValue(division, count);
-        this.earnRevenue(sellPrice);
+        this.earnRevenue(sellPrice, "local");
         division.heldSlaves -= count;
         V.menialDemandFactor -= count;
         return sellPrice;
@@ -692,6 +776,34 @@ App.Corporate.Init = function() {
         division = asDivision(division);
         division.setAutoBuyFromMarket(value);
     };
+    App.Corporate.calculateDividend = function(weekLedger)
+    {
+        let profit = this.ledger.current.profit;
+        if(this.dividendRatio > 0 && profit > 0)
+        {
+            this.chargeDividend(profit * this.dividendRatio, weekLedger);
+        }
+        //Payout leftover cash should be the last thing the corporation does
+        //in a week so that its cash will be at the payout amount.
+        if(this.payoutCash)
+        {
+            let payoutAfter = this.payoutAfterCash;
+            if(this.cash > payoutAfter)
+            {
+                this.chargeDividend(this.cash - payoutAfter, weekLedger);
+            }
+        }
+
+        if(this.dividendTimer <= 1)
+        {
+            weekLedger.payout = Math.trunc(this.dividend * this.shares.personal / this.shares.total);
+            cashX(weekLedger.payout, "stocks");
+            this.dividendTimer = 14;//13 for each quarter, but +1 because we're subtracting one below.
+            this.dividend = 0;
+        }
+
+        this.dividendTimer--;
+    };
     App.Corporate.endWeek = function() {
         let ledger = new WeekProcessingLedger();
         //Prepare requests
@@ -710,11 +822,11 @@ App.Corporate.Init = function() {
             div.endWeek_Market(divLedger);
         }
         this.chargeAsset(ledger.operatingCost, "operations");
-        this.cash -= ledger.overhead;
+        this.chargeAsset(ledger.overhead, "overhead");
         //Execute sales requests, transfers, and earned revenue
         for(let divLedger of Object.values(ledger.divisionLedgers)) {
             let div = divLedger.division;
-            this.earnRevenue(divLedger.revenue.value);
+            this.earnRevenue(divLedger.revenue.value, "local");
             if(div.activeSlaves > 0)
             {
                 shared.SellOverflowSlaves(div);
@@ -766,6 +878,29 @@ App.Corporate.Init = function() {
             }
             divLedger.market.finalPurchase = this.buySlaves(div, divLedger.market.buy);
         }
+        this.creditEconomy();
+
+        if(this.numDivisions < this.divisionList.length && !this.canExpand)
+        {
+            let expansionValue = Math.trunc(Math.pow(this.numDivisions, 1.5) + (5 * this.numDivisions + 2) / 4);
+            if(this.value > expansionValue * 1000000)
+            {
+                ledger.canExpandNow = true;
+                this.canExpand = true;
+            }
+        }
+        let specializationExpansion = 1.6 * Math.pow(1.25, this.specializations) - 1.2;
+        if(this.value > specializationExpansion * 1000000){
+            this.specializationTokens++;
+            this.specializations++;
+            ledger.canSpecializeNow = true;
+        }
+        if(this.specializationTimer > 0)
+        {
+            this.specializationTime--;
+        }
+        this.calculateDividend(ledger);
+
         return ledger;
     };
     App.Corporate.cheatCash = function(userCash) {
@@ -777,7 +912,8 @@ App.Corporate.Init = function() {
     }
 
     App.Corporate.Backcompat = function(){
-        // Currently everything is compatible
+        //current foreignRevenue used to be used for old foreignRevenue
+        App.Corporate.ledger.old.foreignRevenue = App.Corporate.ledger.current.foreignRevenue;
     };
 
     if(V.corpDivTrainSurgeryTimer !== undefined) {
diff --git a/src/Corporation/corporateWidgets.tw b/src/Corporation/corporateWidgets.tw
new file mode 100644
index 0000000000000000000000000000000000000000..1cefcb6b16c09cdc8329eecdadc04a3ae98e8df5
--- /dev/null
+++ b/src/Corporation/corporateWidgets.tw
@@ -0,0 +1,84 @@
+:: corporate widgets [widget nobr]
+
+/*
+Usage:
+<<CorporateLedger _ledger $week>>
+
+    _ledger: One of the members of App.Corporate.ledger, such as .current or .old
+    $week: The current week or the previous week, depending on wether you used current or old.
+*/
+<<widget "CorporateLedger">>
+<table class="corporate">
+<thead>
+<tr><th colspan="2">Ledger for <<= asDateString($args[1]) >> - <<= asDateString($args[1] + 1, -1) >></th></tr>
+</thead>
+<tbody>
+/*Returns last week's revenue, gets calculated in corporationDevelopments, but slaves sold here also added to it for next week*/
+<tr><td>Revenue</td><td><<= cashFormatColor($args[0].revenue)>></td></tr>
+<<if ($cheatMode) && ($cheatModeM) && App.Corporate.foreignRevenue > 0>>
+    <tr><td>Including Neighbor Bonus</td><td><<= cashFormatColor($args[0].foreignRevenue)>></td></tr>
+<</if>>
+/*Just like revenue, except for operating expenses (all calculated in corporationDevelopments)*/
+<tr><td>Operating Expenses</td><td><<= cashFormatColor($args[0].operations, true)>></td></tr>
+/*buying slaves to work on adds to this expense, works just like revenue*/
+<tr><td>Slave Expenses</td><td><<= cashFormatColor($args[0].slaves, true)>></td></tr>
+/*costs associated with expanding divisions end up here, reports costs from last week, not current*/
+<tr><td>Asset Expenses</td><td><<= cashFormatColor($args[0].development, true)>></td></tr>
+<<if ($cheatMode) && ($cheatModeM)>>
+    <tr>
+        <td>Economic <<if $args[0].economicBoost < 0>>Expenses<<else>>Windfall<</if>></td>
+        <td><<= cashFormatColor($args[0].economicBoost)>></td>
+    </tr>
+<</if>>
+<tr><td>Overhead</td><td><<= cashFormatColor($args[0].overhead, true)>></td></tr>
+<tr><td>Profit</td><td>
+<div><<= cashFormatColor($args[0].profit)>></div>
+<<if $args[0].economicBoost > 0>>
+<div class="note">
+    <<if $args[0].economy > 100>>
+        * Profits benefited from a strong economy.
+    <<elseif $args[0].economy > 60>>
+        * Profits were lowered by the weak economy.
+    <<else>>
+        * Profits were severely depressed by the failing economy.
+    <</if>>
+</div>
+<</if>>
+</td></tr>
+</tbody>
+<thead>
+<tr><th colspan="2">Totals</th></tr>
+</thead>
+<tbody>
+<tr>
+    <td>Liquidity</td>
+    <td>
+    <<if ($cheatMode) && ($cheatModeM)>>
+        <span id="corpCash"><<= cashFormatColor(App.Corporate.cash)>></span>
+        <<set _TcorpCash = App.Corporate.cash>>
+        <<textbox "_TcorpCash" _TcorpCash>>
+        <<link "Apply">>
+        <<set App.Corporate.cheatCash(_TcorpCash)>>
+        <<replace "#corpCash">><<= cashFormatColor(App.Corporate.cash)>><</replace>>
+        <</link>>
+    <<else>>
+        <<= cashFormatColor(App.Corporate.cash)>>
+    <</if>>
+    </td>
+</tr>
+<tr><td>Corporate Value</td><td><<= cashFormatColor(App.Corporate.value)>></td></tr>
+<tr>
+<td>Dividend for Payout</td>
+<td>
+<div><<= cashFormatColor(App.Corporate.dividend)>></div>
+<div class="note">Pays out on <<=asDateString($args[1] + App.Corporate.dividendTimer, -1)>>, <<if App.Corporate.dividendTimer == 1>>
+    the end of this week
+<<else>>
+    in <<= App.Corporate.dividendTimer >> weeks
+<</if>>
+</div>
+</td></tr>
+</tbody>
+</table>
+
+<</widget>>
diff --git a/src/Corporation/corporationDevelopments.tw b/src/Corporation/corporationDevelopments.tw
index 3bdad3f57e3fdc3a8a90c87750fedb7caef90910..a63df211aca26f3cc16527157db1c7762580bf1f 100644
--- a/src/Corporation/corporationDevelopments.tw
+++ b/src/Corporation/corporationDevelopments.tw
@@ -5,12 +5,9 @@
 <<if App.Corporate.cash < 0>>
     <<set App.Corporate.cash = Math.trunc(App.Corporate.cash * 1.02)>> /*2% weekly interest rate on negative cash*/
 <</if>>
-<<set _corpOpCost = 0,
-_corpRev = 0,
-_corpAssetsSlave = 0>>
 
-__Corporation Management__
-<br>''Operational Results''
+<h1>Corporation Management</h1>
+<h2>Operational Results</h2>
 /*Divisions doing their thing*/
 <<set _weekLedger = App.Corporate.endWeek()>>
 /* TODO: I would like to move some of the following loop into a new loop. It should go Process -> Transfer -> Sell -> Buy (most expensive to least) to give the best chance of auto-buy having enough money to make purchases. */
@@ -56,116 +53,41 @@ __Corporation Management__
 <</for>>
 
 /*Aggregate Corporation Results*/
-<br><br>''Aggregate Results''
-<<set _corpOverhead = _weekLedger.overhead>>
-
-/*cash, rev and costs state variables get corrected here*/
-<<set _corpOpCost = _weekLedger.operatingCost
-    , _corpProfitProvisional = $corpRev - ($corpAssetsDev + $corpAssetsSlave + _corpOpCost + _corpOverhead)>>
-<<if _corpProfitProvisional > 0>>
-    <<set $corpEcon = Math.trunc(_corpProfitProvisional / (100 / $localEcon) - _corpProfitProvisional),
-    $corpCash += $corpEcon,
-    $corpProfitOld = _corpProfitProvisional + $corpEcon>> /*this is probably the best place for the economy to show itself, the rest is finnicky enough as is*/
-<<else>>
-    <<set $corpProfitOld = _corpProfitProvisional>>
-<</if>>
-<br>Revenue: @@.yellowgreen;<<print cashFormat($corpRev)>>@@
-<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>>
-    <br>Including Neighbor Bonus: @@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@
-<</if>>
-<br>Operating Expenses: @@.red;<<print cashFormat(_corpOpCost)>>@@
-<<if $corpAssetsSlave > 0>>
-    <br>Slave Expenses: @@.red;<<print cashFormat($corpAssetsSlave)>>@@
-<<else>>
-    <br>Slave Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsSlave)>>@@
-<</if>>
-<<if $corpAssetsDev > 0>>
-    <br>Asset Expenses: @@.red;<<print cashFormat($corpAssetsDev)>>@@
-<<else>>
-    <br>Asset Expenses: @@.yellowgreen;<<print cashFormat($corpAssetsDev)>>@@
-<</if>>
-<<if ($cheatMode) && ($cheatModeM)>>
-    <<if $corpEcon < 0>>
-        <br>Economic Expenses: @@.red;<<print cashFormat(-$corpEcon)>>@@
-    <<else>>
-        <br>Economic Windfall: @@.yellowgreen;<<print cashFormat($corpEcon)>>@@
-    <</if>>
-<</if>>
-<<if _corpOverhead != 0>><br>Overhead: @@.red;<<print cashFormat(_corpOverhead)>>@@<</if>>
-<br>Profit: <<if $corpProfitOld > 0>>@@.yellowgreen;<<print cashFormat($corpProfitOld)>>@@<<else>>@@.red;<<print cashFormat($corpProfitOld)>>@@<</if>>
-<<if $localEcon > 100>>
-    <br>Your profits benefit from a strong economy.
-<<elseif $localEcon < 60>>
-    <br>Your profits are severely depressed by the failing economy.
-<<elseif $localEcon < 100>>
-    <br>Your profits are lowered by the weak economy.
-<</if>>
+<<set _ledger = App.Corporate.ledger.current>>/*Note: You can't just pass the object directly into a widget. */
+<<CorporateLedger _ledger $week>>
 
 /*Division Expansion Tokens*/
-<<if App.Corporate.numDivisions < App.Corporate.divisionList.length && !App.Corporate.canExpand>>
-    <<set _corpDivs = App.Corporate.numDivisions>>
-    <<set _expansionValue = Math.trunc(Math.pow(_corpDivs, 1.5) + (5 * _corpDivs + 2) / 4)>>
-    <<if App.Corporate.value > _expansionValue * 1000000>>
-        <<set App.Corporate.canExpand = true>>
-        <div class="majorText">Your corporation is ready to start an additional division!</div>
-    <</if>>
+<<if _weekLedger.canExpandNow>>
+    <div class="majorText">Your corporation is ready to start an additional division!</div>
 <</if>>
 
 /*Specializations tokens*/
-<<if App.Corporate.value > 1600000 * Math.pow(1.25, $corpSpec) - 1200000>>
-    /*the spendable currency*/ <<set $corpSpecToken += 1,
-    $corpSpec += 1>> /*the amount unlocked*/
-    <br><br>Your corporation is ready to specialize its slaves further!
-<</if>>
-
-/*Specialization Cooldown*/
-<<if $corpSpecTimer > 0>>
-    <<set $corpSpecTimer-->>
+<<if _weekLedger.canSpecializeNow>>
+    <div class="majorText">Your corporation is ready to specialize its slaves further!</div>
 <</if>>
 
 /*Calculating cash set aside for dividend*/
-<br><br>''Dividend''
-<<if $dividendRatio > 0>>
-    <br>The corporation is currently reserving <<= Math.floor($dividendRatio * 100)>>% of its profit to be paid out as dividends.
+<h2>Dividend</h2>
+<div>
+<<if App.Corporate.dividendRatio > 0>>
+    The corporation is currently reserving <<= Math.floor(App.Corporate.dividendRatio * 100)>>% of its profit to be paid out as dividends.
 <<else>>
-    <br>The corporation is currently not reserving a portion of its profit to be paid out as dividends.
+    The corporation is currently not reserving a portion of its profit to be paid out as dividends.
 <</if>>
 <<if App.Corporate.payoutCash>>
     It is putting aside unused cash reserves to be paid out as dividends.
 <</if>>
-<<set _dividendCashReserved = 0,
-_dividendReserved = 0>>
-<<if $corpProfitOld > 0 && $dividendRatio > 0 && $corpCash > $corpProfitOld * $dividendRatio>>
-    <<set _dividendReserved = Math.trunc($corpProfitOld * $dividendRatio),
-    $corpDividend += _dividendReserved,
-    $corpCash -= _dividendReserved>>
-<</if>>
-<<if App.Corporate.payoutCash>>
-    <<set _payoutAfter = App.Corporate.payoutAfterCash>>
-    <<if App.Corporate.cash > _payoutAfter>>
-        <<set _dividendCashReserved = App.Corporate.cash - _payoutAfter,
-        App.Corporate.dividend += _dividendCashReserved,
-        App.Corporate.cash -= _dividendCashReserved>>
-    <</if>>
-<</if>>
-<<if $corpDividend > 0 || $dividendRatio > 0 || _dividendCashReserved > 0>>
-    <<if _dividendReserved > 0 || _dividendCashReserved > 0>>
-        It reserved @@.yellowgreen;<<print cashFormat(_dividendReserved + _dividendCashReserved)>>@@ this week.
+</div>
+<div>
+<<if App.Corporate.dividend > 0>>
+    <<if _weekLedger.hasDividend>>
+        It reserved <<print cashFormatColor(_weekLedger.dividend)>> this week.
     <</if>>
-    A total of @@.yellowgreen;<<print cashFormat($corpDividend)>>@@ has been put aside for its shareholders.
+    A total of <<print cashFormatColor(App.Corporate.dividend)>> has been put aside for its shareholders.
 <</if>>
-
-/*The corporation pays out every quarter (13 weeks)*/
-<<if $dividendTimer == 1>>
-    <<set _dividendPayout = Math.trunc($corpDividend * $personalShares / ($personalShares + $publicShares)),
-    $corpDividend = 0,
-    $dividendTimer = 13,
-    cashX(_dividendPayout, "stocks")>>
-    <<if _dividendPayout > 0>>
-    <br>This week the dividends were paid out, you received @@.yellowgreen;<<print cashFormat(_dividendPayout)>>.@@
-    <</if>>
-<<elseif $corpIncorporated == 1>>
-    <<set $dividendTimer -= 1>>
+</div>
+<<if _weekLedger.hasPayout>>
+    <div>This week the dividends were paid out, you received <<print cashFormatColor(_weekLedger.payout)>>.</div>
 <</if>>
 
 /*Bankrupted the Corporation*/
@@ -173,5 +95,5 @@ _dividendReserved = 0>>
     <<run App.Corporation.Dissolve()>>
     <br>@@.red;Your corporation went bankrupt.@@
 <</if>>
-
-<<run App.Corporate.ledger.swap()>> /*This needs to be at the very end of the financials*/
+/*This needs to be at the very end of the financials*/
+<<run App.Corporate.ledger.swap()>>
diff --git a/src/Corporation/manageCorporation.tw b/src/Corporation/manageCorporation.tw
index cd7dd4ddb79be5bcddfd2e96ff88c8a3259313d6..b1732eb71e32834a372579d65b74ea23f4a9ff62 100644
--- a/src/Corporation/manageCorporation.tw
+++ b/src/Corporation/manageCorporation.tw
@@ -61,66 +61,9 @@
 <<if App.Corporate.foundedDate>>
 <div class="founding">Founded on <<= asDateString(App.Corporate.foundedDate)>></div>
 <</if>>
-<<set _ledger = App.Corporate.ledger.old>>
-<table class="corporate">
-<thead>
-<tr><th colspan="2">Ledger for <<= asDateString($week - 1) >> - <<= asDateString($week, -1) >></th></tr>
-</thead>
-<tbody>
-<tr><td>Revenue</td><td><<= cashFormatColor(_ledger.revenue)>></td></tr>
-/*Returns last week's revenue, gets calculated in corporationDevelopments, but slaves sold here also added to it for next week*/
-<<if ($cheatMode) && ($cheatModeM) && $corpNeighborBonus > 0>>
-    <tr><td>Including Last Week's Neighbor Bonus</td><td>@@.yellowgreen;<<print cashFormat($corpNeighborBonus)>>@@</td></tr>
-<</if>>
-<tr><td>Operating Expenses</td><td><<= cashFormatColor(_ledger.operations, true)>></td></tr> /*Just like revenue, except for operating expenses (all calculated in corporationDevelopments)*/
-<tr><td>Slave Expenses</td><td><<= cashFormatColor(_ledger.slaves, true)>></td></tr> /*buying slaves to work on adds to this expense, works just like revenue*/
-<tr><td>Asset Expenses</td><td><<= cashFormatColor(_ledger.development, true)>></td></tr> /*costs associated with expanding divisions end up here, reports costs from last week, not current*/
-<<if $corpOverheadOld > 0>><tr><td>Last Week's Overhead</td><td><<= cashFormatColor(_ledger.operations, true)>></td></tr><</if>>
-<<if ($cheatMode) && ($cheatModeM)>>
-    <<if $corpEcon <= 0>>
-        <tr><td>Economic Expenses</td><td>@@.red;<<print cashFormat(-$corpEcon)>>@@</td></tr>
-    <<else>>
-        <tr><td>Economic Windfall</td><td>@@.yellowgreen;<<print cashFormat($corpEcon)>>@@</td></tr>
-    <</if>>
-<</if>>
-<tr><td>Profit</td><td><<= cashFormatColor(_ledger.profit)>></td></tr>
-</tbody>
-<thead>
-<tr><th colspan="2">Totals</th></tr>
-</thead>
-<tbody>
-<tr>
-    <td>Liquidity</td>
-    <td>
-    <<if ($cheatMode) && ($cheatModeM)>>
-        <span id="corpCash"><<= cashFormatColor(App.Corporate.cash)>></span>
-        <<set _TcorpCash = $corpCash>>
-        <<textbox "_TcorpCash" _TcorpCash>>
-        <<link "Apply">>
-        <<set App.Corporate.cheatCash(_TcorpCash)>>
-        <<replace "#corpCash">><<= cashFormatColor($corpCash)>><</replace>>
-        <</link>>
-    <<else>>
-        <<= cashFormatColor($corpCash)>>
-    <</if>>
-    </td>
-</tr>
-<tr><td>Corporate Value</td><td><<= cashFormatColor(App.Corporate.value)>></td></tr>
-<tr>
-<td>Dividend for Payout</td>
-<td>
-<div><<= cashFormatColor($corpDividend)>></div>
-<div class="note">Pays out on <<=asDateString($week + $dividendTimer, -1)>>, <<if $dividendTimer == 1>>
-    the end of this week
-<<else>>
-    in $dividendTimer weeks
-<</if>>
-</div>
-</td></tr>
-</tbody>
-</table>
-
-<br><br>
+<<set _ledger = App.Corporate.ledger.old>>/*You can't pass the object directly into the widget. */
+<<set _lastWeek = $week - 1>>
+<<CorporateLedger _ledger _lastWeek>>
 
 <h1>Division Management</h1>
 <<for _div range App.Corporate.divisionList.filter(x=>x.founded)>>
diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw
index 8b7bc150939829337cdb20956256151145710e1c..b24656477c6048269dc50f51cde29183604c79c8 100644
--- a/src/uncategorized/neighborsDevelopment.tw
+++ b/src/uncategorized/neighborsDevelopment.tw
@@ -10,8 +10,7 @@
 <<set $averageProsperity = $averageProsperity/$arcologies.length>>
 
 <<if $corpIncorporated == 1>>
-	<<set _corpBonus = Math.trunc(1000 * Math.pow(App.Corporate.value, 0.1)),
-	$corpNeighborBonus = 0>>
+	<<set _corpBonus = Math.trunc(1000 * Math.pow(App.Corporate.value, 0.1))>>
 <</if>>
 
 <<if $useTabs == 0>>__Arcologies in the Free City__<</if>>
@@ -734,7 +733,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if !$corpSpecRaces.includes($arcologies[$i].FSSupremacistRace)>>
 				It's a @@.lightgreen;good market@@ for your corporation's racially inferior slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSSupremacist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -801,7 +800,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecRaces.includes($arcologies[$i].FSSubjugationistRace)>>
 				It's a @@.lightgreen;good market@@ for your corporation's $arcologies[$i].FSSubjugationistRace slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSSubjugationist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -843,15 +842,15 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecMilk > 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's milky cows, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRepopulationFocus += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecAge == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's youthful captures, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRepopulationFocus += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecInjection == 5>>
 				It's a @@.lightgreen;good market@@ for your corporation's milky cows, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRepopulationFocus += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -896,11 +895,11 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecSexEd == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's well trained toys, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRestart += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecIntelligence == 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's smarter captures, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRestart += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -943,21 +942,21 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecHormones > 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's hormonally treated slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSGenderRadicalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 			<<if $corpSpecPussy == 1 && $corpSpecDick == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's beautiful futanari, improving sales and helping social progress.
 				<<set $arcologies[$i].FSGenderRadicalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecBalls == -1>>
 				It's a @@.lightgreen;good market@@ for your corporation's clipped buttsluts, improving sales and helping social progress.
 				<<set $arcologies[$i].FSGenderRadicalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 			<<if ($corpSpecGender == 2) || ($seeDicks == 100)>>
 				It's a @@.lightgreen;good market@@ for your corporation's feminized slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSGenderRadicalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -997,7 +996,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if ($corpSpecGender == 1) || ($seeDicks == 0)>>
 				It's a @@.lightgreen;good market@@ for your corporation's enslaved females, improving sales and helping social progress.
 				<<set $arcologies[$i].FSGenderFundamentalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1039,16 +1038,16 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecTrust > 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's well-treated companions, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPaternalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 			<<if $corpSpecCosmetics == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's meticulously beautified ladies, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPaternalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecEducation > 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's educated ladies, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPaternalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1088,16 +1087,16 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecTrust < 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's thoroughly terrified slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSDegradationist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 			<<if $corpSpecIntelligence == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's idiotic sluts, improving sales and helping social progress.
 				<<set $arcologies[$i].FSDegradationist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecAmputee == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's human sex toys, improving sales and helping social progress.
 				<<set $arcologies[$i].FSDegradationist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1143,7 +1142,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecEducation == 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's uneducated slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSIntellectualDependency += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1192,16 +1191,16 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecEducation > 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's educated ladies, improving sales and helping social progress.
 				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 			<<if $corpSpecSexEd == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's well trained toys, improving sales and helping social progress.
 				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecAccent == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's linguistically perfect slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1244,7 +1243,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 				<<if $corpSpecAmputee != 1>>
 					It's a @@.lightgreen;good market@@ for your corporation's implant-free slaves, improving sales and helping social progress.
 					<<set $arcologies[$i].FSBodyPurist += 1>>
-					<<set $corpNeighborBonus += _corpBonus>>
+					<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 				<</if>>
 			<</if>>
 		<</if>>
@@ -1286,7 +1285,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecImplants == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's implanted slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSTransformationFetishist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecImplants == 2>>
 				It's an @@.lightgreen;excellent market@@ for your corporation's absurdly implanted slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSTransformationFetishist += 2>>
@@ -1339,7 +1338,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAge == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's young slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSYouthPreferentialist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1379,7 +1378,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAge == 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's enslaved MILFs, improving sales and helping social progress.
 				<<set $arcologies[$i].FSMaturityPreferentialist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1425,7 +1424,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecHeight == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's shorter captures, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPetiteAdmiration += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1469,7 +1468,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecHeight == 4>>
 				It's a @@.lightgreen;good market@@ for your corporation's taller captures, improving sales and helping social progress.
 				<<set $arcologies[$i].FSStatuesqueGlorification += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1513,7 +1512,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 				<<if $corpSpecWeight < 3>>
 					It's a @@.lightgreen;good market@@ for your corporation's trim slaves, improving sales and helping social progress.
 					<<set $arcologies[$i].FSSlimnessEnthusiast += 1>>
-					<<set $corpNeighborBonus += _corpBonus>>
+					<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 				<</if>>
 			<</if>>
 		<</if>>
@@ -1559,11 +1558,11 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecInjection == 5>>
 				It's a @@.lightgreen;good market@@ for your corporation's hugely endowed cows, improving sales and helping social progress.
 				<<set $arcologies[$i].FSAssetExpansionist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSPecInjection == 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's stacked slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSAssetExpansionist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1650,11 +1649,11 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecHormones == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's masculinized slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSCummunism += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecDick == 1 && $corpSpecBalls == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's slaves standard dicks and balls, improving sales and helping social progress.
 				<<set $arcologies[$i].FSCummunism += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1700,11 +1699,11 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecMuscle == 4>>
 				It's a @@.lightgreen;good market@@ for your corporation's toned ladies, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPhysicalIdealist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<<elseif $corpSpecHeight > 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's tall ladies, improving sales and helping social progress.
 				<<set $arcologies[$i].FSPhysicalIdealist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1749,7 +1748,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecSexEd == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's skilled slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSHedonisticDecadence += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1788,7 +1787,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAge == 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's motherly slaves, especially those that look like peoples mothers, improving sales and helping social progress.
 				<<set $arcologies[$i].FSIncestFetishist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1831,7 +1830,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecSexEd == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's aspiring sexual acolytes, improving sales and helping social progress.
 				<<set $arcologies[$i].FSChattelReligionist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1885,7 +1884,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecEducation > 0>>
 				It's a @@.lightgreen;good market@@ for your corporation's properly educated slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSRomanRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1937,7 +1936,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAccent == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's lovely mix of slave accents, improving sales and helping social progress.
 				<<set $arcologies[$i].FSAztecRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -1989,7 +1988,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAccent == 1>>
 				It's a @@.lightgreen;good market@@ for your corporation's lovely mix of slave accents, improving sales and helping social progress.
 				<<set $arcologies[$i].FSEgyptianRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -2041,7 +2040,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecAccent == 2>>
 				It's a @@.lightgreen;good market@@ for your corporation's linguistically perfect slaves, improving sales and helping social progress.
 				<<set $arcologies[$i].FSEdoRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -2097,7 +2096,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<elseif $corpSpecDevotion == 4>>
 				It's a @@.lightgreen;good market@@ for your corporation's properly broken girls, improving sales and helping social progress.
 				<<set $arcologies[$i].FSArabianRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
@@ -2149,17 +2148,12 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh
 			<<if $corpSpecIntelligence == 3>>
 				It's a @@.lightgreen;good market@@ for your corporation's intelligent Head Girl prospects, improving sales and helping social progress.
 				<<set $arcologies[$i].FSChineseRevivalist += 1>>
-				<<set $corpNeighborBonus += _corpBonus>>
+				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
 			<</if>>
 		<</if>>
 	<</if>>
 <</if>>
 
-<<if $corpIncorporated == 1>>
-	<<set $corpCash += $corpNeighborBonus,
-	$corpRev += $corpNeighborBonus>>
-<</if>>
-
 /* FUTURE SOCIETY ADOPTION */
 
 <<if $arcologies[$i].direction != 0>>