diff --git a/src/arcologyBuilding/manufacturing.js b/src/arcologyBuilding/manufacturing.js
index 82b17cfa7871d3e633f7a21330118da2e455dbdb..e9dc8a2cd5b84a566de5ac2e307c7ed88c4ee5c6 100644
--- a/src/arcologyBuilding/manufacturing.js
+++ b/src/arcologyBuilding/manufacturing.js
@@ -202,9 +202,7 @@ App.Arcology.Cell.Manufacturing = class extends App.Arcology.Cell.BaseCell {
 						() => {
 							V.farmyard = 5;
 							thisCell.type = "Farmyard";
-						}, cost, "and will incur upkeep costs",
-						// this only exists for the farmyard, remove feature once that is out of alpha
-						App.UI.DOM.makeElement("span", "Alpha Content!", "warning")
+						}, cost, "and will incur upkeep costs"
 					));
 				}
 			}
diff --git a/src/endWeek/saNanny.js b/src/endWeek/saNanny.js
index d4604ea3708eaaf867c55317ba4bed78b83d4ef0..1027fd6abf9b221d17f4a42289a68b97fb69fff3 100644
--- a/src/endWeek/saNanny.js
+++ b/src/endWeek/saNanny.js
@@ -3,7 +3,7 @@
  * @returns {string}
  */
 
- // TODO: redo this
+// TODO: redo this
 App.SlaveAssignment.nanny = function(slave) {
 	const
 		{ he, him, his, He, His } = getPronouns(slave),
@@ -265,16 +265,6 @@ App.SlaveAssignment.nanny = function(slave) {
 				t += ` and talented tongue`;
 			}
 			t += `. `;
-			/* TODO: farmer is often not set and makes no sense here. What should this be? LCD.
-				if (slave.devotion < V.FarmerDevotionThreshold) {
-					slave.devotion += V.FarmerDevotionBonus;
-				}
-				if (slave.devotion < V.FarmerTrustThreshold) {
-					slave.trust += V.FarmerTrustBonus;
-				}
-				if (slave.condition < 100) {
-					improveCondition(slave, V.FarmerHealthBonus);
-				}*/
 		}
 
 		return t;
diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js
index a06295b7d42b9f1d5446f91068281ad89ac61b80..72ddd62738ec3a41e3fc776689e3fef2bb90727f 100644
--- a/src/endWeek/saWorkTheFarm.js
+++ b/src/endWeek/saWorkTheFarm.js
@@ -43,25 +43,14 @@ App.SlaveAssignment.workTheFarm = function(slave) {
 
 	const intro = () => `${He} works as a farmhand this week.`;
 
-	function farmer(slave) {
-		const F = getPronouns(S.Farmer);
-
-		if (S.Farmer) {
-			if (slave.devotion < V.FarmerDevotionThreshold) {
-				slave.devotion += V.FarmerDevotionBonus;
-			}
-
-			if (slave.devotion < V.FarmerTrustThreshold) {
-				slave.trust += V.FarmerTrustBonus;
-			}
-
-			if (slave.health.condition < 100) {
-				improveCondition(slave, V.FarmerHealthBonus);
-			}
-
-			return `${S.Farmer.slaveName} watches over ${him}, making sure that ${he} doesn't slack off and works as hard as ${he} should. ${F.He}'s a tough boss, but a fair one. ${slave.slaveName} benefits from ${F.his} care while working in ${V.farmyardName}.`;
-		}
-	}
+	// function farmer(slave) {
+	// TODO: update this with devotion and health effects
+	// 	const F = getPronouns(S.Farmer);
+
+	// 	if (S.Farmer) {
+	// 		return `${S.Farmer.slaveName} watches over ${him}, making sure that ${he} doesn't slack off and works as hard as ${he} should. ${F.He}'s a tough boss, but a fair one. ${slave.slaveName} benefits from ${F.his} care while working in ${V.farmyardName}.`;
+	// 	}
+	// }
 
 	function devotion(slave) {
 		if (slave.devotion > 50) {
diff --git a/src/facilities/farmyard/farmyard.css b/src/facilities/farmyard/farmyard.css
new file mode 100644
index 0000000000000000000000000000000000000000..1dfe466c3819a232b8fc6cc22803b0be5a12f319
--- /dev/null
+++ b/src/facilities/farmyard/farmyard.css
@@ -0,0 +1,39 @@
+/* MOST LIKELY TEMPORARY UNTIL I FIND A BETTER SPOT */
+
+.farmyard-intro {
+	margin-bottom: 1em;
+}
+
+.farmyard-expand {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-menials {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-rules {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-upgrades {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-animals {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-slaves {
+	margin-top: 1em;
+	margin-bottom: 1em;
+}
+
+.farmyard-rename {
+	margin-top: 1em;
+}
diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js
index dbc376eeab74c58e6bbf98f16402e498a82a6802..872dc00a9adfa43c425877f52d09e613ce87d91d 100644
--- a/src/facilities/farmyard/farmyard.js
+++ b/src/facilities/farmyard/farmyard.js
@@ -1,357 +1,864 @@
-App.Facilities.Farmyard.clearAnimalsBought = function() {
-	for (const i in V.animalsBought) {
-		V.animalsBought[i] = 0;
-	}
-};
+App.Facilities.Farmyard.farmyard = function() {
+	const
+		frag = new DocumentFragment();
 
-App.Facilities.Farmyard.upgrades = function() {
-	const frag = new DocumentFragment(),
+	V.nextButton = "Back to Main";
+	V.nextLink = "Main";
+	V.returnTo = "Farmyard";
+	V.encyclopedia = "Farmyard";
 
-		farmyardUpgrades = V.farmyardUpgrades,
+	if (V.farmyardName !== "the Farmyard") {
+		V.farmyardNameCaps = V.farmyardName.replace("the ", "The ");
+	}
 
-		pumpCost = Math.trunc(5000 * V.upgradeMultiplierArcology),
-		fertilizerCost = Math.trunc(10000 * V.upgradeMultiplierArcology),
-		hydroponicsCost = Math.trunc(20000 * V.upgradeMultiplierArcology),
-		seedsCost = Math.trunc(25000 * V.upgradeMultiplierArcology),
-		machineryCost = Math.trunc(50000 * V.upgradeMultiplierArcology);
+	App.UI.DOM.appendNewElement("div", frag, intro(), "farmyard-intro");
+	App.UI.DOM.appendNewElement("div", frag, expand(), "farmyard-expand");
+	App.UI.DOM.appendNewElement("div", frag, menials(), "farmyard-menials");
+	App.UI.DOM.appendNewElement("div", frag, rules(), "farmyard-rules");
+	App.UI.DOM.appendNewElement("div", frag, upgrades(), "farmyard-upgrades");
+	App.UI.DOM.appendNewElement("div", frag, animals(), "farmyard-animals");
+	App.UI.DOM.appendNewElement("div", frag, App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.farmyard), "farmyard-slaves");
+	App.UI.DOM.appendNewElement("div", frag, rename(), "farmyard-rename");
 
-	if (!farmyardUpgrades.pump) {
+	App.UI.SlaveList.ScrollPosition.restore();
+
+	function intro() {
 		const
-			desc = document.createElement("div"),
-			upgrade = document.createElement("div"),
-			note = document.createElement("span");
+			frag = new DocumentFragment(),
+
+			desc = App.UI.DOM.makeElement("div", '', "scene-intro"),
+			link = App.UI.DOM.makeElement("div", '', "indent"),
+
+			count = App.Entity.facilities.farmyard.totalEmployeesCount;
+
+		desc.append(`${V.farmyardNameCaps} is an oasis of growth in the midst of the jungle of steel and concrete that is ${V.arcologies[0].name}. Animals are kept in pens, tended to by your slaves, while ${V.farmyardUpgrades.hydroponics ? `rows of hydroponics equipment` : `makeshift fields`} grow crops. `);
+
+		switch (V.farmyardDecoration) {
+			case "Roman Revivalist":
+				desc.append(`Its red tiles and white stone walls are the very picture of a Roman farm villa's construction, as are the marble statues and reliefs. Saturn and Ceres look over the prosperity of the fields${V.seeBestiality ? `. Mercury watches over the health of the animals, and Feronia ensures strong litters in your slaves.` : `, and Mercury watches over the health of the animals.`} The slaves here are all looked after well, as they have one of the most important jobs in ${V.arcologies[0].name}.`);
+				break;
+			case "Aztec Revivalist":
+				desc.append(`It can't completely recreate the floating farms in the ancient Aztec fashion, but it comes as close as it can, shallow pseudo-canals dividing each field into multiple sections. Smooth stone and colorful murals cover the walls, depicting bloody stories of gods and mortals alike.`);
+				break;
+			case "Egyptian Revivalist":
+				desc.append(`It does its best to capture the wide open nature of ancient Egyptian farms, including mimicking the irrigation systems fed by the Nile. The stone walls are decorated with murals detailing its construction and your prowess in general, ${V.seeBestiality ? `with animal-bloated slaves featured prominently.` : `hieroglyphs spelling out a volumes of praise.`}`);
+				break;
+			case "Edo Revivalist":
+				desc.append(`It does its best to mimic the rice patties and thatch roofed buildings of the Edo period despite the wide variety of crops tended by various slaves. Not every crop can thrive in flooded fields, but the ones that can take advantage of your attention to detail.`);
+				break;
+			case "Arabian Revivalist":
+				desc.append(`Large plots of olive trees and date palms line the outer edges of the main crop area, while a combination of wheat, flax, and barley occupies the interior space. Irrigation canals snake through the area, ensuring every inch of cropland is well-watered.`);
+				break;
+			case "Chinese Revivalist":
+				desc.append(`It does its best to capture the terraces that covered the ancient Chinese hills and mountains, turning every floor into ribbons of fields following a slight incline. Slaves wade through crops that can handle flooding and splash through the irrigation of the others when they aren't tending to${V.seeBestiality ? ` or breeding with` : ``} your animals.`);
+				break;
+			case "Chattel Religionist":
+				desc.append(`It runs like a well oiled machine, slaves bent in humble service as they tend crops grown on the Prophet's command, or see to the animals' needs. Their clothing is tucked up and out of the way as they see to their tasks, keeping them clean as they work ${V.seeBestiality ? `around animal-bloated bellies ` : ``}as divine will dictates.`);
+				break;
+			case "Degradationist":
+				desc.append(`It is constructed less as a converted warehouse and more as something to visit, allowing guests to enjoy the spectacle of slaves ${V.seeBestiality ? `being pounded by eager animals` : `elbow deep in scrubbing animal waste`} to their satisfaction.`);
+				break;
+			case "Repopulation Focus":
+				desc.append(`It teems with life, both in the belly of every animal and the belly of every slave, though the latter makes tending the fields difficult. They're ordered to take care, as they carry the future ${V.seeBestiality ? `of this farm` : `of the arcology`} in their bellies.`);
+				break;
+			case "Eugenics":
+				desc.append(`It holds a wide variety of crops and animals, but the best of the best is easy to find. They're set apart from the others, given only the best care and supplies${V.seeBestiality ? ` and bred with only the highest quality slaves` : ``}, while the sub-par stock is neglected off to the side.`);
+				break;
+			case "Asset Expansionist":
+				desc.append(`It is not easy to look after animals and till fields with such enormous body parts, but your slaves are diligent regardless, working hard to provide food and livestock for the arcology.`);
+				break;
+			case "Transformation Fetishist":
+				// desc.append(`TODO:`);
+				break;
+			case "Gender Radicalist":
+				// desc.append(`TODO:`);
+				break;
+			case "Gender Fundamentalist":
+				// desc.append(`TODO:`);
+				break;
+			case "Physical Idealist":
+				desc.append(`Its animals are in exceptional shape, their coats unable to hide how muscular they are, requiring your slaves to be equally toned to control them. There's plenty of space for their exercise as well${V.seeBestiality ? ` and an abundance of curatives for the slaves full of their fierce, kicking offspring` : ``}.`);
+				break;
+			case "Supremacist":
+				desc.append(`It is a clean and orderly operation, stables and cages mucked by a multitude of inferior slaves, along with grooming your animals and harvesting your crops.`);
+				break;
+			case "Subjugationist":
+				desc.append(`It is a clean and orderly operation, stables and cages mucked by a multitude of ${V.arcologies[0].FSSubjugationistRace} slaves, while the others are tasked with grooming your animals and harvesting your crops.`);
+				break;
+			case "Paternalist":
+				desc.append(`It's full of healthy animals, crops, and slaves, the former's every need diligently looked after by the latter. The fields flourish to capacity under such care, and the animals give the distinct impression of happiness${V.seeBestiality ? ` — some more than others if the growing bellies of your slaves are anything to go by, the only indication that such rutting takes place` : ``}.`);
+				break;
+			case "Pastoralist":
+				// desc.append(`TODO:`);
+				break;
+			case "Maturity Preferentialist":
+				// desc.append(`TODO:`);
+				break;
+			case "Youth Preferentialist":
+				// desc.append(`TODO:`);
+				break;
+			case "Body Purist":
+				// desc.append(`TODO:`);
+				break;
+			case "Slimness Enthusiast":
+				desc.append(`It features trim animals and slaves alike, not a pound of excess among them. The feed for both livestock and crops are carefully maintained to ensure optimal growth without waste, letting them flourish without being weighed down.`);
+				break;
+			case "Hedonistic":
+				desc.append(`It features wider gates and stalls, for both the humans visiting or tending the occupants, and the animals starting to mimic their handlers${V.seeBestiality ? ` and company` : ``}, with plenty of seats along the way.`);
+				break;
+			default:
+				desc.append(`It is very much a converted warehouse still, sectioned off in various 'departments'${V.farmyardUpgrades.machinery ? ` with machinery placed where it can be` : V.farmyardUpgrades.hydroponics ? ` and plumbing for the hydroponics system running every which way` : ``}.`);
+				break;
+		}
+
+		if (count > 2) {
+			desc.append(` ${V.farmyardNameCaps} is bustling with activity. Farmhands are hurrying about, on their way to feed animals and maintain farming equipment.`);
+		} else if (count) {
+			desc.append(` ${V.farmyardNameCaps} is working steadily. Farmhands are moving about, looking after the animals and crops.`);
+		} else if (S.Farmer) {
+			desc.append(` ${S.Farmer.slaveName} is alone in $farmyardName, and has nothing to do but look after the animals and crops.`);
+		} else {
+			desc.append(` ${V.farmyardNameCaps} is empty and quiet.`);
+		}
+
+		link.append(App.UI.DOM.passageLink(`Decommission ${V.farmyardName}`, "Main", () => {
+			if (V.farmMenials) {
+				V.menials += V.farmMenials;
+				V.farmMenials = 0;
+			}
+
+			V.farmyardName = "the Farmyard";
+			V.farmyard = 0;
+			V.farmyardDecoration = "standard";
 
-		upgrade.classList.add("indent");
-		note.classList.add("note");
+			V.farmMenials = 0;
+			V.farmMenialsSpace = 0;
 
-		upgrade.append(App.UI.DOM.passageLink("Upgrade the water pump", "Farmyard", () => {
-			cashX(forceNeg(pumpCost));
-			farmyardUpgrades.pump = 1;
+			V.farmyardShows = 0;
+			V.farmyardBreeding = 0;
+			V.farmyardCrops = 0;
+
+			V.farmyardKennels = 0;
+			V.farmyardStables = 0;
+			V.farmyardCages = 0;
+
+			V.activeCanine = 0;
+			V.activeHooved = 0;
+			V.activeFeline = 0;
+
+			V.pitAnimal = 0;
+			V.pitAnimalType = 0;
+
+			V.canines = [];
+			V.hooved = [];
+			V.felines = [];
+
+			V.farmyardUpgrades = {
+				pump: 0,
+				fertilizer: 0,
+				hydroponics: 0,
+				machinery: 0,
+				seeds: 0
+			};
+
+			clearAnimalsBought();
+			App.Arcology.cellUpgrade(V.building, App.Arcology.Cell.Manufacturing, "Farmyard", "Manufacturing");
 		}));
 
-		note.append(` Costs ${cashFormat(pumpCost)} and slightly decreases upkeep costs.`);
+		desc.append(link);
+		frag.append(desc);
+
+		return frag;
+	}
 
-		desc.append(`${V.farmyardNameCaps} is currently using the basic water pump that it came with.`);
+	function expand() {
+		const
+			frag = new DocumentFragment(),
+
+			desc = document.createElement("div"),
+			link = App.UI.DOM.makeElement("div", '', "indent"),
+			note = App.UI.DOM.makeElement("span", '', "note"),
+			cost = App.UI.DOM.makeElement("span", '', "yellowgreen"),
 
-		upgrade.append(note);
-		frag.append(desc, upgrade);
-	} else {
-		const desc = document.createElement("div");
+			upgradeCost = Math.trunc(V.farmyard * 1000 * V.upgradeMultiplierArcology),
+			farmhands = App.Entity.facilities.farmyard.totalEmployeesCount;
 
-		desc.append(`The water pump in ${V.farmyardName} is a more efficient model, slightly improving the amount of crops it produces.`);
+			cost.append(cashFormat(upgradeCost));
 
+		desc.append(`It can support ${V.farmyard} farmhands. Currently there ${farmhands === 1 ? `is` : `are`} ${farmhands} ${farmhands === 1 ? `farmhand` : `farmhands`} in ${V.farmyardName}. `);
+		note.append(` Costs `, cost, ` and will increase upkeep costs`);
+
+		link.append(App.UI.DOM.passageLink(`Expand ${V.farmyardName}`, "Farmyard", () => {
+			cashX(forceNeg(cost));
+			V.farmyard += 5;
+			V.PC.skill.engineering += .1;
+		}));
+
+		link.append(note);
+		desc.append(link);
 		frag.append(desc);
 
-		if (!farmyardUpgrades.fertilizer) {
+		if (V.farmyardFarmers || V.farmyardShowgirls) {
 			const
-				upgrade = document.createElement("div"),
-				note = document.createElement("span");
+				removeLink = App.UI.DOM.makeElement("div", '', "indent"),
+				warning = App.UI.DOM.makeElement("span", '', "red"),
 
-			upgrade.classList.add("indent");
-			note.classList.add("note");
+				count = App.Entity.facilities.farmyard.totalEmployeesCount,
+				newPop = count + V.dormitoryPopulation;
 
-			upgrade.append(App.UI.DOM.passageLink("Use a higher-quality fertilizer", "Farmyard", () => {
-				cashX(forceNeg(fertilizerCost));
-				farmyardUpgrades.fertilizer = 1;
+			warning.append(` Dormitory capacity will be exceeded.`);
+
+			removeLink.append(App.UI.DOM.passageLink("Remove all slaves", "Farmyard", () => {
+				App.Utils.moveFacilityWorkers(App.Entity.facilities.farmyard);
 			}));
-			note.append(` Costs ${cashFormat(fertilizerCost)} and moderately increases crop yield and slightly increases upkeep costs.`);
 
-			upgrade.append(note);
-			frag.append(upgrade);
+			if (newPop > V.dormitory) {
+				removeLink.append(warning);
+			}
+
+			if (App.Entity.facilities.farmyard.totalEmployeesCount) {
+				frag.append(removeLink);
+			}
+		}
+
+		return frag;
+	}
+
+	function menials() {
+		const frag = new DocumentFragment();
+
+		frag.append(transferMenials());
+		frag.append(buyMenials());
+		frag.append(houseMenials());
+
+		return frag;
+	}
+
+	function transferMenials() {
+		const
+			frag = new DocumentFragment(),
+
+			links = [],
+			linksDiv = App.UI.DOM.makeElement("div", '', "indent"),
+
+			menials = V.menials,
+			farmMenials = V.farmMenials,
+			farmMenialsSpace = V.farmMenialsSpace;
+
+		if (farmMenials) {
+			frag.append(`Assigned to ${V.farmyardName} ${farmMenials === 1 ? `is` : `are`} ${farmMenials} menial ${farmMenials === 1 ? `slave` : `slaves`}, working to produce as much food for your arcology as they can. `);
+		}
+
+		if (farmMenialsSpace) {
+			frag.append(`You ${menials ? `own ${num(menials)}` : `don't own any`} free menial slaves. ${V.farmyardNameCaps} can house ${farmMenialsSpace} menial slaves total, with ${farmMenialsSpace - farmMenials} free spots. `);
+		}
+
+		if (farmMenialsSpace && farmMenials < farmMenialsSpace) {
+			if (menials) {
+				links.push(App.UI.DOM.passageLink("Transfer in a menial slave", "Farmyard", () => {
+					V.menials--;
+					V.farmMenials++;
+				}));
+			}
+
+			if (menials >= 10 && farmMenials <= farmMenialsSpace - 10) {
+				links.push(App.UI.DOM.passageLink("Transfer in 10 menial slaves", "Farmyard", () => {
+					V.menials -= 10;
+					V.farmMenials += 10;
+				}));
+			}
+
+			if (menials >= 100 && farmMenials <= farmMenialsSpace - 100) {
+				links.push(App.UI.DOM.passageLink("Transfer in 100 menial slaves", "Farmyard", () => {
+					V.menials -= 100;
+					V.farmMenials += 100;
+				}));
+			}
+
+			if (menials) {
+				links.push(App.UI.DOM.passageLink("Transfer in all free menial slaves", "Farmyard", () => {
+					if (menials > farmMenialsSpace - farmMenials) {
+						V.menials -= farmMenialsSpace - farmMenials;
+						V.farmMenials = farmMenialsSpace;
+					} else {
+						V.farmMenials += menials;
+						V.menials = 0;
+					}
+				}));
+			}
+		} else if (!farmMenialsSpace) {
+			frag.append(`${V.farmyardNameCaps} cannot currently house any menial slaves. `);
 		} else {
-			const desc = document.createElement("div");
+			frag.append(`${V.farmyardNameCaps} has all the menial slaves it can currently house assigned to it. `);
+		}
+
+		if (farmMenials) {
+			links.push(App.UI.DOM.passageLink("Transfer out all menial slaves", "Farmyard", () => {
+				V.menials += farmMenials;
+				V.farmMenials = 0;
+			}));
+		}
 
-			desc.append(`${V.farmyardNameCaps} is using a higher-quality fertilizer, moderately increasing the amount of crops it produces and raising slightly raising upkeep costs.`);
+		linksDiv.append(App.UI.DOM.generateLinksStrip(links));
+		frag.append(linksDiv);
 
-			frag.append(desc);
 
-			if (!farmyardUpgrades.hydroponics) {
-				const
-					upgrade = document.createElement("div"),
-					note = document.createElement("span");
+		return frag;
+	}
+
+	function buyMenials() {
+		const
+			frag = new DocumentFragment(),
+
+			links = [],
+			linksDiv = App.UI.DOM.makeElement("div", '', "indent"),
 
-				upgrade.classList.add("indent");
-				note.classList.add("note");
+			menials = V.menials,
+			farmMenials = V.farmMenials,
+			farmMenialsSpace = V.farmMenialsSpace,
+			bulkMax = V.PopCap - menials - V.fuckdolls - V.menialBioreactors,
 
-				upgrade.append(App.UI.DOM.passageLink("Purchase an advanced hydroponics system", "Farmyard", () => {
-					cashX(forceNeg(hydroponicsCost));
-					farmyardUpgrades.hydroponics = 1;
+			menialPrice = Math.trunc(menialSlaveCost()),
+			maxMenials = Math.trunc(Math.clamp(V.cash / menialPrice, 0, bulkMax));
+
+		if (farmMenialsSpace) {
+			MenialPopCap();
+
+			if (bulkMax > 0 || V.menials + V.fuckdolls + V.menialBioreactors === 0) {
+				links.push(App.UI.DOM.passageLink("Buy ", "Farmyard", () => {
+					V.menials++;
+					V.menialSupplyFactor--;
+					cashX(forceNeg(menialPrice), "farmyard");
 				}));
 
-				note.append(` Costs ${cashFormat(hydroponicsCost)} and moderately decreases upkeep costs.`);
+				links.push(App.UI.DOM.passageLink("(x10)", "Farmyard", () => {
+					V.menials += 10;
+					V.menialSupplyFactor -= 10;
+					cashX(forceNeg(menialPrice * 10), "farmyard");
+				}));
 
-				upgrade.append(note);
-				frag.append(upgrade);
+				links.push(App.UI.DOM.passageLink("(x100)", "Farmyard", () => {
+					V.menials += 100;
+					V.menialSupplyFactor -= 100;
+					cashX(forceNeg(menialPrice * 100), "farmyard");
+				}));
+
+				links.push(App.UI.DOM.passageLink("(max)", "Farmyard", () => {
+					V.menials += maxMenials;
+					V.menialSupplyFactor -= maxMenials;
+					cashX(forceNeg(maxMenials * menialPrice), "farmyard");
+				}));
+			}
+		}
+
+		if (farmMenials) {
+			linksDiv.append(App.UI.DOM.generateLinksStrip(links));
+			frag.append(linksDiv);
+		}
+
+		return frag;
+	}
+
+	function houseMenials() {
+		const
+			frag = new DocumentFragment(),
+
+			desc = document.createElement("div"),
+			link = App.UI.DOM.makeElement("div", '', "indent"),
+			note = App.UI.DOM.makeElement("span", '', "note"),
+			cost = App.UI.DOM.makeElement("span", '', "yellowgreen"),
+
+			unitCost = Math.trunc(1000 * V.upgradeMultiplierArcology);
+
+			cost.append(cashFormat(unitCost));
+
+		if (V.farmMenialsSpace < 500) {
+			desc.append(`There is enough room in ${V.farmyardName} to build housing, enough to give ${V.farmMenialsSpace + 100} menial slaves a place to sleep and relax. `);
+			note.append(` Costs `, cost, ` and will increase upkeep costs`);
+
+			link.append(App.UI.DOM.passageLink("Build a new housing unit", "Farmyard", () => {
+				cashX(forceNeg(unitCost), "farmyard");
+				V.farmMenialsSpace += 100;
+			}), note);
+
+			desc.append(link);
+			frag.append(desc);
+		}
+
+		return frag;
+	}
+
+	function rules() {
+		const frag = new DocumentFragment();
+
+		if (App.Entity.facilities.farmyard.employeesIDs().size > 0) {	// TODO: redo this with V.farmyardShowgirls
+			if (V.farmyardShows && (V.canines || V.hooved || V.felines)) {
+				const rule = makeRule(
+					['Slaves', 'are putting on shows with animals'],
+					'are',
+					"End shows",
+					[],
+					["farmyardShows", "farmyardBreeding", "farmyardRestraints"]
+				);
+
+				frag.append(rule);
+
+				if (V.seeBestiality) {
+					if (V.farmyardBreeding) {
+						const rule = makeRule(
+							['Slaves', 'are being bred with animals'],
+							'are',
+							"End breeding",
+							["farmyardShows"],
+							[ "farmyardBreeding", "farmyardRestraints"]
+						);
+
+						frag.append(rule);
+
+						if (V.farmyardRestraints) {
+							const rule = makeRule(
+								'are being restrained',
+								'All of the slaves',
+								"Restrain only disobedient slaves",
+								["farmyardShows", "farmyardBreeding"],
+								["farmyardRestraints"]
+							);
+
+							frag.append(rule);
+						} else {
+							const rule = makeRule(
+								'are being restrained',
+								'Only disobedient slaves',
+								"Restrain all slaves",
+								["farmyardShows", "farmyardBreeding", "farmyardRestraints"],
+								[]
+							);
+
+							frag.append(rule);
+						}
+					} else {
+						const rule = makeRule(
+							['Slaves', 'being bred with animals'],
+							'are not',
+							"Begin breeding",
+							["farmyardShows", "farmyardBreeding"],
+							["farmyardRestraints"]
+						);
+
+						frag.append(rule);
+					}
+				}
 			} else {
-				const desc = document.createElement("div");
+				const rule = makeRule(
+					['Slaves', 'putting on shows with animals'],
+					'are not',
+					"Begin shows",
+					["farmyardShows"],
+					["farmyardBreeding", "farmyardRestraints"]
+				);
+
+				frag.append(rule);
+			}
+		}
 
-				desc.append(`${V.farmyardNameCaps} is outfitted with an advanced hydroponics system, reducing the amount of water your crops consume and thus moderately reducing upkeep costs.`);
+		/**
+		 * Creates a new rule button
+		 * @param {string|[string]} descText The base description for the rule
+		 * @param {string} boldText The part in bold
+		 * @param {string} linkText The link text
+		 * @param {[string]} enabled Variables to be set to 1
+		 * @param {[string]} disabled Variables to be set to 0
+		 */
+		function makeRule(descText, boldText, linkText, enabled, disabled) {
+			const
+				frag = new DocumentFragment(),
 
-				frag.append(desc);
+				desc = document.createElement("div"),
+				bold = App.UI.DOM.makeElement("span", boldText, "bold"),
+				link = document.createElement("span");
 
-				if (!farmyardUpgrades.seeds) {
-					const
-						upgrade = document.createElement("div"),
-						note = document.createElement("span");
+			if (Array.isArray(descText)) {
+				desc.append(`${descText[0]} `, bold, ` ${descText[1]}. `);
+			} else {
+				desc.append(bold, ` ${descText}. `);
+			}
 
-					upgrade.classList.add("indent");
-					note.classList.add("note");
+			link.append(App.UI.DOM.passageLink(linkText, "Farmyard", () => {
+				enabled.forEach(i => V[i] = 1);
+				disabled.forEach(i => V[i] = 0);
+			}));
 
-					upgrade.append(App.UI.DOM.passageLink("Purchase genetically modified seeds", "Farmyard", () => {
-						cashX(forceNeg(seedsCost));
-						farmyardUpgrades.seeds = 1;
-					}));
+			desc.append(link);
+			frag.append(desc);
 
-					note.append(` Costs ${cashFormat(seedsCost)} and moderately increases crop yield and slightly increases upkeep costs.`);
+			return frag;
+		}
+
+		return frag;
+	}
+
+	function upgrades() {
+		const frag = new DocumentFragment(),
+
+			farmyardUpgrades = V.farmyardUpgrades,
+
+			pumpCost = Math.trunc(5000 * V.upgradeMultiplierArcology),
+			fertilizerCost = Math.trunc(10000 * V.upgradeMultiplierArcology),
+			hydroponicsCost = Math.trunc(20000 * V.upgradeMultiplierArcology),
+			seedsCost = Math.trunc(25000 * V.upgradeMultiplierArcology),
+			machineryCost = Math.trunc(50000 * V.upgradeMultiplierArcology);
+
+		if (!farmyardUpgrades.pump) {
+			const
+				desc = document.createElement("div"),
+				upgrade = createUpgrade(
+					"Upgrade the water pump",
+					pumpCost,
+					'slightly decreases upkeep costs',
+					"pump"
+				);
+
+			desc.append(`${V.farmyardNameCaps} is currently using the basic water pump that it came with.`);
+
+			frag.append(desc, upgrade);
+		} else {
+			const desc = document.createElement("div");
+
+			desc.append(`The water pump in ${V.farmyardName} is a more efficient model, slightly improving the amount of crops it produces.`);
+
+			frag.append(desc);
+
+			if (!farmyardUpgrades.fertilizer) {
+				const upgrade = createUpgrade(
+					"Use a higher-quality fertilizer",
+					fertilizerCost,
+					'moderately increases crop yield and slightly increases upkeep costs',
+					"fertilizer"
+				);
+
+				frag.append(upgrade);
+			} else {
+				const desc = document.createElement("div");
+
+				desc.append(`${V.farmyardNameCaps} is using a higher-quality fertilizer, moderately increasing the amount of crops it produces and raising slightly raising upkeep costs.`);
+
+				frag.append(desc);
+
+				if (!farmyardUpgrades.hydroponics) {
+					const upgrade = createUpgrade(
+						"Purchase an advanced hydroponics system",
+						hydroponicsCost,
+						'moderately decreases upkeep costs',
+						"hydroponics"
+					);
 
-					upgrade.append(note);
 					frag.append(upgrade);
 				} else {
 					const desc = document.createElement("div");
 
-					desc.append(`${V.farmyardNameCaps} is using genetically modified seeds, significantly increasing the amount of crops it produces and moderately increasing upkeep costs.`);
+					desc.append(`${V.farmyardNameCaps} is outfitted with an advanced hydroponics system, reducing the amount of water your crops consume and thus moderately reducing upkeep costs.`);
 
 					frag.append(desc);
 
-					if (!farmyardUpgrades.machinery) {
-						const
-							upgrade = document.createElement("div"),
-							note = document.createElement("span");
+					if (!farmyardUpgrades.seeds) {
+						const upgrade = createUpgrade(
+							"Purchase genetically modified seeds",
+							seedsCost,
+							'moderately increases crop yield and slightly increases upkeep costs',
+							"seeds"
+						);
 
-						upgrade.classList.add("indent");
-						note.classList.add("note");
-
-						upgrade.append(App.UI.DOM.passageLink("Upgrade the machinery", "Farmyard", () => {
-							cashX(forceNeg(machineryCost));
-							farmyardUpgrades.machinery = 1;
-						}));
-
-						note.append(` Costs ${cashFormat(machineryCost)} and moderately increases crop yield and slightly increases upkeep costs.`);
-
-						upgrade.append(note);
 						frag.append(upgrade);
 					} else {
 						const desc = document.createElement("div");
 
-						desc.append(`The machinery in ${V.farmyardName} has been upgraded, and is more efficient, significantly increasing crop yields and significantly decreasing upkeep costs.`);
+						desc.append(`${V.farmyardNameCaps} is using genetically modified seeds, significantly increasing the amount of crops it produces and moderately increasing upkeep costs.`);
 
 						frag.append(desc);
+
+						if (!farmyardUpgrades.machinery) {
+							const upgrade = createUpgrade(
+								"Upgrade the machinery",
+								machineryCost,
+								'moderately increases crop yield and slightly increases upkeep costs',
+								"machinery"
+							);
+
+							frag.append(upgrade);
+						} else {
+							const desc = document.createElement("div");
+
+							desc.append(`The machinery in ${V.farmyardName} has been upgraded, and is more efficient, significantly increasing crop yields and significantly decreasing upkeep costs.`);
+
+							frag.append(desc);
+						}
 					}
 				}
 			}
 		}
-	}
 
-	return frag;
-};
+		function createUpgrade(linkText, price, effect, type) {
+			const
+				desc = document.createElement("div"),
+				link = App.UI.DOM.makeElement("div", '', "indent"),
+				note = App.UI.DOM.makeElement("span", '', "note"),
+				cost = App.UI.DOM.makeElement("span", '', "yellowgreen");
+
+			cost.append(cashFormat(price));
 
-App.Facilities.Farmyard.animalHousing = function() {
-	const frag = new DocumentFragment(),
+			link.append(App.UI.DOM.passageLink(linkText, "Farmyard", () => {
+				cashX(forceNeg(price), "farmyard");
+				farmyardUpgrades[type] = 1;
+			}));
 
-		baseCost = Math.trunc(5000 * V.upgradeMultiplierArcology),
-		upgradedCost = Math.trunc(10000 * V.upgradeMultiplierArcology);
+			note.append(` Costs `, cost, ` and ${effect}.`);
+			link.append(note);
+			desc.append(link);
 
-	let
-		farmyardKennels = V.farmyardKennels,
-		farmyardStables = V.farmyardStables,
-		farmyardCages = V.farmyardCages;
+			return desc;
+		}
 
+		return frag;
+	}
 
+	function animals() {
+		const frag = new DocumentFragment(),
 
-	// MARK: Kennels
+			baseCost = Math.trunc(5000 * V.upgradeMultiplierArcology),
+			upgradedCost = Math.trunc(10000 * V.upgradeMultiplierArcology);
+
+		let
+			farmyardKennels = V.farmyardKennels,
+			farmyardStables = V.farmyardStables,
+			farmyardCages = V.farmyardCages;
 
-	const
-		CL = V.canines.length,
-
-		dogs = CL === 1 ? V.canines[0] : CL < 3 ?
-			`several different breeds of dogs` :
-			`all kinds of dogs`,
-		canines = CL === 1 ? V.canines[0].species === "dog" ?
-			V.canines[0].breed : V.canines[0].speciesPlural : CL < 3 ?
-				`several different ${V.canines.every(
-					c => c.species === "dog") ?
-					`breeds of dogs` : `species of canines`}` :
-				`all kinds of canines`,
-
-		kennels = document.createElement("div"),
-		kennelsNote = document.createElement("span"),
-		kennelsUpgrade = document.createElement("div");
-
-	kennelsNote.classList.add("note");
-	kennelsUpgrade.classList.add("indent");
-
-	if (farmyardKennels === 0) {
-		kennels.append(App.UI.DOM.passageLink("Add kennels", "Farmyard",
-			() => {
-				cashX(forceNeg(baseCost));
-				V.farmyardKennels = 1;
-			}));
 
-		kennelsNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic canines`);
 
-		kennels.append(kennelsNote);
-	} else if (farmyardKennels === 1) {
-		kennels.append(App.UI.DOM.passageLink("Kennels", "Farmyard Animals"));
-		kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${dogs}.`}`);
+		// MARK: Kennels
 
-		if (V.rep > 10000) {
-			kennelsUpgrade.append(App.UI.DOM.passageLink("Upgrade kennels", "Farmyard",
+		const
+			CL = V.canines.length,
+
+			dogs = CL === 1 ? V.canines[0] : CL < 3 ?
+				`several different breeds of dogs` :
+				`all kinds of dogs`,
+			canines = CL === 1 ? V.canines[0].species === "dog" ?
+				V.canines[0].breed : V.canines[0].speciesPlural : CL < 3 ?
+					`several different ${V.canines.every(
+						c => c.species === "dog") ?
+						`breeds of dogs` : `species of canines`}` :
+					`all kinds of canines`,
+
+			kennels = document.createElement("div"),
+			kennelsUpgrade = App.UI.DOM.makeElement("div", '', "indent"),
+			kennelsNote = App.UI.DOM.makeElement("span", '', "note"),
+			kennelsCost = App.UI.DOM.makeElement("span", '', "yellowgreen");
+
+		if (farmyardKennels === 0) {
+			kennels.append(App.UI.DOM.passageLink("Add kennels", "Farmyard",
 				() => {
-					cashX(forceNeg(upgradedCost));
-					V.farmyardKennels = 2;
+					cashX(forceNeg(baseCost), "farmyard");
+					V.farmyardKennels = 1;
 				}));
 
-			kennelsNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic canines`);
-
-			kennelsUpgrade.append(kennelsNote);
-			kennels.append(kennelsUpgrade);
-		}
-	} else if (farmyardKennels === 2) {
-		kennels.append(App.UI.DOM.passageLink("Large kennels", "Farmyard Animals"));
-		kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${canines}`} `);
-	}
+			kennelsCost.append(cashFormat(baseCost));
+			kennelsNote.append(` Costs `, kennelsCost, `, will incur upkeep costs, and unlocks domestic canines`);
 
+			kennels.append(kennelsNote);
+		} else if (farmyardKennels === 1) {
+			kennels.append(App.UI.DOM.passageLink("Kennels", "Farmyard Animals"));
+			kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${dogs}`}.`);
 
+			if (V.rep > 10000) {
+				kennelsUpgrade.append(App.UI.DOM.passageLink("Upgrade kennels", "Farmyard",
+					() => {
+						cashX(forceNeg(upgradedCost), "farmyard");
+						V.farmyardKennels = 2;
+					}));
 
-	// MARK: Stables
+				kennelsCost.append(cashFormat(upgradedCost));
+				kennelsNote.append(` Costs `, kennelsCost, `, will incur additional upkeep costs, and unlocks exotic canines`);
 
-	const
-		HL = V.hooved.length,
+				kennelsUpgrade.append(kennelsNote);
+				kennels.append(kennelsUpgrade);
+			}
+		} else if (farmyardKennels === 2) {
+			kennels.append(App.UI.DOM.passageLink("Large kennels", "Farmyard Animals"));
+			kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${canines}`}.`);
+		}
 
-		hooved = HL === 1 ? V.hooved[0] : HL < 3 ?
-			`several different types of hooved animals` :
-			`all kinds of hooved animals`,
 
-		stables = document.createElement("div"),
-		stablesNote = document.createElement("span"),
-		stablesUpgrade = document.createElement("div");
 
-	stablesNote.classList.add("note");
-	stablesUpgrade.classList.add("indent");
+		// MARK: Stables
 
-	if (farmyardStables === 0) {
-		stables.append(App.UI.DOM.passageLink("Add stables", "Farmyard",
-			() => {
-				cashX(forceNeg(baseCost));
-				V.farmyardStables = 1;
-			}));
+		const
+			HL = V.hooved.length,
 
-		stablesNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic hooved animals`);
+			hooved = HL === 1 ? V.hooved[0] : HL < 3 ?
+				`several different types of hooved animals` :
+				`all kinds of hooved animals`,
 
-		stables.append(stablesNote);
-	} else if (farmyardStables === 1) {
-		stables.append(App.UI.DOM.passageLink("Stables", "Farmyard Animals"));
-		stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}.`}`);
+			stables = document.createElement("div"),
+			stablesUpgrade = App.UI.DOM.makeElement("div", '', "indent"),
+			stablesNote = App.UI.DOM.makeElement("span", '', "note"),
+			stablesCost = App.UI.DOM.makeElement("span", '', "yellowgreen");
 
-		if (V.rep > 10000) {
-			stablesUpgrade.append(App.UI.DOM.passageLink("Upgrade stables", "Farmyard",
+		if (farmyardStables === 0) {
+			stables.append(App.UI.DOM.passageLink("Add stables", "Farmyard",
 				() => {
-					cashX(forceNeg(upgradedCost));
-					V.farmyardStables = 2;
+					cashX(forceNeg(baseCost), "farmyard");
+					V.farmyardStables = 1;
 				}));
 
-			stablesNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic hooved animals`);
+			stablesCost.append(cashFormat(baseCost));
+			stablesNote.append(` Costs `, stablesCost, `, will incur upkeep costs, and unlocks domestic hooved animals`);
 
-			stablesUpgrade.append(stablesNote);
-			stables.append(stablesUpgrade);
-		}
-	} else if (farmyardStables === 2) {
-		stables.append(App.UI.DOM.passageLink("Large stables", "Farmyard Animals"));
-		stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`} `);
-	}
+			stables.append(stablesNote);
+		} else if (farmyardStables === 1) {
+			stables.append(App.UI.DOM.passageLink("Stables", "Farmyard Animals"));
+			stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`}.`);
 
+			if (V.rep > 10000) {
+				stablesUpgrade.append(App.UI.DOM.passageLink("Upgrade stables", "Farmyard",
+					() => {
+						cashX(forceNeg(upgradedCost), "farmyard");
+						V.farmyardStables = 2;
+					}));
 
+				stablesCost.append(cashFormat(upgradedCost));
+				stablesNote.append(` Costs `, stablesCost, `, will incur additional upkeep costs, and unlocks exotic hooved animals`);
 
-	// MARK: Cages
+				stablesUpgrade.append(stablesNote);
+				stables.append(stablesUpgrade);
+			}
+		} else if (farmyardStables === 2) {
+			stables.append(App.UI.DOM.passageLink("Large stables", "Farmyard Animals"));
+			stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`}.`);
+		}
 
-	const
-		FL = V.felines.length,
-
-		cats = FL === 1 ? V.felines[0] : FL < 3 ?
-			`several different breeds of cats` :
-			`all kinds of cats`,
-		felines = FL === 1 ? V.felines[0].species === "cat" ?
-			V.felines[0].breed : V.felines[0].speciesPlural : FL < 3 ?
-				`several different ${V.felines.every(
-					c => c.species === "cat") ?
-					`breeds of cats` : `species of felines`}` :
-				`all kinds of felines`,
-
-		cages = document.createElement("div"),
-		cagesNote = document.createElement("span"),
-		cagesUpgrade = document.createElement("div");
-
-	cagesNote.classList.add("note");
-	cagesUpgrade.classList.add("indent");
-
-	if (farmyardCages === 0) {
-		cages.append(App.UI.DOM.passageLink("Add cages", "Farmyard",
-			() => {
-				cashX(forceNeg(baseCost));
-				V.farmyardCages = 1;
-			}));
 
-		cagesNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic felines`);
 
-		cages.append(cagesNote);
-	} else if (farmyardCages === 1) {
-		cages.append(App.UI.DOM.passageLink("Cages", "Farmyard Animals"));
-		cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${cats}.`}`);
+		// MARK: Cages
 
-		if (V.rep > 10000) {
-			cagesUpgrade.append(App.UI.DOM.passageLink("Upgrade cages", "Farmyard",
+		const
+			FL = V.felines.length,
+
+			cats = FL === 1 ? V.felines[0] : FL < 3 ?
+				`several different breeds of cats` :
+				`all kinds of cats`,
+			felines = FL === 1 ? V.felines[0].species === "cat" ?
+				V.felines[0].breed : V.felines[0].speciesPlural : FL < 3 ?
+					`several different ${V.felines.every(
+						c => c.species === "cat") ?
+						`breeds of cats` : `species of felines`}` :
+					`all kinds of felines`,
+
+			cages = document.createElement("div"),
+			cagesUpgrade = App.UI.DOM.makeElement("div", '', "indent"),
+			cagesNote = App.UI.DOM.makeElement("span", '', "note"),
+			cagesCost = App.UI.DOM.makeElement("span", '', "yellowgreen");
+
+		if (farmyardCages === 0) {
+			cages.append(App.UI.DOM.passageLink("Add cages", "Farmyard",
 				() => {
-					cashX(forceNeg(upgradedCost));
-					V.farmyardCages = 2;
+					cashX(forceNeg(baseCost), "farmyard");
+					V.farmyardCages = 1;
 				}));
 
-			cagesNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic felines`);
+			cagesCost.append(cashFormat(baseCost));
+			cagesNote.append(` Costs `, cagesCost, `, will incur upkeep costs, and unlocks domestic felines`);
+
+			cages.append(cagesNote);
+		} else if (farmyardCages === 1) {
+			cages.append(App.UI.DOM.passageLink("Cages", "Farmyard Animals"));
+			cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${cats}`}.`);
 
-			cagesUpgrade.append(cagesNote);
-			cages.append(cagesUpgrade);
+			if (V.rep > 10000) {
+				cagesUpgrade.append(App.UI.DOM.passageLink("Upgrade cages", "Farmyard",
+					() => {
+						cashX(forceNeg(upgradedCost), "farmyard");
+						V.farmyardCages = 2;
+					}));
+
+				cagesCost.append(cashFormat(upgradedCost));
+				cagesNote.append(` Costs `, cagesCost, `, will incur additional upkeep costs, and unlocks exotic felines`);
+
+				cagesUpgrade.append(cagesNote);
+				cages.append(cagesUpgrade);
+			}
+		} else if (farmyardCages === 2) {
+			cages.append(App.UI.DOM.passageLink("Large cages", "Farmyard Animals"));
+			cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${felines}`}.`);
 		}
-	} else if (farmyardCages === 2) {
-		cages.append(App.UI.DOM.passageLink("Large cages", "Farmyard Animals"));
-		cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${felines}`} `);
-	}
 
 
 
-	// MARK: Remove Housing
+		// MARK: Remove Housing
 
-	const
-		removeHousing = document.createElement("div"),
-		removeCost = ((farmyardKennels + farmyardStables + farmyardCages) * 5000) * V.upgradeMultiplierArcology;
+		const
+			removeHousing = document.createElement("div"),
+			removeHousingNote = App.UI.DOM.makeElement("span", '', "note"),
+			removeHousingCost = App.UI.DOM.makeElement("span", '', "yellowgreen"),
 
-	if (farmyardKennels || farmyardStables || farmyardCages) {
-		removeHousing.append(document.createElement("br"));
+			removeHousingPrice = ((farmyardKennels + farmyardStables + farmyardCages) * 5000) * V.upgradeMultiplierArcology;
 
-		removeHousing.append(App.UI.DOM.passageLink("Remove the animal housing", "Farmyard",
-			() => {
-				V.farmyardKennels = 0;
-				V.farmyardStables = 0;
-				V.farmyardCages = 0;
+		if (farmyardKennels || farmyardStables || farmyardCages) {
+			removeHousing.append(document.createElement("br"));
 
-				V.farmyardShows = 0;
-				V.farmyardBreeding = 0;
-				V.farmyardRestraints = 0;
+			removeHousing.append(App.UI.DOM.passageLink("Remove the animal housing", "Farmyard",
+				() => {
+					V.farmyardKennels = 0;
+					V.farmyardStables = 0;
+					V.farmyardCages = 0;
 
-				V.canines = [];
-				V.hooved = [];
-				V.felines = [];
+					V.farmyardShows = 0;
+					V.farmyardBreeding = 0;
+					V.farmyardRestraints = 0;
 
-				App.Facilities.Farmyard.clearAnimalsBought();
-			}));
+					V.canines = [];
+					V.hooved = [];
+					V.felines = [];
+
+					clearAnimalsBought();
+					cashX(forceNeg(removeHousingPrice), "farmyard");
+				}));
+
+			removeHousingCost.append(cashFormat(removeHousingPrice));
+			removeHousingNote.append(` Will cost `, removeHousingCost);
+			removeHousing.append(removeHousingNote);
+		}
+
+		frag.append(kennels, stables, cages, removeHousing);
 
-		removeHousing.append(` Will cost ${cashFormat(removeCost)}`);
+		return frag;
 	}
 
+	function rename() {
+		const
+			frag = new DocumentFragment(),
+
+			renameDiv = App.UI.DOM.makeElement("div", '', "farmyard-rename"),
+			renameNote = App.UI.DOM.makeElement("span", '', "note");
+
+		renameDiv.append(`Rename ${V.farmyardName}: `);
+		renameNote.append(` Use a noun or similar short phrase`);
+
+		renameDiv.append(App.UI.DOM.makeTextBox(V.farmyardName, newName => {
+			V.farmyardName = newName;
+		}));
+
+		renameDiv.append(renameNote);
+
+		frag.append(renameDiv);
 
+		return frag;
+	}
 
-	frag.append(" ", kennels);
-	frag.append(" ", stables);
-	frag.append(" ", cages);
-	frag.append(" ", removeHousing);
+	function clearAnimalsBought() {
+		for (const i in V.animalsBought) {
+			V.animalsBought[i] = 0;
+		}
+	}
 
 	return frag;
 };
diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw
index 37ff37354abdf92b884465e29bb8a400b8b86bef..c7f495ae5e62b3e2b6eb07feb32ee61e6f293d70 100644
--- a/src/facilities/farmyard/farmyard.tw
+++ b/src/facilities/farmyard/farmyard.tw
@@ -4,241 +4,4 @@
 /* TODO: allow slaves that can't walk to put on shows */
 /* TODO: write placeholders */
 
-<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Farmyard", $encyclopedia = "Farmyard">>
-
-<<if $farmyardName != "the Farmyard">>
-	<<set $farmyardNameCaps = $farmyardName.replace("the ", "The ")>>
-<</if>>
-
-<<set _CL = $canines.length, _HL = $hooved.length, _FL = $felines.length, _FyL = App.Entity.facilities.farmyard.employeesIDs().size>>
-<p class="scene-intro">
-	$farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and concrete that is $arcologies[0].name. Animals are kept in pens, tended to by your slaves, while <<if $farmyardUpgrades.hydroponics == 1>>rows of hydroponics equipment<<else>>makeshift fields<</if>> grow crops.
-	<<switch $farmyardDecoration>>
-		<<case "Roman Revivalist">>
-			Its red tiles and white stone walls are the very picture of a Roman farm villa's construction, as are the marble statues and reliefs. Saturn and Ceres look over the prosperity of the fields<<if $seeBestiality>>, Mercury watches over the health of the animals, and Feronia ensures strong litters in your slaves.<<else>> and Mercury watches over the health of the animals.<</if>>. The slaves here are all looked after well, as they have one of the most important jobs in $arcologies[0].name.
-		<<case "Aztec Revivalist">>
-			It can't completely recreate the floating farms in the ancient Aztec fashion, but it comes as close as it can, shallow pseudo-canals dividing each field into multiple sections. Smooth stone and colorful murals cover the walls, depicting bloody stories of gods and mortals alike.
-		<<case "Egyptian Revivalist">>
-			It does its best to capture the wide open nature of ancient Egyptian farms, including mimicking the irrigation systems fed by the Nile. The stone walls are decorated with murals detailing its construction and your prowess in general, <<if $seeBestiality>>with animal-bloated slaves featured prominently.<<else>>hieroglyphs spelling out a volumes of praise.<</if>>
-		<<case "Edo Revivalist">>
-			It does its best to mimic the rice patties and thatch roofed buildings of the Edo period despite the wide variety of crops tended by various slaves. Not every crop can thrive in flooded fields, but the ones that can take advantage of your attention to detail.
-		<<case "Arabian Revivalist">>
-			Large plots of olive trees and date palms line the outer edges of the main crop area, while a combination of wheat, flax, and barley occupies the interior space. Irrigation canals snake through the area, ensuring every inch of cropland is well-watered.
-		<<case "Chinese Revivalist">>
-			It does its best to capture the terraces that covered the ancient Chinese hills and mountains, turning every floor into ribbons of fields following a slight incline. Slaves wade through crops that can handle flooding and splash through the irrigation of the others when they aren't tending <<if $seeBestiality>>or breeding with<</if>> your animals.
-		<<case "Chattel Religionist">>
-			It runs like a well oiled machine, slaves bent in humble service as they tend crops grown on the Prophet's command, or see to the animals' needs. Their clothing is tucked up and out of the way as they see to their tasks, keeping them clean as they work <<if $seeBestiality>>around animal bloated bellies<</if>> as divine will dictates.
-		<<case "Degradationist">>
-			It is constructed less as a converted warehouse and more as something to visit, allowing guests to enjoy the spectacle of slaves <<if $seeBestiality>>being pounded by eager animals<<else>>elbow deep in scrubbing animal waste<</if>> to their satisfaction.
-		<<case "Repopulation Focus">>
-			It teems with life, both in the belly of every animal and the belly of every slave, though the latter makes tending the fields difficult. They're ordered to take care, as they carry the future <<if $seeBestiality>>of this farm<<else>>of the arcology<</if>> in their bellies.
-		<<case "Eugenics">>
-			It holds a wide variety of crops and animals, but the best of the best is easy to find. They're set apart from the others, given only the best care and supplies<<if $seeBestiality>>and bred with only the highest quality slaves<</if>>, while the sub-par stock is neglected off to the side.
-		<<case "Asset Expansionist">>
-			It is not easy to look after animals and till fields with such enormous body parts, but your slaves are diligent regardless, working hard to provide food and livestock for the arcology.
-		<<case "Transformation Fetishist">>
-			/* TODO: */
-		<<case "Gender Radicalist">>
-			/* TODO: */
-		<<case "Gender Fundamentalist">>
-			/* TODO: */
-		<<case "Physical Idealist">>
-			Its animals are in exceptional shape, their coats unable to hide how muscular they are, requiring your slaves to be equally toned to control them. There's plenty of space for their exercise as well<<if $seeBestiality>> and an abundance of curatives for the slaves full of their fierce kicking offspring<</if>>.
-		<<case "Supremacist">>
-			It is a clean and orderly operation, stables and cages mucked by a multitude of inferior slaves, along with grooming your animals and harvesting your crops.
-		<<case "Subjugationist">>
-			It is a clean and orderly operation, stables and cages mucked by a multitude of $arcologies[0].FSSubjugationistRace slaves, while the others are tasked with grooming your animals and harvesting your crops.
-		<<case "Paternalist">>
-			It's full of healthy animals, crops, and slaves, the former's every need diligently looked after by the latter. The fields flourish to capacity under such care, and the animals give the distinct impression of happiness<<if $seeBestiality>> — some more than others if the growing bellies of your slaves are anything to go by, the only indication that such rutting takes place<</if>>.
-		<<case "Pastoralist">>
-			/* TODO: */
-		<<case "Maturity Preferentialist">>
-			/* TODO: */
-		<<case "Youth Preferentialist">>
-			/* TODO: */
-		<<case "Body Purist">>
-			/* TODO: */
-		<<case "Slimness Enthusiast">>
-			It features trim animals and slaves alike, not a pound of excess among them. The feed for both livestock and crops are carefully maintained to ensure optimal growth without waste, letting them flourish without being weighed down.
-		<<case "Hedonistic">>
-			It features wider gates and stalls, for both the humans visiting or tending the occupants, and the animals starting to mimic their handlers <<if $seeBestiality>>and company<</if>>, with plenty of seats along the way.
-		<<default>>
-			It is very much a converted warehouse still, sectioned off in various 'departments'<<if $farmyardUpgrades.machinery == 1>> with machinery placed where it can be<<if $farmyardUpgrades.hydroponics > 0>> and plumbing for the hydroponics system running every which way<</if>><</if>>.
-	<</switch>>
-
-	<<if _FyL > 2>>
-		$farmyardNameCaps is bustling with activity. Farmhands are hurrying about, on their way to feed animals and maintain farming equipment.
-	<<elseif _FyL > 0>>
-		$farmyardNameCaps is working steadily. Farmhands are moving about, looking after the animals and crops.
-	<<elseif $FarmerID != 0>>
-		_S.Farmer.slaveName is alone in $farmyardName, and has nothing to do but look after the animals and crops.
-	<<else>>
-		$farmyardNameCaps is empty and quiet.
-		<div class="choices" style="font-style:normal">
-			<<link "Decommission the Farmyard" "Main">>
-				<<if $farmMenials > 0>>
-					<<set $menials += $farmMenials>>
-				<</if>>
-				<<set $farmyardName = "the Farmyard", $farmyard = 0, $farmyardDecoration = "standard", $farmMenials = 0, $farmMenialsSpace = 0, $farmyardShows = 0, $farmyardBreeding = 0, $farmyardUpgrade = {pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0}, $farmyardCrops = 0, $farmyardKennels = 0, $farmyardStables = 0, $farmyardCages = 0, $activeCanine = 0, $activeHooved = 0, $activeFeline = 0, $pitAnimal = 0, $pitAnimalType = 0, $canines = [], $hooved = [], $felines = []>>
-				<<run App.Facilities.Farmyard.clearAnimalsBought()>>
-				<<run App.Arcology.cellUpgrade($building, App.Arcology.Cell.Manufacturing, "Farmyard", "Manufacturing")>>
-			<</link>>
-		</div>
-	<</if>>
-</p>
-
-<div>
-	<<set _Tmult0 = Math.trunc($farmyard*1000*$upgradeMultiplierArcology)>>
-	It can support $farmyard farmhands. Currently there <<if _FyL == 1>>is<<else>>are<</if>> _FyL farmhand<<if _FyL != 1>>s<</if>> at $farmyardName.
-	<div class= "choices">
-		[[Expand the farmyard|Farmyard][cashX(forceNeg(_Tmult0), "capEx"), $farmyard += 5, $PC.skill.engineering += .1]]
-		<span class="note">
-			Costs <<print cashFormat(_Tmult0)>> and will increase upkeep costs
-		</span>
-	</div>
-	<div class= "choices">
-		<<if _FyL > 0>>
-			<<removeFacilityWorkers "farmyard" "rest" "rest">>
-		<</if>>
-	</div>
-</div>
-<span id="menials">
-<br>
-<<if $farmMenials > 0>>
-	Assigned here are $farmMenials slaves working to produce as much food as possible.
-<</if>>
-	<<if $farmMenialsSpace > 0>>
-	You <<if $menials > 0>> own <<print num($menials)>><<else>>don't own any<</if>> free menial slaves. $farmyardNameCaps can house <<print $farmMenialsSpace>> menial slaves total, with <<print $farmMenialsSpace - $farmMenials>> free slots.
-	<</if>>
-
-<br>
-
-<<if ($farmMenials < $farmMenialsSpace) && ($farmMenialsSpace > 0)>>
-	<<if $menials >= 1>>
-		<<link "Transfer in a menial slave">>
-			<<set $menials-->>
-			<<set $farmMenials++>>
-			<<goto "Farmyard">>
-		<</link>>
-	<</if>>
-	<<if $menials >= 10 && $farmMenials <= ($farmMenialsSpace - 10)>>
-		| <<link "Transfer in 10 menial slaves">>
-			<<set $menials -= 10>>
-			<<set $farmMenials += 10>>
-			<<goto "Farmyard">>
-		<</link>>
-	<</if>>
-	<<if $menials > 0>>
-		| <<link "Transfer in all free menial slaves">>
-			<<if $menials > $farmMenialsSpace - $farmMenials>>
-				<<set $menials -= $farmMenialsSpace - $farmMenials>>
-				<<set $farmMenials = $farmMenialsSpace>>
-			<<else>>
-				<<set $farmMenials += $menials>>
-				<<set $menials = 0>>
-			<</if>>
-			<<goto "Farmyard">>
-		<</link>>
-	<</if>>
-	<<if $farmMenials > 0>>
-	<<if $menials > 0>>|<</if>>
-		<<link "Transfer out all menial slaves">>
-			<<set $menials += $farmMenials>>
-			<<set $farmMenials = 0>>
-			<<goto "Farmyard">>
-		<</link>>
-	<</if>>
-<<elseif $farmMenialsSpace <= 0>>
-	$farmyardNameCaps cannot currently house any menial slaves.
-<<else>>
-	$farmyardNameCaps has all the menial slaves it can currently house assigned to it.
-	<<link "Transfer out all menial slaves">>
-		<<set $menials += $farmMenials>>
-		<<set $farmMenials = 0>>
-		<<goto "Farmyard">>
-	<</link>>
-<</if>>
-
-<<if $farmMenialsSpace > 0>>
-	<<run MenialPopCap()>>
-	<<set _menialPrice = menialSlaveCost()>>
-	<<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>>
-	<<if $cash > _menialPrice>>
-	<<if _bulkMax > 0 || $menials+$fuckdolls+$menialBioreactors == 0>>
-		| [[Buy |Farmyard][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(Math.trunc(_menialPrice, "farmyard")))]]
-		<<if $cash > (menialSlaveCost(10))*10>>
-			[[(x10)|Farmyard][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg(Math.trunc(menialSlaveCost(10))*10), "farmyard")]]
-		<</if>>
-		<<if $cash > (menialSlaveCost(100))*100>>
-			[[(x100)|Farmyard][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg(Math.trunc(menialSlaveCost(100))*100), "farmyard")]]
-		<</if>>
-		<<if $cash > (_menialPrice+1)*2>>
-			[[(max)|Farmyard][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice),0,_bulkMax)*(_menialPrice))), "farmyard")]]
-		<</if>>
-	<</if>>
-	<</if>>
-<</if>>
-
-<<if $farmMenialsSpace < 500>>
-	<br>
-	There is enough room in $farmyardName to build housing, enough to give <<print $farmMenialsSpace+100>> menials a place to sleep and relax.
-	[[Build a unit|Farmyard][cashX(forceNeg(Math.trunc(1000*$upgradeMultiplierArcology), "farmyard")), $farmMenialsSpace += 100]]
-	<span class="note">
-		Costs @@.yellowgreen;<<print cashFormat(Math.trunc(1000*$upgradeMultiplierArcology))>>@@ and will increase upkeep costs
-	</span>
-<</if>>	/* closes menial subsection */
-</span>
-
-<span id="rules">
-<<if _FyL > 0>>
-<br><br>
-	<<if $farmyardShows == 1 && (_CL > 0 || _HL > 0 || _FL > 0)>>
-		Slaves ''are'' putting on shows with animals.
-		[[End shows|Farmyard][$farmyardShows = 0, $farmyardBreeding = 0, $farmyardRestraints = 0]]
-		<<if $seeBestiality>>
-			<br>
-			<<if $farmyardBreeding == 1>>
-				Slaves ''are'' being bred with animals.
-				[[End breeding|Farmyard][$farmyardBreeding = 0, $farmyardRestraints = 0]]
-				<br>
-				<<if $farmyardRestraints == 1>>
-					''All of the slaves'' are being restrained.
-					[[Restrain only disobedient slaves|Farmyard][$farmyardRestraints = 0]]
-				<<else>>
-					''Only disobedient slaves'' are being restrained.
-					[[Restrain all of the slaves|Farmyard][$farmyardRestraints = 1]]
-				<</if>>
-			<<else>>
-				Slaves ''are not'' being bred with animals.
-				[[Begin breeding|Farmyard][$farmyardBreeding = 1]]
-				<br>
-			<</if>>
-		<</if>>
-	<<else>>
-		Slaves ''are not'' putting on shows with animals.
-		<<if (_CL > 0 || _HL > 0 || _FL > 0)>>
-			[[Begin shows|Farmyard][$farmyardShows = 1]]
-		<<else>>
-			//You must purchase animals before you can put on shows//
-		<</if>>
-	<</if>>
-<</if>>
-<br><br>
-</span>
-
-<span id="upgrades">
-<<includeDOM App.Facilities.Farmyard.upgrades()>>
-<br>
-</span>
-
-<span id="animalhousing">
-<<includeDOM App.Facilities.Farmyard.animalHousing()>>
-</span>
-
-<br><hr><br>
-
-<<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.farmyard)>>
-
-<br><br>Rename $farmyardName: <<textbox "$farmyardName" $farmyardName "Farmyard">> //Use a noun or similar short phrase//
-
-<<run App.UI.SlaveList.ScrollPosition.restore()>>
+<<includeDOM App.Facilities.Farmyard.farmyard()>>