diff --git a/.eslintrc.json b/.eslintrc.json
index 2e040c537df808703ab3cf608ec826296261a002..72b581a6b21ed1f5a368bbe32606c5f240645e56 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -38,7 +38,12 @@
 		"camelcase": "warn",
 		"comma-spacing": "error",
 		"comma-style": "error",
-		"object-curly-newline": "off",
+		"object-curly-newline": ["warn", 
+			{
+				"minProperties": 4,
+				"consistent": true
+			}
+		],
 		"object-curly-spacing": "error",
 		"no-var": "error",
 		"spaced-comment": "warn",
@@ -57,4 +62,4 @@
 			}
 		]
 	}
-}
\ No newline at end of file
+}
diff --git a/devNotes/AnatomyOfAFreeCitiesEvent.txt b/devNotes/AnatomyOfAFreeCitiesEvent.txt
index 8d9d406fd85f79d882810eca9565a2c958c34a24..0726e8066d9ba01c1a9699874c42b5b8a4b9345c 100644
--- a/devNotes/AnatomyOfAFreeCitiesEvent.txt
+++ b/devNotes/AnatomyOfAFreeCitiesEvent.txt
@@ -8,7 +8,7 @@ Nonrandom events
 Random nonindividual events
 Random individual events
 
-The differences between them are almost non-existent. If they happen, they happen in this order, so you could say it's a kind of event priority ordering. The last two events pre-select a slave (in $eventSlave), with the "nonindividual" events using all your slaves while the "individual" events use only non-fuckdolls, typically from your penthouse. When writing your event, you're free to ignore this and choose your own slave or create a new one. By convention, scheduled events tend to go back to the "Scheduled Event" passage so that other such events can run; all the others tend to just skip to the next event category. Nothing in code forces you to do it this way for your events.
+The differences between them are almost non-existent. If they happen, they happen in this order, so you could say it's a kind of event priority ordering. The last two events pre-select a slave (in $eventSlave), with the "nonindividual" events using all your slaves while the "individual" events use only non-Fuckdolls, typically from your penthouse. When writing your event, you're free to ignore this and choose your own slave or create a new one. By convention, scheduled events tend to go back to the "Scheduled Event" passage so that other such events can run; all the others tend to just skip to the next event category. Nothing in code forces you to do it this way for your events.
 
 Preconditions
 Most events have some kind of precondition for when they happen. Scheduled events always happen when their preconditions are true. Nonrandom events happen when their preconditions are true and no other nonrandom events get picked first (so writing a too-often-true precondition is a good way to break the game by blocking any further such events). The two other types of events get put in a pool ($events) if they match the precondition, then at most one event gets pulled from the pool per type.
diff --git a/devNotes/Deepmurk_Vector_Art_Changelog.txt b/devNotes/Deepmurk_Vector_Art_Changelog.txt
index 2745b613a4b53b4702c9bf9f86fe213cc61fbde8..396ceca7edc38bd05beaf0bce9797389d5699927 100644
--- a/devNotes/Deepmurk_Vector_Art_Changelog.txt
+++ b/devNotes/Deepmurk_Vector_Art_Changelog.txt
@@ -78,7 +78,7 @@ v1.6 (11/18/2018)
 	-shibari rope outfit is now red for better contrast on some skins
 	-fixed hair showing when ability to grow hair was surgically removed
 	-fixed muscles showing on amputated slave limbs
-	-fixed faces showing on fuckdolls
+	-fixed faces showing on Fuckdolls
 	-fixed "mixed race" skin tone/face issues
 	-fixed some issues related to belly outfits
 
diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt
index 83245d0f8bdf8fcbb8e3017acb0be28aad342c53..eafa5e09cb42a6b481885d0b473e616fa15279bc 100644
--- a/devNotes/Useful JS Function Documentation.txt	
+++ b/devNotes/Useful JS Function Documentation.txt	
@@ -145,7 +145,7 @@ PoliteRudeTitle(slave) - Returns the slave's title for the player they hate.
 
 SlaveTitle(slave) - Returns the slave's descriptive title.
 
-relativeTerm(slave1, slave2) - Returns the term for slave2's relation to slave1. (daughter, mother, etc)
+relativeTerm(slave1, slave2) - Returns the term for slave2's relation to slave1. (daughter, mother, etc.)
 
 relationshipChecks [script] All work as expected with <<if X.rivalryTarget == $slaves[$i].ID>> preceding them.
 	rivalryTerm(id) - Returns the rivalry term for the input. e.g. lines 99-100 of brothelReport.
@@ -246,6 +246,13 @@ SoftenBehavioralFlaw(slave) - Replaces the slave's behavioral flaw with the corr
 
 SoftenSexualFlaw(slave) - Replaces the slave's sexual flaw with the corresponding quirk.
 
+SkillIncrease.Oral(slave, value)
+SkillIncrease.Vaginal(slave, value)
+SkillIncrease.Anal(slave, value)
+SkillIncrease.Whore(slave, value)
+SkillIncrease.Entertain(slave, value)
+- Increases the slave's skill by value or 1. Returns a string if the skill is boosted over a threshold.
+
 UtilJS [script]
 	Height.mean(nationality, race, genes, age) - returns the mean height for the given combination and age in years (>=2).
  Height.mean(nationality, race, genes) - returns the mean adult height for the given combination.
@@ -333,6 +340,8 @@ UtilJS [script]
 
 	capFirstChar() - Capitalizes the first character of a given string.
 
+	addA() - Adds an  `a ` or, if the first character is a vocal, an `an ` in front of a given string.
+
 	cmToInchString() - takes an integer e.g. $activeSlave.hLength, returns a string in the format 10 inches
 
 	cmToFootInchString() - takes an integer e.g. $activeSlave.height, returns a string in the format 6'5"
diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt
index 23e80423b0ae5784b15ac382df592f0b61b1005c..8b751810777ccfc3ecf3313a757e06c808623190 100644
--- a/devNotes/VersionChangeLog-Premod+LoliMod.txt
+++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt
@@ -3,7 +3,9 @@ Pregmod
 0.10.7.1-2.3.x
 
 	9
+	-unified cybermod with vanilla
 	-slave assignment links improved
+	-facility transfer tab added to facility assignment
 	-breast implants now impact milk production based on % implant
 	-many new names added to lacking name pools
 	-fixes
@@ -51,7 +53,7 @@ Pregmod
 04/09/2019
 
 	0
-	-Arcade overhualed
+	-Arcade overhauled
 	-population now affects demand
 	-added superfetation genetic quirk
 	-added rear lipedema genetic quirk (constant ass growth)
@@ -1917,7 +1919,7 @@ Pregmod
 	-new means to add, remove, and locate slaves via index map
 
 	40
-	-added fuckdoll impregnation
+	-added Fuckdoll impregnation
 	-preglocke's fSlaveSlaveVagConsumate cleanup and content addition
 
 4/10/2018
@@ -1932,7 +1934,7 @@ Pregmod
 
 	37
 	-added ability to give slaves your surname during marriage
-	-unbound slaveInteract impreg block from fuckdoll suit (it now checks .fuckdoll instead)
+	-unbound slaveInteract impreg block from Fuckdoll suit (it now checks .fuckdoll instead)
 	-more fixes and typo corrections
 	-Stuffedanon's tweaks now only apply to refreshed passages and not first visits
 	-fixed engineering start not giving secExp proper drone counts
@@ -3950,7 +3952,7 @@ Pregmod
 
 	52
 	-fixed reported problems
-	-arcade will no longer convert slaves sentenced to it into fuckdolls
+	-arcade will no longer convert slaves sentenced to it into Fuckdolls
 
 	51
 	-added SFanon's merge request
@@ -3961,7 +3963,7 @@ Pregmod
 	-fixed creating SF event
 
 	49
-	-fixed, Milf tourist event and decline politely.
+	-fixed, MILF tourist event and decline politely.
 	-pregmodfan's continued RA tweaking
 
 09/29/17
diff --git a/devNotes/legacy files/artWidgets-legacy b/devNotes/legacy files/artWidgets-legacy
index 2ab0c78478d5410310311d6a8f7604469c17435d..a07b0a3534be7299b4a637d150498285848ae644 100644
--- a/devNotes/legacy files/artWidgets-legacy	
+++ b/devNotes/legacy files/artWidgets-legacy	
@@ -82,9 +82,9 @@ $args[2]: icon UI Display for vector art, 1 for on.
 	<<print "<img class='paperdoll' src=" + _folderLoc + "/test ui.svg'" + "/>">>
 <</if>>
 
-/% Set skin colour %/
+/% Set skin color %/
 <<set _skinFilter = "filter: url(#skin-" + _.kebabCase($args[0].skin) + ");">>
-/% Set hair colour %/
+/% Set hair color %/
 <<set _hairFilter = "filter: url(#hair-" + _.kebabCase($args[0].hColor) + ");">>
 <<set _pubesFilter = "filter: url(#hair-" + _.kebabCase($args[0].pubicHColor) + ");">>
 <<set _axillaryFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
diff --git a/devNotes/twine CSS b/devNotes/twine CSS
index db0c78a1783464c2fd64dfcb2f6bc7d789563599..2ae27eb75df04d029932743b01b5911a77cb9036 100644
--- a/devNotes/twine CSS	
+++ b/devNotes/twine CSS	
@@ -18,7 +18,6 @@ hr {
 	opacity: 1 !important;
 }
 
-
 /* default is 54em */
 #passages {
 	max-width: 100%;
@@ -638,7 +637,6 @@ body.lightTheme .optionMacroSelected {
 	content: '';
 }
 
-
 #graph .linage {
 	fill: none;
 	stroke: white;
diff --git a/sanityCheck.sh b/sanityCheck.sh
index 04bae92e8395fcf8ec52499bbd188ab09f7613a6..346a50e63396e53858ee7d23616f1cbc49e58c49 100755
--- a/sanityCheck.sh
+++ b/sanityCheck.sh
@@ -39,7 +39,7 @@ $GREP "<<[^\"<>]*\"[^\"<>]*>>" -- 'src/*' | myprint "MissingSpeechMark"
 # Check for missing ".  e.g.:   <<if $foo = "hello)
 $GREP -e "<<[^\"<>]*\([^\"<>]*\"[^><\"]*\"\| [<>] \)*\"\([^\"<>]*\"[^><\"]*\"\| [<>] \)*\([^\"<>]\| [<>] \)*>>" --and --not -e "*[^']*" -- 'src/*' | myprint "MissingSpeechMark2"
 # Check for colors like: @@color:red   - should be @@.red
-$GREP -e "@@color:" --and --not -e  "@@color:rgb([0-9 ]\+,[0-9 ]\+,[0-9 ]\+)" -- "src/*" | myprint "UseCssColors"
+$GREP -e "@@color:" --and --not -e  "@@color:rgb([0-9 ]\+,[0-9 ]\+,[0-9 ]\+)" -- "src/*" | myprint "UseCSSColors"
 # Check for missing $ in activeSlave or PC
 $GREP "<<[ ]*[^\$><_\[]*\(activeSlave\|PC\)[.]"  -- "src/*" | myprint "MissingDollar"
 # Check for closing bracket without opening bracket.  e.g.:  <<if foo)>>	  (but  <<case "foo")>>   is valid, so ignore those
@@ -110,8 +110,8 @@ $GREP -e "<<option\([lg]t\?\|default\) *>" -- 'src/*' | grep -v src/js | myprint
 $GREP -e "<<option " --and --not -e "<<option\s\+\(-\?[0-9]\+\|[\'\"].*[\'\"]\|false\|true\)\s\+[\`\'\"].*[\'\"\`]" -- 'src/*' | grep -v src/js | myprint "OptionBadArguments4"
 $GREP -e "<<if def [^(>]*[&|]" -- 'src/*' | myprint "AddBracketsAroundDef2"
 # check for missing ; before statement
-$GREP 'if $ ' -- 'src/*'  | myprint "missing ; before statement"
-$GREP 'elseif $ ' -- 'src/*'  | myprint "missing ; before statement"
+$GREP 'if $ ' -- 'src/*'  | myprint "Missing ; before statement"
+$GREP 'elseif $ ' -- 'src/*'  | myprint "Missing ; before statement"
 # Check for an unrecognized letter before >>
 $GREP "[^]a-zA-Z0-9 \")}'+-\*\`] *>>" -- 'src/*' | myprint "StrangeCharacterAtEndOfCommand"
 # Check for a . inside a <<>>
@@ -121,8 +121,20 @@ $GREP -E "@@(\.|,|;|:)\s" -- src/*.tw | myprint "WrongSelectorPunctuation"
 $GREP "@@[a-z]\+;" -- 'src/*' | myprint "SelectorMissingDot"
 # Check for </span>.  instead of .</span>
 $GREP -E "</span>(\.|,|;|:)\s" -- src/*.js | myprint "WrongSelectorPunctuation"
-#Check for non lethal or non-lethal instead of nonlethal
-$GREP "[Nn]on.lethal" -- 'src/*' | myprint "ShouldBeNonlethal"
+# Check for missing whitespace between operators
+#$GREP -E "\(.(\+|\-|\*|\/|\=)." -- src/*.js :^src/001-lib/Jquery.js,^src/js/dTree.min.js,^devTools/tweeGo/storyFormats/sugarcube-2/format.js,^src/001-lib/mousetrap.js | myprint "MissingWhitespace"		disabled until I can figure out how to exclude files
+# Check for @@ selector instead of <span> selector
+$GREP "@@\." -- src/*.js | myprint "WrongSelectorUsed"
+# Check for JSdoc inside function declaration
+$GREP -e ".\=.\/\*\*" --or -e "slave\s\*\/" -- src/*.js --exclude 'src/interaction/main/mainLinks.js' | myprint "WrongJSdocFormat"	# this --exclude doesn't work
+# Check for missing whitespace at end of /**/ style comments
+#$GREP "\S\*\/" -- src/* --exclude 'src/001-lib/jquery/Jquery.js' | myprint "MissingWhitespace"		disabled until I can figure out to exclude files
+# Check for var instead of let or const
+#$GREP "var\s" -- src/*.js | myprint "UseLetOrConst"	disabled until I can figure out how to exclude certain files
+# Check for non lethal or non-lethal instead of nonlethal
+$GREP -i "non.lethal" -- 'src/*' | myprint "ShouldBeNonlethal"
+# Check for missing quotation marks around selectors
+#$GREP "span class=[^\"]" -- src/*.js --exclude 'src/001-lib/Jquery/Jquery.js' | myprint "MissingQuotes" disabled until I can figure out how to exclude files
 
 # Check that we do not have any variables that we use only once.   e.g.	 $onlyUsedOnce
 # Ignore  *Nationalities
diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt
index fb7ec632d812145ed6ab7c6a0053518c70bf711e..0b58e40ef60bcda4760ab88caa5fa7f137e7ead9 100644
--- a/slave variables documentation - Pregmod.txt	
+++ b/slave variables documentation - Pregmod.txt	
@@ -1438,8 +1438,8 @@ PLimb:
 
 What level of prosthetic interface she has installed
 0 - no interface
-1 - basic interface (used both in and out of cyberMod)
-2 - advanced interface (used only in cyberMod)
+1 - basic interface
+2 - advanced interface
 
 heels:
 
diff --git a/src/001-lib/Jquery/Jquery.js b/src/001-lib/Jquery/Jquery.js
index cb826d7932b6309c249b2eb3a86ace3037f90065..cc817707cf93a2f0a8d78be7175b2351a6b24247 100644
--- a/src/001-lib/Jquery/Jquery.js
+++ b/src/001-lib/Jquery/Jquery.js
@@ -1,15 +1,15 @@
 (function (window, define, exports) {
-/*! jQuery UI - v1.12.1 - 2016-09-14
-* http://jqueryui.com
-* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
-* Copyright jQuery Foundation and other contributors; Licensed MIT */
-
-(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)
-}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
-this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
-}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}
-},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog
-},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
-},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;
-this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
-}).call(window, window);
\ No newline at end of file
+    /*! jQuery UI - v1.12.1 - 2016-09-14
+    * http://jqueryui.com
+    * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
+    * Copyright jQuery Foundation and other contributors; Licensed MIT */
+    
+    (function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n)
+    }}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;
+    this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))
+    }},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"&#39;")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}
+    },_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog
+    },disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1
+    },_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td>&#160;</td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;
+    this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip});
+    }).call(window, window);    
\ No newline at end of file
diff --git a/src/002-config/fc-js-init.js b/src/002-config/fc-js-init.js
index f2d1087953d8beef9b67e9ab917148946fcd23fe..ddc82db7712e2c964754f0d0f5e5a9d89066abb7 100644
--- a/src/002-config/fc-js-init.js
+++ b/src/002-config/fc-js-init.js
@@ -4,8 +4,8 @@
 * does not work.
 */
 window.App = { };
-// the same declaration for code parsers that don't like the line above
-var App = window.App || {};
+// the same declaration for code parsers that don't line the line above
+let App = window.App || {};
 
 App.Data = {};
 App.Debug = {};
@@ -16,3 +16,19 @@ App.UI.View = {};
 App.Utils = {};
 App.Interact = {};
 App.Desc = {};
+App.ExtendedFamily = {};
+App.Facilities = {
+    Brothel: {},
+    Club: {},
+    Dairy: {},
+    Farmyard: {},
+    ServantsQuarters: {},
+    MasterSuite: {},
+    Spa: {},
+    Nursery: {},
+    Clinic: {},
+    Schoolroom: {},
+    Cellblock: {},
+    Arcade: {},
+    HGSuite: {}
+};
diff --git a/src/004-base/facility.js b/src/004-base/facility.js
index cdcd64d4ef4bec20943e73ac7f4ed6531524d25a..daad5234e2973bf1f27c1501e7885de3a19c6351 100644
--- a/src/004-base/facility.js
+++ b/src/004-base/facility.js
@@ -99,7 +99,7 @@ App.Entity.Facilities.Job = class {
 	 *
 	 * @callback linkCallback
 	 * @param {string} assignment new assignment
-	 * @returns {string} code to include into the <<link>><</link>
+	 * @returns {string} code to include into the <<link>><</link>>
 	 */
 
 	/**
diff --git a/src/Mods/DinnerParty/dinnerPartyExecution.tw b/src/Mods/DinnerParty/dinnerPartyExecution.tw
index a92591da94f8b6bc541b5c676d6c5229dd069559..4c787fb150aedfbdce05df8c8d42234651f0ffc6 100644
--- a/src/Mods/DinnerParty/dinnerPartyExecution.tw
+++ b/src/Mods/DinnerParty/dinnerPartyExecution.tw
@@ -91,7 +91,7 @@
 			As you bite into the dick your palate is treated with barely a hint of salty taste at the center of your dicky roll. You smile as you know this is the taste of cum trapped in the shaft of the penis at the moment of death. Your guests also enjoy this exotic taste.
 			<<set _dishRating -= 2>>
 		<<else>>
-			As you bite into the dick you feel as if this dish is missing something. Something Je ne sais quoi.
+			As you bite into the dick you feel as if this dish is missing something. A certain 'je ne sais quoi'.
 			<<set _dishRating -= 2.5>>
 		<</if>>
 		/% Dish rating, could be made into a separate function/passage. The following will be called for every dish %/
@@ -578,7 +578,7 @@
 		<<set $MOD_enemyList = []>>
 	<</if>>
 	<<for _i = 0; _i < 6; _i++>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.devotion = -20>>
 		<<set $activeSlave.trust = -2>>
 		<<set $activeSlave.oldDevotion = -20>>
diff --git a/src/Mods/DinnerParty/dinnerPartyPreparations.tw b/src/Mods/DinnerParty/dinnerPartyPreparations.tw
index 1032e3f551b1dc9b3ebc0f927ef5b7bdfbc17f05..fd37212d85e2c3a018137e47eac4d6659ef87929 100644
--- a/src/Mods/DinnerParty/dinnerPartyPreparations.tw
+++ b/src/Mods/DinnerParty/dinnerPartyPreparations.tw
@@ -7,7 +7,7 @@ Hosting of high society dinner parties will increase your prestige significantly
 
 <h1>Cooking Instructions and Recipes:</h1>
 
-''Roast Long Pig'' – Made with the meat of a human roasted on a spit. Young meat is better than old meat. There should be some amount of fat to make the meat juicy, but not too much fat that makes the meat greasy. Muscles affect the texture of the meat. Meat without muscles lacks texture while an excess will be tough and hard to chew. Remember you can't eat silicone, and virgin meat is highly sought after. <<if $seePreg != 0>>If the human is pregnant a veal dish can also be made from the fetus.<</if>>
+''Roast Long Pig'' – Made with the meat of a human roasted on a spit. Young meat is better than old meat. There should be some amount of fat to make the meat juicy, but not too much fat that makes the meat greasy. Muscles affect the texture of the meat. Meat without muscles lacks texture while an excess will be tough and hard to chew. Remember you can't eat silicone, and virgin meat is highly sought after.<<if $seePreg != 0>> If the human is pregnant a veal dish can also be made from the fetus.<</if>>
 
 <br><br>
 ''Dicky Roll'' – An erect penis made into a spring roll. For best results harvest the penis at the moment of ejaculation. The size of the penis and the amount of accumulated ejaculate all affect the quality of the dish. Too big of a dick and too thin of semen can both ruin a dish.
diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw
index e6f679132fcca15f96c063d5ab0ce69a6b7594b3..f0837dc4c0db921f0415889c82f67e8d0af161fb 100644
--- a/src/SecExp/attackHandler.tw
+++ b/src/SecExp/attackHandler.tw
@@ -174,12 +174,14 @@
 		/* 80% chance of increasing warfare */
 		<<if $PC.warfare < 100 && random(1,100) <= 80>>
 			<<set $gainedWarfare = 1>>
-			<<= IncreasePCSkills('warfare',  10)>>
+			<<= IncreasePCSkills('warfare', 10)>>
 			<<set $PC.warfare = Math.clamp($PC.warfare,-100,100)>>
 		<</if>>
-			/* does the PC get wounded? */
+		/* does the PC get wounded? */
 		<<if $PC.career == "mercenary" || $PC.career == "gang">>
 			<<set _woundChance -= 3>>
+		<<elseif $PC.warfare >= 75>>
+			<<set _woundChance -= 2>>
 		<</if>>
 		<<if $PC.physicalAge >= 60>>
 			<<set _woundChance += 1>>
diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw
index 94efe957686a484fed60fb0fa21eacb0324661bd..4f0fa61c460b6334c04970092fe6654faa47c02c 100644
--- a/src/SecExp/attackReport.tw
+++ b/src/SecExp/attackReport.tw
@@ -436,7 +436,7 @@
 	<<run cashX(_loot, "war")>>
 	<br>
 	Damage to the infrastructure was @@.yellow;virtually non-existent,@@ costing only pocket cash to bring the structure back to normal. The inhabitants as well reported little to no injuries, because of this the prosperity of the arcology did not suffer.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(forceNeg(1000 * _majorBattleMod), "war")>>
 	<<if $PCvictoryStreak >= 3>>
 		It seems your victories over the constant threats directed your way is having @@.green;a positive effect on the prosperity of the arcology,@@ due to the security your leadership affords.
@@ -459,7 +459,7 @@
 	<</if>>
 	<br>
 	In the raiding following the battle @@.red;the arcology sustained heavy damage,@@ which will cost quite the amount of cash to fix. Reports of @@.red;citizens or slaves killed or missing@@ flood your office for a few days following the defeat.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(forceNeg(5000 * _majorBattleMod), "war")>>
 	<<if $week <= 30>>
 		<<set $lowerClass -= random(100) * _majorBattleMod>>
@@ -545,7 +545,7 @@
 	<<run cashX(_loot, "war")>>
 	<br>
 	Damage to the city was @@.red;limited,@@ it won't take much to rebuild. Very few citizens or slaves were involved in the fight and even fewer met their end, safeguarding the prosperity of the arcology.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(forceNeg(2000 * _majorBattleMod), "war")>>
 	<<set $lowerClass -= random(10) * _majorBattleMod>>
 	<<set _lostSlaves = random(20) * _majorBattleMod,
@@ -571,7 +571,7 @@
 	<br>
 	The enemy did not have the strength to raid the arcology for long, still @@.red;the arcology sustained some damage,@@ which will cost a moderate amount of cash to fix. Some citizens and slaves found themselves on the wrong end of a gun and met their demise.
 	Some business sustained heavy damage, slightly impacting the arcology's prosperity.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(forceNeg(3000 * _majorBattleMod), "war")>>
 	<<if $week <= 30>>
 		<<set $lowerClass -= random(50) * _majorBattleMod>>
@@ -631,7 +631,7 @@
 	<</if>>
 	<br>
 	The surrender allows the arcology to survive @@.red;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(forceNeg(1000 * _majorBattleMod), "war")>>
 	<<if $week <= 30>>
 		<<set $lowerClass -= random(80) * _majorBattleMod>>
@@ -692,7 +692,7 @@
 	<</if>>
 	<br>
 	Fortunately the arcology survives @@.yellow;mostly intact,@@ however reports of @@.red;mass looting and killing of citizens@@ flood your office for a few days.
-	<<= IncreasePCSkills('engineering',  0.1)>>
+	<<= IncreasePCSkills('engineering', 0.1)>>
 	<<run cashX(-1000, "war")>>
 	<<if $week <= 30>>
 		<<set $lowerClass -= random(80) * _majorBattleMod>>
diff --git a/src/SecExp/encyclopediaSecExpBattles.tw b/src/SecExp/encyclopediaSecExpBattles.tw
index e261224ded36c89123b4a55ae78b14ab00abb9d9..5a6fbc95cdedae42ac0368434d736ee570da6fc2 100644
--- a/src/SecExp/encyclopediaSecExpBattles.tw
+++ b/src/SecExp/encyclopediaSecExpBattles.tw
@@ -47,9 +47,9 @@
 		<br><strong>The Arcology Owner</strong>: You can join the fray yourself. Your performance will depend greatly on your warfare skill and your past. The troops will react to your presence depending on your social standing and your past as well.
 			Do note however there is the possibility of getting wounded, which makes you unable to focus on any task for a few weeks.
 
-		<br><strong>Your Bodyguard</strong>: Your bodyguard can guide the troops. Her performance will greatly depend on her intelligence and past. Slaves will be happy to be lead by one of them, but militia and mercenaries will not, unless your own authority is high enough to make up for the fact they are being lead by a slave.
+		<br><strong>Your Bodyguard</strong>: Your bodyguard can guide the troops. Their performance will greatly depend on their intelligence and past. Slaves will be happy to be lead by one of them, but militia and mercenaries will not, unless your own authority is high enough to make up for the fact they are being lead by a slave.
 
-		<br><strong>Your Head Girl</strong>: Your Head Girl can guide the troops. She acts very similarly to the bodyguard in battle. Be aware that both she and the bodyguard run the risk of getting wounded, potentially with grave wounds like blindness or limb loss.
+		<br><strong>Your Head Girl</strong>: Your Head Girl can guide the troops, and will act very similarly to the bodyguard in battle. Be aware that both slaves run the risk of getting wounded, potentially with grave wounds like blindness or limb loss.
 
 		<br><strong>An Outstanding Citizen</strong>: One of your citizens can take the leading role. Their performance will be average; however the militia will be pleased to be guided by one of them.
 
diff --git a/src/SecExp/propagandaHub.tw b/src/SecExp/propagandaHub.tw
index 434f602e5439cb6e02513ab916f755cf135bc2a3..789c67c86acc71d6ea5fdd088a0557b762ff3c77 100644
--- a/src/SecExp/propagandaHub.tw
+++ b/src/SecExp/propagandaHub.tw
@@ -82,7 +82,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Invest more resources in the propaganda machine" "propagandaHub">>
 			<<run cashX(forceNeg(5000 * $upgradeMultiplierArcology * ($propCampaign + 1) * _HistoryDiscount*$HackingSkillMultiplier), "capEx")>>
 			<<set $propCampaign += 1>>
-			<<= IncreasePCSkills('hacking',  0.5)>>
+			<<= IncreasePCSkills('hacking', 0.5)>>
 			<<set $propHubUpkeep += $upgradeUpkeep>>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
@@ -133,7 +133,7 @@ The propaganda hub is a surprisingly inconspicuous building, dimly lit from the
 		<<link "Institute controlled leaks protocols" "propagandaHub">>
 			<<set $controlLeaks = 1>>
 			<<run cashX(forceNeg(10000*$upgradeMultiplierArcology*_HistoryDiscount*$HackingSkillMultiplier), "capEx")>>
-			<<= IncreasePCSkills('hacking',  1)>>
+			<<= IncreasePCSkills('hacking', 1)>>
 			<<set $propHubUpkeep += $upgradeUpkeep>>
 		<</link>>
 		<br>Institute a system able to release erroneous, but plausible, information about your business, leading your competitors to prepared financial traps.
diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw
index de82a59cda086e76adce24fd7102adbd55debe29..bae87bcecf2d22d05cc2793fc43a7d30699352a0 100644
--- a/src/SecExp/rebellionReport.tw
+++ b/src/SecExp/rebellionReport.tw
@@ -347,7 +347,7 @@
 	<<if $engageRule == 0>>
 		Since you ordered your troops to limit their weaponry to low caliber or nonlethal, the arcology reported only @@.red;minor damage.@@ Most citizens and non involved slaves remained unharmed, though some casualties between the civilians were inevitable.
 		A few businesses were looted and burned, but the damage was pretty limited.
-		<<set $arcRepairTime += 3, IncreasePCSkills('engineering',  0.1)>>
+		<<set $arcRepairTime += 3, IncreasePCSkills('engineering', 0.1)>>
 		<<if $week <= 30>>
 			<<set $lowerClass -= random(40)>>
 			<<set _lostSlaves = random(65),
@@ -392,7 +392,7 @@
 	<<elseif $engageRule == 1>>
 		You ordered your troops to limit their weaponry to non-heavy, non-explosive, because of this the arcology reported @@.red;moderate damage.@@ Most citizens and non involved slaves remained unharmed or only lightly wounded, but many others did not make it. Unfortunately casualties between the civilians were inevitable.
 		A few businesses were looted and burned, but the damage was pretty limited.
-		<<set $arcRepairTime += 5, IncreasePCSkills('engineering',  0.1)>>
+		<<set $arcRepairTime += 5, IncreasePCSkills('engineering', 0.1)>>
 		<<if $week <= 30>>
 			<<set $lowerClass -= random(60)>>
 			<<set _lostSlaves = random(85),
@@ -437,7 +437,7 @@
 	<<elseif $engageRule == 2>>
 		Since you did not apply any restriction on the weapons your forces should use, the arcology reported @@.red;heavy damage.@@ Many citizens and uninvolved slaves are reported killed or missing. Casualties between the civilians were inevitable.
 		Many businesses were damaged during the battle either by the fight itself, by fires which spread unchecked for hours or by looters.
-		<<set $arcRepairTime += 7, IncreasePCSkills('engineering',  0.1)>>
+		<<set $arcRepairTime += 7, IncreasePCSkills('engineering', 0.1)>>
 		<<if $week <= 30>>
 			<<set $lowerClass -= random(100)>>
 			<<set _lostSlaves = random(150),
@@ -482,7 +482,7 @@
 	<<else>>
 		Thanks to the advance riot control weaponry developed by your experts, the rebels were mostly subdued or killed with @@.yellow;little to no collateral damage to the arcology@@ and its inhabitants.
 		A few businesses were looted, but the damage was very limited.
-		<<set $arcRepairTime += 2, IncreasePCSkills('engineering',  0.1)>>
+		<<set $arcRepairTime += 2, IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-1000, "war")>>
 		<<if $week <= 30>>
 			<<set $lowerClass -= random(20)>>
@@ -539,7 +539,7 @@
 	<<if random(1,100) <= (75 - ($fort.reactor * 25))>>
 		Unfortunately during the fighting a group of slaves infiltrated the reactor complex and sabotaged it, causing massive power fluctuations and blackouts.
 		It will take @@.red;time and money to repair the damage.@@
-		<<set $garrison.reactorTime = $repairTime + random(1) - $fort.reactor, IncreasePCSkills('engineering',  0.1)>>
+		<<set $garrison.reactorTime = $repairTime + random(1) - $fort.reactor, IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-2000, "war")>>
 	<<else>>
 		While the reactor was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky.
@@ -551,7 +551,7 @@
 	<<if random(1,100) <= (75 - ($fort.waterway * 25))>>
 		Unfortunately during the fighting a group of slaves infiltrated the water management complex and sabotaged it, causing huge water leaks throughout the arcology and severely limiting the water supply.
 		It will take @@.red;time and money to repair the damage.@@
-		<<set $garrison.waterwayTime = $repairTime + random(1) - $fort.waterway, IncreasePCSkills('engineering',  0.1)>>
+		<<set $garrison.waterwayTime = $repairTime + random(1) - $fort.waterway, IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-2000, "war")>>
 	<<else>>
 		While the water management complex was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky.
@@ -563,7 +563,7 @@
 	<<if random(1,100) <= (75 - ($fort.assistant * 25))>>
 		Unfortunately during the fighting a group of slaves infiltrated the facility housing $assistantName's mainframe and sabotaged it. Without its AI the arcology will be next to impossible to manage.
 		It will take @@.red;time and money to repair the damage.@@
-		<<set $garrison.assistantTime = $repairTime + random(1) - $fort.assistant, IncreasePCSkills('engineering',  0.1)>>
+		<<set $garrison.assistantTime = $repairTime + random(1) - $fort.assistant, IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-2000, "war")>>
 	<<else>>
 		While the $assistantName's mainframe was left defenseless without a garrison, there was no attempt at sabotage. Let's hope we'll always be this lucky.
@@ -580,6 +580,8 @@
 		<<set _woundChance = 0>>
 		<<if $PC.career == "mercenary" || $PC.career == "gang">>
 			<<set _woundChance -= 5>>
+		<<elseif $PC.warfare >= 75>>
+			<<set _woundChance -= 3>>
 		<</if>>
 		<<if $personalArms >= 1>>
 			<<set _woundChance -= 5>>
@@ -740,7 +742,7 @@
 			<</if>>
 		<</if>>
 		The damage to the structure will be @@.red;costly to repair.@@
-		<<= IncreasePCSkills('engineering',  0.1)>>
+		<<= IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-2000, "war")>>
 	<<else>>
 		While the penthouse was left without a sizable garrison, there was no dangerous assault against it. Let's hope we'll always be this lucky.
@@ -751,6 +753,8 @@
 		<<set _woundChance = 0>>
 		<<if $PC.career == "mercenary" || $PC.career == "gang">>
 			<<set _woundChance -= 5>>
+		<<elseif $PC.warfare >= 75>>
+			<<set _woundChance -= 3>>
 		<</if>>
 		<<if $personalArms >= 1>>
 			<<set _woundChance -= 5>>
@@ -850,7 +854,7 @@
 			<</if>>
 		<</if>>
 		The damage to the structure will be @@.red;costly to repair.@@
-		<<= IncreasePCSkills('engineering',  0.1)>>
+		<<= IncreasePCSkills('engineering', 0.1)>>
 		<<run cashX(-2000, "war")>>
 	<<else>>
 		There was no sizable assault against the penthouse. Let's hope we'll always be this lucky.
@@ -861,6 +865,8 @@
 		<<set _woundChance = 0>>
 		<<if $PC.career == "mercenary" || $PC.career == "gang">>
 			<<set _woundChance -= 5>>
+		<<elseif $PC.warfare >= 75>>
+			<<set _woundChance -= 3>>
 		<</if>>
 		<<if $personalArms >= 1>>
 			<<set _woundChance -= 5>>
diff --git a/src/SecExp/riotControlCenter.tw b/src/SecExp/riotControlCenter.tw
index e38298cd3875bed6e0e2199b04def5663e13fa3f..aef13c679bbdae7aaa395a987718de6706b1c995 100644
--- a/src/SecExp/riotControlCenter.tw
+++ b/src/SecExp/riotControlCenter.tw
@@ -25,7 +25,7 @@ The riot control center opens its guarded doors to you. The great chamber inside
 		<br><<link "Invest more resources in the free media project" "riotControlCenter">>
 			<<set $riotUpgrades.freeMedia += 1>>
 			<<run cashX(forceNeg(((5000 * $upgradeMultiplierArcology * ($riotUpgrades.freeMedia + 1)*$HackingSkillMultiplier))), "capEx")>>
-			<<= IncreasePCSkills('hacking',  0.5)>>
+			<<= IncreasePCSkills('hacking', 0.5)>>
 			<<set $riotUpkeep += $upgradeUpkeep>>
 		<</link>>
 		<br>Invest more resources into the project to increase its effectiveness.
@@ -150,7 +150,7 @@ The riot control center opens its guarded doors to you. The great chamber inside
 		<<link "Invest more resources in the brain implant project" "riotControlCenter">>
 			<<set $brainImplantProject += 1>>
 			<<run cashX(forceNeg(50000 * $upgradeMultiplierArcology * $brainImplantProject*$HackingSkillMultiplier), "capEx")>>
-			<<= IncreasePCSkills('hacking',  1)>>
+			<<= IncreasePCSkills('hacking', 1)>>
 			<<set $riotUpkeep += 5000>>
 		<</link>>
 		<br>Invest more resources into the project to increase its speed.
diff --git a/src/SecExp/secExpSmilingMan.tw b/src/SecExp/secExpSmilingMan.tw
index 597770b741f354f355e827c9272242b6ea89d551..7ef0ca3ce40bd3610c6a6ab6700becb0951bdef3 100644
--- a/src/SecExp/secExpSmilingMan.tw
+++ b/src/SecExp/secExpSmilingMan.tw
@@ -247,7 +247,7 @@
 	<<set $fixedRace = "asian">>
 	<<set $fixedNationality = "Japanese">>
 	<<if $seeDicks != 100>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.faceShape = "cute">>
 		<<set $activeSlave.boobShape = "perky">>
 		<<set $activeSlave.nipples = "cute">>
@@ -255,7 +255,7 @@
 		<<set $activeSlave.vagina = 0>>
 		<<set $activeSlave.ovaries = 1>>
 	<<else>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.boobs = 250>>
 		<<set $activeSlave.faceShape = "androgynous">>
 		<<set $activeSlave.boobShape = "perky">>
diff --git a/src/SecExp/securityHQ.tw b/src/SecExp/securityHQ.tw
index 28fe4f424f5a9749bef4c2b58b49e2fb5755b5f2..e61c94e97008f800fb3cf88553b6518ab20bb2b9 100644
--- a/src/SecExp/securityHQ.tw
+++ b/src/SecExp/securityHQ.tw
@@ -24,21 +24,21 @@ You have <span id="secHel"> <<print num($secMenials)>> </span> slaves working in
 <<set _menialPrice = menialSlaveCost()>>
 <<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>>
 <<if $cash > _menialPrice>>
-<<if _bulkMax > 0 || $menials+$fuckdolls+$menialBioreactors == 0>>
-	<br>
-	[[Buy|securityHQ][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]]
-	<<if $cash > (menialSlaveCost(10))*10>>
-		[[(x10)|securityHQ][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]]
-	<</if>>
-	<<if $cash > (menialSlaveCost(100))*100>>
-		[[(x100)|securityHQ][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]]
-	<</if>>
-	<<if $cash > (_menialPrice+1)*2>>
-		<<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>>
-		[[(max)|securityHQ][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]]
+	<<if _bulkMax > 0 || $menials+$fuckdolls+$menialBioreactors == 0>>
+		<br>
+		[[Buy|securityHQ][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]]
+		<<if $cash > (menialSlaveCost(10))*10>>
+			[[(x10)|securityHQ][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]]
+		<</if>>
+		<<if $cash > (menialSlaveCost(100))*100>>
+			[[(x100)|securityHQ][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]]
+		<</if>>
+		<<if $cash > (_menialPrice+1)*2>>
+			<<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>>
+			[[(max)|securityHQ][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)*(_menialPrice+_menialBulkPremium))), "menialTransfer")]]
+		<</if>>
+		//Bulk transactions may require offering a premium.//
 	<</if>>
-	//Bulk transactions may require offering a premium.//
-<</if>>
 <</if>>
 <<if $menials > 0>>
 	<br>Transfer in:
diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw
index 06122339cf37f3063fee20cb9a823ad4f857e17b..404278bb89e462571405fb823893f87f6b999ec8 100644
--- a/src/SecExp/securityReport.tw
+++ b/src/SecExp/securityReport.tw
@@ -56,84 +56,116 @@
 	<<set _secGrowth += 2>>
 <</if>>
 <<if $ACitizens + $ASlaves <= 5000>>
-	The small number of residents makes their job easier.<<set _secGrowth += 2>>
+	The small number of residents makes their job easier.
+	<<set _secGrowth += 2>>
 <<elseif $ACitizens + $ASlaves <= 7500>>
-	The fairly low number of residents makes their job a little easier.<<set _secGrowth += 1>>
+	The fairly low number of residents makes their job a little easier.
+	<<set _secGrowth += 1>>
 <<elseif $ACitizens + $ASlaves <= 10000>>
-	The fairly high number of residents makes their job a little harder.<<set _secGrowth -= -0.5>>
+	The fairly high number of residents makes their job a little harder.
+	<<set _secGrowth -= -0.5>>
 <<elseif $ACitizens + $ASlaves <= 15000>>
-	The high number of residents makes their job harder.<<set _secGrowth -= 1>>
+	The high number of residents makes their job harder.
+	<<set _secGrowth -= 1>>
 <<else>>
-	The extremely high number of residents makes their job a lot harder.<<set _secGrowth -= 2>>
+	The extremely high number of residents makes their job a lot harder.
+	<<set _secGrowth -= 2>>
 <</if>>
 <<if _immigration >= 0 && _emigration == 0>>
 	<<if _immigration < 50>>
-		The limited number of immigrants that reached the arcology this week does not have any serious impact on the efficiency of current security measures.<<set _secGrowth += 0.5>>
+		The limited number of immigrants that reached the arcology this week does not have any serious impact on the efficiency of current security measures.
+		<<set _secGrowth += 0.5>>
 	<<elseif _immigration < 150>>
-		The number of immigrants that reached the arcology this week is high enough to complicate security protocols.<<set _secGrowth -= 0.2>>
+		The number of immigrants that reached the arcology this week is high enough to complicate security protocols.
+		<<set _secGrowth -= 0.2>>
 	<<elseif _immigration < 300>>
-		The high number of immigrants that reached the arcology this week complicates security protocols.<<set _secGrowth -= 0.5>>
+		The high number of immigrants that reached the arcology this week complicates security protocols.
+		<<set _secGrowth -= 0.5>>
 	<<elseif _immigration < 500>>
-		The high number of immigrants that reached the arcology this week severely complicates security protocols.<<set _secGrowth -= 1>>
+		The high number of immigrants that reached the arcology this week severely complicates security protocols.
+		<<set _secGrowth -= 1>>
 	<<else>>
-		The extremely high number of immigrants that reached the arcology this week severely complicates security protocols.<<set _secGrowth -= 2>>
+		The extremely high number of immigrants that reached the arcology this week severely complicates security protocols.
+		<<set _secGrowth -= 2>>
 	<</if>>
 <</if>>
 <<if $visitors < 300>>
-	The limited number of visitors coming and going did not have any serious impact on the efficiency of current security measures.<<set _secGrowth += 0.5>>
+	The limited number of visitors coming and going did not have any serious impact on the efficiency of current security measures.
+	<<set _secGrowth += 0.5>>
 <<elseif _immigration < 750>>
-	The number of visitors coming and going somewhat complicates security protocols.<<set _secGrowth -= 0.2>>
+	The number of visitors coming and going somewhat complicates security protocols.
+	<<set _secGrowth -= 0.2>>
 <<elseif _immigration < 1500>>
-	The high number of visitors coming and going complicates security protocols.<<set _secGrowth -= 0.5>>
+	The high number of visitors coming and going complicates security protocols.
+	<<set _secGrowth -= 0.5>>
 <<elseif _immigration < 2500>>
-	The high number of visitors coming and going greatly complicates security protocols.<<set _secGrowth -= 1>>
+	The high number of visitors coming and going greatly complicates security protocols.
+	<<set _secGrowth -= 1>>
 <<else>>
-	The extremely high number of visitors coming and going severely complicates security protocols.<<set _secGrowth -= 2>>
+	The extremely high number of visitors coming and going severely complicates security protocols.
+	<<set _secGrowth -= 2>>
 <</if>>
 <<if _emigration != 0 && _immigration == 0>>
 	<<if _emigration < 100>>
-		The limited reduction in citizens this week does not have any serious impact on the efficiency of current security measures.<<set _secGrowth += 0.5>>
+		The limited reduction in citizens this week does not have any serious impact on the efficiency of current security measures.
+		<<set _secGrowth += 0.5>>
 	<<elseif _emigration < 300>>
-		The reduction in citizens this week is high enough to complicate security protocols.<<set _secGrowth -= 0.2>>
+		The reduction in citizens this week is high enough to complicate security protocols.
+		<<set _secGrowth -= 0.2>>
 	<<elseif _emigration < 600>>
-		The large reduction in citizens this week complicates security protocols.<<set _secGrowth -= 0.5>>
+		The large reduction in citizens this week complicates security protocols.
+		<<set _secGrowth -= 0.5>>
 	<<elseif _emigration < 1000>>
-		The huge reduction in citizens this week severely complicates security protocols.<<set _secGrowth -= 1>>
+		The huge reduction in citizens this week severely complicates security protocols.
+		<<set _secGrowth -= 1>>
 	<<else>>
-		The extreme reduction in citizens this week severely complicates security protocols.<<set _secGrowth -= 2>>
+		The extreme reduction in citizens this week severely complicates security protocols.
+		<<set _secGrowth -= 2>>
 	<</if>>
 <</if>>
 <<if $crime < 20>>
-	Crime is a distant problem in the arcology, which makes improving security easier.<<set _secGrowth += 1>>
+	Crime is a distant problem in the arcology, which makes improving security easier.
+	<<set _secGrowth += 1>>
 <<elseif $crime < 40>>
 	Crime is a minor problem in the arcology, not serious enough to disrupt security efforts.
 <<elseif $crime < 60>>
-	Crime is an issue in the arcology, which makes improving security harder.<<set _secGrowth -= 0.5>>
+	Crime is an issue in the arcology, which makes improving security harder.
+	<<set _secGrowth -= 0.5>>
 <<elseif $crime < 80>>
-	Crime is an overbearing problem in the arcology, which makes improving security a lot harder.<<set _secGrowth -= 1>>
+	Crime is an overbearing problem in the arcology, which makes improving security a lot harder.
+	<<set _secGrowth -= 1>>
 <<else>>
-	Crime is sovereign in the arcology, which makes improving security extremely difficult.<<set _secGrowth -= 2>>
+	Crime is sovereign in the arcology, which makes improving security extremely difficult.
+	<<set _secGrowth -= 2>>
 <</if>>
 <<if $authority < 5000>>
-	The low authority you hold on the arcology hampers the efforts of your security department.<<set _secGrowth -= 1>>
+	The low authority you hold on the arcology hampers the efforts of your security department.
+	<<set _secGrowth -= 1>>
 <<elseif $authority < 7500>>
-	The limited authority you hold on the arcology hampers the efforts of your security department.<<set _secGrowth -= 0.5>>
+	The limited authority you hold on the arcology hampers the efforts of your security department.
+	<<set _secGrowth -= 0.5>>
 <<elseif $authority < 10000>>
 	The authority you hold on the arcology does not significantly impact the efforts of your security department.
 <<elseif $authority < 15000>>
-	The high authority you hold on the arcology facilitates the security department's work.<<set _secGrowth += 0.5>>
+	The high authority you hold on the arcology facilitates the security department's work.
+	<<set _secGrowth += 0.5>>
 <<else>>
-	The absolute authority you hold on the arcology makes the security department's work a lot easier.<<set _secGrowth += 1>>
+	The absolute authority you hold on the arcology makes the security department's work a lot easier.
+	<<set _secGrowth += 1>>
 <</if>>
 <<if $activeUnits >= 6>>
-	Your military is the size of a small army. Security is easier to maintain with such forces at your disposal. <<set _secGrowth += 0.5>>
+	Your military is the size of a small army. Security is easier to maintain with such forces at your disposal.
+	<<set _secGrowth += 0.5>>
 <</if>>
 <<if $lastAttackWeeks < 3 && $hasFoughtOnce == 1>>
-	The recent attack has a negative effect on the security of the arcology.<<set _secGrowth -= 1>>
+	The recent attack has a negative effect on the security of the arcology.
+	<<set _secGrowth -= 1>>
 <<elseif $lastAttackWeeks < 5 && $hasFoughtOnce == 1>>
-	While some time has passed, the last attack still has a negative effect on the security of the arcology.<<set _secGrowth -= 0.5>>
+	While some time has passed, the last attack still has a negative effect on the security of the arcology.
+	<<set _secGrowth -= 0.5>>
 <<elseif $hasFoughtOnce == 1>>
-	The arcology has not been attacked in a while, which has a positive effect on security.<<set _secGrowth += 0.5>>
+	The arcology has not been attacked in a while, which has a positive effect on security.
+	<<set _secGrowth += 0.5>>
 <</if>>
 
 <<if $transportHub == 1>>
@@ -159,7 +191,7 @@
 	It will still take <<if $garrison.assistantTime> 1>>$garrison.assistantTime weeks<<else>>a week<</if>> to finish repair works.
 	<<set _secGrowth-->>
 	<<set _crimeGrowth++>>
-	<<set $garrison.assistantTime--, IncreasePCSkills('engineering',  0.1)>>
+	<<set $garrison.assistantTime--, IncreasePCSkills('engineering', 0.1)>>
 <</if>>
 
 <<if $SF.Toggle && $SF.Active >= 1>>
@@ -214,60 +246,82 @@
 <strong>Crime</strong>:
 /* crime modifiers */
 <<if $week < 30>>
-	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a small impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 0.5>>
+	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a small impact on the growth of criminal activities in your arcology.
+	<<set _crimeGrowth += 0.5>>
 <<elseif $week < 60>>
-	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a noticeable impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 1>>
+	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a noticeable impact on the growth of criminal activities in your arcology.
+	<<set _crimeGrowth += 1>>
 <<elseif $week < 90>>
-	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a moderate impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 1.5>>
+	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a moderate impact on the growth of criminal activities in your arcology.
+	<<set _crimeGrowth += 1.5>>
 <<elseif $week < 120>>
-	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a big impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 2>>
+	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a big impact on the growth of criminal activities in your arcology.
+	<<set _crimeGrowth += 2>>
 <<else>>
-	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a huge impact on the growth of criminal activities in your arcology.<<set _crimeGrowth += 2.5>>
+	Due to the deterioration of the old world countries, organized crime focuses more and more on the prosperous free cities, yours included. This has a huge impact on the growth of criminal activities in your arcology.
+	<<set _crimeGrowth += 2.5>>
 <</if>>
 <<if $arcologies[0].prosperity < 50>>
-	The low prosperity of the arcology facilitates criminal recruitment and organization.<<set _crimeGrowth += 1>>
+	The low prosperity of the arcology facilitates criminal recruitment and organization.
+	<<set _crimeGrowth += 1>>
 <<elseif $arcologies[0].prosperity < 80>>
-	The fairly low prosperity of the arcology facilitates criminal recruitment and organization.<<set _crimeGrowth += 0.5>>
+	The fairly low prosperity of the arcology facilitates criminal recruitment and organization.
+	<<set _crimeGrowth += 0.5>>
 <<elseif $arcologies[0].prosperity < 120>>
 	The prosperity of the arcology is not high or low enough to have significant effects on criminal recruitment and organization.
 <<elseif $arcologies[0].prosperity < 160>>
-	The prosperity of the arcology is high enough to provide its citizens a decent life, hampering criminal recruitment and organization.<<set _crimeGrowth -= 0.5>>
+	The prosperity of the arcology is high enough to provide its citizens a decent life, hampering criminal recruitment and organization.
+	<<set _crimeGrowth -= 0.5>>
 <<elseif $arcologies[0].prosperity < 180>>
-	The prosperity of the arcology is high enough to provide its citizens a decent life, significantly hampering criminal recruitment and organization.<<set _crimeGrowth -= 1>>
+	The prosperity of the arcology is high enough to provide its citizens a decent life, significantly hampering criminal recruitment and organization.
+	<<set _crimeGrowth -= 1>>
 <<else>>
-	The prosperity of the arcology is high enough to provide its citizens a very good life, significantly hampering criminal recruitment and organization.<<set _crimeGrowth -= 2>>
+	The prosperity of the arcology is high enough to provide its citizens a very good life, significantly hampering criminal recruitment and organization.
+	<<set _crimeGrowth -= 2>>
 <</if>>
 <<if $ASlaves < 1000>>
-	The low number of slaves in the arcology does not hinder the activity of law enforcement, limiting crime growth.<<set _crimeGrowth -= 1>>
+	The low number of slaves in the arcology does not hinder the activity of law enforcement, limiting crime growth.
+	<<set _crimeGrowth -= 1>>
 <<elseif $ASlaves < 2000>>
-	The fairly low number of slaves in the arcology does not hinder significantly the activity of law enforcement, limiting crime growth.<<set _crimeGrowth -= 0.5>>
+	The fairly low number of slaves in the arcology does not hinder significantly the activity of law enforcement, limiting crime growth.
+	<<set _crimeGrowth -= 0.5>>
 <<elseif $ASlaves < 3000>>
-	The number of slaves in the arcology is becoming an impediment for law enforcement, facilitating crime growth.<<set _crimeGrowth += 1>>
+	The number of slaves in the arcology is becoming an impediment for law enforcement, facilitating crime growth.
+	<<set _crimeGrowth += 1>>
 <<else>>
-	The number of slaves in the arcology is becoming a big issue for law enforcement, facilitating crime growth.<<set _crimeGrowth += 1.5>>
+	The number of slaves in the arcology is becoming a big issue for law enforcement, facilitating crime growth.
+	<<set _crimeGrowth += 1.5>>
 <</if>>
 <<if $security <= 20>>
 	The security measures in place are severely limited, allowing crime to grow uncontested.
 <<elseif $security <= 50>>
-	The security measures in place are of limited effect and use, giving only mixed results in their fight against crime.<<set _crimeGrowth -= 1.5>>
+	The security measures in place are of limited effect and use, giving only mixed results in their fight against crime.
+	<<set _crimeGrowth -= 1.5>>
 <<elseif $security <= 75>>
-	The security measures in place are well developed and effective, making a serious dent in the profitability of criminal activity in your arcology.<<set _crimeGrowth -= 3>>
+	The security measures in place are well developed and effective, making a serious dent in the profitability of criminal activity in your arcology.
+	<<set _crimeGrowth -= 3>>
 <<else>>
-	The security measures in place are extremely well developed and very effective, posing a serious threat even to the most powerful criminal organizations in existence.<<set _crimeGrowth -= 5.5>>
+	The security measures in place are extremely well developed and very effective, posing a serious threat even to the most powerful criminal organizations in existence.
+	<<set _crimeGrowth -= 5.5>>
 <</if>>
 <<if $authority < 5000>>
-	Your low authority allows crime to grow undisturbed.<<set _crimeGrowth += 1>>
+	Your low authority allows crime to grow undisturbed.
+	<<set _crimeGrowth += 1>>
 <<elseif $authority < 7500>>
-	Your relatively low authority facilitates criminal activities.<<set _crimeGrowth += 0.5>>
+	Your relatively low authority facilitates criminal activities.
+	<<set _crimeGrowth += 0.5>>
 <<elseif $authority < 10000>>
 	Your authority is not high enough to discourage criminal activity.
 <<elseif $authority < 15000>>
-	Your high authority is an effective tool against crime.<<set _crimeGrowth -= 1>>
+	Your high authority is an effective tool against crime.
+	<<set _crimeGrowth -= 1>>
 <<else>>
-	Your absolute authority is an extremely effective tool against crime.<<set _crimeGrowth -= 2>>
+	Your absolute authority is an extremely effective tool against crime.
+	<<set _crimeGrowth -= 2>>
 <</if>>
 <<if $cash >= 100000>>
-	Your great wealth acts as a beacon for the greediest criminals, calling them to your arcology as moths to a flame.<<set _crimeGrowth += 0.5>>
+	Your great wealth acts as a beacon for the greediest criminals, calling them to your arcology as moths to a flame.
+	<<set _crimeGrowth += 0.5>>
 <</if>>
 <<if $marketInfiltration == 1>>
 	<<set _crimeGrowth += 0.5 * random(1,2)>>
@@ -408,27 +462,36 @@
 	<<if $mercenaries >= 1>>
 		<<set _newMercs = random(0,3)>>
 		<<if $rep < 6000>>
-			Your low reputation turns some mercenaries away, hoping to find contracts that would bring them more renown.<<set _newMercs -= 1>>
+			Your low reputation turns some mercenaries away, hoping to find contracts that would bring them more renown.
+			<<set _newMercs -= 1>>
 		<<elseif $rep < 12000>>
 			Your reputation is not high enough to attract many mercenaries to your free city.
 		<<else>>
-			Your reputation attracts many guns for hire who would be proud to have such distinct character on their resume.<<set _newMercs += 1>>
+			Your reputation attracts many guns for hire who would be proud to have such distinct character on their resume.
+			<<set _newMercs += 1>>
 		<</if>>
 		<<if $arcologies[0].prosperity < 50>>
-			The low prosperity of the arcology discourages new guns for hire from coming to your arcology.<<set _newMercs -= 1>>
+			The low prosperity of the arcology discourages new guns for hire from coming to your arcology.
+			<<set _newMercs -= 1>>
 		<<elseif $arcologies[0].prosperity < 80>>
-			The fairly low prosperity of the arcology discourages new guns for hire from coming to your arcology.<<set _newMercs += 1>>
+			The fairly low prosperity of the arcology discourages new guns for hire from coming to your arcology.
+			<<set _newMercs += 1>>
 		<<elseif $arcologies[0].prosperity < 120>>
-			The prosperity of the arcology attracts a few mercenaries, hopeful to find lucrative contracts within its walls.<<set _newMercs += random(1,2)>>
+			The prosperity of the arcology attracts a few mercenaries, hopeful to find lucrative contracts within its walls.
+			<<set _newMercs += random(1,2)>>
 		<<elseif $arcologies[0].prosperity < 160>>
-			The fairly high prosperity of the arcology attracts some mercenaries, hopeful to find lucrative contracts within its walls.<<set _newMercs += random(2,3)>>
+			The fairly high prosperity of the arcology attracts some mercenaries, hopeful to find lucrative contracts within its walls.
+			<<set _newMercs += random(2,3)>>
 		<<elseif $arcologies[0].prosperity < 180>>
-			The high prosperity of the arcology is attracts some mercenaries, hopeful to find lucrative contracts within its walls.<<set _newMercs += random(2,4)>>
+			The high prosperity of the arcology is attracts some mercenaries, hopeful to find lucrative contracts within its walls.
+			<<set _newMercs += random(2,4)>>
 		<<else>>
-			The very high prosperity of the arcology attracts a lot of mercenaries, hopeful to find lucrative contracts within its walls.<<set _newMercs += random(3,5)>>
+			The very high prosperity of the arcology attracts a lot of mercenaries, hopeful to find lucrative contracts within its walls.
+			<<set _newMercs += random(3,5)>>
 		<</if>>
 		<<if $crime > 60>>
-			The powerful crime organizations that nested themselves in the arcology have an unending need for cheap guns for hire, many mercenaries flock to your free city in search of employment.<<set _newMercs += random(1,2)>>
+			The powerful crime organizations that nested themselves in the arcology have an unending need for cheap guns for hire, many mercenaries flock to your free city in search of employment.
+			<<set _newMercs += random(1,2)>>
 		<</if>>
 		<<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>>
 			Having a powerful special force attracts a lot of mercenaries, hopeful that they may be able to fight along side it.
diff --git a/src/SecExp/tradeReport.tw b/src/SecExp/tradeReport.tw
index ce1ac7429038b35ddb0504e1372cdd25f10afd39..b6ae33a0b61bbc5e2cffcf0fdf9d026ccad26d9e 100644
--- a/src/SecExp/tradeReport.tw
+++ b/src/SecExp/tradeReport.tw
@@ -1,27 +1,35 @@
 :: tradeReport [nobr]
 
 <<if $week < 30>>
-	The world economy is in good enough shape to sustain economic growth. Trade flows liberally in all the globe.<<set _tradeChange += 1>>
+	The world economy is in good enough shape to sustain economic growth. Trade flows liberally in all the globe.
+	<<set _tradeChange += 1>>
 <<elseif $week < 60>>
-	The world economy is deteriorating, but still in good enough shape to sustain economic growth.<<set _tradeChange += 0.5>>
+	The world economy is deteriorating, but still in good enough shape to sustain economic growth.
+	<<set _tradeChange += 0.5>>
 <<elseif $week < 90>>
 	The world economy is deteriorating, but still in decent enough shape to sustain economic growth.
 <<elseif $week < 120>>
-	The world economy is deteriorating and the slowing down of global growth is starting to have some effect on trade flow.<<set _tradeChange -= 1>>
+	The world economy is deteriorating and the slowing down of global growth is starting to have some effect on trade flow.
+	<<set _tradeChange -= 1>>
 <<else>>
-	The world economy is heavily deteriorated. The slowing down of global growth has a great negative effect on trade flow.<<set _tradeChange -= 2>>
+	The world economy is heavily deteriorated. The slowing down of global growth has a great negative effect on trade flow.
+	<<set _tradeChange -= 2>>
 <</if>>
 
 <<set _tradeChange = 0>>
 <<if $lastAttackWeeks < 2 && $hasFoughtOnce == 1>>
-	The recent attack has a negative effect on the trade of the arcology.<<set _tradeChange -= 1>>
+	The recent attack has a negative effect on the trade of the arcology.
+	<<set _tradeChange -= 1>>
 <<elseif $lastAttackWeeks < 4 && $hasFoughtOnce == 1>>
-	While some time has passed, the last attack still has a negative effect on the commercial activity of the arcology.<<set _tradeChange -= 0.5>>
+	While some time has passed, the last attack still has a negative effect on the commercial activity of the arcology.
+	<<set _tradeChange -= 0.5>>
 <</if>>
 <<if $lastRebellionWeeks < 2 && $hasRebelledOnce == 1>>
-	The recent rebellion has a negative effect on the trade of the arcology.<<set _tradeChange -= 1>>
+	The recent rebellion has a negative effect on the trade of the arcology.
+	<<set _tradeChange -= 1>>
 <<elseif $lastRebellionWeeks < 4 && $hasRebelledOnce == 1>>
-	While some time has passed, the last rebellion still has a negative effect on the commercial activity of the arcology.<<set _tradeChange -= 0.5>>
+	While some time has passed, the last rebellion still has a negative effect on the commercial activity of the arcology.
+	<<set _tradeChange -= 0.5>>
 <</if>>
 
 <<if $terrain == "urban">>
@@ -46,17 +54,21 @@
 <</if>>
 
 <<if $assistantPower == 1>>
-	Thanks to the computing power available to her, $assistantName is able to guide the commercial development of the arcology to greater levels. <<set _tradeChange++>>
+	Thanks to the computing power available to her, $assistantName is able to guide the commercial development of the arcology to greater levels.
+	<<set _tradeChange++>>
 <<elseif $assistantPower == 2>>
-	Thanks to the incredible computing power available to her, $assistantName is able to guide the commercial development of the arcology to greater levels. <<set _tradeChange += 2>>
+	Thanks to the incredible computing power available to her, $assistantName is able to guide the commercial development of the arcology to greater levels.
+	<<set _tradeChange += 2>>
 <</if>>
 
 <<if $tradeLegalAid == 1>>
-	Your support in legal matters for new businesses helps improve the economic dynamicity of your arcology, boosting commercial activities.<<set _tradeChange += 1>>
+	Your support in legal matters for new businesses helps improve the economic dynamicity of your arcology, boosting commercial activities.
+	<<set _tradeChange += 1>>
 <</if>>
 
 <<if $taxTrade == 1>>
-	The fees imposed on transitioning goods do little to earn you the favor of the companies making use of your arcology.<<set _tradeChange -= 1>>
+	The fees imposed on transitioning goods do little to earn you the favor of the companies making use of your arcology.
+	<<set _tradeChange -= 1>>
 <</if>>
 
 <<if $weapManu == 1>>
@@ -65,36 +77,47 @@
 <</if>>
 <<if $transportHub == 1>>
 	<<if $airport == 1>>
-		The airport, while small, helps facilitate the commercial development of the arcology.<<set _tradeChange += 1>>
+		The airport, while small, helps facilitate the commercial development of the arcology.
+		<<set _tradeChange += 1>>
 	<<elseif $airport == 2>>
-		The airport, while fairly small, helps facilitate the commercial development of the arcology.<<set _tradeChange += 1.5>>
+		The airport, while fairly small, helps facilitate the commercial development of the arcology.
+		<<set _tradeChange += 1.5>>
 	<<elseif $airport == 3>>
-		The airport helps facilitate the commercial development of the arcology.<<set _tradeChange += 2>>
+		The airport helps facilitate the commercial development of the arcology.
+		<<set _tradeChange += 2>>
 	<<elseif $airport == 4>>
-		The airport is a great boon to the commercial development of the arcology.<<set _tradeChange += 2.5>>
+		The airport is a great boon to the commercial development of the arcology.
+		<<set _tradeChange += 2.5>>
 	<<else>>
-		The airport is an incredible boon to the commercial development of the arcology.<<set _tradeChange += 3>>
+		The airport is an incredible boon to the commercial development of the arcology.
+		<<set _tradeChange += 3>>
 	<</if>>
 
 	<<if $terrain != "oceanic" && $terrain != "marine">>
 		<<if $railway == 1>>
 			The railway network's age and limited extension limit commercial activity.
 		<<elseif $railway == 2>>
-			The railway network is a great help to the commercial development of the arcology, but its limited extension hampers its potential.<<set _tradeChange += 1>>
+			The railway network is a great help to the commercial development of the arcology, but its limited extension hampers its potential.
+			<<set _tradeChange += 1>>
 		<<elseif $railway == 3>>
-			The railway network is a great help to the commercial development of the arcology.<<set _tradeChange += 1.5>>
+			The railway network is a great help to the commercial development of the arcology.
+			<<set _tradeChange += 1.5>>
 		<<else>>
-			The railway network is a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.<<set _tradeChange += 2>>
+			The railway network is a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.
+			<<set _tradeChange += 2>>
 		<</if>>
 	<<else>>
 		<<if $docks == 1>>
 			The docks' age and limited size limit commercial activity.
 		<<elseif $docks == 2>>
-			The docks are a great help to the commercial development of the arcology, but their limited size hampers its potential.<<set _tradeChange += 1>>
+			The docks are a great help to the commercial development of the arcology, but their limited size hampers its potential.
+			<<set _tradeChange += 1>>
 		<<elseif $docks == 3>>
-			The docks are a great help to the commercial development of the arcology.<<set _tradeChange += 1.5>>
+			The docks are a great help to the commercial development of the arcology.
+			<<set _tradeChange += 1.5>>
 		<<else>>
-			The docks are a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.<<set _tradeChange += 2>>
+			The docks are a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.
+			<<set _tradeChange += 2>>
 		<</if>>
 	<</if>>
 <</if>>
diff --git a/src/SpecialForce/ColonelSexDec.tw b/src/SpecialForce/ColonelSexDec.tw
index ac5e516c09ff837efae96bc5cec36ced79cb6d15..ebf24f073575910c99a84e5238e2352786741ccb 100644
--- a/src/SpecialForce/ColonelSexDec.tw
+++ b/src/SpecialForce/ColonelSexDec.tw
@@ -12,7 +12,7 @@
 
 	<br><<link "Leave her be">>
 	<<replace "#result7">>
-	"It is probably better that she tries to deal with her demons alone"
+	"It is probably better that she tries to deal with her demons alone."
 	<</replace>>
 	<</link>>
 	</span>
diff --git a/src/SpecialForce/Firebase.tw b/src/SpecialForce/Firebase.tw
index cbc6a0111eda70a6b9621d1fecc01fdae4479cb2..59406c612b08fe8a874416b0ea171214b31e950e 100644
--- a/src/SpecialForce/Firebase.tw
+++ b/src/SpecialForce/Firebase.tw
@@ -143,7 +143,7 @@
 	<<= UnitText('drugs')>> <<= UnitText('UAV')>>
 
 	<<if _G > 0 && _S.Firebase >= 1>> <br><br>''Garage:''
-		<<if _S.AV+_S.TV > 0>>  <br>&nbsp;''Vehicles:''
+		<<if _S.AV+_S.TV > 0>> <br>&nbsp;''Vehicles:''
 			<<= UnitText('AV')>> <<= UnitText('TV')>>
 		<</if>>
 		<<= UnitText('PGT')>>
@@ -159,7 +159,7 @@
 	<</if>>
 	<<if _T1 && _LB> 0>> <br><br>''Launch Bay:''
 		<<if $SF.Squad.Satellite.lv > 0>> <<= UnitText('sat')>>
-			<<if $SF.Squad.Satellite.InOrbit < 1>> <br>&nbsp;&nbsp;&nbsp;[[Launch it into geostationary orbit.|Firebase][$SF.Squad.Satellite.InOrbit=1]] //You <span class='red'>cannot</span> upgrade the satellite once it has been launched.// <</if>>
+			<<if $SF.Squad.Satellite.InOrbit < 1>> <br>&nbsp;&nbsp;&nbsp;[[Launch it into geostationary orbit.|Firebase][$SF.Squad.Satellite.InOrbit=1]] //You <span class="red">cannot</span> upgrade the satellite once it has been launched.// <</if>>
 		<</if>>
 		<<= UnitText('GR')>> <<= UnitText('ms')>>
 	<</if>>
diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js
index 326f02f17bc06a1c0d0e529a53ab6e1533dfb6a3..a88da511caa1d2cf2918cb75d19e810b111dd624 100644
--- a/src/SpecialForce/SpecialForce.js
+++ b/src/SpecialForce/SpecialForce.js
@@ -1,43 +1,35 @@
 // V=SugarCube.State.variables, T=SugarCube.State.temporary;
 window.Main = function() {
- const V = State.variables;
- V.SF = {
-		Toggle:V.SF.Toggle, Active:-1, Depravity:0, Size:0, Upgrade:0, Gift:0,
+	const V = State.variables;
+	V.SF = {Toggle:V.SF.Toggle, Active:-1, Depravity:0, Size:0, Upgrade:0, Gift:0,
 		UC:{Assign:0, Lock:0, num:0}, ROE:"hold", Target:"recruit", Regs:"strict",
-		Caps:"The Special Force", Lower:"the special force", Subsidy:1, BadOutcome:""
-	};
- V.arcologies[0].SFRaid = 1; V.arcologies[0].SFRaidTarget = -1;
+		Caps:"The Special Force", Lower:"the special force", Subsidy:1, BadOutcome:""};
+	V.arcologies[0].SFRaid = 1; V.arcologies[0].SFRaidTarget = -1;
 };
 window.Squad = function() {
- const V = State.variables;
- V.SF.Squad = {
-		Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0,
+	const V = State.variables;
+	V.SF.Squad = {Troops:40, Armoury:0, Firebase:0, AV:0, TV:0, Drones:0, Drugs:0,
 		PGT:0, AA:0, TA:0, SpacePlane:0, GunS:0, Satellite:{lv:0, InOrbit:0},
-		GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0
-	};
+		GiantRobot:0, MissileSilo:0, AircraftCarrier:0, Sub:0, HAT:0};
 };
 window.Colonel = function() {
- const V = State.variables;
- V.SF.Colonel = {Core:"", Talk:0, Fun:0, Status:0};
+	const V = State.variables;
+	V.SF.Colonel = {Core:"", Talk:0, Fun:0, Status:0};
 };
 window.MercCon = function() {
- const V = State.variables;
- V.SF.MercCon = {
-		History:0, CanAttend:-2, Income:0, Revenue:0, Menials:0,
-		TotalMenials:0, Mercs:0, TotalMercs:0
-	};
+	const V = State.variables;
+	V.SF.MercCon = {History:0, CanAttend:-2, Income:0, Revenue:0, Menials:0,
+		TotalMenials:0, Mercs:0, TotalMercs:0};
 };
 window.Facility = function() {
- const V = State.variables;
- V.SF.Facility = {
-		Toggle:0, Active:0, LC:0, Workers:0, Max:5,
+	const V = State.variables;
+	V.SF.Facility = {Toggle:0, Active:0, LC:0, Workers:0, Max:5,
 		Caps:"Special force support facility", Lower:"special force support facility",
-		Decoration:"standard", Speed:0, Upgrade:0, IDs:[]
-	};
+		Decoration:"standard", Speed:0, Upgrade:0, IDs:[]};
 };
 
 window.SFInit = function() {
- Main(); Squad(); Colonel();
+	Main(); Squad(); Colonel();
 };
 
 window.SFBC = function() {
@@ -133,8 +125,7 @@ window.SFBC = function() {
 			if (V.ColonelCore === undefined) V.ColonelCore = "";
 			if (V.ColonelDiscussion === undefined) V.ColonelDiscussion = 0;
 			if (V.ColonelSexed === undefined) V.ColonelSexed = 0;
-			V.SF.Colonel = {
-				Core:V.ColonelCore,
+			V.SF.Colonel = {Core:V.ColonelCore,
 				Talk:V.securityForceColonelToken,
 				Fun:V.securityForceColonelSexed,
 				Status:V.ColonelRelationship}; ColonelClean();
@@ -143,8 +134,7 @@ window.SFBC = function() {
 			if (V.TotalTradeShowIncome === undefined) V.TotalTradeShowIncome = 0;
 			if (V.TradeShowHelots === undefined) V.TradeShowHelots = 0;
 			if (V.TotalTradeShowHelots === undefined) V.TotalTradeShowHelots = 0;
-			V.SF.MercCon = {
-				History:V.OverallTradeShowAttendance,
+			V.SF.MercCon = {History:V.OverallTradeShowAttendance,
 				CanAttend:V.CurrentTradeShowAttendance,
 				Income:V.TradeShowIncome,
 				Revenue:V.TotalTradeShowIncome,
@@ -236,9 +226,9 @@ window.SFBC = function() {
 			V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat;
 		}
 	}
- InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean();
- if (V.SF.Facility === undefined) Facility();
- if (V.SF.Squad.Satellite === undefined) V.SF.Squad.Satellite = {lv:0, InOrbit:0};
+	InitClean(); MainClean(); ColonelClean(); TradeShowClean(); UnitsClean();
+	if (V.SF.Facility === undefined) Facility();
+	if (V.SF.Squad.Satellite === undefined) V.SF.Squad.Satellite = {lv:0, InOrbit:0};
 };
 
 window.SFReport = function() {
@@ -531,8 +521,8 @@ window.Count = function() {
 };
 
 window.SFNameCapsCheck = function() {
- const V = State.variables;
- if (V.SF.Lower !== "the special force") V.SF.Caps = V.SF.Lower.replace("the ", "The ");
+	const V = State.variables;
+	if (V.SF.Lower !== "the special force") V.SF.Caps = V.SF.Lower.replace("the ", "The ");
 };
 
 window.SFUpgradeCost = function(cost, unit) {
@@ -570,8 +560,8 @@ window.SFC = function() {
 		return `The Colonel`;
 	} else {
 		/* if (V.SF.Facility.LCActive > 0) {
-		 * return `Lieutenant Colonel ${SlaveFullName(V.SF.Facility.LC)}`;
-		 }*/
+			* return `Lieutenant Colonel ${SlaveFullName(V.SF.Facility.LC)}`;
+			}*/
 		return `a designated soldier`;
 	}
 };
@@ -724,6 +714,7 @@ window.UnitText = function(input) {
 
 	let activate2 = `has been recommissioned for use by ${V.SF.Lower}. Currently, it `;
 	let barrels = `Miniguns and Gatling cannons line`, distance = `, though the distance to ground targets renders the smaller calibers somewhat less useful`;
+	// eslint-disable-next-line camelcase
 	let b4 = ``, c2 = ``, fuel = ``, GS_Speed = ``, countermeasures = ``, ammunition = ``, DFA = ``, autocannon = ``;
 
 	let loc1 = `An unused science satellite has been purchased from an old world nation. While currently useless, it holds potential to be a powerful tool.`;
@@ -918,11 +909,13 @@ window.UnitText = function(input) {
 				if (S.GunS >= 3) c2 = `The underside of the aircraft has been better armored against small-arms fire`; countermeasures = `.`;
 				if (S.GunS >= 4) fuel = `Larger fuel tanks have been installed in the wings and fuselage, allowing the gunship to provide aerial support for longer periods before refueling.`;
 				if (S.GunS >= 5) barrels = `25 mm Gatling cannons`; distance = `; allowing the gunship to eliminate infantry`; DFA = ` and light vehicles from above`; autocannon = ` and a 40 mm autocannon are mounted on`;
+				// eslint-disable-next-line camelcase
 				if (S.GunS >= 6) GS_Speed = `The engines have been replaced, allowing both faster travel to a target, and slower travel around a target.`;
 				if (S.GunS >= 7) countermeasures = `; and multi-spectrum countermeasures have been installed to protect against guided missiles.`;
 				if (S.GunS >= 8) b4 = `Upgraded multi-spectrum sensors can clearly depict targets even with IR shielding.`;
 				if (S.GunS >= 9) ammunition = `The ammunition storage has been increased, only slightly depriving loaders of a place to sit.`;
 				if (S.GunS >= 10) DFA = `; both light and heavy vehicles, and most enemy cover from above`; autocannon = `; a 40 mm autocannon, and a 105 mm howitzer are mounted on`;
+				// eslint-disable-next-line camelcase
 				return `${text11} A large gunship ${activate2} is being refueled in the hangar. ${barrels}${autocannon} the port side of the fuselage${distance}${DFA}. ${b4} ${ammunition} ${GS_Speed} ${c2}${countermeasures} ${fuel}`;
 			}
 			break;
@@ -1158,7 +1151,7 @@ window.UnitText = function(input) {
 						MEMU_OPTION('title','OptPOS',cost), text += ` `;
 					} else if (![FSPOS].includes(V.SF.FS.ColonelGift)) {
 						text += `\n&nbsp;&nbsp;`, MEMU_OPTION('Buy the Colonel a ','ColonelGift',1000000), text += ` `;
-				 }
+					}
 				}
 			}
 		}
diff --git a/src/SpecialForce/TrickShotNight.tw b/src/SpecialForce/TrickShotNight.tw
index 2463e042dabf46996eaa6c88f4b8fdf658e5056d..ddf90f23e23549655ac6b7d1041bfbc3bc066ff2 100644
--- a/src/SpecialForce/TrickShotNight.tw
+++ b/src/SpecialForce/TrickShotNight.tw
@@ -76,9 +76,9 @@ Despite your direct elevator, interaction with the majority of your security for
 				<<set $fixedRace = _races.random()>>
 			<</if>>
 			<<if $seeDicks != 100>>
-				<<include "Generate XX Slave">>
+				<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<else>>
-				<<include "Generate XY Slave">>
+				<<set $activeSlave = GenerateNewSlave("XY")>>
 			<</if>>
 			<<set $activeSlave.origin = "She put herself up as collateral at a trick shot game, and lost.">>
 			<<set $activeSlave.career = "a soldier">>
@@ -141,7 +141,7 @@ Despite your direct elevator, interaction with the majority of your security for
 							<br>
 							<<include "New Slave Intro">>
 						<</if>>
-						<<= IncreasePCSkills('warfare',  1)>>
+						<<= IncreasePCSkills('warfare', 1)>>
 					<</replace>>
 				<</link>>
 
@@ -156,7 +156,7 @@ Despite your direct elevator, interaction with the majority of your security for
 							<<run repX(10000, "event")>>
 							<<run cashX(50000, "event")>>
 						<</if>>
-						<<= IncreasePCSkills('warfare',  1)>>
+						<<= IncreasePCSkills('warfare', 1)>>
 					<</replace>>
 				<</link>>
 
diff --git a/src/SpecialForce/WeeklyChoices.tw b/src/SpecialForce/WeeklyChoices.tw
index 389d665def029a98a39409bb536230871f9275c9..4ae342a95dec4e1e76c3e34cae014a8fee495248 100644
--- a/src/SpecialForce/WeeklyChoices.tw
+++ b/src/SpecialForce/WeeklyChoices.tw
@@ -130,17 +130,17 @@
 			<<set $SF.Colonel.Status +=3>>
 			<<switch random(1,6)>>
 			<<case 1>>
-				<<= IncreasePCSkills('medicine',  1)>> <<= IncreasePCSkills('trading',  1)>> <<= IncreasePCSkills('slaving', 1)>>
+				<<= IncreasePCSkills('medicine', 1)>> <<= IncreasePCSkills('trading', 1)>> <<= IncreasePCSkills('slaving', 1)>>
 			<<case 2>>
-				<<= IncreasePCSkills('trading',  1)>> <<= IncreasePCSkills('slaving', 1)>> <<= IncreasePCSkills('engineering',  1)>>
+				<<= IncreasePCSkills('trading', 1)>> <<= IncreasePCSkills('slaving', 1)>> <<= IncreasePCSkills('engineering', 1)>>
 			<<case 3>>
-				<<= IncreasePCSkills('slaving', 1)>> <<= IncreasePCSkills('engineering',  1)>> <<= IncreasePCSkills('hacking',  1)>>
+				<<= IncreasePCSkills('slaving', 1)>> <<= IncreasePCSkills('engineering', 1)>> <<= IncreasePCSkills('hacking', 1)>>
 			<<case 4>>
-				<<= IncreasePCSkills('engineering',  1)>> <<= IncreasePCSkills('hacking',  1)>> <<= IncreasePCSkills('warfare',  1)>>
+				<<= IncreasePCSkills('engineering', 1)>> <<= IncreasePCSkills('hacking', 1)>> <<= IncreasePCSkills('warfare', 1)>>
 			<<case 5>>
-				<<= IncreasePCSkills('hacking',  1)>> <<= IncreasePCSkills('warfare',  1)>> <<= IncreasePCSkills('medicine',  1)>>
+				<<= IncreasePCSkills('hacking', 1)>> <<= IncreasePCSkills('warfare', 1)>> <<= IncreasePCSkills('medicine', 1)>>
 			<<case 6>>
-				<<= IncreasePCSkills('warfare',  1)>> <<= IncreasePCSkills('medicine',  1)>> <<= IncreasePCSkills('trading',  1)>>
+				<<= IncreasePCSkills('warfare', 1)>> <<= IncreasePCSkills('medicine', 1)>> <<= IncreasePCSkills('trading', 1)>>
 			<</switch>>
 		<</replace>><</link>>
 
diff --git a/src/art/artJS.js b/src/art/artJS.js
index 7a18eab3ac7b2a128b5a4115e25ac16e962af752..cfeaba2ae90a47cbf47b504a5e7f5b7d555bf22a 100644
--- a/src/art/artJS.js
+++ b/src/art/artJS.js
@@ -13,6 +13,9 @@ UIDisplay (optional, only used by legacy art): icon UI Display for vector art, 1
 */
 /**
  * @param {App.Entity.SlaveState} artSlave
+ * @param {number} artSize
+ * @param {number} UIDisplay
+ * @returns {object}	// TODO: I think
  */
 window.SlaveArt = function(artSlave, artSize, UIDisplay) {
 	const imageChoice = State.variables.imageChoice;
@@ -100,6 +103,8 @@ window.ArtControlRendered = function ArtControlRendered(slave, sizePlacement) {
 
 /**
  * @param {App.Entity.SlaveState} slave
+ * @param {number} imageSize
+ * @returns {string}
  */
 window.CustomArt = function(slave, imageSize) {
 	const fileType = slave.custom.image.format || "png";
@@ -124,12 +129,12 @@ eyes can be nearly anything, it only indicates that the function is being used f
 This code's working is described to the user in the Encyclopedia, chapter "Lore", section "Dyes".
 */
 
-window.extractColor = function (color, eyes) {
+window.extractColor = function(color, eyes) {
 	/*
 	these are color names known and used in FreeCities
 	attributed color names are at the front of the array
 	*/
-	var FCname2HTMLarray = [
+	let FCname2HTMLarray = [
 		["amber", "#ffbf00"],
 		["auburn", "#a53f2a"],
 		["black", "#171717"],
@@ -171,11 +176,11 @@ window.extractColor = function (color, eyes) {
 	];
 
 	/* these are HTML color names supported by most browsers */
-	var HTMLstandardColors = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgrey", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgrey", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"];
+	let HTMLstandardColors = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgrey", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgrey", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"];
 
-	var FCnames = new Map(FCname2HTMLarray);
+	let FCnames = new Map(FCname2HTMLarray);
 	color = color.toLowerCase(); /* normalization: lowercase color name */
-	var colorCode = FCnames.get(color); /* look up in FreeCities color names */
+	let colorCode = FCnames.get(color); /* look up in FreeCities color names */
 	if (!colorCode) { /* not a FreeCities color name*/
 		if (HTMLstandardColors.includes(color) || color.match(/^#([0-9a-f]{3}){1,2}$/) !== null) {
 			colorCode = color; /* is a HTML color name or value, use it directly */
@@ -184,23 +189,23 @@ window.extractColor = function (color, eyes) {
 			is not even a HTML color name. color probably is a description.
 			look for anything resembling a valid color name within the description.
 			*/
-			var colorNoSpaces = color.replace(/\s+/g, ''); /* remove all spaces from description */
-			var FCkeys = Array.from(FCnames.keys());
-			var colorCodes = [
-				FCnames.get(FCkeys.find(function (e) {
+			let colorNoSpaces = color.replace(/\s+/g, ''); /* remove all spaces from description */
+			let FCkeys = Array.from(FCnames.keys());
+			let colorCodes = [
+				FCnames.get(FCkeys.find(function(e) {
 					return color.startsWith(e);
 				})),
-				HTMLstandardColors.find(function (e) {
+				HTMLstandardColors.find(function(e) {
 					return colorNoSpaces.startsWith(e);
 				}),
-				FCnames.get(FCkeys.find(function (e) {
+				FCnames.get(FCkeys.find(function(e) {
 					return color.includes(e);
 				})),
-				HTMLstandardColors.find(function (e) {
+				HTMLstandardColors.find(function(e) {
 					return colorNoSpaces.includes(e);
 				})
 			];
-			colorCode = colorCodes.find(function (e) {
+			colorCode = colorCodes.find(function(e) {
 				return e;
 			}); /* picks the first successful guess */
 		}
@@ -215,7 +220,7 @@ window.extractColor = function (color, eyes) {
 	return colorCode;
 };
 
-window.clothing2artSuffix = function (v) {
+window.clothing2artSuffix = function(v) {
 	if (v === "restrictive latex") {
 		v = "latex";
 	} /* universal "special case": latex art is actually "restrictive latex" TODO: align name in vector source */
@@ -223,7 +228,7 @@ window.clothing2artSuffix = function (v) {
 		.replace(/ ?(outfit|clothing) ?/, "") /* remove "outfit" and "clothing" (redundant) */
 		.replace("-", "") /* remove minus character */
 		.replace(/\w\S*/g,
-			function (txt) {
+			function(txt) {
 				return txt.charAt(0).toUpperCase() +
 					txt.substr(1).toLowerCase();
 			}
@@ -231,7 +236,7 @@ window.clothing2artSuffix = function (v) {
 		.replace(/\W/g, ""); /* remove remaining whitespace */
 };
 
-window.skinColorCatcher = function (artSlave) {
+window.skinColorCatcher = function(artSlave) {
 	let colorSlave = {
 		skinColor: "#e8b693",
 		areolaColor: "#d76b93",
diff --git a/src/art/vector/VectorArtJS.js b/src/art/vector/VectorArtJS.js
index 50288a37e6e4d1b765d32ad3456ed5d6f22a1f62..fd6860d8b914afa6a2f4ef9b848cdcd7e13847d8 100644
--- a/src/art/vector/VectorArtJS.js
+++ b/src/art/vector/VectorArtJS.js
@@ -1,6 +1,4 @@
-/* eslint-disable no-case-declarations */
-/* eslint-disable no-undef */
-window.VectorArt = (function () {
+window.VectorArt = (function() {
 	"use strict";
 	let V, T, slave;
 	let r;
@@ -18,6 +16,7 @@ window.VectorArt = (function () {
 		/* reset/initialize some variables */
 		T.artTransformBelly = "";
 		T.artTransformBoob = "";
+		// eslint-disable-next-line camelcase
 		T.art_transform = ""; /* in case other files are trying to use this, and expecting a string */
 
 		setStylesheet(artSize); /* initializes the stylesheet, and r */
@@ -77,8 +76,10 @@ window.VectorArt = (function () {
 		if (T.art_display_id > 0)
 			T.art_display_id++;
 		else
+			// eslint-disable-next-line camelcase
 			T.art_display_id = 1;
 		displayClass = `ad${T.art_display_id}`;
+		// eslint-disable-next-line camelcase
 		T.art_display_class = displayClass;
 
 		/* setup height scaling and style */
@@ -595,6 +596,7 @@ window.VectorArt = (function () {
 	}
 
 	function ArtVectorBalls() {
+		let ballsScaleFactor;
 		switch (slave.clothes) {
 			case "a bra":
 			case "a button-up shirt":
@@ -629,7 +631,7 @@ window.VectorArt = (function () {
 			case "slutty jewelry":
 			case "uncomfortable straps":
 			case "Western clothing":
-				let ballsScaleFactor = (slave.scrotum / 3) * heightScaleFactor;
+				ballsScaleFactor = (slave.scrotum / 3) * heightScaleFactor;
 				artTranslationX = -271 * (ballsScaleFactor - 1);
 				artTranslationY = -453 * (ballsScaleFactor - 1);
 				T.artTransformBalls = `matrix(${ballsScaleFactor},0,0,${ballsScaleFactor},${artTranslationX},${artTranslationY})`;
@@ -2146,7 +2148,7 @@ window.VectorArt = (function () {
 			r += jsInclude("Art_Vector_Lip_Heavy");
 
 		/* ADDONS */
-		if (slave.fuckdoll === 0) { /* fuckdolls cannot be decorated */
+		if (slave.fuckdoll === 0) { /* Fuckdolls cannot be decorated */
 			if (slave.collar === "dildo gag")
 				r += jsInclude("Art_Vector_Dildo_Gag");
 			else if (slave.collar === "ball gag")
@@ -2228,8 +2230,10 @@ window.VectorArt = (function () {
 		if (slave.fuckdoll !== 0 || slave.clothes !== "a latex catsuit") {
 			if (V.showBodyMods === 1 && slave.vaginaTat === "rude words") {
 				if (slave.dick !== 0)
+					// eslint-disable-next-line camelcase
 					T.art_pussy_tattoo_text = "Useless";
 				else
+					// eslint-disable-next-line camelcase
 					T.art_pussy_tattoo_text = "Fucktoy";
 				r += jsInclude("Art_Vector_Pussy_Tattoo");
 			}
@@ -2658,7 +2662,7 @@ window.LegacyVectorArt = function(slave, artSize) {
 	/* if pregnant or has a belly */
 	if (slave.belly >= 5000) {
 		r += `<img class='paperdoll' src=${skinFilePath}/preg belly 5000.svg' style='${skinFilter}'>`;
-		if (slave.navelPiercing >= 1) /*Navel Piercing*/
+		if (slave.navelPiercing >= 1) /* Navel Piercing*/
 			r += `<img class='paperdoll' src=${filePath}/body/addon/preg navel piercing.svg'/>`;
 		if (slave.navelPiercing === 2)
 			r += `<img class='paperdoll' src=${filePath}/body/addon/preg navel piercing heavy.svg'/>`;
@@ -2671,7 +2675,7 @@ window.LegacyVectorArt = function(slave, artSize) {
 			r += `<img class='paperdoll' src=${filePath}/body/addon/preg navel piercing heavy.svg'/>`;
 		*/
 	} else {
-		if (slave.navelPiercing >= 1) /*Navel Piercing*/
+		if (slave.navelPiercing >= 1) /* Navel Piercing*/
 			r += `<img class='paperdoll' src=${filePath}/body/addon/navel piercing.svg'/>`;
 		if (slave.navelPiercing === 2)
 			r += `<img class='paperdoll' src=${filePath}/body/addon/navel piercing heavy.svg'/>`;
diff --git a/src/art/vector_revamp/vectorRevampedArtControl.js b/src/art/vector_revamp/vectorRevampedArtControl.js
index 7e1f419ffc7738643f55f1af0db7ad24b7a657ed..a08cabbd3e8989fd91bd0457a1b3e5d6afb445f1 100644
--- a/src/art/vector_revamp/vectorRevampedArtControl.js
+++ b/src/art/vector_revamp/vectorRevampedArtControl.js
@@ -711,8 +711,7 @@ class RevampedArtControl {
 			case "a leotard":
 				/*return this.clothingControl.leotard;*/
 				break;
-			default:
-				break;
+			
 		}
 		return clothing;
 	}
diff --git a/src/cheats/PCCheatMenu.tw b/src/cheats/PCCheatMenu.tw
index 88f2340c9907fbaa9c536bd7ca39617eeda2c7e1..5b29cbdec5e9f466209f6ec4f8e3396532077fea 100644
--- a/src/cheats/PCCheatMenu.tw
+++ b/src/cheats/PCCheatMenu.tw
@@ -49,14 +49,8 @@ Sex: ''$tempSlave.genes''
 	<<radiobutton "$tempSlave.refreshmentType" 4>> Injected
 	<<radiobutton "$tempSlave.refreshmentType" 5>> Popped
 	<<radiobutton "$tempSlave.refreshmentType" 6>> Orally Dissolved
-
 <br>
 
-<br>''Boobs'': <<textbox "$tempSlave.boobs" $tempSlave.boobs>> //0: masculine chest (if title = 1) or flat chested (if title = 0)(WIP) 1: feminine bust//
-<<if $tempSlave.boobs > 0>>
-	<br>''BoobsBonus'': <<textbox "$tempSlave.boobsBonus" $tempSlave.boobsBonus>> //breast size - -3: B-cup, -2: C-cup, -1: D-cup, 0: DD-cup, 1: F-cup, 2: G-cup, 3: H-cup//
-	<br>''BoobsImplant'': <<textbox "$tempSlave.boobsImplant" $tempSlave.boobsImplant>> //do you have breast implants - 0: no, 1: yes//
-<</if>>
 <br>''Skin'': <<textbox "$tempSlave.skin" $tempSlave.skin>>
 <br>''Genetic Skin'': <<textbox "$tempSlave.origSkin" $tempSlave.origSkin>>
 <br>''Race'': <<textbox "$tempSlave.race" $tempSlave.race>>
@@ -67,33 +61,40 @@ Sex: ''$tempSlave.genes''
 <br>''Sclera Color'': <<textbox "$tempSlave.sclerae" $tempSlave.sclerae>>
 <br>''Hair Color'': <<textbox "$tempSlave.hColor" $tempSlave.hColor>>
 <br>''Genetic Hair Color'': <<textbox "$tempSlave.origHColor" $tempSlave.origHColor>>
+<br>
+<br>''Boobs'': <<textbox "$tempSlave.boobs" $tempSlave.boobs>> //0: masculine chest (if title = 1) or flat chested (if title = 0)(WIP) 1: feminine bust//
+<br>''Boobs Bonus'': <<textbox "$tempSlave.boobsBonus" $tempSlave.boobsBonus>> //breast size - -3: B-cup, -2: C-cup, -1: D-cup, 0: DD-cup, 1: F-cup, 2: G-cup, 3: H-cup//
+<br>''Boobs Implant'': <<textbox "$tempSlave.boobsImplant" $tempSlave.boobsImplant>> //do you have breast implants - 0: no, 1: yes//
+<br>''Lactation'': <<textbox "$tempSlave.lactation" $tempSlave.lactation>> //are you lactating - 0: no, 1: yes//
+<br>
 <br>''Butt Size'': <<textbox "$tempSlave.butt" $tempSlave.butt>> //0: normal, 1: big, 2: huge, 3: enormous//
 <br>''Butt Implant'': <<textbox "$tempSlave.buttImplant" $tempSlave.buttImplant>> //do you have butt implants - 0: no, 1: yes//
-<br>''Dick'': <<textbox "$tempSlave.dick" $tempSlave.dick>>
+<br>
 <br>''Vagina'': <<textbox "$tempSlave.vagina" $tempSlave.vagina>>
-<<if $tempSlave.dick == 1>>
-	<br>''BallSize'': <<textbox "$tempSlave.balls" $tempSlave.balls>> //0: normal, 1: big, 2: huge//
-	<br>''BallsImplant'': <<textbox "$tempSlave.ballsImplant" $tempSlave.ballsImplant>> //0: normal, 1: large, 2: huge, 3: enormous, 4: monstrous//
-<</if>>
+<br>''New Vagina'': <<textbox "$tempSlave.newVag" $tempSlave.newVag>> //0: no, 1: yes//
+<br>
+<br>''Dick'': <<textbox "$tempSlave.dick" $tempSlave.dick>>
+<br>''Balls Size'': <<textbox "$tempSlave.balls" $tempSlave.balls>> //0: normal, 1: big, 2: huge//
+<br>''Balls Implant'': <<textbox "$tempSlave.ballsImplant" $tempSlave.ballsImplant>> //0: normal, 1: large, 2: huge, 3: enormous, 4: monstrous//
 
-<br><br>__Age__
+<br><br>
+__Age__
 <br>''Actual Age'': <<textbox "$tempSlave.actualAge" $tempSlave.actualAge>>
 <br>''Physical Age'': <<textbox "$tempSlave.physicalAge" $tempSlave.physicalAge>>
 <br>''Visual Age'': <<textbox "$tempSlave.visualAge" $tempSlave.visualAge>>
 <br>''Ovary Age'': <<textbox "$tempSlave.ovaryAge" $tempSlave.ovaryAge>>
-/*<br>''Age Implant'': <<textbox "$tempSlave.ageImplant" $tempSlave.ageImplant>> //0: no surgery, 1: age altering surgery// */
+<br>''Age Implant'': <<textbox "$tempSlave.ageImplant" $tempSlave.ageImplant>> //0: no surgery, 1: age altering surgery//
 <br>''Player Aging'': <<textbox "$playerAging" $playerAging>> //0: no aging, 1: no aging, but birthdays, 2: aging//
 
-<<if $tempSlave.vagina == 1>>
-	<br><br>
-	__pregnancy__
-	<br>''Pregnancy length'': <<textbox "$tempSlave.preg" $tempSlave.preg>> //how far along your pregnancy is (pregMood kicks in at 24+ weeks) - -2: infertile, -1: contraceptives, 0: not pregnant, 1 - 42: pregnant, 43+: giving birth//
-	<br>''Fetus Count'': <<textbox "$tempSlave.pregType" $tempSlave.pregType>> //how many you're having (1-8)//
-	<br>''PregSource'': <<textbox "$tempSlave.pregSource" $tempSlave.pregSource>> //who knocked you up - 0: unknown, -1: self-impreg, -2: citizen, -3: former master, -4: male arc owner, -5: client, -6: Societal Elite, -7: designer baby, -9: Futanari Sister//
-	<br>''PregMood'': <<textbox "$tempSlave.pregMood" $tempSlave.pregMood>> //how you act when heavily pregnant - 0: no change, 1: submissive and motherly, 2: aggressive and dominant//
-<</if>>
+<br><br>
+__Pregnancy__
+<br>''Pregnancy Length'': <<textbox "$tempSlave.preg" $tempSlave.preg>> //how far along your pregnancy is (pregMood kicks in at 24+ weeks) - -2: infertile, -1: contraceptives, 0: not pregnant, 1 - 42: pregnant, 43+: giving birth//
+<br>''Fetus Count'': <<textbox "$tempSlave.pregType" $tempSlave.pregType>> //how many you're having (1-8)//
+<br>''PregSource'': <<textbox "$tempSlave.pregSource" $tempSlave.pregSource>> //who knocked you up - 0: unknown, -1: self-impreg, -2: citizen, -3: former master, -4: male arc owner, -5: client, -6: Societal Elite, -7: designer baby, -9: Futanari Sister//
+<br>''PregMood'': <<textbox "$tempSlave.pregMood" $tempSlave.pregMood>> //how you act when heavily pregnant - 0: no change, 1: submissive and motherly, 2: aggressive and dominant//
 
-<br><br>''Skills:''
+<br><br>
+''Skills:''
 <br>
 <br>Trading:
 ''<<if $tempSlave.trading >= 100>>
@@ -316,12 +317,21 @@ Sex: ''$tempSlave.genes''
 <<radiobutton "$tempSlave.hacking" -50>> Where's the "any" key?
 <<radiobutton "$tempSlave.hacking" -70>> Main screen turn on?
 <<radiobutton "$tempSlave.hacking" -90>> Ooh, cool glowy thingy!
+
 <br>
 <br>Your mother ID:
 <<textbox "$tempSlave.mother" $tempSlave.mother>>
 <br>Your father ID:
 <<textbox "$tempSlave.father" $tempSlave.father>>
 
+<br>
+<br>''Sexual Energy'': <<textbox "$tempSlave.sexualEnergy" $tempSlave.sexualEnergy>>
+<br>''Cum Tap'': <<textbox "$tempSlave.cumTap" $tempSlave.cumTap>>
+<br>''Stored Cum'': <<textbox "$tempSlave.storedCum" $tempSlave.storedCum>>
+<br>''Fertility Drugs'': <<textbox "$tempSlave.fertDrugs" $tempSlave.fertDrugs>> //0: no, 1: yes//
+<br>''Forced Fertility Drugs'': <<textbox "$tempSlave.forcedFertDrugs" $tempSlave.forcedFertDrugs>> //time left in body system//
+<br>''Stamina Pills'': <<textbox "$tempSlave.staminaPills" $tempSlave.staminaPills>> //0: no, 1: yes//
+
 <br><br>Custom Cheat:
 <br><<textarea "$customEvalCode" "">>
 <br>//Any JavaScript function will be automatically run using the PC as an argument when "Apply" is clicked. For example, entering "(PC) => PC.name = 'Fancy Name' " will change your name to "Fancy Name".//
diff --git a/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw b/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw
index ad73fa10a6518e4589ca7a4e5d548a24db144544..227c60dffbc96c8759a01cd6801ec9d7204112e7 100644
--- a/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw
+++ b/src/cheats/PCCheatMenuCheatDatatypeCleanup.tw
@@ -47,8 +47,16 @@
 	<<set $tempSlave.balls = 0>>
 	<<set $tempSlave.ballsImplant = 0>>
 <</if>>
+<<if $tempSlave.vagina == 0>>
+	<<set $tempSlave.newVag = 0>>
+<</if>>
+<<if $tempSlave.lactation > 0 && $tempSlave.lactationDuration == 0>>
+	<<set $tempSlave.lactationDuration = 2>>
+<<elseif $tempSlave.lactation == 0 && $tempSlave.lactationDuration > 0>>
+	<<set $tempSlave.lactationDuration = 0>>
+<</if>>
 
-You perform the dark rituals, pray to the dark gods and sold your soul for the power to reshape your body and life at will. What a cheater!
+You perform the dark rituals, pray to the dark gods, and sell your soul for the power to reshape your body and life at will. What a cheater!
 
 <<set $PC = clone($tempSlave)>>
 <<unset $tempSlave>>
diff --git a/src/cheats/mod_EditChildCheatDatatypeCleanupNew.tw b/src/cheats/mod_EditChildCheatDatatypeCleanupNew.tw
index dc30d71ae634eb35eef65b2922addeca1d262f20..ffde781e01a55c811d38fc307269080de4fb3369 100644
--- a/src/cheats/mod_EditChildCheatDatatypeCleanupNew.tw
+++ b/src/cheats/mod_EditChildCheatDatatypeCleanupNew.tw
@@ -46,10 +46,10 @@
 	<<print "Indenture was smaller than -1, reset to Fulltime Slave">><br>
 <<elseif $tempSlave.indentureRestrictions < 0>>
 	<<set $tempSlave.indentureRestrictions = 0>>
-	<<print "Indenture Restriction was smaller than 0, reset to No Restrictions">><br>
+	<<print "Indenture restriction was smaller than 0, reset to no restrictions">><br>
 <<elseif $tempSlave.indentureRestrictions > 2>>
 	<<set $tempSlave.indentureRestrictions = 2>>
-	<<print "Indenture Restrictions was bigger than 2, reset to Full Restrictions">><br>
+	<<print "Indenture restrictions was larger than 2, reset to full restrictions">><br>
 <</if>>
 <<if $tempSlave.weekAcquired < 0>>
 	<<set $tempSlave.weekAcquired = 0>>
@@ -63,26 +63,26 @@
 <<if ($tempSlave.rivalryTarget == $tempSlave.ID) && ($tempSlave.rivalry > 0)>>
 	<<set $tempSlave.rivalryTarget = 0>>
 	<<set $tempSlave.rivalry = 0>>
-	<<print "The Slave was $his own Rival, reset to No Rivalry">><br>
+	<<print "Slave was $his own rival, reset to no rivalry">><br>
 <</if>>
 <<if $tempSlave.actualAge < 0>>
-	<<print "Slave actual Age is set too low, reset to existing actual Age">><br>
+	<<print "Slave's actual age is set too low, reset to existing actual age">><br>
 	<<set $tempSlave.actualAge = $activeSlave.actualAge>>
 <</if>>
 <<if $tempSlave.physicalAge < 0>>
-	<<print "Slave physical Age is set too low, reset to existing physical Age">><br>
+	<<print "Slave's physical Age is set too low, reset to existing physical age">><br>
 	<<set $tempSlave.physicalAge = $activeSlave.actualAge>>
 <</if>>
 <<if $tempSlave.visualAge < 0>>
-	<<print "Slave visual Age is set too low, reset to existing visual Age">><br>
+	<<print "Slave's visual age is set too low, reset to existing visual age">><br>
 	<<set $tempSlave.visualAge = $activeSlave.actualAge>>
 <</if>>
 <<if $tempSlave.ovaryAge < 0>>
-	<<print "Slave ovary Age is set too low, reset to match physical age">><br>
+	<<print "Slave's ovary age is set too low, reset to match physical age">><br>
 	<<set $tempSlave.ovaryAge = $tempSlave.physicalAge>>
 <</if>>
 <<if $tempSlave.chem < 0>>
-	<<print "Slaves DNA Error is set too low, reset to 0">><br>
+	<<print "Slave's DNA error is set too low, reset to 0">><br>
 	<<set $tempSlave.chem = 0>>
 <</if>>
 <<if $tempSlave.face < -100>>
@@ -154,7 +154,7 @@
 	<<set $tempSlave.pubertyXX = 0>>
 <</if>>
 <<if $tempSlave.dick < 0>>
-	<<print "Slave Dick Value set too low, reset to 0 (No Dick)" >><br>
+	<<print "Slave dick value set too low, reset to 0 (no dick)" >><br>
 	<<set $tempSlave.dick = 0>>
 <</if>>
 <<if $tempSlave.dick == 0>>
@@ -167,7 +167,7 @@
 	<<set $tempSlave.ovaries = 0>>
 <</if>>
 <<if ($tempSlave.clit > 0) && ($tempSlave.dick > 0 )>>
-	<<print "No Giant Clit when Dick is present, reset Clit to 0 (Normal)" >><br>
+	<<print "No giant clit when dick is present, reset clit to 0 (normal)" >><br>
 	<<set $tempSlave.clit = 0>>
 <</if>>
 <<if ($tempSlave.ovaries == 0) && ($tempSlave.mpreg == 0) && ($tempSlave.preg > 0)>>
@@ -323,7 +323,7 @@
 <<run SetBellySize($tempSlave)>>
 
 <br>
-You perform the dark rituals, pray to the dark gods and sold your soul for the power to change and mold slaves to your will.
+You perform the dark rituals, pray to the dark gods, and sell your soul for the power to change and mold slaves to your will.
 
 <br><br>This slave has been changed forever and you have lost a bit of your soul, YOU CHEATER!
 
diff --git a/src/cheats/mod_EditChildCheatNew.tw b/src/cheats/mod_EditChildCheatNew.tw
index e9ecbd8466d81e66c336fbe24382a78013718c36..e60caa3b5683b369b5eca6735bc59adb495713c0 100644
--- a/src/cheats/mod_EditChildCheatNew.tw
+++ b/src/cheats/mod_EditChildCheatNew.tw
@@ -913,12 +913,12 @@
 	Custom hair length: <<textbox "$tempSlave.hLength" $tempSlave.hLength>>
 	<br>
 	<<switch $tempSlave.hStyle>>
-	<<case "tails" "dreadlocks" "curled" "cornrows">>
-	''$His hair is in @@.yellow;$tempSlave.hStyle@@''
+	<<case "cornrows" "curled" "dreadlocks" "tails">>
+		''$His hair is in @@.yellow;$tempSlave.hStyle@@''
 	<<case "ponytail">>
-	''$His hair is in a @@.yellow;$tempSlave.hStyle@@''
+		''$His hair is in a @@.yellow;$tempSlave.hStyle@@''
 	<<default>>
-	''$His hair is @@.yellow;$tempSlave.hStyle@@''
+		''$His hair is @@.yellow;$tempSlave.hStyle@@''
 	<</switch>>
 	Custom hair description: <<textbox "$tempSlave.hStyle" $tempSlave.hStyle>>
 	<br>
diff --git a/src/cheats/mod_EditFSCheatDatatypeCleanup.tw b/src/cheats/mod_EditFSCheatDatatypeCleanup.tw
index f0dc1eabfd1d3b10eb3c864d0c1c40eb882af4fb..6f7a72dbc30a0d38cbcd96da60eed5d6f8257084 100644
--- a/src/cheats/mod_EditFSCheatDatatypeCleanup.tw
+++ b/src/cheats/mod_EditFSCheatDatatypeCleanup.tw
@@ -145,6 +145,6 @@
 	<</if>>
 <</for>>
 
-You perform the dark rituals, pray to the chaos gods and sold your CHEATING SOUL for the power to change and mold the Future Society to your will.
+You perform the dark rituals, pray to the chaos gods, and sell your CHEATING SOUL for the power to change and mold the Future Society to your will.
 
 <br><br>The Future Society has been changed forever and the chaos gods take YOUR CHEATING SOUL as payment YOU CHEATING CHEATER!
diff --git a/src/cheats/mod_EditSlaveCheat.tw b/src/cheats/mod_EditSlaveCheat.tw
index e425afbe7bd7b5b01daf009460291899d29b407f..b583f28c1e1c36c408904b4e00b25230c44de042 100644
--- a/src/cheats/mod_EditSlaveCheat.tw
+++ b/src/cheats/mod_EditSlaveCheat.tw
@@ -258,12 +258,12 @@
 <br><br>
 
 <<switch $tempSlave.hStyle>>
-<<case "tails" "dreadlocks" "cornrows">>
-''$His hair is in $tempSlave.hStyle''
+<<case "cornrows" "dreadlocks" "tails">>
+	''$His hair is in $tempSlave.hStyle''
 <<case "ponytail">>
-''$His hair is in a $tempSlave.hStyle''
+	''$His hair is in a $tempSlave.hStyle''
 <<default>>
-''$His hair is $tempSlave.hStyle''
+	''$His hair is $tempSlave.hStyle''
 <</switch>>
 Custom hair description: <<textbox "$tempSlave.hStyle" $tempSlave.hStyle>>
 <br>
diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw
index e3e6a737e396ced653f6bd5d809e1b28df9557c3..3c5613c98a9352b9d65cecbeef70631a9766e05a 100644
--- a/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw
+++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanup.tw
@@ -31,7 +31,7 @@
 <</if>>
 <<run SlaveDatatypeCleanup($tempSlave)>> /* will break cheated pregnancies if run before the above block of code */
 
-You perform the dark rituals, pray to the dark gods and sold your soul for the power to change and mold slaves to your will.
+You perform the dark rituals, pray to the dark gods, and sell your soul for the power to change and mold slaves to your will.
 
 <br><br>This slave has been changed forever and you have lost a bit of your soul, YOU CHEATER!
 
diff --git a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
index 329f321049c313fb1fbfcd8e2efbf3dee1db22e7..f3ca0f74fc5511e988bc139ca45f50715c76d1bd 100644
--- a/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
+++ b/src/cheats/mod_EditSlaveCheatDatatypeCleanupNew.tw
@@ -42,15 +42,15 @@
 <<if ($tempSlave.relationshipTarget == $tempSlave.ID) && ($tempSlave.relationship > 0)>>
 	<<set $tempSlave.relationshipTarget = 0>>
 	<<set $tempSlave.relationship = -1>>
-	<<print "The Slave was in a relation with $himself, reset to emotional Slut">><br>
+	<<print "Slave was in a relation with $himself, reset to emotional slut">><br>
 <</if>>
 <<if ($tempSlave.rivalryTarget == $tempSlave.ID) && ($tempSlave.rivalry > 0)>>
 	<<set $tempSlave.rivalryTarget = 0>>
 	<<set $tempSlave.rivalry = 0>>
-	<<print "The Slave was $his own Rival, reset to No Rivalry">><br>
+	<<print "Slave was $his own rival, reset to no rivalry">><br>
 <</if>>
 <<if ($tempSlave.ageImplant == 1) && ($tempSlave.visualAge < 25)>>
-	<<print "Slave's Visual Age is smaller than 25, reset to no lifting">><br>
+	<<print "Slave's visual age is smaller than 25, reset to no lifting">><br>
 	<<set $tempSlave.ageImplant = 0>>
 <</if>>
 <<if ($tempSlave.voice == 0) && ($tempSlave.voiceImplant != 0)>>
@@ -66,18 +66,18 @@
 	<<set $tempSlave.voiceImplant = 0>>
 <</if>>
 <<if $tempSlave.amp < -5>>
-	<<print "Amputation Value too low, reset to -5 (Cybernetic limbs)">><br>
+	<<print "Amputation value too low, reset to -5 (cybernetic limbs)">><br>
 	<<set $tempSlave.amp = -5>>
 <<elseif $tempSlave.amp > 1>>
-	<<print "Amputation Value too high, reset to 1 (Amputated)">><br>
+	<<print "Amputation value too high, reset to 1 (amputated)">><br>
 	<<set $tempSlave.amp = 1>>
 <</if>>
 <<if ($tempSlave.amp == 0) && ($tempSlave.PLimb > 0)>>
-	<<print "Slave has Normal Limbs, Limb Interface reset to 0 (No Interface)">><br>
+	<<print "Slave has normal limbs, limb interface reset to 0 (no interface)">><br>
 	<<set $tempSlave.PLimb = 0>>
 <</if>>
 <<if ($tempSlave.PLimb == 0) && ($tempSlave.amp < 0)>>
-	<<print "Slave has no Prosthetic limb Interface, limbs reset to 1 (Amputated)">>
+	<<print "Slave has no prosthetic limb interface, limbs reset to 1 (amputated)">>
 	<<set _tempLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
 	<<set _tempLimbs.type = $tempSlave.amp, _tempLimbs.armsTat = $tempSlave.armsTat, _tempLimbs.legsTat = $tempSlave.legsTat>>
 	<<if !Array.isArray($tempSlave.readyLimbs)>>
@@ -129,19 +129,19 @@
 	<<set $tempSlave.ovaries = 0>>
 <</if>>
 <<if ($tempSlave.cervixImplant == 1) && ($tempSlave.ovaries == 0)>>
-	<<print "Slave has no Ovaries Cervix Implant reset to 0 (Not Implanted)" >><br>
+	<<print "Slave has no ovaries, cervix implant reset to 0 (not implanted)">><br>
 	<<set $tempSlave.cervixImplant = 0>>
 <</if>>
 <<if ($tempSlave.cervixImplant == 1) && ($tempSlave.preg == -2)>>
-	<<print "Slave is Sterile, Cervix Implant reset to 0 (Not Implanted)">><br>
+	<<print "Slave is sterile, cervix implant reset to 0 (not implanted)">><br>
 	<<set $tempSlave.cervixImplant = 0>>
 <</if>>
 <<if ($tempSlave.clit > 0) && ($tempSlave.dick > 0 )>>
-	<<print "No Giant Clit when Dick is present, reset Clit to 0 (Normal)" >><br>
+	<<print "No giant clit when dick is present, reset clit to 0 (normal)">><br>
 	<<set $tempSlave.clit = 0>>
 <</if>>
 <<if ($tempSlave.ovaries == 0) && ($tempSlave.mpreg == 0) && ($tempSlave.preg > 0)>>
-	<<print "Slave has no Ovaries and no Analwomb, Pregnancy reset to 0">><br>
+	<<print "Slave has no ovaries and no anal womb, pregnancy reset to 0">><br>
 	<<set $tempSlave.preg = 0>>
 	<<set $tempSlave.pregType = 0>>
 	<<set $tempSlave.pregSource = 0>>
@@ -149,15 +149,15 @@
 	<<run WombFlush($tempSlave)>>
 <</if>>
 <<if ($tempSlave.pubertyXX != 1) && ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXX)>>
-	<<print "Slaves physical Age is equal or higher than female Puberty Age, Puberty set to 1 (Post Puberty)" >><br>
+	<<print "Slave's physical age is equal to or higher than female puberty age, puberty set to 1 (post-puberty)">><br>
 	<<set $tempSlave.pubertyXX = 1>>
 <</if>>
 <<if ($tempSlave.ovaries == 1) && ($tempSlave.mpreg == 1)>>
-	<<print "Slave has a working Vagina, Analwomb got removed" >><br>
+	<<print "Slave has a working vagina, anal womb removed">><br>
 	<<set $tempSlave.mpreg = 0>>
 <</if>>
 <<if ($tempSlave.pubertyXX == 0) && ($tempSlave.preg > 0)>>
-	<<print "Slave is not fertile (Pre-Puberty) and has no Anal Womb, pregnancy aborted!">><br>
+	<<print "Slave is not fertile (pre-puberty) and has no anal womb, pregnancy aborted">><br>
 	<<set $tempSlave.preg = 0>>
 	<<set $tempSlave.pregType = 0>>
 	<<set $tempSlave.pregSource = 0>>
@@ -170,11 +170,11 @@
 	<<set $tempSlave.pubertyXY = 0>>
 <</if>>
 <<if ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXY) && ($tempSlave.pubertyXY != 1)>>
-	<<print "Slaves physical Age is equal or higher than male Puberty Age, Puberty set to 1 (Post Puberty)" >><br>
+	<<print "Slave's physical age is equal to or higher than male puberty age, puberty set to 1 (post-puberty)" >><br>
 	<<set $tempSlave.pubertyXY = 1>>
 <</if>>
 <<if $tempSlave.breedingMark == 1 && ["be a subordinate slave", "be confined in the arcade", "be the DJ", "be the Madam", "live with your Head Girl", "serve in the club", "serve the public", "whore", "work a glory hole", "work in the brothel", "work in the dairy"].includes($tempSlave.assignment)>>
-	<<print "Eugenics Breeding Marked slave detected in questionable use, defaulting slave assignment to 'rest'">><br>
+	<<print "Eugenics breeding marked slave detected in questionable use, defaulting slave assignment to 'rest'">><br>
 	<<= assignJob($tempSlave, "rest")>>
 <</if>>
 <<if $tempSlave.lactation > 0 && $tempSlave.lactationDuration == 0>>
@@ -185,7 +185,7 @@
 <<run SetBellySize($tempSlave)>>
 
 <br>
-You perform the dark rituals, pray to the dark gods and sold your soul for the power to change and mold slaves to your will.
+You perform the dark rituals, pray to the dark gods, and sell your soul for the power to change and mold slaves to your will.
 
 <br><br>This slave has been changed forever and you have lost a bit of your soul, YOU CHEATER!
 
diff --git a/src/cheats/mod_editSlaveCheatNew.tw b/src/cheats/mod_editSlaveCheatNew.tw
index 3158bdcdcd3a182fb203dfcf42246d82ca30b7b4..f5f0266cc0a8de221bb030407d4e39a38b885d3a 100644
--- a/src/cheats/mod_editSlaveCheatNew.tw
+++ b/src/cheats/mod_editSlaveCheatNew.tw
@@ -1537,12 +1537,12 @@
 	Custom hair length: <<textbox "$tempSlave.hLength" $tempSlave.hLength>>
 	<br>
 	<<switch $tempSlave.hStyle>>
-	<<case "tails" "dreadlocks" "curled" "cornrows">>
-	''$His hair is in @@.yellow;$tempSlave.hStyle@@''
+	<<case "cornrows" "curled" "dreadlocks" "tails">>
+		''$His hair is in @@.yellow;$tempSlave.hStyle@@''
 	<<case "ponytail">>
-	''$His hair is in a @@.yellow;$tempSlave.hStyle@@''
+		''$His hair is in a @@.yellow;$tempSlave.hStyle@@''
 	<<default>>
-	''$His hair is @@.yellow;$tempSlave.hStyle@@''
+		''$His hair is @@.yellow;$tempSlave.hStyle@@''
 	<</switch>>
 	Custom hair description: <<textbox "$tempSlave.hStyle" $tempSlave.hStyle>>
 	<br>
diff --git a/src/debugging/debugJS.js b/src/debugging/debugJS.js
index 5675664ec6d6537aa37c7309676c06da467d7f70..86ca5dd2d9c83f88edf02c4049205e3a3e2a7379 100644
--- a/src/debugging/debugJS.js
+++ b/src/debugging/debugJS.js
@@ -5,7 +5,7 @@ Given an object, this will return an array where for each property of the origin
 {variable: property, oldVal: _oldDiff.property, newVal: _newDiff.property}
 */
 window.generateDiffArray = function generateDiffArray(obj) {
-	var diffArray = Object.keys(obj).map(function(key) {
+	let diffArray = Object.keys(obj).map(function(key) {
 		return {variable: key, oldVal: State.temporary.oldDiff[key], newVal: State.temporary.newDiff[key]};
 	});
 	return diffArray;
@@ -16,7 +16,7 @@ Shamelessly copied from https://codereview.stackexchange.com/a/11580
 Finds and returns the difference between two objects. Potentially will have arbitrary nestings of objects.
 */
 window.difference = function difference(o1, o2) {
-	var k, kDiff, diff = {};
+	let k, kDiff, diff = {};
 	for (k in o1) {
 		if (!o1.hasOwnProperty(k)) {
 		} else if (typeof o1[k] !== 'object' || typeof o2[k] !== 'object') {
@@ -49,17 +49,17 @@ Flattens an object while concatenating property names.
 For example {id: {number: 4, name: "A"}} --> {id.number: 4, id.name: "A"}
 */
 window.diffFlatten = function diffFlatten(data) {
-	var result = {};
-	function recurse (cur, prop) {
+	let result = {};
+	function recurse(cur, prop) {
 		if (Object(cur) !== cur) {
 			result[prop] = cur;
 		} else if (Array.isArray(cur)) {
-			for(var i=0, l=cur.length; i<l; i++)
+			for (let i=0, l=cur.length; i<l; i++)
 				recurse(cur[i], prop + "[" + i + "]");
 			if (l === 0)
 				result[prop] = [];
 		} else {
-			var isEmpty = true;
+			let isEmpty = true;
 			for (let p in cur) {
 				isEmpty = false;
 				recurse(cur[p], prop ? prop+"."+p : p);
@@ -77,7 +77,7 @@ Finds all NaN values anywhere in the State.variables object. Returns an array wi
 */
 window.findNaN = function findNan() {
 	const flatV = diffFlatten(State.variables);
-	var result = [];
+	let result = [];
 	for (let key in flatV) {
 		if (Number.isNaN(flatV[key])) {
 			result.push('$$'+key); /* double dollar signs to escape sugarcube markup */
@@ -89,12 +89,12 @@ window.findNaN = function findNan() {
 /**
  * Dumps game save as a readable JSON to the browser for saving in a file
  */
-App.Debug.dumpGameState = function () {
+App.Debug.dumpGameState = function() {
 	// helper to download a blob
 	// borrowed from stackexchange
 	function downloadToFile(content, fileName, contentType) {
-		var a = document.createElement("a");
-		var file = new Blob([content], {
+		let a = document.createElement("a");
+		let file = new Blob([content], {
 			type: contentType
 		});
 		a.href = URL.createObjectURL(file);
@@ -105,7 +105,7 @@ App.Debug.dumpGameState = function () {
 	// we will replace SugarCube onSave handler
 	let oldHandler = SugarCube.Config.saves.onSave;
 	try {
-		SugarCube.Config.saves.onSave = function (save) {
+		SugarCube.Config.saves.onSave = function(save) {
 			if (oldHandler) {
 				oldHandler(save);
 			}
diff --git a/src/endWeek/minorInjuryResponse.js b/src/endWeek/minorInjuryResponse.js
index 8781ec6293afa63c2dc282585523c754f58bf6ba..49416c41d34eb5deeac9ad4e2bbc6b82899b3c98 100644
--- a/src/endWeek/minorInjuryResponse.js
+++ b/src/endWeek/minorInjuryResponse.js
@@ -1,6 +1,8 @@
-/* eslint-disable no-undef */
-/* eslint-disable no-unused-vars */
-window.minorInjuryResponse = /** @param {App.Entity.SlaveState} slave */ function minorInjuryResponse(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.minorInjuryResponse = function minorInjuryResponse(slave) {
 	const arcology = State.variables.arcologies[0];
 	const arcologyUpgrade = State.variables.arcologyUpgrade;
 	const pronouns = getPronouns(slave);
diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js
index 7ba75136b79cfb66c747eacb117a5847360f811a..de9badc60f82c7d2cc776ed0effd76339b5fea0d 100644
--- a/src/endWeek/saChoosesOwnClothes.js
+++ b/src/endWeek/saChoosesOwnClothes.js
@@ -3,6 +3,7 @@ window.saChoosesOwnClothes = (function() {
 	let V;
 	let player;
 	let r;
+	/* eslint-disable */
 	let pronouns;
 	let he;
 	let him;
@@ -12,8 +13,12 @@ window.saChoosesOwnClothes = (function() {
 	let boy;
 	let He;
 	let His;
+	/* eslint-enable */
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function saChoosesOwnClothes(slave) {
 		V = State.variables;
 		player = V.PC;
@@ -91,7 +96,10 @@ window.saChoosesOwnClothes = (function() {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string} // I think
+	 */
 	function todaysOutfit(slave) {
 		const clothing = [];
 		let chosenClothing;
@@ -946,7 +954,10 @@ window.saChoosesOwnClothes = (function() {
 		return selection;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function todaysShoes(slave) {
 		const shoes = [];
 
@@ -989,12 +1000,17 @@ window.saChoosesOwnClothes = (function() {
 		return jsEither(shoes);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function todaysCollar(slave) {
 		const neck = [];
 
 		if (slave.fetish === "mindbroken") {
+			//
 		} else if (slave.devotion <= 20) {
+			//
 		} else {
 			if (V.arcologies[0].FSEgyptianRevivalist > 0) {
 				neck.push({text: `dons a wesekh to support your ancient Egyptian pretensions,`, collar: "ancient Egyptian"});
@@ -1016,7 +1032,10 @@ window.saChoosesOwnClothes = (function() {
 		return jsEither(neck);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function todaysCorset(slave) {
 		const belly = [];
 		const empathyBellies = ["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"];
diff --git a/src/endWeek/saPorn.js b/src/endWeek/saPorn.js
index fea7013dedb26444c9d3ff878d4761ec26a8e83e..93ab5aa36c52c40b03030d04339859f23b79298d 100644
--- a/src/endWeek/saPorn.js
+++ b/src/endWeek/saPorn.js
@@ -1,6 +1,10 @@
 /* to later be rolled into saPorn */
 
-window.getHighestPorn = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.getHighestPorn = function(slave) {
 	let max = {value: 0, type: "none"};
 
 	if (slave.porn.fame.general > max.value) {
diff --git a/src/endWeek/saRest.js b/src/endWeek/saRest.js
index cd32de24646df7155de4da6c5142851baa9732ea..009befc9e6b397d3426d5f13dc73ae0136b75b50 100644
--- a/src/endWeek/saRest.js
+++ b/src/endWeek/saRest.js
@@ -1,5 +1,10 @@
-window.saRest = /** @param {App.Entity.SlaveState} slave */ function saRest(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.saRest = function saRest(slave) {
 	const V = State.variables;
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -9,6 +14,7 @@ window.saRest = /** @param {App.Entity.SlaveState} slave */ function saRest(slav
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 
 	let t = " takes the week off.";
 
@@ -25,13 +31,13 @@ window.saRest = /** @param {App.Entity.SlaveState} slave */ function saRest(slav
 	if (slave.health > 90) {
 		t += ` ${His} health is so outstanding that rest does not improve it.`;
 	} else if (slave.health > -100) {
-		t += ` ${His} <span class='green'>health recovers</span> with rest.`;
+		t += ` ${His} <span class="green">health recovers</span> with rest.`;
 		slave.health += 10;
 		if (!(canHear(slave))) {
-			t += ` Since ${he} is deaf, the hustle and bustle of daily life in the penthouse <span class='green'>didn't bother ${him} at all.</span>`;
+			t += ` Since ${he} is deaf, the hustle and bustle of daily life in the penthouse <span class="green">didn't bother ${him} at all.</span>`;
 			slave.health += 3;
 		} else if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs")) {
-			t += ` Since ${he} is hard of hearing, the hustle and bustle of daily life in the penthouse <span class='green'>didn't disturb ${his} rest as much.</span>`;
+			t += ` Since ${he} is hard of hearing, the hustle and bustle of daily life in the penthouse <span class="green">didn't disturb ${his} rest as much.</span>`;
 			slave.health += 1;
 		}
 	}
@@ -39,18 +45,18 @@ window.saRest = /** @param {App.Entity.SlaveState} slave */ function saRest(slav
 	if (slave.fuckdoll === 0 && slave.fetish !== "mindbroken") {
 		if (slave.devotion > 20) {
 			if (slave.trust <= 20) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
+				t += ` Being allowed to rest <span class="mediumaquamarine">reduces ${his} fear</span> of you.`;
 				slave.trust += 4;
 			} else if (slave.trust <= 50) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>builds ${his} trust</span> in you.`;
+				t += ` Being allowed to rest <span class="mediumaquamarine">builds ${his} trust</span> in you.`;
 				slave.trust += 2;
 			} else {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>confirms ${his} trust</span> in you.`;
+				t += ` Being allowed to rest <span class="mediumaquamarine">confirms ${his} trust</span> in you.`;
 				slave.trust += 2;
 			}
 		} else {
 			if (slave.trust < -20) {
-				t += ` Being allowed to rest <span class='mediumaquamarine'>reduces ${his} fear</span> of you.`;
+				t += ` Being allowed to rest <span class="mediumaquamarine">reduces ${his} fear</span> of you.`;
 				slave.trust += 4;
 			}
 		}
@@ -61,77 +67,77 @@ window.saRest = /** @param {App.Entity.SlaveState} slave */ function saRest(slav
 		t += ` __This week__ ${_vignette.text} `;
 		if (_vignette.type === "cash") {
 			if (_vignette.effect > 0) {
-				t += `<span class='yellowgreen'>making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
+				t += `<span class="yellowgreen">making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
+				t += `<span class="red">losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			cashX(Math.trunc(V.FResult*_vignette.effect), "rest", slave);
+			cashX(Math.trunc(V.FResult * _vignette.effect), "rest", slave);
 		} else if (_vignette.type === "devotion") {
 			if (_vignette.effect > 0) {
 				if (slave.devotion > 50) {
-					t += `<span class='hotpink'>increasing ${his} devotion to you.</span>`;
+					t += `<span class="hotpink">increasing ${his} devotion to you.</span>`;
 				} else if (slave.devotion >= -20) {
-					t += `<span class='hotpink'>increasing ${his} acceptance of you.</span>`;
+					t += `<span class="hotpink">increasing ${his} acceptance of you.</span>`;
 				} else if (slave.devotion > -10) {
-					t += `<span class='hotpink'>reducing ${his} dislike of you.</span>`;
+					t += `<span class="hotpink">reducing ${his} dislike of you.</span>`;
 				} else {
-					t += `<span class='hotpink'>reducing ${his} hatred of you.</span>`;
+					t += `<span class="hotpink">reducing ${his} hatred of you.</span>`;
 				}
 			} else if (_vignette.effect < 0) {
 				if (slave.devotion > 50) {
-					t += `<span class='mediumorchid'>reducing ${his} devotion to you.</span>`;
+					t += `<span class="mediumorchid">reducing ${his} devotion to you.</span>`;
 				} else if (slave.devotion >= -20) {
-					t += `<span class='mediumorchid'>reducing ${his} acceptance of you.</span>`;
+					t += `<span class="mediumorchid">reducing ${his} acceptance of you.</span>`;
 				} else if (slave.devotion > -10) {
-					t += `<span class='mediumorchid'>increasing ${his} dislike of you.</span>`;
+					t += `<span class="mediumorchid">increasing ${his} dislike of you.</span>`;
 				} else {
-					t += `<span class='mediumorchid'>increasing ${his} hatred of you.</span>`;
+					t += `<span class="mediumorchid">increasing ${his} hatred of you.</span>`;
 				}
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			slave.devotion += (1*_vignette.effect);
+			slave.devotion += (1 * _vignette.effect);
 		} else if (_vignette.type === "trust") {
 			if (_vignette.effect > 0) {
 				if (slave.trust > 20) {
-					t += `<span class='mediumaquamarine'>increasing ${his} trust in you.</span>`;
+					t += `<span class="mediumaquamarine">increasing ${his} trust in you.</span>`;
 				} else if (slave.trust > -10) {
-					t += `<span class='mediumaquamarine'>reducing ${his} fear of you.</span>`;
+					t += `<span class="mediumaquamarine">reducing ${his} fear of you.</span>`;
 				} else {
-					t += `<span class='mediumaquamarine'>reducing ${his} terror of you.</span>`;
+					t += `<span class="mediumaquamarine">reducing ${his} terror of you.</span>`;
 				}
 			} else if (_vignette.effect < 0) {
 				if (slave.trust > 20) {
-					t += `<span class='gold'>reducing ${his} trust in you.</span>`;
+					t += `<span class="gold">reducing ${his} trust in you.</span>`;
 				} else if (slave.trust >= -20) {
-					t += `<span class='gold'>increasing ${his} fear of you.</span>`;
+					t += `<span class="gold">increasing ${his} fear of you.</span>`;
 				} else {
-					t += `<span class='gold'>increasing ${his} terror of you.</span>`;
+					t += `<span class="gold">increasing ${his} terror of you.</span>`;
 				}
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			slave.trust += (1*_vignette.effect);
+			slave.trust += (1 * _vignette.effect);
 		} else if (_vignette.type === "health") {
 			if (_vignette.effect > 0) {
-				t += `<span class='green'>improving ${his} health.</span>`;
+				t += `<span class="green">improving ${his} health.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>affecting ${his} health.</span>`;
+				t += `<span class="red">affecting ${his} health.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			slave.health += (2*_vignette.effect);
+			slave.health += (2 * _vignette.effect);
 		} else {
 			if (_vignette.effect > 0) {
-				t += `<span class='green'>gaining you a bit of reputation.</span>`;
+				t += `<span class="green">gaining you a bit of reputation.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you a bit of reputation.</span>`;
+				t += `<span class="red">losing you a bit of reputation.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
-			repX((V.FResult*_vignette.effect*0.1), "vignette", slave);
+			repX((V.FResult * _vignette.effect * 0.1), "vignette", slave);
 		}
 	}
 
diff --git a/src/endWeek/saServant.js b/src/endWeek/saServant.js
index 5b13a5642fc18f95b36025845633b90a9c556885..7125a95b18c2258d193979513773d0a1421410e8 100644
--- a/src/endWeek/saServant.js
+++ b/src/endWeek/saServant.js
@@ -1,5 +1,10 @@
-window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServant(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.saServant = function saServant(slave) {
 	const V = State.variables;
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -9,6 +14,7 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 
 	let t = `works as a servant. ${He} performs the lowest jobs in your penthouse, cleaning up after your other slaves, bathing them, helping them dress, and giving them sexual relief.`;
 
@@ -21,14 +27,14 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 			if (V.Stewardess !== 0) {
 				t += ` This brings ${him} under ${V.Stewardess.slaveName}'s supervision. The Stewardess `;
 				if (slave.devotion < -20) {
-					t += `subjects ${him} to <span class='gold'>corrective rape</span> when ${his} service is imperfect, <span class='hotpink'>when ${he} steps out of line,</span> or when the Stewardess just feels like raping ${him}, forcing the poor slave to <span class='yellowgreen'>find refuge in work.</span>`;
+					t += `subjects ${him} to <span class="gold">corrective rape</span> when ${his} service is imperfect, <span class="hotpink">when ${he} steps out of line,</span> or when the Stewardess just feels like raping ${him}, forcing the poor slave to <span class="yellowgreen">find refuge in work.</span>`;
 					slave.devotion += 2;
 					slave.trust -= 2;
 				} else if (slave.devotion <= 20) {
-					t += `molests ${him}, encouraging the poor slave to <span class='hotpink'>keep ${his} head down</span> and <span class='yellowgreen'>work harder.</span>`;
+					t += `molests ${him}, encouraging the poor slave to <span class="hotpink">keep ${his} head down</span> and <span class="yellowgreen">work harder.</span>`;
 					slave.devotion += 2;
 				} else {
-					t += `uses <span class='hotpink'>sex as a reward,</span> getting ${him} off when ${he} <span class='yellowgreen'>works harder.</span>`;
+					t += `uses <span class="hotpink">sex as a reward,</span> getting ${him} off when ${he} <span class="yellowgreen">works harder.</span>`;
 					slave.devotion++;
 				}
 				if (!(canHear(slave))) {
@@ -46,21 +52,21 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 
 	t += ` ${He} is `;
 	if (slave.trust < -20) {
-		t += "frightened of punishment and works very hard, <span class='yellowgreen'>reducing the upkeep</span> of your slaves.";
+		t += `frightened of punishment and works very hard, <span class="yellowgreen">reducing the upkeep</span> of your slaves.`;
 	} else if (slave.devotion < -20) {
 		if (slave.trust >= 20) {
-			t += `uninterested in doing such work and barely lifts a finger to <span class='yellowgreen'>reduce the upkeep</span> of your slaves.`;
+			t += `uninterested in doing such work and barely lifts a finger to <span class="yellowgreen">reduce the upkeep</span> of your slaves.`;
 		} else {
-			t += `reluctant, requiring your other slaves to force ${his} services, and does not <span class='yellowgreen'>reduce upkeep</span> of your slaves much.`;
+			t += `reluctant, requiring your other slaves to force ${his} services, and does not <span class="yellowgreen">reduce upkeep</span> of your slaves much.`;
 		}
 	} else if (slave.devotion <= 20) {
-		t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class='yellowgreen'>reduces upkeep</span> of your slaves.`;
+		t += `hesitant, requiring your other slaves to demand ${his} services, and only slightly <span class="yellowgreen">reduces upkeep</span> of your slaves.`;
 	} else if (slave.devotion <= 50) {
-		t += `obedient, offering your other slaves ${his} services, and moderately <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
+		t += `obedient, offering your other slaves ${his} services, and moderately <span class="yellowgreen">reduces the upkeep</span> of your slaves.`;
 	} else if (slave.devotion <= 95) {
-		t += `devoted, happily giving your other slaves ${his} services, and <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
+		t += `devoted, happily giving your other slaves ${his} services, and <span class="yellowgreen">reduces the upkeep</span> of your slaves.`;
 	} else {
-		t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class='yellowgreen'>reduces the upkeep</span> of your slaves.`;
+		t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class="yellowgreen">reduces the upkeep</span> of your slaves.`;
 	}
 
 	if (slave.releaseRules !== "chastity") {
@@ -121,9 +127,9 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 		t += ` __This week__ ${_vignette.text} `;
 		if (_vignette.type === "cash") {
 			if (_vignette.effect > 0) {
-				t += `<span class='yellowgreen'>making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
+				t += `<span class="yellowgreen">making you an extra ${cashFormat(Math.trunc(V.FResult*_vignette.effect))}.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
+				t += `<span class="red">losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*_vignette.effect)))}.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
@@ -131,23 +137,23 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 		} else if (_vignette.type === "devotion") {
 			if (_vignette.effect > 0) {
 				if (slave.devotion > 50) {
-					t += `<span class='hotpink'>increasing ${his} devotion to you.</span>`;
+					t += `<span class="hotpink">increasing ${his} devotion to you.</span>`;
 				} else if (slave.devotion >= -20) {
-					t += `<span class='hotpink'>increasing ${his} acceptance of you.</span>`;
+					t += `<span class="hotpink">increasing ${his} acceptance of you.</span>`;
 				} else if (slave.devotion > -10) {
-					t += `<span class='hotpink'>reducing ${his} dislike of you.</span>`;
+					t += `<span class="hotpink">reducing ${his} dislike of you.</span>`;
 				} else {
-					t += `<span class='hotpink'>reducing ${his} hatred of you.</span>`;
+					t += `<span class="hotpink">reducing ${his} hatred of you.</span>`;
 				}
 			} else if (_vignette.effect < 0) {
 				if (slave.devotion > 50) {
-					t += `<span class='mediumorchid'>reducing ${his} devotion to you.</span>`;
+					t += `<span class="mediumorchid">reducing ${his} devotion to you.</span>`;
 				} else if (slave.devotion >= -20) {
-					t += `<span class='mediumorchid'>reducing ${his} acceptance of you.</span>`;
+					t += `<span class="mediumorchid">reducing ${his} acceptance of you.</span>`;
 				} else if (slave.devotion > -10) {
-					t += `<span class='mediumorchid'>increasing ${his} dislike of you.</span>`;
+					t += `<span class="mediumorchid">increasing ${his} dislike of you.</span>`;
 				} else {
-					t += `<span class='mediumorchid'>increasing ${his} hatred of you.</span>`;
+					t += `<span class="mediumorchid">increasing ${his} hatred of you.</span>`;
 				}
 			} else {
 				t += `an incident without lasting effect.`;
@@ -156,19 +162,19 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 		} else if (_vignette.type === "trust") {
 			if (_vignette.effect > 0) {
 				if (slave.trust > 20) {
-					t += `<span class='mediumaquamarine'>increasing ${his} trust in you.</span>`;
+					t += `<span class="mediumaquamarine">increasing ${his} trust in you.</span>`;
 				} else if (slave.trust > -10) {
-					t += `<span class='mediumaquamarine'>reducing ${his} fear of you.</span>`;
+					t += `<span class="mediumaquamarine">reducing ${his} fear of you.</span>`;
 				} else {
-					t += `<span class='mediumaquamarine'>reducing ${his} terror of you.</span>`;
+					t += `<span class="mediumaquamarine">reducing ${his} terror of you.</span>`;
 				}
 			} else if (_vignette.effect < 0) {
 				if (slave.trust > 20) {
-					t += `<span class='gold'>reducing ${his} trust in you.</span>`;
+					t += `<span class="gold">reducing ${his} trust in you.</span>`;
 				} else if (slave.trust >= -20) {
-					t += `<span class='gold'>increasing ${his} fear of you.</span>`;
+					t += `<span class="gold">increasing ${his} fear of you.</span>`;
 				} else {
-					t += `<span class='gold'>increasing ${his} terror of you.</span>`;
+					t += `<span class="gold">increasing ${his} terror of you.</span>`;
 				}
 			} else {
 				t += `an incident without lasting effect.`;
@@ -176,18 +182,18 @@ window.saServant = /** @param {App.Entity.SlaveState} slave */ function saServan
 			slave.trust += (1 * _vignette.effect);
 		} else if (_vignette.type === "health") {
 			if (_vignette.effect > 0) {
-				t += `<span class='green'>improving ${his} health.</span>`;
+				t += `<span class="green">improving ${his} health.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>affecting ${his} health.</span>`;
+				t += `<span class="red">affecting ${his} health.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
 			slave.health += (2 * _vignette.effect);
 		} else {
 			if (_vignette.effect > 0) {
-				t += `<span class='green'>gaining you a bit of reputation.</span>`;
+				t += `<span class="green">gaining you a bit of reputation.</span>`;
 			} else if (_vignette.effect < 0) {
-				t += `<span class='red'>losing you a bit of reputation.</span>`;
+				t += `<span class="red">losing you a bit of reputation.</span>`;
 			} else {
 				t += `an incident without lasting effect.`;
 			}
diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js
index 366c7736815a4cb4e84a7f433c07f9df4d7e3c36..c7c0ba7403f24862bcb4465b4a128956e9096a39 100644
--- a/src/endWeek/saServeThePublic.js
+++ b/src/endWeek/saServeThePublic.js
@@ -18,7 +18,10 @@ window.saServeThePublic = (function saServeThePublic() {
 
 	return saServeThePublic;
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function saServeThePublic(slave) {
 		V = State.variables;
 		T = State.temporary;
@@ -59,7 +62,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function gatherStatistics(slave) {
 		/* Statistics gathering */
 		const facility = slave.assignment === Job.CLUB ? V.facility.club : undefined;
@@ -67,7 +73,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		T.incomeStats.customers = slave.sexAmount;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function jobPreface(slave) {
 		if (slave.devotion > 95 || slave.energy > 95) {
 			r += `enthusiastically serves`;
@@ -84,7 +93,10 @@ window.saServeThePublic = (function saServeThePublic() {
 	}
 
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function bonusMultiplierText(slave) {
 		if (V.club > 0) {
 			if ((V.universalRulesFacilityWork === 1 && slave.assignment === "serve the public" && V.clubSpots > 0) || (slave.assignment === "serve in the club")) {
@@ -198,7 +210,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function usageCountDescriptions(slave) {
 		r += ` ${His} appearance attracted ${slave.sexAmount} members of the public (${Math.trunc(slave.sexAmount / 7)} a day)`;
 		if (slave.sexAmount > 160) {
@@ -238,7 +253,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function comingOfAge(slave) {
 		if (slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
 			if (slave.birthWeek === 0) {
@@ -261,7 +279,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function mentalEffects(slave) {
 		if (slave.behavioralQuirk === "advocate") {
 			r += ` ${slave.slaveName} <span class="hotpink">really enjoys</span> being able to share ${his} convert's enthusiasm about slavery with new people.`;
@@ -279,7 +300,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function physicalEffects(slave) {
 		let injury = 0;
 		if (slave.assignment !== "serve in the club") {
@@ -422,7 +446,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function slaveSkills(slave) {
 		let skillIncrease;
 		if (!setup.entertainmentCareers.includes(slave.career) && slave.skill.entertainer < V.masteredXP) {
@@ -510,27 +537,30 @@ window.saServeThePublic = (function saServeThePublic() {
 				}
 				r += `.`;
 				skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.oralUseWeight);
-				r += `${SkillIncrease.Oral(slave, skillIncrease)}`;
+				r += ` ${SkillIncrease.Oral(slave, skillIncrease)}`;
 				if (canDoVaginal(slave)) {
 					skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.vaginalUseWeight);
-					r += `${SkillIncrease.Vaginal(slave, skillIncrease)}`;
+					r += ` ${SkillIncrease.Vaginal(slave, skillIncrease)}`;
 				}
 				if (canDoAnal(slave)) {
 					skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.analUseWeight);
-					r += `${SkillIncrease.Anal(slave, skillIncrease)}`;
+					r += ` ${SkillIncrease.Anal(slave, skillIncrease)}`;
 				}
 			}
 			if (slave.amp !== 1) {
 				if (slave.skill.entertainment < 100) {
 					r += ` ${He} gains experience as a public slut.`;
 					skillIncrease = (10 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32));
-					r += `${SkillIncrease.Entertain(slave, skillIncrease)}`;
+					r += ` ${SkillIncrease.Entertain(slave, skillIncrease)}`;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function publicReactions(slave) {
 		let sstp;
 
@@ -538,7 +568,7 @@ window.saServeThePublic = (function saServeThePublic() {
 			r += ` ${He}'s a better slut because public service is ${his} main sexual outlet.`;
 		}
 
-		//Someone double check this block
+		// Someone double check this block
 		if (V.familyTesting === 1) {
 			if (totalRelatives(slave) > 0) {
 				let children = [];
@@ -611,7 +641,7 @@ window.saServeThePublic = (function saServeThePublic() {
 			r += ` ${He} attracts fewer people due to ${his} minor injury.`;
 		}
 
-		if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs") ||(slave.hears === -2)) {
+		if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs") || (slave.hears === -2)) {
 			r += ` ${His} trouble hearing causes ${him} to miss potential partners.`;
 		}
 
@@ -1171,7 +1201,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function addFlaw(slave) {
 		if (slave.devotion < 10) {
 			if (jsRandom(1, 100) > 70) {
@@ -1189,7 +1222,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function addRep(slave) {
 		if (slave.assignment !== "recruit girls") {
 			if (slave.assignment === "serve in the club" || slave.assignment ===  "be the DJ") {
@@ -1203,7 +1239,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		T.incomeStats.income += Math.trunc((slave.sexAmount * slave.sexQuality) * (1 + (0.003 * slave.skill.entertainment)) * 0.15);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function applyFSDecoration(slave) {
 		/* FACILITY DECORATION IMPACTS */
 		const fsBeauty = (0.0005 * V.FSSingleSlaveRep * slave.sexAmount);
@@ -1283,7 +1322,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function sexCounts(slave) {
 		/* SEX ACT COUNTS AND SEXUAL SATISFACTION */
 
@@ -1303,7 +1345,7 @@ window.saServeThePublic = (function saServeThePublic() {
 			}
 		}
 		mammaryUse = 0;
-		//perhaps boost this for truly massive breasts
+		// perhaps boost this for truly massive breasts
 		if (slave.boobs > 10000) {
 			mammaryUse = (5 + V.mammaryUseWeight);
 		} else if (slave.boobs > 2000) {
@@ -1362,7 +1404,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function sexualSatiation(slave) {
 		if (slave.need) {
 			if (slave.fetishKnown) {
@@ -1442,7 +1487,10 @@ window.saServeThePublic = (function saServeThePublic() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function assignmentVignette(slave) {
 		let vignette;
 		if (slave.assignment !== "recruit girls") {
diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js
index 26404bd0f72d461ed0215064b927db8567e7d95e..a76ddbb0f2c5de970f1ead3e6a46600697fc1cbb 100644
--- a/src/endWeek/saStayConfined.js
+++ b/src/endWeek/saStayConfined.js
@@ -1,5 +1,10 @@
-window.saStayConfined = /** @param {App.Entity.SlaveState} slave */ function saStayConfined(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.saStayConfined = function saStayConfined(slave) {
 	const V = State.variables;
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -9,33 +14,34 @@ window.saStayConfined = /** @param {App.Entity.SlaveState} slave */ function saS
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 
 	let t = "";
 
 	if (slave.fetish !== "mindbroken") {
 		if (slave.devotion < -50) {
-			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. ${He} still hates ${his} place in the world, but being forced to rely on slave life as ${his} only human contact <span class='hotpink'>grinds down ${his} resistance.</span>`;
+			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. ${He} still hates ${his} place in the world, but being forced to rely on slave life as ${his} only human contact <span class="hotpink">grinds down ${his} resistance.</span>`;
 			slave.devotion += 2;
 		} else if (slave.devotion <= 20) {
-			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. With nothing to do but look forward to the next time ${he}'s let out to serve, <span class='hotpink'>${he} begins to rely on servitude.</span>`;
+			t += `is kept in solitary confinement whenever ${he} is not being forced to do something else. With nothing to do but look forward to the next time ${he}'s let out to serve, <span class="hotpink">${he} begins to rely on servitude.</span>`;
 			slave.devotion += 1;
 		} else if (slave.devotion <= 50) {
 			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. Since ${he} is obedient, the mental torture neither breaks ${him} further nor causes ${him} to hate you.`;
 		} else {
-			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. ${He} spends ${his} time wondering hopelessly how ${he} has failed you, <span class='mediumorchid'>damaging ${his} devotion to you.</span>`;
+			t += `accepts solitary confinement whenever ${he} is not being forced to do something else. ${He} spends ${his} time wondering hopelessly how ${he} has failed you, <span class="mediumorchid">damaging ${his} devotion to you.</span>`;
 			slave.devotion -= 2;
 		}
 
 		if (slave.trust < -50) {
 			t += ` ${He} is so terrified of you that this confinement does not make ${him} fear you any more.`;
 		} else if (slave.trust < -20) {
-			t += ` ${He} is already afraid of you, but this confinement makes ${him} <span class='gold'>fear you even more.</span>`;
+			t += ` ${He} is already afraid of you, but this confinement makes ${him} <span class="gold">fear you even more.</span>`;
 			slave.trust -= 2;
 		} else if (slave.trust <= 20) {
-			t += ` This confinement makes ${him} <span class='gold'>fear your power</span> over ${him}.`;
+			t += ` This confinement makes ${him} <span class="gold">fear your power</span> over ${him}.`;
 			slave.trust -= 4;
 		} else {
-			t += ` This confinement makes ${him} <span class='gold'>trust you less,</span> and fear you more.`;
+			t += ` This confinement makes ${him} <span class="gold">trust you less,</span> and fear you more.`;
 			slave.trust -= 5;
 		}
 
@@ -45,7 +51,7 @@ window.saStayConfined = /** @param {App.Entity.SlaveState} slave */ function saS
 			}
 		}
 
-		t += ` The stress of confinement <span class='red'>damages ${his} health.</span>`;
+		t += ` The stress of confinement <span class="red">damages ${his} health.</span>`;
 		slave.health -= 10;
 	} else {
 		t += `is oblivious to ${his} confinement.`;
@@ -73,9 +79,9 @@ window.saStayConfined = /** @param {App.Entity.SlaveState} slave */ function saS
 		if (slave.fetish === "mindbroken") {
 			t += ` ${His} broken mind hinges entirely on other's guidance,`;
 		} else {
-			t += ` ${He} is now willing to <span class='hotpink'>do as ${he}'s told,</span>`;
+			t += ` ${He} is now willing to <span class="hotpink">do as ${he}'s told,</span>`;
 		}
-		t += ` so <span class='yellow'>${his} assignment has defaulted to rest.</span>`;
+		t += ` so <span class="yellow">${his} assignment has defaulted to rest.</span>`;
 		if (slave.assignment === "be confined in the cellblock") {
 			State.temporary.brokenSlaves++;
 			State.temporary.DL--;
diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js
index 91a818e2e3f9bc326669d62bcf3a37661345c3ec..57caf147ec2ec0fe0871fe0a7d4c8ecc172c4b92 100644
--- a/src/endWeek/saWhore.js
+++ b/src/endWeek/saWhore.js
@@ -25,7 +25,10 @@ window.saWhore = (function saWhore() {
 
 	return saWhore;
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function saWhore(slave) {
 		V = State.variables;
 		T = State.temporary;
@@ -68,7 +71,9 @@ window.saWhore = (function saWhore() {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * */
 	function gatherStatistics(slave) {
 		/* Statistics gathering */
 		const facility = slave.assignment === Job.BROTHEL ? V.facility.brothel : undefined;
@@ -76,11 +81,13 @@ window.saWhore = (function saWhore() {
 	}
 
 	// I suspect this one will mostly be cut out in the overhauling
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function updateNonSlaveVariables(slave) {
 		// FResult setting
 		FuckResult = FResult(slave);
-		//slave needs release
+		// slave needs release
 		if ((slave.releaseRules === "restrictive" || slave.releaseRules === "chastity") && slave.standardReward !== "orgasm" && slave.energy >= 20) {
 			FuckResult += 2;
 		}
@@ -227,8 +234,10 @@ window.saWhore = (function saWhore() {
 		}
 		T.incomeStats.customers = beauty;
 	}
-
-	/** @param {App.Entity.SlaveState} slave */
+	
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function jobPreface(slave) {
 		if (slave.devotion > 95 || slave.energy > 95) {
 			r += `enthusiastically sells`;
@@ -244,7 +253,9 @@ window.saWhore = (function saWhore() {
 		r += ` ${his} body.`;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function bonusMultiplierText(slave) {
 		if (V.brothel > 0) {
 			if ((V.universalRulesFacilityWork === 1 && slave.assignment === "whore" && V.brothelSpots > 0) || (slave.assignment === "work in the brothel")) {
@@ -360,7 +371,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function usageCountDescriptions(slave) {
 		r += ` ${His} appearance attracted ${beauty} members of the public (${Math.trunc(beauty / 7)} a day)`;
 		if (beauty > 160) {
@@ -395,7 +408,9 @@ window.saWhore = (function saWhore() {
 		r += `.`;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function comingOfAge(slave) {
 		if (slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
 			if (slave.birthWeek === 0) {
@@ -418,7 +433,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function mentalEffects(slave) {
 		if (slave.behavioralQuirk === "sinful") {
 			r += ` ${slave.slaveName} <span class="hotpink">secretly enjoys</span> how utterly sinful and depraved it is for ${him} to sell ${his} body.`;
@@ -436,7 +453,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function physicalEffects(slave) {
 		let injury = 0;
 		if (slave.assignment !== "work in the brothel") {
@@ -579,7 +598,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveSkills(slave) {
 		let skillIncrease;
 		if (!setup.whoreCareers.includes(slave.career) && slave.skill.whore < V.masteredXP) {
@@ -684,28 +705,29 @@ window.saWhore = (function saWhore() {
 				}
 				r += `.`;
 				skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.oralUseWeight);
-				r += `${SkillIncrease.Oral(slave, skillIncrease)}`;
+				r += ` ${SkillIncrease.Oral(slave, skillIncrease)}`;
 				if (canDoVaginal(slave)) {
 					skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.vaginalUseWeight);
-					r += `${SkillIncrease.Vaginal(slave, skillIncrease)}`;
+					r += ` ${SkillIncrease.Vaginal(slave, skillIncrease)}`;
 				}
 				if (canDoAnal(slave)) {
 					skillIncrease = (5 + Math.floor((slave.intelligence + slave.intelligenceImplant) / 32) + V.analUseWeight);
-					r += `${SkillIncrease.Anal(slave, skillIncrease)}`;
+					r += ` ${SkillIncrease.Anal(slave, skillIncrease)}`;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function publicReactions(slave) {
 		let SWi;
 
 		if ((slave.releaseRules === "restrictive" || slave.releaseRules === "chastity") && slave.standardReward !== "orgasm") {
 			r += ` ${He}'s a better whore because prostitution is ${his} main sexual outlet.`;
 		}
-
-		//Someone double check this block
+		
 		if (V.familyTesting === 1) {
 			if (totalRelatives(slave) > 0) {
 				let children = [];
@@ -1340,7 +1362,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function addFlaw(slave) {
 		if (slave.devotion < 10) {
 			if (jsRandom(1, 100) > 70) {
@@ -1358,7 +1382,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function addCash(slave) {
 		cash = Math.trunc((beauty * FuckResult) * (1 + (0.002 * slave.skill.whoring)));
 		T.incomeStats.income += cash;
@@ -1370,14 +1396,18 @@ window.saWhore = (function saWhore() {
 			cashX(cash, "whoring in an unregistered building", slave);
 		}
 	}
-
-	/** @param {App.Entity.SlaveState} slave */
+	
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function addCashText(slave) {
 		r += ` In total, you were paid <span class="yellowgreen">${cashFormat(cash)}</span> for the use of ${slave.slaveName}'s body this week.`;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
-	function applyFSDecoration(slave) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
+	function applyFSDecoration() {
 		/* FACILITY DECORATION IMPACTS */
 		const fsBeauty = (0.0005 * V.FSSingleSlaveRep * beauty);
 		switch (V.brothelDecoration) {
@@ -1456,7 +1486,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function sexCounts(slave) {
 		/* SEX ACT COUNTS AND SEXUAL SATISFACTION */
 
@@ -1476,7 +1508,7 @@ window.saWhore = (function saWhore() {
 			}
 		}
 		mammaryUse = 0;
-		//perhaps boost this for truly massive breasts
+		// perhaps boost this for truly massive breasts
 		if (slave.boobs > 10000) {
 			mammaryUse = (5 + V.mammaryUseWeight);
 		} else if (slave.boobs > 2000) {
@@ -1535,7 +1567,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function sexualSatiation(slave) {
 		if (slave.need) {
 			if (slave.fetishKnown) {
@@ -1615,7 +1649,9 @@ window.saWhore = (function saWhore() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function assignmentVignette(slave) {
 		const vignette = GetVignette(slave);
 		// I forgot what to do with __X__
diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js
index 2a478efce3caf56801400473b2119a53624295d4..f0e681998571cf3f877cacfa3e28333c38bb94e9 100644
--- a/src/endWeek/saWorkAGloryHole.js
+++ b/src/endWeek/saWorkAGloryHole.js
@@ -5,12 +5,24 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 	let r;
 	let beauty;
 	let FResult;
+	/* eslint-disable */
 	let pronouns;
-	let he, him, his, hers, himself, boy, He, His;
+	let he;
+	let him;
+	let his;
+	let hers;
+	let himself;
+	let boy;
+	let He;
+	let His;
+	/* eslint-enable */
 
 	return saWorkAGloryHole;
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {string}
+	 */
 	function saWorkAGloryHole(slave) {
 		V = State.variables;
 		T = State.temporary;
@@ -33,7 +45,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 *
+	 */
 	function gatherStatistics(slave) {
 		/* Statistics gathering */
 		const facility = slave.assignment === Job.ARCADE ? V.facility.arcade : undefined;
@@ -41,7 +56,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		T.incomeStats.customers = beauty;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 *
+	 */
 	function jobPreface(slave) {
 		r += ` is `;
 		if (slave.fuckdoll === 0) {
@@ -75,9 +93,12 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function physicalEffects(slave) {
-		//check usage counts for these — more fucks should be more damaging
+		// check usage counts for these — more fucks should be more damaging
 		if (slave.curatives > 0 || slave.inflationType === "curative") {
 			r += ` The drugs ${he}'s `;
 			if (slave.inflationType === "curative") {
@@ -148,20 +169,23 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function mentalEffects(slave) {
 		if (slave.fetish === "mindbroken") {
 			r += ` ${He} serves ${his} role as a mindless set of holes to perfection.`;
 		} else {
 			if (slave.skill.oral <= 10) {
 				r += ` With ${his} throat being brutally used, ${his} gag reflex is suppressed and ${his} oral skills improve.`;
-				r += `${SkillIncrease.Oral(slave, 5)}`;
+				r += ` ${SkillIncrease.Oral(slave, 5)}`;
 			} else if (slave.skill.vaginal <= 10 && canDoVaginal(slave)) {
 				r += ` With ${his} pussy being harshly used, ${his} vaginal skills improve.`;
-				r += `${SkillIncrease.Vaginal(slave, 5)}`;
+				r += ` ${SkillIncrease.Vaginal(slave, 5)}`;
 			} else if (slave.skill.anal <= 10 && canDoAnal(slave)) {
 				r += ` With ${his} butt being mercilessly fucked, ${his} anal skills improve.`;
-				r += `${SkillIncrease.Anal(slave, 5)}`;
+				r += ` ${SkillIncrease.Anal(slave, 5)}`;
 			}
 			if (slave.sexualFlaw === "self hating") {
 				r += ` ${His} self hatred is so deep that ${he} believes ${he} deserves to serve in a glory hole, and even gets off on the degradation.`;
@@ -205,7 +229,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function jobBody(slave) {
 		r += ` ${His} feelings, skills, and appearance do not matter. ${He} is condemned to a world that consists of a tiny cell, featureless except for the never-ending dicks ${he} is required to service. You `;
 		if (V.publicFuckdolls === 0) {
@@ -216,7 +243,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		r += ` for the use of ${slave.slaveName}'s holes this week.`;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function applyFSDecoration(slave) {
 		/* FACILITY DECORATION IMPACTS */
 		if (slave.assignment === "be confined in the arcade" && V.arcadeDecoration !== "standard") {
@@ -298,7 +328,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function sexCounts(slave) {
 		/* SEX ACT COUNTS AND SEXUAL SATISFACTION */
 
@@ -342,7 +375,7 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 			cervixPump += (20 * analUse);
 		}
 
-		//this may need improvement with the new system
+		// this may need improvement with the new system
 		if (slave.need) {
 			if (slave.fetishKnown) {
 				switch (slave.fetish) {
@@ -403,7 +436,10 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * 
+	 */
 	function profitReport(slave) {
 		if (V.publicFuckdolls === 0) {
 			if (slave.assignment === "work a glory hole") {
diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js
index 8a1c5bb3c3a2a75b6f0a159d3da766b3ff0e525e..75b64a10d38478124b500ff956e14d2a06ef4423 100644
--- a/src/endWeek/saWorkTheFarm.js
+++ b/src/endWeek/saWorkTheFarm.js
@@ -1,10 +1,22 @@
-window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWorkTheFarm(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.saWorkTheFarm = function saWorkTheFarm(slave) {
 	"use strict";
 	const V = State.variables;
 	const arcology = V.arcologies[0];
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
-	const he = pronouns.pronoun; const him = pronouns.object; const his = pronouns.possessive; const hers = pronouns.possessivePronoun; const himself = pronouns.objectReflexive; const boy = pronouns.noun;
-	const He = capFirstChar(he); const His = capFirstChar(his);
+	const he = pronouns.pronoun;
+	const him = pronouns.object;
+	const his = pronouns.possessive;
+	const hers = pronouns.possessivePronoun;
+	const himself = pronouns.objectReflexive;
+	const boy = pronouns.noun;
+	const He = capFirstChar(he);
+	const His = capFirstChar(his);
+	/* eslint-enable */
 	const incomeStats = getSlaveStatisticData(slave, V.facility.farmyard);
 
 	let t = `works as a farmhand this week. `;
@@ -16,7 +28,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		} else {
 			t += `care`;
 		}
-		if (V.Farmer.skill.oral) {			// TODO: keep this? replace with something else?
+		if (V.Farmer.skill.oral) { // TODO: keep this? replace with something else?
 			t += ` and talented tongue`;
 		}
 		t += `. `;
@@ -83,7 +95,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	if (slave.tired === 1) {
 		t += `${He} is so tired that ${he} doesn't have the energy to work efficiently, impacting ${his} production. `;
 	}
-	t += `As a result, ${he} produces @@.chocolate;${ massFormat(food) }@@ of food over the week. `;
+	t += `As a result, ${he} produces <span class="chocolate">${massFormat(food)}</span> of food over the week. `;
 
 	// Close Food Production
 
@@ -94,26 +106,26 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	if (V.farmyardShows) {
 		t += `${He} also puts on shows with animals this week. `;
 
-		//Open FS Subsection
+		// Open FS Subsection
 
 		if (arcology.FSSupremacist !== "unset") {
 			if (slave.race === arcology.FFSupremacistRace) {
-				t += `Society @@.red;disapproves@@ of your allowing a member of the elite race to be degraded in such a fashion, and thus ${he} didn't earn as much. `;
+				t += `Society <span class="red">disapproves</span> of your allowing a member of the elite race to be degraded in such a fashion, and thus ${he} didn't earn as much. `;
 			}
 		}
 		if (arcology.FSSubjugationist !== "unset") {
 			if (slave.race === arcology.FSSubjugationistRace) {
-				t += `Society @@.green;approves@@ of the degradation you submit your ${ arcology.FSSubjugationistRace } slaves to, and so ${he} earns you a bit more. `;
+				t += `Society <span class="green">approves</span> of the degradation you submit your ${arcology.FSSubjugationistRace} slaves to, and so ${he} earns you a bit more. `;
 			} else {
-				t += `Society doesn't disapprove of ${him} not being ${ arcology.FSSubjugationistRace }, but ${he} doesn't earn as much as ${he} would if ${he} was ${ arcology.FSSubjugationistRace }. `;
+				t += `Society doesn't disapprove of ${him} not being ${arcology.FSSubjugationistRace}, but ${he} doesn't earn as much as ${he} would if ${he} was ${arcology.FSSubjugationistRace}. `;
 			}
 		}
 		if (arcology.FSRepopulationFocus !== "unset") {
 			if (slave.pregWeek > 16) {
 				if (slave.eggType !== "human") {
-					t += `Society is @@.red;disgusted@@ by ${his} pregnancy when they realize that what it is in ${his} womb is not human. `;
+					t += `Society is <span class="red">disgusted</span> by ${his} pregnancy when they realize that what it is in ${his} womb is not human. `;
 				} else {
-					t += `Society @@.green;greatly approves@@ of your having pregnant slaves `;
+					t += `Society <span class="green">greatly approves</span> of your having pregnant slaves `;
 					if (V.seeBestiality === 1) {
 						t += `have sex`;
 					} else {
@@ -128,7 +140,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 				if (slave.eggType !== "human") {
 					t += `Society is disgusted by ${his} pregnancy until they learn that what is in ${his} womb is not human. `;
 				} else {
-					t += `Society is @@.red;extremely disgusted@@ by ${his} pregnancy and the fact that you would have ${him} `;
+					t += `Society is <span class="red">extremely disgusted</span> by ${his} pregnancy and the fact that you would have ${him} `;
 					if (V.seeBestiality === 1) {
 						t += `have sex`;
 					} else if (V.farmyardShows) {
@@ -140,14 +152,14 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 		if (arcology.FSGenderRadicalist !== "unset") {
 			if (slave.dick > 0) {
-				t += `${His} patrons @@.green;approve@@ of the fact that ${he} has a dick. `;
+				t += `${His} patrons <span class="green">approve</span> of the fact that ${he} has a dick. `;
 			} else {
 				// TODO: not sure what to do for this
 			}
 		}
 		if (arcology.FSGenderFundamentalist !== "unset") {
 			if (slave.pregWeek > 16) {
-				t += `${His} patrons @@.green;approve@@ of the fact that ${he} is sporting a baby bump.`;
+				t += `${His} patrons <span class="green">approve</span> of the fact that ${he} is sporting a baby bump.`;
 			} else {
 				// TODO: also this
 			}
@@ -157,16 +169,16 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 		if (arcology.FSPaternalist !== "unset") {
 			if (V.seeBestiality === 1 && V.farmyardBreeding) {
-				t += `Your citizens are @@.red;very disapproving@@ of the fact that you would allow something as degrading as having your slaves to be knocked up by filthy beasts. `;
+				t += `Your citizens are <span class="red">very disapproving</span> of the fact that you would allow something as degrading as having your slaves to be knocked up by filthy beasts. `;
 			} else {
-				t += `Your citizens @@.red;disapprove@@ of the fact that you would allow your slaves to be degraded in such a manner. `;
+				t += `Your citizens <span class="red">disapprove</span> of the fact that you would allow your slaves to be degraded in such a manner. `;
 			}
 		}
 		if (arcology.FSDegradationist !== "unset") {
 			if (V.seeBestiality === 1 && V.farmyardBreeding) {
-				t += `Your citizens are @@.green;very approving@@ of the fact that you would allow something as degrading as having your slaves to be knocked up by filthy beasts. `;
+				t += `Your citizens are <span class="green">very approving</span> of the fact that you would allow something as degrading as having your slaves to be knocked up by filthy beasts. `;
 			} else {
-				t += `Your citizens @@.green;approve@@ of the fact that you would allow your slaves to be degraded in such a manner. `;
+				t += `Your citizens <span class="green">approve</span> of the fact that you would allow your slaves to be degraded in such a manner. `;
 			}
 		}
 		if (arcology.FSBodyPurist !== "unset") {
@@ -200,22 +212,22 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 			}
 		}
 		if (arcology.FSYouthPreferentialist !== "unset") {
-			if (slave.visualAge > 25) {		// TODO: not sure about this age
-				t += `${arcology.name }'s citizens @@.red;disapprove@@ of your using such old slaves to put on shows. `;
+			if (slave.visualAge > 25) { // TODO: not sure about this age
+				t += `${arcology.name}'s citizens <span class="red">disapprove</span> of your using such old slaves to put on shows. `;
 			} else {
-				t += `${arcology.name }'s citizens @@.green;approve@@ of your using young slaves to put on shows. `;
+				t += `${arcology.name}'s citizens <span class="green">approve</span> of your using young slaves to put on shows. `;
 			}
 		}
 		if (arcology.FSMaturityPreferentialist !== "unset") {
-			if (slave.visualAge > 25) {		// TODO: not sure about this age
-				t += `${arcology.name }'s citizens @@.green;approve@@ of your using mature slaves to put on shows. `;
+			if (slave.visualAge > 25) { // TODO: not sure about this age
+				t += `${arcology.name}'s citizens <span class="green">approve</span> of your using mature slaves to put on shows. `;
 			} else {
-				t += `${arcology.name }'s citizens @@.red;disapprove@@ of your using such young slaves to put on shows. `;
+				t += `${arcology.name}'s citizens <span class="red">disapprove</span> of your using such young slaves to put on shows. `;
 			}
 		}
 		if (arcology.FSSlimnessEnthusiast !== "unset") {
 			if (slave.weight > 10) {
-				t += `Society finds a slave with such a flabby body @@.red;absolutely disgusting.@@ `;
+				t += `Society finds a slave with such a flabby body <span class="red">absolutely disgusting.</span> `;
 			}
 			if (slave.boobs > 799) {
 				t += `Your citizens `;
@@ -274,7 +286,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		if (setup.entertainmentCareers.includes(slave.career)) {
 			t += ` ${He} has experience with putting on shows from ${his} life before ${he} was a slave, making ${him} more effective at putting on shows.`;
 		}
-		if (setup.farmerCareers.includes(slave.career)) {		// TODO: does this even make sense to include?
+		if (setup.farmerCareers.includes(slave.career)) { // TODO: does this even make sense to include?
 			// TODO: write this
 		}
 		if (slave.prestige === 1) {
@@ -284,7 +296,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		} else if (slave.prestige === 3) {
 			t += `Because ${he} is so famous, ${he} earns a lot more then ${he} would otherwise.`;
 		}
-		if (slave.pornPrestige === 1) {		// TODO: are prestige and pornPrestige mutually exclusive?
+		if (slave.pornPrestige === 1) { // TODO: are prestige and pornPrestige mutually exclusive?
 			t += `${He} earns a bit more because some of your citizens already know $him from porn. `;
 		} else if (slave.pornPrestige === 2) {
 			t += `${He} earns quite a bit more because a lot of your citizens already know $him from porn. `;
@@ -376,7 +388,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		} else if (slave.intelligence < -50) {
 			// TODO: write this
 		}
-		if (slave.energy <= 20 ) {
+		if (slave.energy <= 20) {
 			// TODO: write this
 		} else if (slave.energy <= 40) {
 			// TODO: write this
@@ -395,7 +407,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 			// TODO: write this
 		} else if (slave.fetish === "masochist") {
 			// TODO: write this
-		}	// TODO: incoroporate quirks
+		} // TODO: incoroporate quirks
 	}
 
 	// Close Shows
@@ -405,9 +417,9 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	if (slave.fetishKnown && (slave.fetish === "submissive" || slave.fetish === "humiliation" || slave.fetish === "masochist") || slave.energy > 95) {
 		if (V.farmyardShows) {
 			if (V.seeBestiality === 1) {
-				t += `Getting fucked by animals is the perfect job for ${him}, as far as ${he} can tell. @@.hotpink;${He} is happy@@ to spend ${his} days being utterly degraded. `;
+				t += `Getting fucked by animals is the perfect job for ${him}, as far as ${he} can tell. <span class="hotpink">${He} is happy</span> to spend ${his} days being utterly degraded. `;
 			} else {
-				t += `${He} loves putting on shows with animals, and as far as ${he} can tell, it's the perfect job for ${him}. @@.hotpink;${He} is happy@@ to spend ${his} days doing something so degrading. `;		// TODO: not sure how degrading putting on shows is
+				t += `${He} loves putting on shows with animals, and as far as ${he} can tell, it's the perfect job for ${him}. <span class="hotpink">${He} is happy</span> to spend ${his} days doing something so degrading. `; // TODO: not sure how degrading putting on shows is
 			}
 		}
 		slave.devotion += 1;
@@ -416,7 +428,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 		}
 	}
 	if (slave.behavioralQuirk === "fitness") {
-		t += `${slave.slaveName } @@.hotpink;privately enjoys@@ the exercise ${he} receives while working in ${farmyardName}. `;
+		t += `${slave.slaveName} <span class="hotpink">privately enjoys</span> the exercise ${he} receives while working in ${farmyardName}. `;
 		slave.devotion += 1;
 	}
 
@@ -426,84 +438,84 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 
 	if (V.showVignettes) {
 		const vignette = GetVignette(slave);
-		t += `__This week__ ${ vignette.text}`;
+		t += `__This week__ ${vignette.text}`;
 		if (vignette.type === "cash") {
 			FResult(slave);
 			if (vignette.effect > 0) {
-				t += ` @@.yellowgreen;making you an extra ${ cashFormat(Math.trunc(V.FResult*vignette.effect)) }.@@ `;
+				t += ` <span class="yellowgreen">making you an extra ${cashFormat(Math.trunc(V.FResult*vignette.effect))}.</span> `;
 			} else if (vignette.effect < 0) {
-				t += ` @@.red;losing you ${ cashFormat(Math.abs(Math.trunc(V.FResult*vignette.effect))) }.@@ `;
+				t += ` <span class="red">losing you ${cashFormat(Math.abs(Math.trunc(V.FResult*vignette.effect)))}.</span> `;
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
-			cashX(Math.trunc(V.FResult*vignette.effect), "farmyard");
-			incomeStats.income += (Math.trunc(V.FResult*vignette.effect));
+			cashX(Math.trunc(V.FResult * vignette.effect), "farmyard");
+			incomeStats.income += (Math.trunc(V.FResult * vignette.effect));
 		} else if (vignette.type === "devotion") {
 			if (vignette.effect > 0) {
 				if (slave.devotion > 50) {
-					t += ` @@.hotpink;increasing ${his} devotion to you.@@ `;
+					t += ` <span class="hotpink">increasing ${his} devotion to you.</span> `;
 				} else if (slave.devotion >= -20) {
-					t += ` @@.hotpink;increasing ${his} acceptance of you.@@ `;
+					t += ` <span class="hotpink">increasing ${his} acceptance of you.</span> `;
 				} else if (slave.devotion >= -20) {
-					t += ` @@.hotpink;reducing ${his} dislike of you.@@ `;
+					t += ` <span class="hotpink">reducing ${his} dislike of you.</span> `;
 				} else {
-					t += ` @@.hotpink;reducing ${his} hatred of you.@@ `;
+					t += ` <span class="hotpink">reducing ${his} hatred of you.</span> `;
 				}
 			} else if (vignette.effect < 0) {
 				if (slave.devotion > 50) {
-					t += ` @@.mediumorchid;reducing ${his} devotion to you.@@ `;
+					t += ` <span class="mediumorchid">reducing ${his} devotion to you.</span> `;
 				} else if (slave.devotion >= 20) {
-					t += ` @@.mediumorchid;reducing ${his} acceptance of you.@@ `;
+					t += ` <span class="mediumorchid">reducing ${his} acceptance of you.</span> `;
 				} else if (slave.devotion >= -20) {
-					t += ` @@.mediumorchid;increasing ${his} dislike of you.@@ `;
+					t += ` <span class="mediumorchid">increasing ${his} dislike of you.</span> `;
 				} else {
-					t += ` @@.mediumorchid;increasing ${his} hatred of you.@@ `;
+					t += ` <span class="mediumorchid">increasing ${his} hatred of you.</span> `;
 				}
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
-			slave.devotion += 1*vignette.effect;
+			slave.devotion += 1 * vignette.effect;
 		} else if (vignette.type === "trust") {
 			if (vignette.effect > 0) {
 				if (slave.trust > 20) {
-					t += ` @@.mediumaquamarine;increasing ${his} trust in you.@@ `;
+					t += ` <span class="mediumaquamarine">increasing ${his} trust in you.</span> `;
 				} else if (slave.trust >= -20) {
-					t += ` @@.mediumaquamarine;reducing ${his} fear of you.@@ `;
+					t += ` <span class="mediumaquamarine">reducing ${his} fear of you.</span> `;
 				} else {
-					t += ` @@.mediumaquamarine;reducing ${his} terror of you.@@ `;
+					t += ` <span class="mediumaquamarine">reducing ${his} terror of you.</span> `;
 				}
 			} else if (vignette.effect < 0) {
 				if (slave.trust > 20) {
-					t += ` @@.gold;reducing ${his} trust in you.@@ `;
+					t += ` <span class="gold">reducing ${his} trust in you.</span> `;
 				} else if (slave.trust >= -20) {
-					t += ` @@.gold;increasing ${his} fear of you.@@ `;
+					t += ` <span class="gold">increasing ${his} fear of you.</span> `;
 				} else {
-					t += ` @@.gold;increasing ${his} terror of you.@@ `;
+					t += ` <span class="gold">increasing ${his} terror of you.</span> `;
 				}
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
-			slave.trust += 1*vignette.effect;
+			slave.trust += 1 * vignette.effect;
 		} else if (vignette.type === "health") {
 			if (vignette.effect > 0) {
-				t += ` @@.green;improving ${his} health.@@ `;
+				t += ` <span class="green">improving ${his} health.</span> `;
 			} else if (vignette.effect < 0) {
-				t += ` @@.red;affecting ${his} health.@@ `;
+				t += ` <span class="red">affecting ${his} health.</span> `;
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
-			slave.health += 2*vignette.effect;
+			slave.health += 2 * vignette.effect;
 		} else {
 			FResult(slave);
 			if (vignette.effect > 0) {
-				t += ` @@.green;gaining you a bit of reputation.@@ `;
+				t += ` <span class="green">gaining you a bit of reputation.</span> `;
 			} else if (vignette.effect < 0) {
-				t += ` @@.red;losing you a bit of reputation.@@ `;
+				t += ` <span class="red">losing you a bit of reputation.</span> `;
 			} else {
 				t += ` an incident without lasting effect. `;
 			}
-			repX(Math.trunc(V.FResult*vignette.effect*0.1), "vignette", slave);
-			incomeStats.rep += Math.trunc(V.FResult*vignette.effect*0.1);
+			repX(Math.trunc(V.FResult * vignette.effect * 0.1), "vignette", slave);
+			incomeStats.rep += Math.trunc(V.FResult * vignette.effect * 0.1);
 		}
 	}
 
@@ -512,7 +524,7 @@ window.saWorkTheFarm = /** @param {App.Entity.SlaveState} slave */ function saWo
 	// Open Facility Decorations
 
 	if (V.farmyardDecoration !== "standard") {
-		const fsGain = Math.min(0.0001*V.FSSingleSlaveRep*(food), 1);
+		const fsGain = Math.min(0.0001 * V.FSSingleSlaveRep * (food), 1);
 		switch (V.farmyardDecoration) {
 			case "Roman Revivalist":
 				arcology.FSRomanRevivalist = Math.clamp(arcology.FSRomanRevivalist += fsGain, 0, 100);
diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw
index 91623ebf7e6091670f8fe31c62333e4902e733d8..75bc6bb9f663419509fb87246992e45f45b245cb 100644
--- a/src/events/intro/introSummary.tw
+++ b/src/events/intro/introSummary.tw
@@ -1301,17 +1301,6 @@ __''Mods''__
 
 <br>
 
-<<options $cyberMod>>
-	Cybernetics mod is
-	<<option 0 "Disable">>
-		''disabled''.
-	<<option 1 "Enable">>
-		''enabled''.
-	<<comment>>
-		This mod alters how prosthetics system works and adds some content.
-<</options>>
-<br>
-
 <<options $secExp>>
 	The Security Expansion Mod is
 	<<option 0 "Disable">>
diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw
index fa2afef1a024459a14cc7365483fe86142e2c563..ff47e477539b9191d95a20226e4a05477775b560 100644
--- a/src/facilities/farmyard/farmyard.tw
+++ b/src/facilities/farmyard/farmyard.tw
@@ -463,7 +463,7 @@ $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and
 
 <br><hr><br>
 <<if $Farmer != 0>>
-<<set $Flag = 2>>
+<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a Farmer. [[Appoint one|Farmer Select]]
@@ -483,7 +483,7 @@ $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and
 			''$farmyardNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $farmyardSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
@@ -493,7 +493,7 @@ $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and
 	<div class="content">
 		<<if $farmyardSlaves > 0>>
 			<<farmyardAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
diff --git a/src/facilities/farmyard/farmyardLab.tw b/src/facilities/farmyard/farmyardLab.tw
index 44b855b0d9d73ffbb5cdbe8cf8330ca63d540186..2616e5991476f801ad3cb1cf5052cc87f8d21736 100644
--- a/src/facilities/farmyard/farmyardLab.tw
+++ b/src/facilities/farmyard/farmyardLab.tw
@@ -9,7 +9,7 @@ $farmyardNameCaps Research Lab
 <hr>
 
 <<if $farmyardLabUpgrades.animalOvaries == 0>>
-	[[Retrofit the pharmaceutical fabricator to work with animal ovaries|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalOvaries = 1]]
+	[[Retrofit the pharmaceutical fabricator to work with animal ovaries|FarmyardLab][cashX(forceNeg(25000), "capEx"), $farmyardLabUpgrades.animalOvaries = 1]]
 	<br>//Costs <<print cashFormat(25000)>> and allows you to implant animal ovaries into slaves.//
 	<br>
 <<elseif $farmyardLabUpgrades.animalOvaries == 1>>
@@ -17,7 +17,7 @@ $farmyardNameCaps Research Lab
 	<br>
 <</if>>
 <<if $farmyardLabUpgrades.animalTesticles == 0>>
-	[[Retrofit the pharmaceutical fabricator to work with animal testicles|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalTesticles = 1]]
+	[[Retrofit the pharmaceutical fabricator to work with animal testicles|FarmyardLab][cashX(forceNeg(25000), "capEx"), $farmyardLabUpgrades.animalTesticles = 1]]
 	<br>//Costs <<print cashFormat(25000)>> and allows you to implant animal testicles into slaves.//
 	<br>
 <<elseif $farmyardLabUpgrades.animalTesticles == 1>>
@@ -25,7 +25,7 @@ $farmyardNameCaps Research Lab
 	<br>
 <</if>>
 <<if $farmyardLabUpgrades.animalMpreg == 0>>
-	[[Retrofit the pharmaceutical fabricator to work with animal anal wombs and ovaries|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalMpreg = 1]]
+	[[Retrofit the pharmaceutical fabricator to work with animal anal wombs and ovaries|FarmyardLab][cashX(forceNeg(25000), "capEx"), $farmyardLabUpgrades.animalMpreg = 1]]
 	<br>//Costs <<print cashFormat(25000)>> and allows you to implant animal anal wombs and ovaries into slaves.//
 	<br>
 <<elseif $farmyardLabUpgrades.animalMpreg == 1>>
diff --git a/src/facilities/farmyard/farmyardReport.tw b/src/facilities/farmyard/farmyardReport.tw
index 6f9e1ec35c5bc29378cf24e4da56e2ff1089f3bc..ce107fe63906013ef8c77f0c9801fb77887f765f 100644
--- a/src/facilities/farmyard/farmyardReport.tw
+++ b/src/facilities/farmyard/farmyardReport.tw
@@ -264,9 +264,8 @@
 		<<else>>
 			<<silently>>
 			<<include "SA chooses own job">>
-			<<_dump = saWorkTheFarm($slaves[$i])>>
-			$He <<= saWorkTheFarm($slaves[$i])>>
-			<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+			<<run saWorkTheFarm($slaves[$i])>>
+			<<run saChoosesOwnClothes($slaves[$i])>>
 			<<include "SA rules">>
 			<<include "SA diet">>
 			<<include "SA long term effects">>
diff --git a/src/facilities/nursery/childInteract.tw b/src/facilities/nursery/childInteract.tw
index f205b17a7cdab1e9c48502c1d3c73cec6763fe78..5cc4cffba7eb01ab3ab888a275f1b5bb62aff231 100644
--- a/src/facilities/nursery/childInteract.tw
+++ b/src/facilities/nursery/childInteract.tw
@@ -28,7 +28,7 @@
 | [[Auto salon|Salon][$degradation = 0,$primaryHairColor = "",$secondaryHairColor = "",$artificialEyeColor = "",$artificialEyeShape = "",$artificialEyeFill = "",$tattooChoice = "",$piercingLevel = ""]]
 | [[Body mod studio|Body Modification][$degradation = 0, $tattooChoice = undefined]]
 | [[Remote surgery|Remote Surgery][$degradation = 0]]
-<<if $cyberMod == 1>>| [[Configure cybernetics|cyberConfig][$temp = 0]]<</if>>
+| [[Configure cybernetics|Prosthetics Config][$prostheticsConfig = "main"]]
 */
 /*TODO: These will most likely need to be reworked*/
 <<if $extremeUnderage == 1>>
diff --git a/src/facilities/nursery/childSummary.tw b/src/facilities/nursery/childSummary.tw
index 122147fef73678fa84a4caf0f8c1df647fed5270..c002dc6f778e8249d9c747cf745448e5263373c0 100644
--- a/src/facilities/nursery/childSummary.tw
+++ b/src/facilities/nursery/childSummary.tw
@@ -4,8 +4,8 @@
 	"Main":							c => (c.assignmentVisible == 1),
 	"Nursery"						c => (c.assignmentVisible == 1 && c.fuckdoll == 0),
 	"Personal Attention Select":	c => (c.assignmentVisible == 1 && c.fuckdoll <= 0) && (
-			($Flag == 0 && c.assignment != "be a child")
-		|| ($Flag == 1 && c.assignment == "be a child")
+			($SlaveSummaryFiler == "assignable" && c.assignment != "be a child")
+		|| ($SlaveSummaryFiler == "occupying" && c.assignment == "be a child")
 	),
 	"New Game Plus":				c => (($Flag == 0 && c.assignment != "be imported") || ($Flag != 0 && c.assignment == "be imported")),
 	"Rules Slave Select":		 	c => (($Flag == 0 && !ruleSlaveSelected(c, $currentRule)) || ($Flag != 0 && ruleSlaveSelected(c, $currentRule))),
@@ -85,7 +85,7 @@
 					<</for>>
 				</div>
 				<script>
-					$("[data-quick-index]").click(function () {
+					$("[data-quick-index]").click(function() {
 							var $this = $(this), which = $this.attr('data-quick-index');
 							var $quick = $('div#list_index' + which);
 							$quick.toggleClass("hidden");
@@ -138,13 +138,13 @@
 	<</link>>
 
 <<case "New Game Plus">>
-	<<if $Flag == 0>>
+	<<if $SlaveSummaryFiler == "assignable">>
 		<br>__''@@.pink;_Child.slaveName@@''__
 	<<else>>
 		<br>__''@@.pink;_Child.slaveName@@''__
 	<</if>>
 <<case "Rules Slave Select">>
-	<<if $Flag == 0>>
+	<<if $SlaveSummaryFiler == "assignable">>
 		<br>__''
 		[[_childName|Rules Slave Select Workaround][$activeSlave = $cribs[_csi]]]''__
 	<<else>>
@@ -152,7 +152,7 @@
 		[[_childName|Rules Slave Deselect Workaround][$activeSlave = $cribs[_csi]]]''__
 	<</if>>
 <<case "Rules Slave Exclude">>
-	<<if $Flag == 0>>
+	<<if $SlaveSummaryFiler == "assignable">>
 		<br>__''
 		[[_childName|Rules Slave Exclude Workaround][$activeSlave = $cribs[_csi]]]''__
 	<<else>>
@@ -238,14 +238,14 @@ will stay in $nurseryName for another _Child.weeksLeft weeks.
 	<<continue>>
 <<case "New Game Plus">>
 	<br><<if $seeImages != 1 || $seeSummaryImages != 1 || $imageChoice == 1>>&nbsp;&nbsp;&nbsp;&nbsp;<</if>>
-	<<if $Flag === 0>>
+	<<if $SlaveSummaryFiler === "assignable">>
 		<<link "Add to import list" "New Game Plus">>
-			<<set $cribsToImport += 1,$Flag = 1>>
+			<<set $cribsToImport += 1,$SlaveSummaryFiler = "occupying">>
 			<<= assignJob($cribs[_csi], "be imported")>>
 		<</link>>
 	<<else>>
 		<<link "Remove from import list" "New Game Plus">>
-			<<set $cribsToImport -= 1,$Flag = 0>>
+			<<set $cribsToImport -= 1,$SlaveSummaryFiler = "assignable">>
 			<<= removeJob($cribs[_csi], $cribs[_csi].assignment)>>
 		<</link>>
 	<</if>>
diff --git a/src/facilities/nursery/nursery.tw b/src/facilities/nursery/nursery.tw
index d4a63b5f9d82c08c2cba62a72f4ced3f689f5b99..ff5fca004e8596edd97e9bd26b13394988449e80 100644
--- a/src/facilities/nursery/nursery.tw
+++ b/src/facilities/nursery/nursery.tw
@@ -1,6 +1,6 @@
 :: Nursery [nobr]
 
-<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Nursery", $showEncyclopedia = 1, $encyclopedia = "Nursery", $nurserySlaves = $NurseryiIDs.length, $Flag = 0>>
+<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Nursery", $showEncyclopedia = 1, $encyclopedia = "Nursery", $nurserySlaves = $NurseryiIDs.length, $SlaveSummaryFiler = "assignable">>
 <<set $targetAgeNursery = Number($targetAgeNursery) || $minimumSlaveAge>>
 <<set $targetAgeNursery = Math.clamp($targetAgeNursery, $minimumSlaveAge, 42)>>
 
@@ -118,7 +118,7 @@ $nurseryNameCaps
 
 <br><br>
 <<if $Matron != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a Matron. [[Appoint one|Matron Select]]
@@ -137,7 +137,7 @@ $nurseryNameCaps
 	<div class="content">
 		<<if $nurserySlaves > 0>>
 			<<nurseryAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -152,7 +152,7 @@ $nurseryNameCaps
 			''$nurseryNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $nurserySlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/facilities/nursery/nurseryReport.tw b/src/facilities/nursery/nurseryReport.tw
index 8adf96ded21aaefbe941ae791974bec0dbe595b8..aa35b8d37c9754c83f52387f6d7f70b8d6b7d0bd 100644
--- a/src/facilities/nursery/nurseryReport.tw
+++ b/src/facilities/nursery/nurseryReport.tw
@@ -184,8 +184,8 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own job">>
-		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
-		<<set _dump = saRest($slaves[$i])>>
+		<<run saChoosesOwnClothes($slaves[$i])>>
+		<<run saRest($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
diff --git a/src/facilities/penthouse/penthouseFramework.js b/src/facilities/penthouse/penthouseFramework.js
index c4741f5ba916645da826bae3c4ced96b7ea2b489..3b8102501b2a3a4658115845a92be3e75b06d066 100644
--- a/src/facilities/penthouse/penthouseFramework.js
+++ b/src/facilities/penthouse/penthouseFramework.js
@@ -130,6 +130,10 @@ App.Entity.Facilities.PenthouseJobs = {
 			}
 			return r;
 		}
+
+		assignmentLink(i, passage, callback, linkText) {
+			return super.assignmentLink(i, "Subordinate Targeting", callback, linkText);
+		}
 	},
 	Cow: class extends App.Entity.Facilities.PenthouseJob {
 		canEmploy(slave) {
diff --git a/src/facilities/schoolroom/schoolroomFramework.js b/src/facilities/schoolroom/schoolroomFramework.js
index b207a406c61ff4e4c806f5856940b563897409e3..0ec97695b7b4774678bbd4026f428b000ef94bc6 100644
--- a/src/facilities/schoolroom/schoolroomFramework.js
+++ b/src/facilities/schoolroom/schoolroomFramework.js
@@ -11,7 +11,7 @@ App.Data.Facilities.schoolroom = {
 	},
 	defaultJob: "student",
 	manager: {
-		position: "teacher",
+		position: "schoolteacher",
 		assignment: "be the Schoolteacher",
 		careers: ["a child prodigy", "a coach", "a dean", "a historian", "a librarian", "a principal", "a private instructor", "a professor", "a scholar", "a scientist", "a teacher's pet", "a teacher", "a teaching assistant", "an archaeologist", "an astronaut", "an economist"],
 		skill: "teacher",
diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw
index 3ce93df56ec0bd35a54e11432029e601a6ee40e4..7f0a12977557a9b1005b7c68c4abc1c9b465494c 100644
--- a/src/gui/Encyclopedia/encyclopedia.tw
+++ b/src/gui/Encyclopedia/encyclopedia.tw
@@ -2548,7 +2548,7 @@ LORE: INTERVIEWS
 	<br>''Wahn'' wrote numerous generic recruitment events.
 	<br>''PregModder'' has modded extensively, including descriptive embellishments for pregnant slaves, various asset descriptions, Master Suite reporting, the Wardrobe, a pack of facility leader interactions, options for Personal Assistant appearances, birthing scenes, fake pregnancy accessories, many other preg mechanics, blind content, expanded chubby belly descriptions, several new surgeries, neon and metallic makeup, better descriptive support for different refreshments, work on choosesOwnJob, many bugfixes, an expansion to the hostage corruption event chain, slave specific player titles, gagging and several basic gags, extended family mode, oversized sex toys, buttplug attachment system, and other, likely forgotten, things. (And that's just the vanilla added stuff!)
 	<br>''Lolimodder'' your loli expertise will be missed.
-	<br>''pregmodfan'' for tremendous amounts of work with compilers, decompilers, etc. Single-handedly kicked this mod into its new git home. Contributed lots of bugfixes as well as fixed the RA considerably. Revamped pregnancy tracking as well. Also for ppmod, ramod, implmod, cfpmod and psmod (preg speed).
+	<br>''pregmodfan'' for tremendous amounts of work with compilers, decompilers, etc. Single-handedly kicked this mod into its new git home. Contributed lots of bugfixes as well as fixed the RA considerably. Revamped pregnancy tracking as well then further expanded it. Also for ppmod, ramod, implmod, cfpmod and psmod (preg speed).
 	<br>''FCGudder'' for advanced economy reports, image improvements, cleaning and fixing extended-extended family mode, extending building widgets, anaphrodisiacs, name cleaning, height overhauling, proper slave summary caching, new shelter slaves, some crazy ass shit with vector art, fixing seDeath, coding jquery in ui support and likely one to two of these other anon credits.
 	<br>''family mod anon'' for extending extended family mode.
 	<br>''anon'' for lolimod content, new slave careers, new pubestyles, and general improvements.
@@ -2615,7 +2615,10 @@ LORE: INTERVIEWS
 	<br>''DCoded'' for creating the favicon and adding animals to the Pit, as well as nursery and bestiality content, scenes, facilities and fixes. Also added a pussy licking scene and created and fixed a number of bugs.
 	<br>''HiveBro'' for giving hyperpregnant slaves some serious loving.
 	<br>''Quin2k'' for overwriting save function and expired tweak via Vrelnir & co.
-	<br>''ezsh'' for bugfixing and creating a tool to build twineJS for me.
+	<br>''ezsh'' for bugfixing and creating a tool to build twineJS for me. Has contributed massive revisions to the game's structure.
+	<br>''Sonofrevvan'' for fDance and fBeg.
+	<br>''skriv'' for fixes and endless code cleaning.
+	<br>''Arkerthan'' for various additions including merging cybermod and vanilla prosthetics.
 	<br>''git contributors lost to time'' for their submissions and work through pregmod's git.
 	<br>''Bane70'' optimized huge swaths of code with notable professionalism.
 	<br>''Circle Tritagonist'' provided several new collars and outfits.
@@ -2634,8 +2637,8 @@ LORE: INTERVIEWS
 	<br>''freecitiesbandit'' wrote a number of recruitment, future society, mercenary and random events, provided tailed buttplugs, new eyes and tattoos, and contributed the code for the mercenary raiders policy.
 	<br>''DrNoOne'' wrote the bulk slave purchase and persistent summary code.
 	<br>''Mauve'' provided vector art for chastity belts and limp dicks.
-	<br>''Klorpa'' for dozens of new nationalities and boundless new names and nicknames. Also monokinis, middle eastern clothing and aprons. Also the hearing overhaul. Has declared war on bad spelling, grammar and formatting.
-	<br>''lowercasedonkey'' for various additions, not limited to the budget overhaul.
+	<br>''Klorpa'' for dozens of new nationalities and boundless new names and nicknames. Also monokinis, middle eastern clothing, overalls and aprons. Also the hearing overhaul. Has declared war on bad spelling, grammar and formatting.
+	<br>''lowercasedonkey'' for various additions, not limited to the budget overhaul. Set up all the tabs too.
 	<br>''amomynous0'' for bug reports and testing in addition to SFmod unit descriptions.
 	<br>''wepsrd'' for QOL (hormonal balance cheat and lactation adaptation to new menu) fixes.
 
diff --git a/src/gui/css/mainStyleSheet.css b/src/gui/css/mainStyleSheet.css
index f65deefb2632efd3a8a750892fe51c4d54e49e4a..36f4b1034aeabb1d3989bf85d99b934b7a60359d 100644
--- a/src/gui/css/mainStyleSheet.css
+++ b/src/gui/css/mainStyleSheet.css
@@ -18,7 +18,6 @@ hr {
 	opacity: 1 !important;
 }
 
-
 /* default is 54em */
 #passages {
 	max-width: 100%;
diff --git a/src/init/setupVars.tw b/src/init/setupVars.tw
index 4941b5649be6f4d55d4fc611fa843f2496bdf90f..73aecf7ac19d5469f1df438cbdad65c3dc6d54f5 100644
--- a/src/init/setupVars.tw
+++ b/src/init/setupVars.tw
@@ -4,6 +4,29 @@
 * This passage is tagged as widget, so it will be loaded whenever any passage is loaded. The global setup object seems to reset itself to {} (empty object): until we figure out why, this is where we set properties for it.
 */
 
+/* prosthetic stuff */
+<<set setup.prostheticIDs = ["interfaceP1", "interfaceP2", "basicL", "sexL", "beautyL", "combatL", "cyberneticL", "ocular", "cochlear", "electrolarynx", "interfaceTail", "modT", "combatT", "sexT", "erectile"]>>
+
+/* .name is expected to be singular and uncapitalized; 10 = 1 week without upgrades */
+<<set setup.prosthetics = {
+	interfaceP1: {name: "basic prosthetic interface", adjust: 40, craft: 50, research: 100, level: 1, costs: 5000},
+	interfaceP2: {name: "advanced prosthetic interface", adjust: 80, craft: 80, research: 160, level: 2, costs: 10000},
+	basicL: {name: "set of basic prosthetic limbs", adjust: 40, craft: 40, research: 80, level: 1, costs: 7000},
+	sexL: {name: "set of advanced sex limbs", adjust: 60, craft: 70, research: 140, level: 2, costs: 15000},
+	beautyL: {name: "set of advanced beauty limbs", adjust: 60, craft: 70, research: 140, level: 2, costs: 15000},
+	combatL: {name: "set of advanced combat limbs", adjust: 60, craft: 70, research: 140, level: 2, costs: 15000},
+	cyberneticL: {name: "set of cybernetic limbs", adjust: 80, craft: 150, research: 250, level: 3, costs: 25000},
+	ocular: {name: "ocular implant", adjust: 60, craft: 80, research: 150, level: 2, costs: 20000},
+	cochlear: {name: "cochlear implant", adjust: 40, craft: 40, research: 80, level: 1, costs: 5000},
+	electrolarynx: {name: "electrolarynx", adjust: 40, craft: 40, research: 40, level: 1, costs: 5000},
+	interfaceTail: {name: "prosthetic tail interface", adjust: 50, craft: 60, research: 120, level: 1, costs: 5000},
+	modT: {name: "modular tail", adjust: 40, craft: 40, research: 80, level: 1, costs: 5000},
+	combatT: {name: "combat tail", adjust: 70, craft: 70, research: 140, level: 2, costs: 15000},
+	sexT: {name: "pleasure tail", adjust: 60, craft: 60, research: 120, level: 2, costs: 10000},
+	erectile: {name: "erectile implant", adjust: 40, craft: 50, research: 100, level: 1, costs: 7000}
+}>>
+/* prosthetic stuff end */
+
 /*** pregmod exclusive start ***/
 
 
@@ -588,9 +611,9 @@ equine: {type: "equine", normalOvaMin:1, normalOvaMax: 1, normalBirth: 48, minLi
 
 <<set setup.curacaoanSlaveNames = ["Aafke", "Aaghie", "Aaltje", "Ada", "Adèle", "Adriaantje", "Adride", "Aefje", "Aeltje", "Agnietje", "Akisha", "Alerta", "Aletta", "Alexandra", "Altagracia", "Amelia", "Anamaria", "Angela", "Angeline", "Angenie", "Ann", "Anna", "Annaatje", "Anne Marie", "Anne", "Anneke", "Annemarie", "Annetje", "Anouk", "Antke", "Antoinette", "Anushka", "Ariaantje", "Ashanta", "Aubrey", "Ayanette", "Baltje", "Bartje", "Beatrix", "Beletje", "Bertha", "Betje", "Bloeme", "Camille", "Catharina", "Catherine", "Chanelle", "Christina", "Christine", "Christyntje", "Cipriana", "Claasje", "Cokkie", "Cunegonde", "Daatje", "Daleen", "Diana", "Dievertje", "Dirkje", "Divertje", "Doortje", "Dorinda", "Eefke", "Eline", "Elizabeth", "Elsa", "Elsbet", "Elsita", "Elsje", "Elvira", "Emmetje", "Emmy", "Engeltje", "Eugenia", "Eunice", "Evalina", "Fatima", "Femke", "Femmeke", "Femmetje", "Fernandine", "Fletje", "Floortje", "Florentijntje", "Fransiska", "Fransje", "Fyrena", "Fytie", "Gayle", "Geerta", "Geertje", "Geertruda", "Geertruijd", "Geesje", "Gepje", "Gertrudis", "Giertje", "Gloria", "Greet", "Gregoria", "Greta", "Hannah", "Hanneke", "Hansje", "Hassana", "Heleentje", "Heller", "Hendrika", "Herlinda", "Hilletje", "Imelda", "Ingeborg", "Ingrid", "Iris", "Irma", "Ivette", "Jaapje", "Jacoba", "Jacqueline", "Jamine", "Jan", "Jana", "Janna", "Jannetje", "Jansje", "Jantje", "Jasmin", "Jearmeane", "Jenne", "Jenyfeer", "Jetje", "Jikke", "Joanna", "Johanna", "Johanne", "Joke", "Jolanda", "Jorien", "Jouraine", "Jozaine", "Judica", "Juliana", "Jutte", "Juut", "Kaatje", "Kanisha", "Karin", "Kastanje", "Katrijn", "Katryn", "Katryne", "Klaartje", "Klaasje", "Klara", "Krisje", "Kristijntje", "Larisa", "Laurencia", "Laurien", "Leen", "Leena", "Leentje", "Leida", "Lena", "Lenoor", "Leonora", "Letje", "Lidushka", "Liene", "Lijdia", "Lisa", "Lucille", "Ludwina", "Lysje", "Maaicke", "Maartje", "Mafalda", "Magda", "Magdaleentje", "Margarietje", "Margreet", "Margretha", "Margriet", "Maria", "Marie", "Marieke", "Marijse", "Mariken", "Marisa", "Mariska", "Marit", "Maritje", "Marloes", "Martiena", "Maruschka", "Mary-Ann", "Mary", "Maxima", "Maybeline", "Mckeeyla", "Mercelina", "Miep", "Mijanou", "Mijntje", "Minerva", "Monifa", "Monika", "Mylene", "Naatje", "Naemi", "Nashaira", "Natacha", "Neeltje", "Nelleke", "Nida", "Nilva", "Ninfa", "Noortje", "Norayla", "Oeke", "Olga", "Paula", "Paulina", "Paulyntje", "Peggy", "Petra", "Petronella", "Philomena", "Pieternella", "Regina", "Regine", "Resyntje", "Rianne", "Rie", "Rika", "Romy", "Roosje", "Rosalinda", "Rosana", "Rozemond", "Ruth", "Ruthmilda", "Rychacviana", "Saartje", "Sabrina", "Sadie", "Safira", "Sally", "Sanna", "Sanne", "Sanneke", "Sannertje", "Saskia", "Seer", "Sharyaane", "Sheida", "Sien", "Sientje", "Silvana", "Siska", "Sjoukje", "Solange", "Soraida", "Soucke", "Steentje", "Stephanie", "Stien", "Sue-Ann", "Sue", "Supharmy", "Susanne", "Suzanne", "Tamara", "Teuntje", "Theresa", "Thialda", "Tientje", "Tietje", "Tjaatje", "Toontje", "Tressje", "Trijn", "Trintje", "Trui", "Truida", "Truitje", "Urseltje", "Valentyn", "Vanessa", "Vanity", "Veerle", "Vendetta", "Verna", "Victoria", "Viennaline", "Viveca", "Vrouwtje", "Wimpje", "Wyntje", "Xafira", "Xiomara", "Yandra", "Yasmin", "Ydje", "Yvonne", "Zita", "Zjarritjen"]>>
 <<set setup.curacaoanMaleNames = ["Aalbert", "Aarend", "Aart", "Adolf", "Adriaan", "Adriaen", "Aelbert", "Agiomar", "Alexander", "Amerigo", "Andre", "Andreas", "Andries", "Angelo", "Anthonij", "Anthonius", "Anthony", "Anton", "Ariaantje", "Arjen", "Arnold", "Arte", "Aubrey", "Augustyn", "Baltus", "Barent", "Bart", "Barthold", "Bastiaan", "Ben", "Bernard", "Bram", "Caspar", "Chris", "Christiaan", "Christoffel", "Churandy", "Claas", "Clemens", "Conrad", "Constantijn", "Coos", "Cor", "Cornelis", "Cornelius", "D'Angelo", "Daam", "Daendels", "Daniel", "Denzil", "Diderik", "Diederik", "Dionijs", "Dirck", "Dirk", "Dolf", "Dorus", "Dries", "Dudley", "Eduard", "Eelke", "Egbert", "Endy", "Epke", "Errol", "Eugene", "Eusebio", "Faas", "Felix", "Fijtge", "Floris", "Frans", "Frederek", "Freek", "Frem", "Frits", "Geerard", "Geerd", "Geert", "Geordie", "Gerald", "Gerolt", "Gerrit", "Gerritson", "Gervaas", "Giel", "Gijsbert", "Gilmar", "Gionne", "Glenn", "Govert", "Gregor", "Gysbert", "Hannes", "Harman", "Hendrick", "Hendrik", "Hendrikus", "Hensley", "Howard", "Hubrecht", "Huib", "Huijbert", "Humphrey", "Huybert", "Huyck", "Huygen", "Ireneus", "Irvingly", "Izaak", "Jaap", "Jacobus", "Jaime", "Jairo", "Jakob", "Jan", "Jandino", "Jantje", "Japie", "Jarchinio", "Jean-Julien", "Jean", "Jeremy", "Jeroen", "Joannes", "Joao", "Jochem", "Johan", "Johannes", "John-Henk", "John", "Joop", "Joost", "Joren", "Jorgen", "Joris", "Jos", "Jubert", "Julien", "Karel", "Kenneth", "Klaas", "Kobie", "Koenrad", "Krelis", "Laurens", "Leendert", "Leo", "Lieb", "Liemarvin", "Lieuwe", "Lodewijk", "Lukas", "Lusger", "Maarten", "Maartje", "Mannus", "Marco", "Mario", "Mark", "Marshall", "Marthinus", "Martijn", "Mathys", "Matthys", "Menno", "Mertijn", "Mewis", "Neeltje", "Nicolaes", "Niek", "Niels", "Nijs", "Nikolaas", "Nygell", "Nys", "Okkert", "Ornelio", "Oswald", "Paulus", "Peter", "Philip", "Piet", "Pieter", "Pouw", "Priit", "Quenten", "Quentin", "Rachmil", "Ranier", "Raymond", "Reginald", "Reignier", "Reimond", "Rembrandt", "Riaan", "Richel", "Rigsheillo", "Rijkaard", "Rijkerd", "Rip", "Robbert", "Roberto", "Roeland", "Roelof", "Rogier", "Rombert", "Ruben", "Rutger", "Rutgert", "Rykaard", "Salomon", "Samuel", "Sander", "Sebastiaan", "Sijthoff", "Simon", "Snouck", "Staaf", "Staats", "Stanley", "Stephanus", "Stoffel", "Surae", "Theunis", "Thijs", "Thomas", "Tiebout", "Tobias", "Toff", "Toon", "Tryntje", "Tymen", "Uys", "Vaast", "Valentijn", "Virgilio", "Wendell", "Wilhelmus", "Willem-Jan", "Willem", "Wim", "Wouter"]>>
-<<set setup.curacaoanSlaveSurnames = ["Albert", "Alexander", "Alting", "America", "Americaan", "Ammerlaan", "Angelista", "Antonia", "Arvelo", "Asjes", "Asporaat", "Atacho", "Bakhuis", "Bakker", "Balentien", "Beaujon", "Begina", "Betrian", "Bislip", "Blatt", "Bloem", "Bodden", "Bonevacia", "Bos", "Braafheid", "Brown", "Cahill", "Canwood", "Capriles", "Carti", "Carty", "Chang", "Chumaceiro", "Clifton", "Coffie", "Colastica", "Conner", "Córdoba", "Cova", "Craane", "Croes", "Cunningham", "Curiel", "Da Silva", "Daflaar", "Dania", "Davelaar", "de Castro", "de Jongh", "de Lau", "de Marchena", "de Nooijer", "de Paula", "de Pool", "de Windt", "de Wit", "Delaney", "den Dulk", "Desbarida", "Dijkhuizen", "Dirks", "Domacasse", "Doran", "Drechsel", "Dumfries", "Duncan", "Duzant", "Eisden", "Elhage", "Faulborn", "Fraai", "Fraites", "Francisco", "Franenk", "Garcia", "Garia", "Geerman", "George-Wout", "George", "Gerard", "Gijsbertha", "Girigori", "Girigorie", "Godfried", "Godschalk", "Goedgedrag", "Goes", "Haagensen", "Halley", "Hammoud", "Hancock", "Harvey", "Hassell", "Heerenveen", "Heilleger", "Henriquez", "Hering", "Hersisia", "Hieroms", "Hinds", "Hodge", "Houtman", "Hudson", "Illis", "Isenia", "Jansen", "Janzen", "Jesus", "Johnson", "Kingsbury", "Knepa", "Koeiman", "Krijger", "Kunst", "Labega", "Larmonie", "Leito", "Lejuez", "Macauly", "Maduro", "Mambi", "Marchena", "Mardenborough", "Maria", "Marshall", "Martes", "Martha", "Martina", "Martinus", "Martis", "McDermott", "McKenney", "Mendes", "Mercelina", "Monte", "Montgomery", "Moreno", "Mosteiro", "Nar", "Nelson", "Nicolaas", "O'Connor", "Oduber", "Palm", "Paulina", "Penzo", "Peterson", "Pikero", "Pisas", "Pop", "Prade", "Punter", "Regales", "Rhuggenaath", "Ricardo", "Richards", "Richardson", "Roche", "Rojer", "Römer", "Romijn", "Roozendal", "Rosalia", "Rose-Chang", "Rose", "Rozendal", "Salas", "Sambo", "Sanchez", "Schotborgh", "Schotte", "Seferijn", "Semeleer", "Shelley", "Siberi", "Sibilo", "Simmons", "Simon", "Sluis", "Smith", "Snel", "Sola", "Spanner", "Spatz", "Sprock", "Sprockel", "Statia", "Stevens", "Strauss", "Strick", "Sulvaran", "Thodé", "Thomassen", "Thomson", "Torres", "Treu", "Trijonis", "Trinidad", "Troeman", "Tromp", "Urselita", "van Arendonk", "van Delden", "van Eijma", "van Kesteren", "van Lamoen", "van Putten", "Van Riet", "Vasquez", "Verbrugge", "Verschoor", "Vlaun", "Vonhogen", "Vos", "Wall", "Wardekker", "Wawoe", "Weijde", "Wever", "Weyde", "Whiteman", "Williams", "Williamson", "Winfield", "Winklaar", "Wout", "Zagers", "Zielinski", "Zimmerman"]>>
+<<set setup.curacaoanSlaveSurnames = ["Albert", "Alexander", "Alting", "America", "Americaan", "Ammerlaan", "Angelista", "Antonia", "Arvelo", "Asjes", "Asporaat", "Atacho", "Bakhuis", "Bakker", "Balentien", "Beaujon", "Begina", "Betrian", "Bislip", "Blatt", "Bloem", "Bodden", "Bonevacia", "Bos", "Braafheid", "Braam", "Brown", "Cahill", "Camelia", "Canwood", "Capriles", "Carti", "Carty", "Chang", "Chumaceiro", "Clifton", "Coffie", "Colastica", "Conner", "Cooper", "Córdoba", "Cova", "Craane", "Croes", "Cunningham", "Curiel", "Da Silva", "Daflaar", "Dania", "Davelaar", "de Castro", "de Jongh", "de Lau", "de Marchena", "de Nooijer", "de Paula", "de Pool", "de Windt", "de Wit", "Delaney", "den Dulk", "Desbarida", "Dijkhuizen", "Dirks", "Domacasse", "Doran", "dos Santos", "Drechsel", "Dumfries", "Duncan", "Duzant", "Eisden", "Elhage", "Faulborn", "Fraai", "Fraites", "Francisco", "Franco", "Franenk", "Garcia", "Garia", "Geerman", "George", "Gerard", "Gijsbertha", "Girigori", "Girigorie", "Godett", "Godfried", "Godschalk", "Goedgedrag", "Goeloe", "Goes", "Haagensen", "Halley", "Hammoud", "Hancock", "Harvey", "Hassell", "Heerenveen", "Heilleger", "Henriquez", "Hering", "Hernandez", "Hersisia", "Hieroms", "Hinds", "Hodge", "Houtman", "Hudson", "Illis", "Isenia", "Jansen", "Janzen", "Jesus", "Johnson", "Kingsbury", "Knepa", "Koeiman", "Krijger", "Kunst", "Labega", "Larmonie", "Leeflang", "Leito", "Lejuez", "Macauly", "Maduro", "Mambi", "Marchena", "Mardenborough", "Maria", "Marshall", "Martes", "Martha", "Martina", "Martinus", "Martis", "McDermott", "McKenney", "McWilliam", "Mendes", "Mercelina", "Millerson", "Monk", "Monte", "Montgomery", "Moreno", "Moses", "Mosteiro", "Mozes", "Nar", "Nelson", "Nicolaas", "O'Connor", "Oduber", "Palm", "Parris", "Paulina", "Penzo", "Peterson", "Pikero", "Pisas", "Pop", "Prade", "Punter", "Regales", "Rhuggenaath", "Ribeiro", "Ricardo", "Richards", "Richardson", "Roche", "Rojer", "Römer", "Romijn", "Roozendal", "Rosalia", "Rosaria", "Rose", "Rozendal", "Rozier", "Salas", "Sambo", "Sanchez", "Schotborgh", "Schotte", "Seferijn", "Semeleer", "Shelley", "Siberi", "Sibilo", "Simmons", "Simon", "Sluis", "Smith", "Snel", "Sola", "Spanner", "Spatz", "Sprock", "Sprockel", "Statia", "Stevens", "Strauss", "Strick", "Sulvaran", "Thodé", "Thomassen", "Thomson", "Torres", "Treu", "Trijonis", "Trinidad", "Troeman", "Tromp", "Urselita", "van Arendonk", "van Delden", "van Eijma", "van Kesteren", "van Lamoen", "van Putten", "van Riet", "Vasquez", "Verbrugge", "Verschoor", "Vlaun", "Vonhogen", "Vos", "Wall", "Wardekker", "Wawoe", "Weijde", "Wever", "Weyde", "Whiteman", "Wiels", "Williams", "Williamson", "Wilsoe", "Winfield", "Winklaar", "Wout", "Zagers", "Zielinski", "Zimmerman"]>>
 
-<<set setup.cypriotSlaveNames = ["Acacia", "Acantha", "Ada", "Adonia", "Adora", "Aeola", "Afroditi", "Agalia", "Agathe", "Agathi", "Aikaterine", "Aikaterini", "Akilina", "Alala", "Aldora", "Aleka", "Aleki", "Aleni", "Alesia", "Alessandra", "Alethea", "Alexandra", "Alexandria", "Alexi", "Alexine", "Alexis", "Alexxa", "Alissa", "Althaia", "Amara", "Ambrosia", "Ana", "Anabel", "Anastacia", "Anastasia", "Anatolia", "Andri", "Andriana", "Andrianou", "Andromeda", "Andromede", "Androniki", "Androula", "Androulla", "Anemone", "Angela", "Angele", "Angelee", "Angeliki", "Anna", "Annagletha", "Anthaia", "Anthoula", "Anthy", "Antigone", "Antigoni", "Antonia", "Antri", "Aphrodite", "Argiri", "Argiro", "Ariadne", "Ariana", "Aristea", "Artemis", "Artemisia", "Aspasia", "Atalante", "Athanasia", "Athena", "Athenagora", "Athina", "Ayşe", "Azina", "Barbara", "Basiliki", "Calandra", "Calantha", "Calista", "Calla", "Cassa", "Cassia", "Caterina", "Charis", "Charissa", "Chloe", "Chloris", "Chrisoula", "Chrissitha", "Christalla", "Christiane", "Christina", "Christine", "Chrysanthe", "Chryseis", "Chryssi", "Chrystalla", "Chrystalleni", "Clematia", "Cleopatra", "Clio", "Constantina", "Corallia", "Costandina", "Cressida", "Cyma", "Cynara", "Dagmara", "Damara", "Damaris", "Danae", "Daphne", "Dawn", "Deianira", "Delia", "Demetra", "Demitria", "Denise", "Despina", "Diana", "Diantha", "Dido", "Dimitra", "Dionisia", "Dominica", "Domna", "Dora", "Dorkas", "Dru", "Drusilla", "Effie", "Effie)", "Effrossini", "Effrosyni", "Efpraxia", "Efthimia", "Eftimia", "Eirene", "Eirini", "Ekaterine", "Ekaterini", "Eleanna", "Eleftheria", "Eleftheriani", "Elektra", "Elena", "Eleni", "Eleutheria", "Elewteria", "Elewtheria", "Elina", "Elisa", "Elmaziye", "Elsie", "Emalia", "Emine", "Emmanuelle", "Erato", "Ereini", "Erene", "Erianthe", "Ethougia", "Eudocia", "Eudora", "Eudoxia", "Eugenia", "Euphemia", "Euphrosyne", "Evaggelia", "Evanthia", "Evdokia", "Eve", "Evgenia", "Evi", "Eyaggelia", "Faika", "Fatma", "Feirha", "Feri", "Filanthi", "Fotini", "Gabriella", "Gaea", "Galatea", "Gavriella", "Georgia", "Georgoulla", "Gioulli", "Halcyone", "Hatice", "Havva", "Hazar", "Helen", "Helena", "Helene", "Helia", "Hera", "Hlois", "Ianthe", "Ilektra", "Iliana", "Ino", "Ioanna", "Ioánna", "Ioannis", "Iona", "Iphigenia", "Ira", "Irene", "Irini", "Iris", "Iro", "Isaura", "Isi", "Işın", "Ivi", "Jasmine", "Junia", "Juno", "Kali", "Kalia", "Kaliopi", "Kalliope", "Kalyca", "Karima", "Karolina", "Katerina", "Katerine", "Katina", "Keziban", "Khloe", "Kielia", "Kleoniki", "Konstanta", "Konstantina", "Kore", "Koren", "Krystiana", "Kynthia", "Kyriaki", "Lamprini", "Leontia", "Lexi", "Lia", "Lida", "Lilika", "Lisa", "Lugaretzia", "Lydia", "Maia", "Margaret", "Margarites", "Maria", "Marianna", "Marianthi", "Marilia", "Marina", "Marista", "Maritsa", "Marlen", "Maroula", "Maroulla", "Medora", "Melaina", "Melanie", "Melantha", "Melina", "Melissa", "Melpomeni", "Meryem", "Metaxia", "Miranta", "Mirofora", "Myrofora", "Myropi", "Myrto", "Nafsika", "Nana", "Nantia", "Natalia", "Natalie", "Nazire", "Nektaria", "Neona", "Neriman", "Nerissa", "Nessa", "Nicki", "Nicole", "Niki", "Nikola", "Nitsa", "Nora", "Nouritza", "Ntaniella", "Odessa", "Olga", "Olympia", "Ophelia", "Ourania", "Pamfilia", "Panagiota", "Panayiota", "Pannayita", "Paraskevi", "Paraskevou", "Paraskevoulla", "Pareskevi", "Parthenia", "Pavlina", "Pembe", "Phaedra", "Phaidra", "Phedra", "Philana", "Philippa", "Philomela", "Phoebe", "Phyllis", "Praxoula", "Rahme", "Ramona", "Rebecca", "Rena", "Rhea", "Rodanthi", "Salome", "Selene", "Sevgül", "Sia", "Sibel", "Smaragda", "Smaragdi", "Sofia", "Sophia", "Sotiria", "Soula", "Stamata", "Stavroula", "Stefania", "Stella", "Styliani", "Styllou", "Tassia", "Tassula", "Tattiana", "Tekla", "Thalassa", "Thaleia", "Thalia", "Thania", "Tharsia", "Thecla", "Thekla", "Theodora", "Theodosia", "Theodosoulla", "Theone", "Theophano", "Theothosia", "Theresa", "Tia", "Timothea", "Tina", "Toula", "Tulisa", "Vanessa", "Vasiliki", "Vasiliky", "Vassiliki", "Xanthe", "Xanthippe", "Xantippe", "Xena", "Xenia", "Xristina", "Xylia", "Yana", "Yiannoula", "Zacharenia", "Zaharou", "Zelia", "Zenaida", "Zenobia", "Ziynet", "Zoe", "Zoi", "Zuhre"]>>
+<<set setup.cypriotSlaveNames = ["Acacia", "Acantha", "Ada", "Adonia", "Adora", "Aeola", "Afroditi", "Agalia", "Agathe", "Agathi", "Aikaterine", "Aikaterini", "Akilina", "Alala", "Aldora", "Aleka", "Aleki", "Aleni", "Alesia", "Alessandra", "Alethea", "Alexandra", "Alexandria", "Alexi", "Alexine", "Alexis", "Alexxa", "Alissa", "Althaia", "Amara", "Ambrosia", "Ana", "Anabel", "Anastacia", "Anastasia", "Anatolia", "Andri", "Andriana", "Andrianou", "Andromeda", "Andromede", "Androniki", "Androula", "Androulla", "Anemone", "Angela", "Angele", "Angelee", "Angeliki", "Anna", "Annagletha", "Anthaia", "Anthoula", "Anthy", "Antigone", "Antigoni", "Antonia", "Antri", "Aphrodite", "Argiri", "Argiro", "Ariadne", "Ariana", "Aristea", "Artemis", "Artemisia", "Aspasia", "Atalante", "Athanasia", "Athena", "Athenagora", "Athina", "Ayşe", "Azina", "Barbara", "Basiliki", "Calandra", "Calantha", "Calista", "Calla", "Cassa", "Cassia", "Caterina", "Charis", "Charissa", "Charlotte", "Chloe", "Chloris", "Chrisoula", "Chrissitha", "Christalla", "Christiane", "Christina", "Christine", "Chrysanthe", "Chryseis", "Chryssi", "Chrystalla", "Chrystalleni", "Clematia", "Cleopatra", "Clio", "Constantina", "Corallia", "Costandina", "Cressida", "Cyma", "Cynara", "Dagmara", "Damara", "Damaris", "Danae", "Daphne", "Dawn", "Deianira", "Delia", "Demetra", "Demitria", "Denise", "Despina", "Diana", "Diantha", "Dido", "Dimitra", "Dionisia", "Dominica", "Domna", "Dora", "Dorkas", "Dru", "Drusilla", "Effie", "Effrossini", "Effrosyni", "Efpraxia", "Efthimia", "Eftimia", "Eirene", "Eirini", "Ekaterine", "Ekaterini", "Eleanna", "Eleftheria", "Eleftheriani", "Elektra", "Elena", "Eleni", "Eleutheria", "Elewteria", "Elewtheria", "Elina", "Elisa", "Elmaziye", "Elsie", "Emalia", "Emine", "Emmanuelle", "Erato", "Ereini", "Erene", "Erianthe", "Ethougia", "Eudocia", "Eudora", "Eudoxia", "Eugenia", "Euphemia", "Euphrosyne", "Evaggelia", "Evanthia", "Evdokia", "Eve", "Evgenia", "Evi", "Eyaggelia", "Faika", "Fatma", "Feirha", "Feri", "Filanthi", "Fotini", "Gabriella", "Gaea", "Galatea", "Gavriella", "Georgia", "Georgoulla", "Gioulli", "Halcyone", "Hatice", "Havva", "Hazar", "Helen", "Helena", "Helene", "Helia", "Hera", "Hlois", "Ianthe", "Ilektra", "Iliana", "Ino", "Ioanna", "Ioánna", "Ioannis", "Iona", "Iphigenia", "Ira", "Irene", "Irini", "Iris", "Iro", "Isaura", "Isi", "Işın", "Ivi", "Jasmine", "Junia", "Juno", "Kali", "Kalia", "Kaliopi", "Kalliope", "Kalyca", "Karima", "Karolina", "Katerina", "Katerine", "Katina", "Keziban", "Khloe", "Kielia", "Kleoniki", "Konstanta", "Konstantina", "Kore", "Koren", "Krystiana", "Kynthia", "Kyriaki", "Lamprini", "Leontia", "Lexi", "Lia", "Lida", "Lilika", "Lisa", "Lugaretzia", "Lydia", "Maia", "Margaret", "Margarites", "Maria", "Marianna", "Marianthi", "Marietta", "Marilia", "Marina", "Marista", "Maritsa", "Marlen", "Maroula", "Maroulla", "Medora", "Melaina", "Melanie", "Melantha", "Melina", "Melissa", "Melpomeni", "Meryem", "Metaxia", "Miranta", "Mirofora", "Myrofora", "Myropi", "Myrto", "Nafsika", "Nana", "Nantia", "Natalia", "Natalie", "Nazire", "Nektaria", "Neona", "Neriman", "Nerissa", "Nessa", "Nicki", "Nicole", "Niki", "Nikola", "Nitsa", "Nora", "Nouritza", "Ntaniella", "Odessa", "Olga", "Olympia", "Ophelia", "Ourania", "Pamfilia", "Panagiota", "Panayiota", "Pannayita", "Paraskevi", "Paraskevou", "Paraskevoulla", "Pareskevi", "Parthenia", "Pavlina", "Pembe", "Phaedra", "Phaidra", "Phedra", "Philana", "Philippa", "Philomela", "Phoebe", "Phyllis", "Praxoula", "Rahme", "Ramona", "Rebecca", "Rena", "Rhea", "Rodanthi", "Salome", "Selene", "Sevgül", "Sia", "Sibel", "Smaragda", "Smaragdi", "Sofia", "Sophia", "Sotiria", "Soula", "Stamata", "Stavroula", "Stefania", "Stella", "Styliani", "Styllou", "Tassia", "Tassula", "Tattiana", "Tekla", "Thalassa", "Thaleia", "Thalia", "Thania", "Tharsia", "Thecla", "Thekla", "Theodora", "Theodosia", "Theodosoulla", "Theone", "Theophano", "Theothosia", "Theresa", "Tia", "Timothea", "Tina", "Toula", "Tulisa", "Vanessa", "Vasiliki", "Vasiliky", "Vassiliki", "Xanthe", "Xanthippe", "Xantippe", "Xena", "Xenia", "Xristina", "Xylia", "Yana", "Yiannoula", "Zacharenia", "Zaharou", "Zelia", "Zenaida", "Zenobia", "Ziynet", "Zoe", "Zoi", "Zuhre"]>>
 <<set setup.cypriotMaleNames = ["Abdullah", "Achilleas", "Achilleos", "Achilles", "Adamantios", "Adamos", "Adonis", "Agapios", "Agias", "Agyros", "Ahmet", "Aiakos", "Aineias", "Aiolos", "Albert", "Aleda", "Alekhis", "Alekos", "Aleksiu", "Alexander", "Alexandros", "Alexios", "Alexiou", "Alexis", "Ambrosios", "Anakletos", "Anastasios", "Anastassios", "Andonios", "Andreas", "Andreou", "Andrew", "Andros", "Angelo", "Angelos", "Aniketos", "Anninos", "Anthony", "Antonios", "Antonis", "Apostolis", "Apostolos", "Argyros", "Ari", "Arion", "Aris", "Aristides", "Aristotelis", "Arout", "Arsenios", "Asaf", "Athan", "Athanasios", "Athanassios", "Athones", "Augustine", "Augustinos", "Avraam", "Aziz", "Bikos", "Boreas", "Carolos", "Charalambos", "Charalampos", "Charilaos", "Christodoulos", "Christofis", "Christoforos", "Christopher", "Christophoros", "Christos", "Chrysanthos", "Chrysanthous", "Chrysostomos", "Cletus", "Constandinos", "Constantine", "Constantinos", "Cosmo", "Costa", "Costantinos", "Costas", "Crist", "Damianos", "Demetri", "Demetrios", "Demetris", "Demos", "Demosthenes", "Dennis", "DerviÅŸ", "Dighenis", "Dimitri", "Dimitrios", "Dimitris", "Dino", "Dinos", "Dion", "Dionysios", "Dionyssios", "Dmitris", "Doxiadis", "Drymiotes", "Efstathios", "Efstratios", "Eftchios", "Efthimios", "Eleftherios", "Eleni", "Elias", "Emmanouil", "Emmanuel", "Emmanuil", "Epameinondas", "Epaminondas", "Eraklis", "Euaggelos", "Evagelos", "Evangelos", "Evenios", "Evis", "Evripides", "Fanos", "Fotis", "Francis", "Geo", "George", "Georges", "Georghios", "Georgios", "Gerasimos", "Giannakos", "Giannis", "Giannos", "Giatas", "Giorgos", "Glafkos", "Gondikas", "Greg", "Gregorios", "Gregory", "Grigorios", "Grigoris", "Gus", "Gustas", "Halu", "Haralambos", "Harrys", "Hasan", "Herakles", "Hermes", "Herodotos", "Herodotou", "Hippocrates", "Hristos", "Huseyin", "Iacovos", "Iakovos", "Iannis", "Iason", "Ibrahim", "Ignatios", "Ilias", "Ioannes", "Ioannis", "Isaakios", "John", "Kalinikos", "Kharilaos", "Khristodoulos", "Kimon", "Kleanthe", "Koinos", "Konstandinos", "Konstantinos", "Kosmas", "Kosta", "Kostantinos", "Kostas", "Kosti", "Kris", "Kristion", "Kymon", "Kypros", "Kyriacos", "Kyriakos", "Lakis", "Lambro", "Lambros", "Laurentios", "Lazaros", "Leandros", "Lefteris", "Leo", "Leonidas", "Leontios", "Lida", "Linos", "Loucas", "Loukas", "Loukianos", "Makarios", "Makis", "Manolis", "Manos", "Marcos", "Marinos", "Marios", "Marko", "Markos", "Martinos", "Matthaios", "Maximos", "Menelaos", "Metrophanes", "Michail", "Michalis", "Mike", "Mikhalakis", "Milos", "Miltiades", "Miltos", "Moris", "Mustafa", "Myron", "Nathanael", "Nektarios", "Neofitos", "Neophytos", "Neophytou", "Nicholas", "Nick", "Nickolas", "Nico", "Nicolaon", "Nicolas", "Nicos", "Nikodemos", "Nikolaos", "Nikolas", "Nikos", "Niovi", "Odysseas", "Odysseus", "Orestis", "Orion", "Osman", "Othon", "Panagiote", "Panagiotis", "Panayiotis", "Panayotis", "Panicos", "Panikos", "Panos", "Pantelis", "Papayiannis", "Paraskevas", "Paul", "Paulos", "Pavlos", "Pericles", "Periklis", "Petri", "Petros", "Philip", "Philippos", "Photios", "Pieris", "Platon", "Polyvios", "Prokopios", "RareÈ™", "Rhigas", "Romanos", "Salih", "Samaras", "Samuel", "Savas", "Savvas", "Sebastianos", "Sergios", "Silvanos", "Simos", "Skyros", "Socrates", "Sofronios", "Sokratis", "Solon", "Sophocles", "Sotirios", "Sotiris", "Spiridon", "Spiro", "Spiros", "Spyridon", "Spyros", "Stamatis", "Stathis", "Stavros", "Stefan", "Stefanos", "Stelios", "Stephanos", "Sterghios", "Steve", "Stratis", "Stratos", "Stylianos", "Taki", "Takis", "Tasos", "Tassos", "Tataki", "Thaddaios", "Thanasios", "Thanasis", "Thanos", "Themestoclis", "Theodore", "Theodoros", "Theodosios", "Theodossios", "Theofanis", "Theologos", "Theophanis", "Thomas", "Thrasyvoulos", "Timotheos", "Titos", "Tonios", "Tzannas", "Vaggelis", "Valerios", "Vangelis", "Vardis", "Vasileios", "Vasilios", "Vasilis", "Vassilios", "Vassilis", "Vassos", "Xenophon", "Yannas", "Yanni", "Yannis", "YaÅŸar", "Yianni", "Yiannis", "Yiannos", "Yiorgos", "Yioryios", "Zacharias", "Zaharias", "Zenon", "Zeus"]>>
 <<set setup.cypriotSlaveSurnames = ["Achilleos", "Achilleou", "Adamos", "Adamou", "Adebibe", "Afxentiou", "Agapiou", "Agathangelou", "Agathocleou", "Agathocleous", "Alexander", "Alexandrou", "Anastasiou", "Anastassi", "Anastassiou", "Andreou", "Andronicou", "Angeli", "Angelide", "Antoniade", "Antoniades", "Antoniadou", "Antoniou", "Apostolou", "Aresti", "Argyrou", "Arif", "Aristidou", "Aristodemou", "Aristotelou", "Aristotelous", "Artem", "Athanasiou", "Athanassiou", "Avgousti", "Avraam", "Avraamide", "Bonita", "Brown", "Cansel", "Charalambide", "Charalambides", "Charalambou", "Charalambous", "Charalampou", "Charalampous", "Chari", "Charilaou", "Christodoulide", "Christodoulides", "Christodoulidou", "Christodoulou", "Christofi", "Christofide", "Christofides", "Christofidou", "Christoforou", "Christos", "Christou", "Chrysanthou", "Chrysostomou", "Cleanthous", "Constanti", "Constantinide", "Constantinides", "Constantinidou", "Constantinou", "Contostavlos", "Costa", "Costi", "Cuzdriorean", "Damianou", "Debes", "Demetri", "Demetriade", "Demetriades", "Demetriadou", "Demetriou", "Demir", "Demosthenou", "Demosthenous", "Deometria", "Derya", "Dimitriou", "Dionysiou", "Dionyssiou", "Economide", "Economides", "Economou", "Efstathiou", "Efthymiou", "Efthyvoulou", "Eleftheriou", "Eleutheriou", "Elia", "Eliade", "Eliades", "Elialzamis", "Ellina", "Ellinas", "Emin", "Eracleou", "Ergüçlü", "Erotokritou", "Evagorou", "Evangelou", "Evripidou", "Filippou", "Fotiou", "Frangos", "Gavriel", "Georgiade", "Georgiades", "Georgiadou", "Georgiou", "Giasemidou", "Gregoriou", "Hadjicharalambous", "Hadjigeorgiou", "Hadjikyriacou", "Hadjimichael", "Hadjinicolaou", "Hadjioannou", "Hadjiosif", "Hamza", "Hanihak", "Harman", "Heracleou", "Heracleous", "Herodotou", "Iacovide", "Iacovides", "Iacovou", "Ibrahim", "Illamba", "Ioakim", "Ioanni", "Ioannide", "Ioannides", "Ioannidou", "Ioannou", "Iosif", "Jone", "Kadi", "Kalli", "Kallis", "Kalogirou", "Karaolis", "Karavezirler", "Kari", "Kaya", "Kefala", "Khan", "Kleanthou", "Kokkinos", "Kokkinou", "Konstantinou", "Koumi", "Kryiacou", "Kyprianou", "Kyriacou", "Kyriakide", "Kyriakides", "Kyriakidou", "Kyriakou", "Kythraioti", "Lambrou", "Lazarou", "Leonidou", "Loizide", "Loizides", "Loizidou", "Loizou", "Louca", "Loucaides", "Louka", "Makri", "Makride", "Malas", "Manoli", "Marangou", "Marcou", "Markide", "Markou", "Matheou", "Mattheou", "Mavrommati", "Mavrommatis", "Mehmetali", "Menelaou", "Metaxa", "Michael", "Michaelide", "Michaelides", "Michaelidou", "Miltiadou", "Miltiadous", "Mina", "Mourtouvanis", "Mustafa", "Mylona", "Mylonas", "Nearchou", "Neocleou", "Neocleous", "Neofytou", "Neophytou", "Nicola", "Nicolaide", "Nicolaides", "Nicolaidou", "Nicolaou", "Nikolaou", "Odysseos", "Odysseou", "Onisiforou", "Onissiforou", "Onoufrios", "Onoufriou", "Orphanide", "Orphanides", "Panagi", "Panagiotou", "Panayi", "Panayide", "Panayides", "Panayiotou", "Panteli", "Pantelide", "Pantelides", "Papa", "Papacharalambous", "Papachristoforou", "Papademetriou", "Papadopoulos", "Papadopoulou", "Papageorgiou", "Papaioannou", "Papakyriacou", "Papamichael", "Papanicolaou", "Papantoniou", "Papapetrou", "Paphitis", "Paraskeva", "Paraskevas", "Paschali", "Patsalide", "Patsalides", "Pavlide", "Pavlides", "Pavlidou", "Pavlou", "Pericleou", "Pericleous", "Petride", "Petrides", "Petridou", "Petrou", "Philippou", "Photiou", "Pieri", "Pitsillide", "Pitsillides", "Pittas", "Polycarpou", "Polydorou", "Polykarpou", "Polyviou", "Procopiou", "Prodromou", "Prokopiou", "Protopapa", "Protopapas", "Pyrketti", "Rousou", "Sadi", "Şah", "Salih", "Savva", "Savvide", "Savvides", "Savvidou", "Sentürk", "Sergiou", "Serviou", "Siber", "Singh", "Smith", "Socratou", "Socratous", "Sofocleou", "Sofokleou", "Sofroniou", "Solomou", "Sophocleou", "Sophocleous", "Soteriou", "Sotiriou", "Spence", "Spyrou", "Stavrinou", "Stavrou", "Stefanou", "Stephanou", "Stratura", "Stylianide", "Stylianides", "Stylianou", "Symeonide", "Symeonides", "Symeou", "Themistocleou", "Themistocleous", "Theocharou", "Theocharous", "Theodorou", "Theodosiou", "Theodossiou", "Theodotou", "Theodoulou", "Theofanou", "Theophanou", "Theophanous", "Thoma", "Thomas", "Thrassyvoulou", "Timotheou", "Tin", "Tryfonos", "Tsangarides", "Türkmen", "Varnava", "Vasili", "Vasiliou", "Vassiliade", "Vassiliades", "Vassiliou", "Violaris", "Vissi", "Vrachas", "Vrahimi", "Vronti", "White", "Xenofontos", "Xenofontou", "Xenophontos", "Xenophontou", "Yerolemou", "Yiangou", "Yiannakou", "Yiannakoú", "Yianni", "Yilmaz", "Yorgancioglu", "Zacharia", "Zachariou", "Zeki", "Zembyla", "Zenonos", "Zenonou"]>>
 
@@ -2116,7 +2139,8 @@ Then pick _namePool.random(), or display those names as possible choices, or do
 	{name: "No default setting", value: "no default setting"},
 	{name: "None", value: "none"},
 	{name: "Tail", value: "tail", rs: "buyTails"},
-	{name: "Fox tail", value: "fox tail", rs: "buyTails"}, {name: "Cat tail", value: "cat tail", rs: "buyTails"}]>>
+	{name: "Fox tail", value: "fox tail", rs: "buyTails"},
+	{name: "Cat tail", value: "cat tail", rs: "buyTails"}]>>
 
 <<set setup.facilityCareers = ["be confined in the arcade", "be confined in the cellblock", "be the Attendant", "be the DJ", "be the Farmer", "be the Madam", "be the Matron", "be the Milkmaid", "be the Nurse", "be the Schoolteacher", "be the Stewardess", "be the Wardeness", "be your Concubine", "get treatment in the clinic", "learn in the schoolroom", "live with your Head Girl", "rest in the spa", "serve in the club", "serve in the master suite", "work as a farmhand", "work as a nanny", "work as a servant", "work in the brothel", "work in the dairy"]>>
 
diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw
index 0c6f84f6cdcdb1ce9c9b75c70b8d751de3406ca5..ff372e4d6a8d58b58f5ab35eebbc75b48118abe9 100644
--- a/src/init/storyInit.tw
+++ b/src/init/storyInit.tw
@@ -341,9 +341,7 @@ You should have received a copy of the GNU General Public License along with thi
 	<<set $useAccordion = 0>>
 
 	<<set $useTabs = 0>>
-	<<set $tabChoice = {
-		Main: "all"
-	}>>
+	<<set $tabChoice = {Main: "all"}>>
 	<<set $formatNumbers = 0>>
 
 	/* onlyintendeddickgirls variables */
@@ -1057,8 +1055,6 @@ You should have received a copy of the GNU General Public License along with thi
 <<set $dispensaryUpgrade = 0>>
 <<set $organFarmUpgrade = 0>>
 <<set $completedOrgans = []>>
-<<set $limbsCompleted = 0>>
-<<set $limbs = []>>
 <<set $ImplantProductionUpgrade = 0>>
 <<set $permaPregImplant = 0>>
 <<set $injectionUpgrade = 0>>
@@ -1088,7 +1084,6 @@ You should have received a copy of the GNU General Public License along with thi
 <<set $animalOvaries = 0>> /*{pigOvaries: 0, canineOvaries: 0, horseOvaries: 0, cowOvaries: 0} currently unused*/
 <<set $animalTesticles = 0>> /*{pigTestes: 0, dogTestes: 0, horseTestes: 0, cowTestes: 0} currently unused*/
 <<set $animalMpreg = 0>> /*{pigMpreg: 0, dogMpreg: 0, horseMpreg: 0, cowMpreg: 0} currently unused*/
-<<set $prostheticsUpgrade = 0>>
 <<set $geneticMappingUpgrade = 0>>
 <<set $pregnancyMonitoringUpgrade = 0>>
 <<set $cloningSystem = 0>>
@@ -1441,24 +1436,6 @@ You should have received a copy of the GNU General Public License along with thi
 
 /* Misc mod variables */
 <<set $recruiterEugenics = 0>>
-<<set $cyberMod = 0>>
-<<set $stockpile = {
-basicPLimbInterface: 0,
-advPLimbInterface: 0,
-basicPLimb: 0,
-advSexPLimb: 0,
-advGracePLimb: 0,
-advCombatPLimb: 0,
-cyberneticPLimb: 0,
-ocularImplant: 0,
-cochlearImplant: 0,
-electrolarynx: 0,
-interfacePTail: 0,
-modPTail: 0,
-warPTail: 0,
-sexPTail: 0,
-erectileImplant: 0
-} >>
 
 <<if ndef $AgeEffectOnTrainerPricingPC>>
 	<<set $AgeEffectOnTrainerPricingPC = 1>>
@@ -1479,27 +1456,23 @@ erectileImplant: 0
 	<<set $IsPastPrimePC = 5000>>
 <</if>>
 
+<<set $prostheticsUpgrade = 0>>
+<<set $adjustProstheticsCompleted = 0>>
+<<set $adjustProsthetics = []>> /*format: {id: string, workleft: int, slaveID: int}*/
+/*task: {type: "research"/"craft/craftFit", id: string, workLeft: int, [if constructFit] slaveID: int}*/
 <<set $researchLab = {
-built: "false",
-aiModule: 1,
-productionTime: 0,
-research: "none",
-manufacture: "none",
-maxSpace: 0,
-hired: 0,
-menials: 0,
-basicPLimbInterface: 0,
-advPLimbInterface: 0,
-basicPLimb: 0,
-advSexPLimb: 0,
-advGracePLimb: 0,
-advCombatPLimb: 0,
-cyberneticPLimb: 0,
-ocularImplant: 0,
-cochlearImplant: 0,
-electrolarynx: 0,
-erectileImplant: 0
-} >>
+	level: 0,
+	aiModule: 1,
+	tasks: [],
+	maxSpace: 0,
+	hired: 0,
+	menials: 0,
+}>>
+<<set $prosthetics = {}>>
+<<run setup.prostheticIDs.forEach(function(id) {
+	$prosthetics[id] = {amount: 0, research: 0};
+})>>
+
 
 <<set $merchantFSWares = ["AssetExpansionistResearch", "GenderRadicalistResearch", "HedonisticDecadenceResearch", "SlimnessEnthusiastResearch", "TransformationFetishistResearch", "YouthPreferentialistResearch"]>>
 <<set $merchantIllegalWares = ["asexualReproduction", "childhoodFertilityInducedNCS", "PGHack", "RapidCellGrowthFormula", "sympatheticOvaries", "UterineRestraintMesh"]>> /* "AnimalOrgans" for future use */
diff --git a/src/interaction/cyberConfig.tw b/src/interaction/cyberConfig.tw
deleted file mode 100644
index c7adf2f9b97d2bc696e34c06e3fcf4fa2678ef8e..0000000000000000000000000000000000000000
--- a/src/interaction/cyberConfig.tw
+++ /dev/null
@@ -1,266 +0,0 @@
-:: cyberConfig [nobr]
-
-<<switch $temp>>
-
-<<case 0>>
-	This room is lined with shelves and cabinets, it could be easily mistaken for a storage room if it were not for examination table in its center.<br>
-	<<set $nextButton = "Back", $nextLink = "Slave Interact">>
-		<<if $activeSlave.amp != 1>>
-			Your slave $activeSlave.slaveName is obediently waiting for your instructions.
-		<<else>>
-			Your slave $activeSlave.slaveName is lying on the table, waiting for your instructions.
-		<</if>>
-
-	<<if $activeSlave.eyesImplant == 1>><br><br>&nbsp;
-		$He has an ocular implant installed.
-		<<if $activeSlave.eyes == 1>>
-			They are operating normally.
-		<<elseif $activeSlave.eyes == -1>>
-			They are set to blur $his vision.
-		<<else>>
-			They are turned off.
-		<</if>>
-		<br><br>
-		<<if $activeSlave.eyes != 1>>[[Restore vision|cyberConfig][$activeSlave.eyes = 1,$temp = 3]] | <</if>>
-		<<if $activeSlave.eyes != -1>>[[Blur|cyberConfig][$activeSlave.eyes = -1,$temp = 3]] | <</if>>
-		<<if $activeSlave.eyes != -2>>[[Disable|cyberConfig][$activeSlave.eyes = -2,$temp = 3]]<</if>>
-
-		$He currently has $activeSlave.eyeColor lenses equipped.
-
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-
-		Swap out $his lenses:
-		<br>
-		Iris Color:
-		[[Blue|cyberConfig][$activeSlave.eyeColor = "blue",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Black|cyberConfig][$activeSlave.eyeColor = "black",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Brown|cyberConfig][$activeSlave.eyeColor = "brown",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Green|cyberConfig][$activeSlave.eyeColor = "green",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Turquoise|cyberConfig][$activeSlave.eyeColor = "turquoise",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Sky-Blue|cyberConfig][$activeSlave.eyeColor = "sky-blue",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Hazel|cyberConfig][$activeSlave.eyeColor = "hazel",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Pale-Grey|cyberConfig][$activeSlave.eyeColor = "pale-grey",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[White|cyberConfig][$activeSlave.eyeColor = "white",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Pink|cyberConfig][$activeSlave.eyeColor = "pink",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Amber|cyberConfig][$activeSlave.eyeColor = "amber",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Red|cyberConfig][$activeSlave.eyeColor = "red",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Yellow|cyberConfig][$activeSlave.eyeColor = "yellow",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Orange|cyberConfig][$activeSlave.eyeColor = "orange",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		<br>
-		Pupil Shape:
-		<br>[[Circular|cyberConfig][$activeSlave.pupil = "circular",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Catlike|cyberConfig][$activeSlave.pupil = "catlike",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Serpent-Like|cyberConfig][$activeSlave.pupil = "serpent-like",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Devilish|cyberConfig][$activeSlave.pupil = "devilish",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Demonic|cyberConfig][$activeSlave.pupil = "demonic",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Hypnotic|cyberConfig][$activeSlave.pupil = "hypnotic",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Heart-Shaped|cyberConfig][$activeSlave.pupil = "heart-shaped",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Wide-Eyed|cyberConfig][$activeSlave.pupil = "wide-eyed",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Almond-Shaped|cyberConfig][$activeSlave.pupil = "almond-shaped",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Bright|cyberConfig][$activeSlave.pupil = "bright",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Teary|cyberConfig][$activeSlave.pupil = "teary",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Vacant|cyberConfig][$activeSlave.pupil = "vacant",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Star-Shaped|cyberConfig][$activeSlave.pupil = "star-shaped",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Goat-Like|cyberConfig][$activeSlave.pupil = "goat-like",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		<br>
-		Sclera Colors:
-		[[White|cyberConfig][$activeSlave.sclerae = "white",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Blue|cyberConfig][$activeSlave.sclerae = "blue",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Black|cyberConfig][$activeSlave.sclerae = "black",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Brown|cyberConfig][$activeSlave.sclerae = "brown",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Green|cyberConfig][$activeSlave.sclerae = "green",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Turquoise|cyberConfig][$activeSlave.sclerae = "turquoise",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Sky-Blue|cyberConfig][$activeSlave.sclerae = "sky-blue",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Hazel|cyberConfig][$activeSlave.sclerae = "hazel",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Pale-Grey|cyberConfig][$activeSlave.sclerae = "pale-grey",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Pink|cyberConfig][$activeSlave.sclerae = "pink",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Amber|cyberConfig][$activeSlave.sclerae = "amber",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Red|cyberConfig][$activeSlave.sclerae = "red",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Yellow|cyberConfig][$activeSlave.sclerae = "yellow",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Orange|cyberConfig][$activeSlave.sclerae = "orange",$temp = 2,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-	<</if>>
-
-	<<if $activeSlave.earImplant == 1>><br><br>&nbsp;
-		$He has a cochlear implant installed.
-		<<if $activeSlave.hears == 0>>
-			They are operating normally.
-		<<elseif $activeSlave.hears == -1>>
-			They are set to muffle $his hearing.
-		<<else>>
-			They are turned off.
-		<</if>>
-		<br><br>
-		<<if $activeSlave.hears != 0>>[[Restore hearing|cyberConfig][$activeSlave.hears = 0,$temp = 5]] | <</if>>
-		<<if $activeSlave.hears != -1>>[[Muffle|cyberConfig][$activeSlave.hears = -1,$temp = 5]] | <</if>>
-		<<if $activeSlave.hears != -2>>[[Disable|cyberConfig][$activeSlave.hears = -2,$temp = 5]]<</if>>
-	<</if>>
-
-	<<if $activeSlave.electrolarynx == 1>><br><br>&nbsp;
-		$He has an electrolarynx installed.
-		<<if $activeSlave.voice == 0>>
-			It is turned off.
-		<<elseif $activeSlave.voice == 1>>
-			It is set to its "deep voice" setting.
-		<<elseif $activeSlave.voice == 2>>
-			It is set to its "normal voice" setting.
-		<<elseif $activeSlave.voice == 3>>
-			It is set to its "high voice" setting.
-		<</if>>
-		<br><br>
-		<<if $activeSlave.voice != 0>>[[Disable|cyberConfig][$activeSlave.voice = 0,$temp = 6]] | <</if>>
-		<<if $activeSlave.voice != 1>>[[Deep voice setting|cyberConfig][$activeSlave.voice = 1,$temp = 6]] | <</if>>
-		<<if $activeSlave.voice != 2>>[[Standard voice setting|cyberConfig][$activeSlave.voice = 2,$temp = 6]] | <</if>>
-		<<if $activeSlave.voice != 3>>[[High voice setting|cyberConfig][$activeSlave.voice = 3,$temp = 6]]<</if>>
-	<</if>>
-
-	<<if $activeSlave.PLimb > 0>><br><br>
-		$He has PLimb interface installed. You can assign and adjust $his prosthetics here.
-		<<if $activeSlave.amp <= -1>><br>&nbsp;
-			$His prosthetics are currently attached, if you wish to change them you will first need to detach them.<br>
-			[[Detach|cyberConfig][$temp = 1,$nextButton = "Continue", $nextLink = "cyberConfig"]]
-		<<else>><br>&nbsp;
-			<<if $stockpile.basicPLimb > 0>>[[Attach basic limbs|cyberConfig][$temp = 4, $activeSlave.amp = -1, $stockpile.basicPLimb -= 1]]<</if>>
-			<<if $stockpile.advSexPLimb > 0>>[[Attach sex limbs|cyberConfig][$temp = 4, $activeSlave.amp = -2, $stockpile.advSexPLimb -= 1]]<</if>>
-			<<if $stockpile.advGracePLimb > 0>>[[Attach beauty limbs|cyberConfig][$temp = 4, $activeSlave.amp = -3, $stockpile.advGracePLimb -= 1]]<</if>>
-			<<if $stockpile.advCombatPLimb > 0>>[[Attach combat limbs|cyberConfig][$temp = 4, $activeSlave.amp = -4, $stockpile.advCombatPLimb -= 1]]<</if>>
-			<<if $activeSlave.PLimb == 2>>
-				<<if $stockpile.cyberneticPLimb > 0>>[[Attach cybernetic limbs|cyberConfig][$temp = 4, $activeSlave.amp = -5, $stockpile.cyberneticPLimb -= 1]]<</if>>
-			<<else>>
-				//To equip more advanced prosthetics you will need to upgrade your slaves' PLimb interface.//
-			<</if>>
-		<</if>>
-
-	<<else>>
-		<<if $activeSlave.amp == 0>><br>
-			$He has healthy limbs so there is no need for prosthetics.
-		<<elseif $activeSlave.amp < 0>>
-			Unidentified PLimb interface detected. [[Please reboot system.|cyberConfig][$activeSlave.PLimb = 2]]
-		<<else>><br>
-			$He does not have a PLimb interface installed so you can't give $him any prosthetics.
-		<</if>>
-	<</if>>
-
-	<<if $activeSlave.PTail == 1>><br><br>
-		$He has a neural tail interface installed. You can assign and adjust $his tail here.
-		<<if $activeSlave.tail != "none">><br>&nbsp;
-			$He currently has a tail attached, if you wish to change it you will first need to detach it.<br>
-			[[Detach|cyberConfig][$temp = 7,$nextButton = "Continue", $nextLink = "cyberConfig"]]
-		<<else>><br>&nbsp;
-			<<if $stockpile.modPTail > 0>>Attach a modular tail designed to look like a:<br>
-			[[Cat's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "neko", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]
-			| [[Dog's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "inu", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]
-			| [[Fox's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "kit", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]
-			| [[Kitsune's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "kitsune", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]
-			| [[Tanuki's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailShape = "tanuki", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]
-			| [[Cow's Tail|cyberConfig][$temp = 8, $activeSlave.tail = "mod", $activeSlave.tailColor = "ushi", $activeSlave.tailColor = $activeSlave.hColor, $stockpile.modPTail -= 1]]<br><</if>>
-			<<if $stockpile.warPTail > 0>>[[Attach Combat Tail|cyberConfig][$temp = 8, $activeSlave.tail = "combat", $activeSlave.tailColor = "jet black", $stockpile.warPTail -= 1]]<</if>>
-			<<if $stockpile.sexPTail > 0>>| [[Attach Pleasure Tail|cyberConfig][$temp = 8, $activeSlave.tail = "sex", $activeSlave.tailColor = "pink", $stockpile.sexPTail -= 1]]<</if>>
-		<</if>>
-	<<else>>
-		$He does not have a neural tail interface installed so you cannot attach a tail.
-	<</if>>
-	<<if $activeSlave.tail == "mod">><br>
-		$He currently has a modular tail, styled to look like
-		<<if $activeSlave.tailShape == "neko">>
-			a long, slender cat tail.
-		<<elseif $activeSlave.tailShape == "inu">>
-			a bushy dog tail.
-		<<elseif $activeSlave.tailShape == "kit">>
-			a soft, fluffy fox tail.
-		<<elseif $activeSlave.tailShape == "kitsune">>
-			three incredibly soft, fluffy fox tails.
-		<<elseif $activeSlave.tailShape == "tanuki">>
-			a long, fluffy tanuki tail.
-		<<elseif $activeSlave.tailShape == "ushi">>
-			a long cow tail.
-		<</if>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-
-		Modify $his tail's appearance:<br>
-		[[Cat|cyberConfig][$activeSlave.tailShape = "neko",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Dog|cyberConfig][$activeSlave.tailShape = "inu",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Fox|cyberConfig][$activeSlave.tailShape = "kit",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Kitsune|cyberConfig][$activeSlave.tailShape = "kitsune",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Tanuki|cyberConfig][$activeSlave.tailShape = "tanuki",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-		| [[Bovine|cyberConfig][$activeSlave.tailShape = "ushi",cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
-	<</if>>
-<<case 1>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.amp == -1>><<set $stockpile.basicPLimb += 1>>
-	<<elseif $activeSlave.amp == -2>><<set $stockpile.advSexPLimb += 1>>
-	<<elseif $activeSlave.amp == -3>><<set $stockpile.advGracePLimb += 1>>
-	<<elseif $activeSlave.amp == -4>><<set $stockpile.advCombatPLimb += 1>>
-	<<elseif $activeSlave.amp == -5>><<set $stockpile.cyberneticPLimb += 1>>
-	<</if>>
-	<<set $activeSlave.amp = 1>>
-	Due to built-in safeties it is necessary to remove each limb separately, first releasing the lock and then waiting for automated seal release.<br>
-	<<if ($activeSlave.devotion > 20)>>
-		You instruct $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<elseif canHear($activeSlave)>>listens<<else>>waits<</if>> with interest as you work.<<if ($activeSlave.devotion > 50)>> As you remove the last limb $he playfully wiggles $his stumps at you.<</if>>
-	<<else>>
-		You order $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<elseif canHear($activeSlave)>>listens<<else>>waits<</if>> with a bitter expression as you work.
-	<</if>>
-
-<<case 2>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.amp != 1>>You have $him lie down and<<else>>You<</if>> use a speculum to keep $his eyes open while you disengage $his lenses remotely and swap them out with $his new $activeSlave.eyeColor lenses<<if $activeSlave.pupil != "circular" || $activeSlave.sclerae != "white">> with <<if $activeSlave.pupil != "circular" >>$activeSlave.pupil pupils<</if>><<if $activeSlave.pupil != "circular" && $activeSlave.sclerae != "white">> and <</if>><<if $activeSlave.sclerae != "white" >>$activeSlave.sclerae sclerae<</if>><</if>>.
-<<case 3>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.eyes == 1>>
-		$He blinks as $his vision returns.
-	<<elseif $activeSlave.eyes == -1>>
-		$He squints at you as $his vision becomes a blur.
-	<<else>>
-		$He has a panicked expression when $his vision suddenly goes out.
-	<</if>>
-<<case 4>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>> When you are done, $he sits up and
-	<<if $activeSlave.amp == -2>>experimentally engages the vibe function in $his fingers.
-	<<elseif $activeSlave.amp == -3>>runs a hand over the smooth skin of $his new legs.
-	<<elseif $activeSlave.amp == -4>>engages and disengages the blade in $his forearm.
-	<<elseif $activeSlave.amp == -5>>experimentally flexes the muscles in $his artificial arm.
-	<<else>>catches $his balance.
-	<</if>>
-<<case 5>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.hears == 0>>
-		$He tilts $his head as $his hearing returns.
-	<<elseif $activeSlave.hears == -1>>
-		$He shakes $his head as $his hearing becomes muffled.
-	<<else>>
-		$He has a panicked expression when $his hearing is suddenly silenced.
-	<</if>>
-<<case 6>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.voice == 0>>
-		$He tries testing out $his new voice, only to discover $he's been made mute.
-	<<elseif $activeSlave.voice == 1>>
-		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, deep voice.
-	<<elseif $activeSlave.voice == 2>>
-		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, normal voice.
-	<<elseif $activeSlave.voice == 3>>
-		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, high voice.
-	<</if>><br>
-<<case 7>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	<<if $activeSlave.tail == "mod">><<set $stockpile.modPTail += 1>>
-	<<elseif $activeSlave.tail == "combat">><<set $stockpile.warPTail += 1>>
-	<<elseif $activeSlave.tail == "sex">><<set $stockpile.sexPTail += 1>>
-	<</if>>
-	<<set $activeSlave.tail = "none">><<set $activeSlave.tailShape = "none">><<set $activeSlave.tailColor = "none">>
-	You send the release signal and the mechanical lock disengages allowing the artificial tail to pop right off.<br>
-<<case 8>>
-	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
-	Attaching $his tail is a simple procedure, you simply push the connector into a socket, right where $his tailbone ends, until the lock engages.<br>
-	When you are done, $he looks back and
-	<<if $activeSlave.tailShape == "neko">>sways $his tail side to side enigmatically.
-	<<elseif $activeSlave.tailShape == "inu">>wags $his tail side to side energetically.
-	<<elseif $activeSlave.tailShape == "kit">>slowly sways $his tail feeling the soft fur brush against $his skin.
-	<<elseif $activeSlave.tailShape == "kitsune">>slowly sways $his tails luxuriating in the incredibly soft, fluffy fur brushing against $his skin.
-	<<elseif $activeSlave.tailShape == "tanuki">>admires $his long, thick fluffy tail.
-	<<elseif $activeSlave.tailShape == "ushi">>swats $himself playfully.
-	<<elseif $activeSlave.tail == "combat">>experimentally whips the long tail side to side then takes aim at a prepared fruit, lashes out with blinding speed and smiles as it explodes into chunks.
-	<<elseif $activeSlave.tail == "sex">>accidentally engages the vibrating and lube functions, startling $him and making quite a mess.
-	<<else>>admires $his new tail.
-	<</if>>
-<</switch>>
diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js
index 66e3e58e782ce4b7cb842a220e30b37afd834a77..65430da9617ea8a2668f7a93c16e25a03357d9fc 100644
--- a/src/interaction/main/mainLinks.js
+++ b/src/interaction/main/mainLinks.js
@@ -1,23 +1,23 @@
-/** breaks in the last case in switches are not required, but are highly recommended */
-
 /* OPEN MAIN */
-App.UI.View.MainLinks = function () {
+App.UI.View.MainLinks = function() {
 	"use strict";
 	const V = State.variables;
-	const PA = Array.isArray(V.personalAttention) ? V.personalAttention.map(function (x) {
+	const PA = Array.isArray(V.personalAttention) ? V.personalAttention.map(function(x) {
 		return getSlave(x.ID);
 	}) : [];
 	let r = ``;
 	if (V.HeadGirl) {
-		var pronouns = getPronouns(V.HeadGirl),
-			he = pronouns.pronoun,
-			him = pronouns.object,
-			his = pronouns.possessive,
-			hers = pronouns.possessivePronoun,
-			himself = pronouns.objectReflexive,
-			boy = pronouns.noun,
-			He = capFirstChar(he),
-			His = capFirstChar(his);
+		/* eslint-disable */
+		const pronouns = getPronouns(V.HeadGirl);
+		const he = pronouns.pronoun;
+		const him = pronouns.object;
+		const his = pronouns.possessive;
+		const hers = pronouns.possessivePronoun;
+		const himself = pronouns.objectReflexive;
+		const boy = pronouns.noun;
+		const He = capFirstChar(he);
+		const His = capFirstChar(his);
+		/* eslint-enable */
 	}
 
 	if (V.PCWounded === 1) {
@@ -74,7 +74,7 @@ App.UI.View.MainLinks = function () {
 						if (dwi > 0 && dwi === l - 1) {
 							r += ` and `;
 						}
-						r += `<strong><u><span class=pink>${SlaveFullName(PA[dwi])}</span></u></strong> to ${V.personalAttention[dwi].trainingRegimen}`;
+						r += `<strong><u><span class="pink">${SlaveFullName(PA[dwi])}</span></u></strong> to ${V.personalAttention[dwi].trainingRegimen}`;
 						if (dwi > 0 && dwi < l - 2) {
 							r += `,`;
 						}
@@ -86,39 +86,39 @@ App.UI.View.MainLinks = function () {
 	}
 
 	if (V.PCWounded !== 1) {
-		r += ` <span id="managePA"><strong><<link "Change plans">><<goto "Personal Attention Select">><</link>></strong></span> <span class=cyan>[A]</span>`;
+		r += ` <span id="managePA"><strong><<link "Change plans">><<goto "Personal Attention Select">><</link>></strong></span> <span class="cyan">[A]</span>`;
 	}
 
 	if (V.useSlaveSummaryOverviewTab !== 1) {
 		if (typeof V.slaveIndices[V.HeadGirl.ID] !== 'undefined') {
-			r += `<br><strong><u><span class=pink>${SlaveFullName(V.HeadGirl)}</span></u></strong> is serving as your Head Girl`;
+			r += `<br><strong><u><span class="pink">${SlaveFullName(V.HeadGirl)}</span></u></strong> is serving as your Head Girl`;
 			if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) {
 				r += ` and Consort`;
 			}
-			r += `. <span id="manageHG"><strong><<link "Manage Head Girl">><<goto "HG Select">><</link>></strong></span> <span class=cyan>[H]</span>`;
+			r += `. <span id="manageHG"><strong><<link "Manage Head Girl">><<goto "HG Select">><</link>></strong></span> <span class="cyan">[H]</span>`;
 		} else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined' && (V.slaves.length > 1)) {
 			r += `<br>You have not selected a Head Girl`;
 			if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) {
 				r += ` and Consort`;
 			}
-			r += `. <span id="manageHG"><strong><<link "Select one">><<goto "HG Select">><</link>></strong></span> <span class=cyan>[H]</span>`;
+			r += `. <span id="manageHG"><strong><<link "Select one">><<goto "HG Select">><</link>></strong></span> <span class="cyan">[H]</span>`;
 		} else if (typeof V.slaveIndices[V.HeadGirl.ID] === 'undefined') {
 			r += `//You do not have enough slaves to keep a Head Girl//`;
 		}
 		r += `<br>`;
 
 		if (typeof V.slaveIndices[V.Recruiter.ID] !== 'undefined') {
-			r += `<strong><u><span class=pink>${SlaveFullName(V.Recruiter)}</span></u></strong> is working to recruit girls. <span id="manageRecruiter"><strong><<link "Manage Recruiter">><<goto "Recruiter Select">><</link>></strong></span> <span class=cyan>[U]</span>`;
+			r += `<strong><u><span class="pink">${SlaveFullName(V.Recruiter)}</span></u></strong> is working to recruit girls. <span id="manageRecruiter"><strong><<link "Manage Recruiter">><<goto "Recruiter Select">><</link>></strong></span> <span class="cyan">[U]</span>`;
 		} else {
-			r += `You have not selected a Recruiter. <span id="manageRecruiter"><strong><<link "Select one">><<goto "Recruiter Select">><</link>></strong></span> <span class=cyan>[U]</span>`;
+			r += `You have not selected a Recruiter. <span id="manageRecruiter"><strong><<link "Select one">><<goto "Recruiter Select">><</link>></strong></span> <span class="cyan">[U]</span>`;
 		}
 
 		if (V.dojo) {
 			r += `<br>`;
 			if (typeof V.slaveIndices[V.Bodyguard.ID] !== 'undefined') {
-				r += `<strong><u><span class=pink>${SlaveFullName(V.Bodyguard)}</span></u></strong> is serving as your bodyguard. <span id="manageBG"><strong><<link "Manage Bodyguard">><<goto "BG Select">><</link>></strong></span> <span class=cyan>[B]</span>`;
+				r += `<strong><u><span class="pink">${SlaveFullName(V.Bodyguard)}</span></u></strong> is serving as your bodyguard. <span id="manageBG"><strong><<link "Manage Bodyguard">><<goto "BG Select">><</link>></strong></span> <span class="cyan">[B]</span>`;
 			} else {
-				r += `You have not selected a Bodyguard. <span id="manageBG"><strong><<link "Select one">><<goto "BG Select">><</link>></strong></span> <span class=cyan>[B]</span>`;
+				r += `You have not selected a Bodyguard. <span id="manageBG"><strong><<link "Select one">><<goto "BG Select">><</link>></strong></span> <span class="cyan">[B]</span>`;
 			}
 		}
 	}
@@ -137,13 +137,13 @@ App.UI.View.MainLinks = function () {
 			});
 			/* if the interrogated slave has one or more organs ready: */
 			if (slaveOrgans > 0) {
-				r += '<br><span class=yellow>The fabricator has completed ';
+				r += '<br><span class="yellow">The fabricator has completed ';
 				if (slaveOrgans > 1) {
 					r += `${slaveOrgans} organs`;
 				} else {
 					r += 'an organ';
 				}
-				r += ` for </span><<link "<<print $slaves[${i}].slaveName>>">><<set $activeSlave = $slaves[${i}]>><<goto "Slave Interact">><</link>>, <span class=yellow> which `;
+				r += ` for </span><<link "<<print $slaves[${i}].slaveName>>">><<set $activeSlave = $slaves[${i}]>><<goto "Slave Interact">><</link>>, <span class="yellow"> which `;
 				if (slaveOrgans > 1) {
 					r += 'are';
 				} else {
@@ -154,66 +154,66 @@ App.UI.View.MainLinks = function () {
 		}
 	}
 
-	if (V.limbsCompleted > 0) {
-		for (let j = 0; j < V.limbs.length; j++) {
-			if (typeof V.limbs[j] === 'object' || getSlave(V.limbs[j].ID) !== undefined) {
-				let i = V.slaveIndices[V.limbs[j].ID];
-				if (V.limbs[j].weeksToCompletion <= 0) {
-					r += `<br><span class=yellow>The facility has completed a set of limbs for</span> <span id="name"><<print "[[SlaveFullName($slaves[${i}])|Slave Interact][$activeSlave = $slaves[${i}]]]">>,</span> <span class=yellow> which is ready to be attached.</span>`;
+	if (V.adjustProstheticsCompleted > 0) {
+		for (let j = 0; j < V.adjustProsthetics.length; j++) {
+			if (getSlave(V.adjustProsthetics[j].slaveID) !== undefined) {
+				let i = V.slaveIndices[V.adjustProsthetics[j].slaveID];
+				if (V.adjustProsthetics[j].workLeft <= 0) {
+					r += `<br><span class="yellow">The lab has completed <<= addA(setup.prosthetics[$adjustProsthetics[${j}].id].name)>> for</span> <span id="name"><<= "[[SlaveFullName($slaves[${i}])|Slave Interact][$activeSlave = $slaves[${i}]]]">>,</span> <span class="yellow"> which is ready to be attached.</span>`;
 				}
 			} else {
-				V.limbs.splice(j, 1);
+				V.adjustProsthetics.splice(j, 1);
 				j--;
 			}
 		}
 	}
 
-	if (V.completedOrgans.length > 0 && V.limbsCompleted > 0) {
-		r += `<br>[[Implant and Attach|Multiple Organ Implant]] <span class=yellow>all organs and limbs that are ready.</span>`;
+	if (V.completedOrgans.length > 0 && V.adjustProstheticsCompleted > 0) {
+		r += `<br>[[Implant and Attach|Multiple Organ Implant]] <span class="yellow">all organs and prosthetics that are ready.</span>`;
 	} else if (V.completedOrgans.length > 0) {
-		r += `<br>[[Implant|Multiple Organ Implant]] <span class=yellow>all organs that are ready for implantation.</span>`;
-	} else if (V.limbsCompleted > 0) {
-		r += `<br>[[Attach|Multiple Organ Implant]] <span class=yellow>all sets of limbs that are ready to be attached.</span>`;
+		r += `<br>[[Implant|Multiple Organ Implant]] <span class="yellow">all organs that are ready for implantation.</span>`;
+	} else if (V.adjustProstheticsCompleted > 0) {
+		r += `<br>[[Attach|Multiple Organ Implant]] <span class="yellow">all prosthetics that are ready to be attached.</span>`;
 	}
 
 	if (V.slaveCostFactor > 1.05) {
-		r += `<br><span class=yellow>There is a bull market for slaves; the price of slaves is very high.</span>`;
+		r += `<br><span class="yellow">There is a bull market for slaves; the price of slaves is very high.</span>`;
 	} else if (V.slaveCostFactor > 1) {
-		r += `<br><span class=yellow>The slave market is bullish; the price of slaves is high.</span>`;
+		r += `<br><span class="yellow">The slave market is bullish; the price of slaves is high.</span>`;
 	} else if (V.slaveCostFactor < 0.95) {
-		r += `<br><span class=yellow>There is a bear market for slaves; the price of slaves is very low.</span>`;
+		r += `<br><span class="yellow">There is a bear market for slaves; the price of slaves is very low.</span>`;
 	} else if (V.slaveCostFactor < 1) {
-		r += `<br><span class=yellow>The slave market is bearish; the price of slaves is low.</span>`;
+		r += `<br><span class="yellow">The slave market is bearish; the price of slaves is low.</span>`;
 	} else {
 		r += `<br>The slave market is stable; the price of slaves is average.`;
 	}
 
-	r += ` <span id="buySlaves"><strong><<link "Buy Slaves">><<goto "Buy Slaves">><</link>></strong></span> <span class=cyan>[S]</span>`;
+	r += ` <span id="buySlaves"><strong><<link "Buy Slaves">><<goto "Buy Slaves">><</link>></strong></span> <span class="cyan">[S]</span>`;
 	if (V.TSS.schoolSale !== 0) {
-		r += `<br><span class=yellow>For your first purchase, </span><strong>[[The Slavegirl School][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+		r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Slavegirl School][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 	}
 	if (V.GRI.schoolSale !== 0) {
-		r += `<br><span class=yellow>For your first purchase, </span><strong>[[Growth Research Institute][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+		r += `<br><span class="yellow">For your first purchase, </span><strong>[[Growth Research Institute][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 	}
 	if (V.SCP.schoolSale !== 0) {
-		r += `<br><span class=yellow>For your first purchase, </span><strong>[[St. Claver Preparatory][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+		r += `<br><span class="yellow">For your first purchase, </span><strong>[[St. Claver Preparatory][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 	}
 	if (V.TCR.schoolSale !== 0) {
-		r += `<br><span class=yellow>For your first purchase, </span><strong>[[The Cattle Ranch][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+		r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Cattle Ranch][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 	}
 	if (V.HA.schoolSale !== 0) {
-		r += `<br><span class=yellow>For your first purchase, </span><strong>[[The Hippolyta Academy][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+		r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Hippolyta Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 	}
 
 	if (V.seeDicks !== 0) {
 		if (V.LDE.schoolSale !== 0) {
-			r += `<br><span class=yellow>For your first purchase, </span><strong>[[L'École des Enculées][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+			r += `<br><span class="yellow">For your first purchase, </span><strong>[[L'École des Enculées][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 		}
 		if (V.TGA.schoolSale !== 0) {
-			r += `<br><span class=yellow>For your first purchase, </span><strong>[[The Gymnasium-Academy][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Gymnasium-Academy][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 		}
 		if (V.TFS.schoolSale !== 0) {
-			r += `<br><span class=yellow>For your first purchase, </span><strong>[[The Futanari Sisters][$slavesSeen += 1]]</strong><span class=yellow> will sell at half price this week.</span>`;
+			r += `<br><span class="yellow">For your first purchase, </span><strong>[[The Futanari Sisters][$slavesSeen += 1]]</strong><span class="yellow"> will sell at half price this week.</span>`;
 		}
 	}
 	return r;
diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw
new file mode 100644
index 0000000000000000000000000000000000000000..3756a951d1a0242ddba28aaae0de07978817de20
--- /dev/null
+++ b/src/interaction/prostheticConfig.tw
@@ -0,0 +1,508 @@
+:: Prosthetics Config [nobr]
+
+<<switch $prostheticsConfig>>
+
+<<case "main">>
+	<<set $nextButton = "Back", $nextLink = "Slave Interact">>
+	/* get all prosthetics that are ready for this slave */
+	<<if $adjustProstheticsCompleted > 0>>
+		<<set $adjustProsthetics = $adjustProsthetics.filter(function(p) {
+			if (p.workLeft <= 0 && p.slaveID == $activeSlave.ID) {
+				$activeSlave.readyProsthetics.push({id: p.id});
+				$adjustProstheticsCompleted--;
+				return false;
+			}
+			return true;
+		})>>
+	<</if>>
+
+/* base screen START */
+This room is lined with shelves and cabinets, it could be easily mistaken for a storage room if it were not for the examination table in its center.<br>
+<<if $activeSlave.amp != 1>>
+	Your slave $activeSlave.slaveName is obediently waiting for your instructions.
+<<else>>
+	Your slave $activeSlave.slaveName is lying on the table, waiting for your instructions.
+<</if>>
+
+<<if $activeSlave.eyesImplant == 1>><br><br>&nbsp;
+	$He has an ocular implant installed.
+	<<if $activeSlave.eyes == 1>>
+		They are operating normally.
+	<<elseif $activeSlave.eyes == -1>>
+		They are set to blur $his vision.
+	<<else>>
+		They are turned off.
+	<</if>>
+	<br><br>
+	<<if $activeSlave.eyes != 1>>
+		[[Restore vision|Prosthetics Config][$activeSlave.eyes = 1, $prostheticsConfig = "eyes"]] |
+	<</if>>
+	<<if $activeSlave.eyes != -1>>
+		[[Blur|Prosthetics Config][$activeSlave.eyes = -1, $prostheticsConfig = "eyes"]] |
+	<</if>>
+	<<if $activeSlave.eyes != -2>>
+		[[Disable|Prosthetics Config][$activeSlave.eyes = -2, $prostheticsConfig = "eyes"]]
+	<</if>>
+
+	$He currently has $activeSlave.eyeColor lenses equipped.
+
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;
+
+	Swap out $his lenses:
+	<br>
+	Iris Color:
+	[[Blue|Prosthetics Config][$activeSlave.eyeColor = "blue", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Black|Prosthetics Config][$activeSlave.eyeColor = "black", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Brown|Prosthetics Config][$activeSlave.eyeColor = "brown", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Green|Prosthetics Config][$activeSlave.eyeColor = "green", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Turquoise|Prosthetics Config][$activeSlave.eyeColor = "turquoise", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Sky-Blue|Prosthetics Config][$activeSlave.eyeColor = "sky-blue", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Hazel|Prosthetics Config][$activeSlave.eyeColor = "hazel", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Pale-Grey|Prosthetics Config][$activeSlave.eyeColor = "pale-grey", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[White|Prosthetics Config][$activeSlave.eyeColor = "white", $prostheticsConfig = "eyeColor" ,cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Pink|Prosthetics Config][$activeSlave.eyeColor = "pink", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Amber|Prosthetics Config][$activeSlave.eyeColor = "amber", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Red|Prosthetics Config][$activeSlave.eyeColor = "red", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Yellow|Prosthetics Config][$activeSlave.eyeColor = "yellow", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Orange|Prosthetics Config][$activeSlave.eyeColor = "orange", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	<br>
+	Pupil Shape:
+	<br>[[Circular|Prosthetics Config][$activeSlave.pupil = "circular", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Catlike|Prosthetics Config][$activeSlave.pupil = "catlike", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Serpent-Like|Prosthetics Config][$activeSlave.pupil = "serpent-like", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Devilish|Prosthetics Config][$activeSlave.pupil = "devilish", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Demonic|Prosthetics Config][$activeSlave.pupil = "demonic", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Hypnotic|Prosthetics Config][$activeSlave.pupil = "hypnotic", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Heart-Shaped|Prosthetics Config][$activeSlave.pupil = "heart-shaped", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Wide-Eyed|Prosthetics Config][$activeSlave.pupil = "wide-eyed", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Almond-Shaped|Prosthetics Config][$activeSlave.pupil = "almond-shaped", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Bright|Prosthetics Config][$activeSlave.pupil = "bright", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Teary|Prosthetics Config][$activeSlave.pupil = "teary", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Vacant|Prosthetics Config][$activeSlave.pupil = "vacant", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Star-Shaped|Prosthetics Config][$activeSlave.pupil = "star-shaped", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Goat-Like|Prosthetics Config][$activeSlave.pupil = "goat-like", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	<br>
+	Sclera Colors:
+	[[White|Prosthetics Config][$activeSlave.sclerae = "white", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Blue|Prosthetics Config][$activeSlave.sclerae = "blue", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Black|Prosthetics Config][$activeSlave.sclerae = "black", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Brown|Prosthetics Config][$activeSlave.sclerae = "brown", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Green|Prosthetics Config][$activeSlave.sclerae = "green", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Turquoise|Prosthetics Config][$activeSlave.sclerae = "turquoise", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Sky-Blue|Prosthetics Config][$activeSlave.sclerae = "sky-blue", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Hazel|Prosthetics Config][$activeSlave.sclerae = "hazel", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Pale-Grey|Prosthetics Config][$activeSlave.sclerae = "pale-grey", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Pink|Prosthetics Config][$activeSlave.sclerae = "pink", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Amber|Prosthetics Config][$activeSlave.sclerae = "amber", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Red|Prosthetics Config][$activeSlave.sclerae = "red", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Yellow|Prosthetics Config][$activeSlave.sclerae = "yellow", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Orange|Prosthetics Config][$activeSlave.sclerae = "orange", $prostheticsConfig = "eyeColor", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+<</if>>
+
+<<if $activeSlave.earImplant == 1>><br><br>&nbsp;
+	$He has a cochlear implant installed.
+	<<if $activeSlave.hears == 0>>
+		They are operating normally.
+	<<elseif $activeSlave.hears == -1>>
+		They are set to muffle $his hearing.
+	<<else>>
+		They are turned off.
+	<</if>>
+	<br><br>
+	<<if $activeSlave.hears != 0>>
+		[[Restore hearing|Prosthetics Config][$activeSlave.hears = 0, $prostheticsConfig = "hearing"]] |
+	<</if>>
+	<<if $activeSlave.hears != -1>>
+		[[Muffle|Prosthetics Config][$activeSlave.hears = -1, $prostheticsConfig = "hearing"]] |
+	<</if>>
+	<<if $activeSlave.hears != -2>>
+		[[Disable|Prosthetics Config][$activeSlave.hears = -2, $prostheticsConfig = "hearing"]]
+	<</if>>
+<</if>>
+
+<<if $activeSlave.electrolarynx == 1>><br><br>&nbsp;
+	$He has an electrolarynx installed.
+	<<if $activeSlave.voice == 0>>
+		It is turned off.
+	<<elseif $activeSlave.voice == 1>>
+		It is set to its "deep voice" setting.
+	<<elseif $activeSlave.voice == 2>>
+		It is set to its "normal voice" setting.
+	<<elseif $activeSlave.voice == 3>>
+		It is set to its "high voice" setting.
+	<</if>>
+	<br><br>
+	<<if $activeSlave.voice != 0>>
+		[[Disable|Prosthetics Config][$activeSlave.voice = 0, $prostheticsConfig = "voice"]] |
+	<</if>>
+	<<if $activeSlave.voice != 1>>
+		[[Deep voice setting|Prosthetics Config][$activeSlave.voice = 1, $prostheticsConfig = "voice"]] |
+	<</if>>
+	<<if $activeSlave.voice != 2>>
+		[[Standard voice setting|Prosthetics Config][$activeSlave.voice = 2, $prostheticsConfig = "voice"]] |
+	<</if>>
+	<<if $activeSlave.voice != 3>>
+		[[High voice setting|Prosthetics Config][$activeSlave.voice = 3, $prostheticsConfig = "voice"]]
+	<</if>>
+<</if>>
+
+<<if $activeSlave.readyProsthetics.length > 0>>
+	<br><br>
+	<<if $activeSlave.fuckdoll != 0>>
+		// A Fuckdoll can't use prosthetic limbs. //
+	<<elseif $activeSlave.amp == 0>>
+		// $He must be an amputee to attach prosthetic limbs. //
+	<<elseif $activeSlave.PLimb == 0>>
+		// $He must have a prosthetic interface installed to attach prosthetic limbs. //
+	<<else>>
+		<<if $activeSlave.amp < 0>>
+			//$He currently has
+			<<switch $activeSlave.amp>>
+			<<case -1>> <<= addA(setup.prosthetics.basicL.name)>>
+			<<case -2>> <<= addA(setup.prosthetics.sexL.name)>>
+			<<case -3>> <<= addA(setup.prosthetics.beautyL.name)>>
+			<<case -4>> <<= addA(setup.prosthetics.combatL.name)>>
+			<<case -5>> <<= addA(setup.prosthetics.cyberneticL.name)>>
+			<</switch>>
+			installed.//<br>
+			<<link "Detach <<= $his>> limbs" "Prosthetics Config">>
+				<<set $activeSlave.amp = 0, $prostheticsConfig = "removeLimbs">>
+			<</link>>
+			<br><br>
+		<</if>>
+		/*TODO save .legsTat and .armsTat / link them to prosthetic*/
+		<<if $activeSlave.amp != -1 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "basicL"}) != -1>>
+			<<link "Attach <<= addA(setup.prosthetics.basicL.name)>>" "Prosthetics Config">>
+				<<set $activeSlave.amp = -1, $prostheticsConfig = "basicPLimbs">>
+			<</link>>
+			<br>
+		<</if>>
+		<<if $activeSlave.amp != -2 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "sexL"}) != -1>>
+			<<link "Attach <<= addA(setup.prosthetics.sexL.name)>>" "Prosthetics Config">>
+				<<set $activeSlave.amp = -2, $prostheticsConfig = "sexPLimbs">>
+			<</link>>
+			<br>
+		<</if>>
+		<<if $activeSlave.amp != -3 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "beautyL"}) != -1>>
+			<<link "Attach <<= addA(setup.prosthetics.beautyL.name)>>" "Prosthetics Config">>
+				<<set $activeSlave.amp = -3, $prostheticsConfig = "beautyPLimbs">>
+			<</link>>
+			<br>
+		<</if>>
+		<<if $activeSlave.amp != -4 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "combatL"}) != -1>>
+			<<link "Attach <<= addA(setup.prosthetics.combatL.name)>>" "Prosthetics Config">>
+				<<set $activeSlave.amp = -4, $prostheticsConfig = "combatPLimbs">>
+			<</link>>
+			<br>
+		<</if>>
+		<<if $activeSlave.amp != -5 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "cyberneticL"}) != -1>>
+			<<if $activeSlave.PLimb == 2>>
+				<<link "Attach <<= addA(setup.prosthetics.cyberneticL.name)>>" "Prosthetics Config">>
+					<<set $activeSlave.amp = -5, $prostheticsConfig = "cyberPLimbs">>
+				<</link>>
+			<<else>>
+				// $He must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach <<= addA(setup.prosthetics.cyberneticL.name)>>. //
+			<</if>>
+		<</if>>
+	<</if>>
+<</if>>
+
+<<if $activeSlave.PTail == 1>><br><br>
+	$He has a neural tail interface installed. You can assign and adjust $his tail here.
+	<<if $activeSlave.tail != "none">><br>&nbsp;
+		$He currently has a tail attached, if you wish to change it you will first need to detach it.<br>
+		[[Detach|Prosthetics Config][$prostheticsConfig = "detachTail",$nextButton = "Continue", $nextLink = "Prosthetics Config"]]
+	<<else>><br>&nbsp;
+		<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "modT"})>>
+			Attach a modular tail designed to look like a:<br>
+			[[Cat's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailShape = "neko", $activeSlave.tailColor = $activeSlave.hColor]]
+			| [[Dog's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailShape = "inu", $activeSlave.tailColor = $activeSlave.hColor]]
+			| [[Fox's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailShape = "kit", $activeSlave.tailColor = $activeSlave.hColor]]
+			| [[Kitsune's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailShape = "kitsune", $activeSlave.tailColor = $activeSlave.hColor]]
+			| [[Tanuki's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailShape = "tanuki", $activeSlave.tailColor = $activeSlave.hColor]]
+			| [[Cow's Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "mod", $activeSlave.tailColor = "ushi", $activeSlave.tailColor = $activeSlave.hColor]]
+			<br>
+		<</if>>
+		<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "combatT"})>>
+			[[Attach Combat Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "combat", $activeSlave.tailColor = "jet black"]]
+		<</if>>
+		<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "sexT"})>>
+			| [[Attach Pleasure Tail|Prosthetics Config][$prostheticsConfig = "attachTail", $activeSlave.tail = "sex", $activeSlave.tailColor = "pink"]]
+		<</if>>
+	<</if>>
+<<else>><br><br>
+	$He does not have a neural tail interface installed so you cannot attach a tail.
+<</if>>
+<<if $activeSlave.tail == "mod">><br>
+	$He currently has a modular tail, styled to look like
+	<<if $activeSlave.tailShape == "neko">>
+		a long, slender cat tail.
+	<<elseif $activeSlave.tailShape == "inu">>
+		a bushy dog tail.
+	<<elseif $activeSlave.tailShape == "kit">>
+		a soft, fluffy fox tail.
+	<<elseif $activeSlave.tailShape == "kitsune">>
+		three incredibly soft, fluffy fox tails.
+	<<elseif $activeSlave.tailShape == "tanuki">>
+		a long, fluffy tanuki tail.
+	<<elseif $activeSlave.tailShape == "ushi">>
+		a long cow tail.
+	<</if>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;
+
+	Modify $his tail's appearance:<br>
+	[[Cat|Prosthetics Config][$activeSlave.tailShape = "neko", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Dog|Prosthetics Config][$activeSlave.tailShape = "inu", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Fox|Prosthetics Config][$activeSlave.tailShape = "kit", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Kitsune|Prosthetics Config][$activeSlave.tailShape = "kitsune", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Tanuki|Prosthetics Config][$activeSlave.tailShape = "tanuki", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+	| [[Bovine|Prosthetics Config][$activeSlave.tailShape = "ushi", cashX(forceNeg($modCost), "slaveMod", $activeSlave)]]
+<</if>>
+
+<<if $activeSlave.readyProsthetics.length > 0>>
+	<br><br>
+	These prosthetics are in storage or already equipped by $him:<br>
+	<<for _p range $activeSlave.readyProsthetics>>
+		&nbsp;&nbsp;<<= capFirstChar(setup.prosthetics[_p.id].name)>> <br>
+	<</for>>
+<</if>>
+
+<br><br>
+Fit prosthetics to $him:
+<<for _p range setup.prostheticIDs>>
+	<<if _p != "erectile">> /* exclude erectile implant */
+		<<if $adjustProsthetics.findIndex(function(p) {return p.id == _p && p.slaveID == $activeSlave.ID}) != -1 || $researchLab.tasks.findIndex(function(p) {return p.type == "craftFit" && p.id == _p && p.slaveID == $activeSlave.ID}) != -1>><br>
+			//<<= capFirstChar(addA(setup.prosthetics[_p].name))>> is already being fitted to $him.//
+		<<elseif setup.prosthetics[_p].level > $prostheticsUpgrade>><br>
+			//You need better contracts to buy <<= addA(setup.prosthetics[_p].name)>>.//
+		<<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == _p}) == -1>>
+			<br>
+			<<capture _p>>
+			<<if $prosthetics[_p].amount > 0>>
+				<<link "Fit <<= addA(setup.prosthetics[_p].name)>> from storage to <<= $him>>" "Prosthetics Config">>
+					<<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: $activeSlave.ID}), $prosthetics[_p].amount -= 1>>
+				<</link>>
+			<<else>>
+				<<link "Buy and fit <<= addA(setup.prosthetics[_p].name)>> to <<= $him>>" "Prosthetics Config">>
+					<<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: $activeSlave.ID}), cashX(forceNeg(setup.prosthetics[_p].costs), "slaveMod", $activeSlave)>>
+				<</link>>
+				//Costs <<= cashFormat(setup.prosthetics[_p].costs)>>.//
+			<</if>>
+			<<if $researchLab.level > 0 & $prosthetics[_p].research > 0>>
+				<br>&nbsp;&nbsp;
+				<<link "Construct <<= addA(setup.prosthetics[_p].name)>> for <<= $him>>" "Prosthetics Config">>
+					<<set $researchLab.tasks.push({
+						type: "craftFit",
+						id: _p,
+						workLeft: (setup.prosthetics[_p].adjust + setup.prosthetics[_p].craft) / 1.5,
+						slaveID: $activeSlave.ID})>>
+					/* 1.5: longer than adjust, but faster than adjust+craft. */
+				<</link>>
+				//Will take longer than fitting an existing prosthetic but faster than first building it and than fitting it to $him.//
+			<</if>>
+			<</capture>>
+		<</if>>
+	<</if>>
+<</for>>
+
+/* base screen END */
+
+<<case "eyeColor">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<if $activeSlave.amp != 1>>You have $him lie down and<<else>>You<</if>> use a speculum to keep $his eyes open while you disengage $his lenses remotely and swap them out with $his new $activeSlave.eyeColor lenses<<if $activeSlave.pupil != "circular" || $activeSlave.sclerae != "white">> with <<if $activeSlave.pupil != "circular" >>$activeSlave.pupil pupils<</if>><<if $activeSlave.pupil != "circular" && $activeSlave.sclerae != "white">> and <</if>><<if $activeSlave.sclerae != "white" >>$activeSlave.sclerae sclerae<</if>><</if>>.
+
+<<case "eyes">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<if $activeSlave.eyes == 1>>
+		$He blinks as $his vision returns.
+	<<elseif $activeSlave.eyes == -1>>
+		$He squints at you as $his vision becomes a blur.
+	<<else>>
+		$He has a panicked expression when $his vision suddenly goes out.
+	<</if>>
+
+<<case "basicPLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>>
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
+		<<if $activeSlave.devotion > 20>>
+			$He's overwhelmed with gratitude and thanks you profusely the first chance $he gets. $He follows the acclimation program diligently, doing $his best to learn how to be a good slave despite, or sometimes even because of, $his artificial arms and legs.
+		<<elseif $activeSlave.devotion >= -20>>
+			$He's overwhelmed with gratitude in part because $he didn't think you'd do something like this for $him. $He thanks you profusely the first chance $he gets, and follows the acclimation program diligently, trying to deserve the expense you went to.
+		<<else>>
+			Despite $his hatred of you, $he can't help but notice that you clearly have a plan for $him that involves putting a good deal of value into $him. Your goals might not be $hers, but at least $he has an indication that you're not toying with $him.
+		<</if>>
+	<</if>>
+
+<<case "sexPLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>>
+	While exiting the prosthetics lab $he is experimenting with $his new arms and legs.
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
+		<<if $activeSlave.devotion <= 20>>
+			$He rapidly discovers that $his fingertips are now vibrators, and then makes a mess when $he figures out that $his hands can dispense lube without figuring out how to make them stop dispensing lube. $He's frustrated and frightened, realizing that even $his prosthetics are now customized to suit $his purpose as a human sex toy. $He knew $he was a toy before, but somehow, being a literal vibrator is a bit much for $him.
+		<<elseif $activeSlave.energy > 95>>
+			Since $he's a nympho, $he discovers $his new sexual functions in a hurry. They trigger in part is based on arousal, and $he's never not aroused, so they activate one by one as $he leaves the surgery. The vibration, lube, and other dirty functions surprise $him, and it takes $him a moment to realize what's going on, but $he begins to breathe hard when $he understands.
+		<<else>>
+			$He discovers $his sexy new functions one by one. The vibration, lube, and other dirty functions surprise $him, and it takes $him a moment to realize what's going on, but $he begins to shake with amusement when $he understands. $He heads off to try them out.
+		<</if>>
+	<</if>>
+
+<<case "beautyPLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>> $He exits the prosthetic lab <<if canSee($activeSlave)>>marveling at the beautiful, natural appearance of $his new arms and legs<<else>>thanking you for $his new arms and legs, unaware of how natural they look<</if>>.
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
+		<<if $activeSlave.devotion <= 20>>
+			If $he doubts that you have some sort of long term plan for $him, all $he has to do is <<if canSee($activeSlave)>>look down and examine<<else>>feel<</if>> $his elegant, natural prosthetics, which are often mistaken for the genuine article. Even $he makes the mistake at times as $he gets used to them.
+		<<elseif $activeSlave.skill.entertainment >= 100>>
+			Since $he's a masterful entertainer, $he knows multiple styles of dance, though $his straightforward modern prosthetics never allowed $him to be anything more than a mechanically competent dancer. $He finds that $he has far better balance now, in addition to looking more natural. Before long, $he goes //en pointe// and holds the position, before collapsing in a heap. It soon becomes apparent that this wasn't due to clumsiness: $he's sobbing so hard $he can barely breathe. $He thanks you profusely the next time $he sees you, eyes still puffy with tears of joy.
+		<<else>>
+			When $he first <<if canSee($activeSlave)>>catches sight of $himself in a mirror<<else>>runs a new finger over $his natural feeling skin<</if>>, $he begins to cry. Terribly complex emotions war across $his face: gratitude, joy, regret, and something undefinable. Blinking, $he uses newly elegant fingertips to trace the scarcely visible seams where $his artificial and natural skin meet. $He thanks you profusely the next time $he sees you, eyes still puffy with tears.
+		<</if>>
+	<</if>>
+
+<<case "combatPLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>> While exiting the prosthetic lab $he is wondering over the bulky <<if canSee($activeSlave)>>appearance<<else>>weight<</if>> of $his reinforced arms and legs.
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
+		<<if $activeSlave.devotion <= 20>>
+			$He's frightened, once $he discovers what $he can do, and what $he is. $His integral weapons are locked out by the arcology systems, for now, but $he quickly realizes what they are. $He is not, to say the least, thrilled by the revelation that $he is now a living weapon, and is kept awake by thoughts of what you might be planning for $him.
+		<<elseif ($activeSlave.skill.combat == 1) && ($activeSlave.devotion > 75)>>
+			$He leaves the prosthetic lab with a purpose, $his footsteps a bit heavier than before. $He heads down to the armory's range, still naked, and when $he gets there, $he places $his dominant hand over $his thigh on that side. It folds open, revealing a handgun, which $he draws and empties into a <<if canSee($activeSlave)>>target<<else>>beeping target<</if>>; as $he fires the last rounds, $he uses $his off hand to reach down to that thigh, which folds open and reveals spare magazines. $He knows that $his prosthetics are a wash, at best, in terms of actual combat effectiveness; they'll never match the reliability and dexterity of the genuine article. But $he thinks they are //cool.//
+		<<else>>
+			$He has mixed feelings about what $he soon discovers. $He's a living weapon now, and has to live with the constant knowledge that $he can incapacitate or kill with nothing more than what's contained within $his arms and legs. $He's touched, though, by the tremendous trust this shows. $He knows that the arcology would instantly lock out $his weapons if $he were to misbehave, but $he's still affected.
+		<</if>>
+	<</if>>
+
+<<case "cyberPLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>> $He exits the prosthetic lab marveling <<if canSee($activeSlave)>>at the shiny artificial skin of $his new arms and legs<<else>>at the feel of the artificial skin of $his new arms and legs under $his new fingers<</if>>.
+	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
+		<<if $activeSlave.devotion <= 20>>
+			$He's frightened, once $he discovers what $he can do, and what $he is. $His cybernetic limbs are restricted by the arcology systems, for now, but $he quickly realizes what they are. $He is not, to say the least, thrilled by the revelation that $he is now a living weapon, and is kept awake by thoughts of what you might be planning for $him.
+		<<elseif ($activeSlave.skill.combat == 1) && ($activeSlave.devotion > 75)>>
+			$He leaves the surgery with a purpose, $his footsteps a bit heavier than before. $He heads down to the armory's range, still naked, and when $he gets there, $he places $his dominant hand over $his thigh on that side. It folds open, revealing a handgun, which $he draws and empties into a <<if canSee($activeSlave)>>target<<else>>beeping target<</if>>; as $he fires the last rounds, $he uses $his off hand to reach down to that thigh, which folds open and reveals spare magazines. $He knows that $his prosthetics will enhance $his combat effectiveness and $he thinks they are //cool.//
+		<<else>>
+			$He has mixed feelings about what $he soon discovers. $He's a living weapon now, and has to live with the constant knowledge that $he can incapacitate or kill with nothing more than $his arms and legs themselves. $He's touched, though, by the tremendous trust this shows. $He knows that the arcology would instantly lock out $his limbs if $he were to misbehave, but $he's still affected.
+		<</if>>
+	<</if>>
+
+<<case "removeLimbs">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<set $activeSlave.amp = 1>>
+	Due to built-in safeties it is necessary to remove each limb separately, first releasing the lock and then waiting for automated seal release.<br>
+	<<if ($activeSlave.devotion > 20)>>
+		You instruct $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<elseif canHear($activeSlave)>>listens<<else>>waits<</if>> with interest as you work.<<if ($activeSlave.devotion > 50)>> As you remove the last limb $he playfully wiggles $his stumps at you.<</if>>
+	<<else>>
+		You order $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<elseif canHear($activeSlave)>>listens<<else>>waits<</if>> with a bitter expression as you work.
+	<</if>>
+
+<<case "hearing">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<if $activeSlave.hears == 0>>
+		$He tilts $his head as $his hearing returns.
+	<<elseif $activeSlave.hears == -1>>
+		$He shakes $his head as $his hearing becomes muffled.
+	<<else>>
+		$He has a panicked expression when $his hearing is suddenly silenced.
+	<</if>>
+
+<<case "voice">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<if $activeSlave.voice == 0>>
+		$He tries testing out $his new voice, only to discover $he's been made mute.
+	<<elseif $activeSlave.voice == 1>>
+		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, deep voice.
+	<<elseif $activeSlave.voice == 2>>
+		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, normal voice.
+	<<elseif $activeSlave.voice == 3>>
+		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, high voice.
+	<</if>>
+
+<<case "detachTail">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	<<if $activeSlave.tail == "mod">><<set $stockpile.modPTail += 1>>
+	<<elseif $activeSlave.tail == "combat">><<set $stockpile.warPTail += 1>>
+	<<elseif $activeSlave.tail == "sex">><<set $stockpile.sexPTail += 1>>
+	<</if>>
+	<<set $activeSlave.tail = "none">><<set $activeSlave.tailShape = "none">><<set $activeSlave.tailColor = "none">>
+	You send the release signal and the mechanical lock disengages allowing the artificial tail to pop right off.
+
+<<case "attachTail">>
+	<<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Config">>
+	Attaching $his tail is a simple procedure, you simply push the connector into a socket, right where $his tailbone ends, until the lock engages.<br>
+	When you are done, $he looks back and
+	<<if $activeSlave.tailShape == "neko">>sways $his tail side to side enigmatically.
+	<<elseif $activeSlave.tailShape == "inu">>wags $his tail side to side energetically.
+	<<elseif $activeSlave.tailShape == "kit">>slowly sways $his tail feeling the soft fur brush against $his skin.
+	<<elseif $activeSlave.tailShape == "kitsune">>slowly sways $his tails luxuriating in the incredibly soft, fluffy fur brushing against $his skin.
+	<<elseif $activeSlave.tailShape == "tanuki">>admires $his long, thick fluffy tail.
+	<<elseif $activeSlave.tailShape == "ushi">>swats $himself playfully.
+	<<elseif $activeSlave.tail == "combat">>experimentally whips the long tail side to side then takes aim at a prepared fruit, lashes out with blinding speed and smiles as it explodes into chunks.
+	<<elseif $activeSlave.tail == "sex">>accidentally engages the vibrating and lube functions, startling $him and making quite a mess.
+	<<else>>admires $his new tail.
+	<</if>>
+
+<<case "interface">>
+	<span id="attach">
+	<<set _first = 1>>
+	/*TODO save .legsTat and .armsTat / link them to prosthetic*/
+	<<if $activeSlave.amp != -1 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "basicL"}) != -1>>
+		<<if _first>>
+			<br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br>
+			<<set _first = 0>>
+		<</if>>
+		<<link "Attach <<= addA(setup.prosthetics.basicL.name)>>">>
+			<<set $activeSlave.amp = -1, $prostheticsConfig = "basicPLimbs">>
+			<<replace #attach>><br><br><<include "Prosthetics Config">><<set $nextLink = "Remote Surgery">><</replace>>
+		<</link>>
+		<br>
+	<</if>>
+	<<if $activeSlave.amp != -2 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "sexL"}) != -1>>
+		<<if _first>>
+			<br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br>
+			<<set _first = 0>>
+		<</if>>
+		<<link "Attach <<= addA(setup.prosthetics.sexL.name)>>">>
+			<<set $activeSlave.amp = -2, $prostheticsConfig = "sexPLimbs">>
+			<<replace #attach>><br><br><<include "Prosthetics Config">><<set $nextLink = "Remote Surgery">><</replace>>
+		<</link>>
+		<br>
+	<</if>>
+	<<if $activeSlave.amp != -3 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "beautyL"}) != -1>>
+		<<if _first>>
+			<br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br>
+			<<set _first = 0>>
+		<</if>>
+		<<link "Attach <<= addA(setup.prosthetics.beautyL.name)>>">>
+			<<set $activeSlave.amp = -3, $prostheticsConfig = "beautyPLimbs">>
+			<<replace #attach>><br><br><<include "Prosthetics Config">><<set $nextLink = "Remote Surgery">><</replace>>
+		<</link>>
+		<br>
+	<</if>>
+	<<if $activeSlave.amp != -4 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "combatL"}) != -1>>
+		<<if _first>>
+			<br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br>
+			<<set _first = 0>>
+		<</if>>
+		<<link "Attach <<= addA(setup.prosthetics.combatL.name)>>">>
+			<<set $activeSlave.amp = -4, $prostheticsConfig = "combatPLimbs">>
+			<<replace #attach>><br><br><<include "Prosthetics Config">><<set $nextLink = "Remote Surgery">><</replace>>
+		<</link>>
+		<br>
+	<</if>>
+	<<if $activeSlave.amp != -5 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "cyberneticL"}) != -1>>
+		<<if $activeSlave.PLimb == 2>>
+			<<if _first>>
+				<br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br>
+				<<set _first = 0>>
+			<</if>>
+			<<link "Attach <<= addA(setup.prosthetics.cyberneticL.name)>>" "Prosthetics Config">>
+				<<set $activeSlave.amp = -5, $prostheticsConfig = "cyberPLimbs">>
+				<<replace #attach>><br><br><<include "Prosthetics Config">><<set $nextLink = "Remote Surgery">><</replace>>
+			<</link>>
+		<</if>>
+	<</if>>
+	</span>
+
+<</switch>>
diff --git a/src/interaction/prothesticLab.tw b/src/interaction/prothesticLab.tw
new file mode 100644
index 0000000000000000000000000000000000000000..8f3cc31836f3ef8695ca00f07a7d5c19e507dd6d
--- /dev/null
+++ b/src/interaction/prothesticLab.tw
@@ -0,0 +1,221 @@
+:: Prosthetic Lab [nobr]
+
+<<set $nextButton = "Back", $nextLink = "Main">>
+
+<<set $researchLab.speed = (($researchLab.hired * 3) + $researchLab.menials) * $researchLab.aiModule>>
+
+Prosthetic Lab
+<hr><br>
+
+<<if $adjustProsthetics.length > 0>>
+	Currently adjusting these prosthetics:<br>
+	<<for _p range $adjustProsthetics>>
+		&nbsp;&nbsp;<<= capFirstChar(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>><br>
+	<</for>>
+<<else>>
+	//Currently there are no prosthetics being fit to a slave.//
+<</if>>
+
+<<if $researchLab.level > 0>>
+	<br><br>Research Department
+	<hr>
+	//You switch one of the screens in your office to the feed from your research facility.//
+
+	<br><br>
+	__Personnel__
+	<br><br>
+
+	<<if $researchLab.aiModule == 1>>
+		[[Buy and install research module|Prosthetic Lab][cashX(forceNeg(35000*$upgradeMultiplierArcology), "capEx"), $researchLab.aiModule = 2]] //This module enables your personal assistant to assist staff and direct menials assigned to your research facility, increasing efficiency. It costs <<= cashFormat(35000*$upgradeMultiplierArcology)>>//<br>
+	<</if>>
+	<<if ($researchLab.hired + $researchLab.menials) == 0>>
+		//Facility is currently unstaffed.//
+	<<else>>
+		//You have
+		<<if $researchLab.hired == 1>>
+			one scientist
+		<<elseif $researchLab.hired > 1>>
+			$researchLab.hired scientists
+		<</if>>
+		<<if $researchLab.hired > 0 && $researchLab.menials > 0 >> and<</if>>
+		<<if $researchLab.menials == 1>>
+			one menial slave
+		<<elseif $researchLab.menials > 1>>
+			$researchLab.menials menials
+		<</if>>
+		working in your lab.
+			<<setAssistantPronouns>>
+			<<if $researchLab.aiModule > 1>>Occasionally you hear the voice of your assistant as _heA helps direct and organize work.<</if>>//
+	<</if>>
+	<br>
+
+	&nbsp;Currently, this facility can employ $researchLab.maxSpace people.
+	<<if $researchLab.maxSpace == 5>>
+		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 10]]
+		//Costs <<= cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
+	<<elseif $researchLab.maxSpace == 10>>
+		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 20]]
+		//Costs <<= cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
+	<<elseif $researchLab.maxSpace == 20>>
+		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 30]]
+		//Costs <<= cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
+	<<elseif $researchLab.maxSpace == 30>>
+		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 40]]
+		//Costs <<= cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
+	<<elseif $researchLab.maxSpace == 40>>
+		[[Expand facility|Prosthetic Lab][cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 50]]
+		//Costs <<= cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>//
+	<<elseif $researchLab.maxSpace == 50>>
+		//Facility is fully expanded.//
+	<</if>>
+	<br><br>&nbsp;
+
+	<<if ($researchLab.hired + $researchLab.menials) < $researchLab.maxSpace>>
+		Hire [[x1|Prosthetic Lab][$researchLab.hired += 1,cashX(-2000, "lab")]]
+		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5>>
+			| [[x5|Prosthetic Lab][$researchLab.hired += 5,cashX(-10000, "lab")]]
+		<</if>>
+		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10>>
+			| [[x10|Prosthetic Lab][$researchLab.hired += 10,cashX(-10000, "lab")]]
+		<</if>>
+		scientists.<br>
+		&nbsp;&nbsp;&nbsp;//Each scientist will require an initial fee of <<= cashFormat(2000)>> and incur <<= cashFormat(300)>> weekly.//
+		<br>
+		<<if $menials > 0>>
+			Assign [[x1|Prosthetic Lab][$researchLab.menials += 1,$menials -= 1]]
+			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5 && $menials >= 5>>
+				| [[x5|Prosthetic Lab][$researchLab.menials += 5,$menials -= 5]]
+			<</if>>
+			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10 && $menials >= 10>>
+				| [[x10|Prosthetic Lab][$researchLab.menials += 10,$menials -= 10]]
+			<</if>>
+			menial slaves to lab.<br>
+		<<else>>You do not own any <<if $researchLab.menials != 0>>unassigned <</if>>menial slaves.<br>
+		<</if>>
+		&nbsp;&nbsp;&nbsp;//Using menial slaves is much cheaper than hiring scientists, but they are less effective. <<= cashFormat(100)>> per slave each week.//<br>
+	<<else>>
+		&nbsp;&nbsp;&nbsp;//Facility is fully staffed.//
+	<</if>>
+	<br>
+	<<if $researchLab.hired > 0>>&nbsp;
+		Fire [[x1|Prosthetic Lab][$researchLab.hired -= 1]]
+		<<if $researchLab.hired >= 5>>
+			| [[x5|Prosthetic Lab][$researchLab.hired -= 5]]
+		<</if>>
+		<<if $researchLab.hired >= 10>>
+			| [[x10|Prosthetic Lab][$researchLab.hired -= 10]]
+		<</if>>
+		| [[All|Prosthetic Lab][$researchLab.hired = 0]]
+		scientists.
+	<</if>>
+	<<if $researchLab.menials > 0>><br>&nbsp;
+		Dismiss [[x1|Prosthetic Lab][$researchLab.menials -= 1,$menials += 1]]
+		<<if $researchLab.menials >= 5>>
+			| [[x5|Prosthetic Lab][$researchLab.menials -= 5,$menials += 5]]
+		<</if>>
+		<<if $researchLab.menials >= 10>>
+			| [[x10|Prosthetic Lab][$researchLab.menials -= 10,$menials += 10]]
+		<</if>>
+		| [[All|Prosthetic Lab][$menials += $researchLab.menials, $researchLab.menials = 0]]
+		menial slaves.
+	<</if>>
+
+	<br><br>
+
+	__Tasks__
+
+	<br><br>
+
+	<<if $researchLab.tasks.length > 0>>
+		<<set _j = 0>>
+		<<if $researchLab.speed > 0>>
+			The following tasks are queued:
+		<<else>>
+			You have projects planned but without researchers you won't be able to work on them:
+		<</if>>
+		<br>
+		<<for _i = 0; _i < $researchLab.tasks.length; _i++>>
+			&nbsp;
+			<<switch $researchLab.tasks[_i].type>>
+			<<case "research">>
+				You <<if _i == 0>>are researching<<else>> plan to research<</if>>
+			<<case "craft">>
+				You <<if _i == 0>>are constructing<<else>> plan to construct<</if>>
+			<<case "craftFit">>
+				For @@.yellow;<<= SlaveFullName($slaves[$slaveIndices[$researchLab.tasks[_i].slaveID]])>>@@ you <<if _i == 0>>are constructing<<else>> plan to construct<</if>>
+			<<default>>
+				@@.red;Error: Unknown $researchLab.tasks[].type: $researchLab.tasks[_i].type@@
+			<</switch>>
+			<<set _j += $researchLab.tasks[_i].workLeft>>
+			@@.yellow;<<= capFirstChar(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@.
+			<<if $researchLab.speed > 0>>
+				Finished in approximately <<= (Math.floor(_j / $researchLab.speed) + 1)>> week(s).
+			<</if>>
+
+			<<if $researchLab.tasks[_i].type == "research">>
+				<<set _link = "Cancel: Will not return investments.">>
+			<<else>>
+				<<set _link = "Cancel">>
+			<</if>>
+			<<capture _i>>
+				<<link _link "Prosthetic Lab">>
+					<<if $researchLab.tasks[_i].type == "research">>
+						<<set $prosthetics[$researchLab.tasks[_i].id].research = 0>>
+					<</if>>
+					<<set $researchLab.tasks.deleteAt(_i)>>
+				<</link>>
+			<</capture>>
+
+			<br>
+		<</for>>
+	<<else>>
+		//Currently the research lab has no tasks planned.//
+	<</if>>
+
+	<br><br>
+
+	__Research__
+	<br><br>
+
+	&nbsp;Available research projects:<br>
+	<<for _p range setup.prostheticIDs>>
+		<<if $prosthetics[_p].research == 0>>
+			<<if _p != "erectile">> /*excludes erectile*/
+			&nbsp;&nbsp;
+			<<if setup.prosthetics[_p].level <= $prostheticsUpgrade>>
+				<<capture _p>>
+				<<link "Reverse engineer <<= capFirstChar(setup.prosthetics[_p].name)>>" "Prosthetic Lab">>
+					<<set cashX(forceNeg(setup.prosthetics[_p].costs), "lab"), $prosthetics[_p].research = -1, $researchLab.tasks.push({type: "research", id: _p, workLeft: setup.prosthetics[_p].research})>>
+				<</link>>
+				<</capture>>
+					//Costs <<= cashFormat(setup.prosthetics[_p].costs)>> of initial investment.//
+			<<else>>
+				//You need better contracts to get the needed research material for researching <<= capFirstChar(setup.prosthetics[_p].name)>>.//
+			<</if>>
+			<br>
+			<</if>>
+		<</if>>
+	<</for>>
+
+	<br><br>
+	__Manufacture__
+	<br><br>&nbsp;
+
+	Available building projects:<br>
+	<<for _p range setup.prostheticIDs>>
+		<<if $prosthetics[_p].research == 1>>
+			<<if _p != setup.prostheticIDs.erectile>> /*excludes erectile*/
+			&nbsp;&nbsp;
+			<<capture _p>>
+			<<link "Build <<= addA(setup.prosthetics[_p].name)>>" "Prosthetic Lab">>
+				<<set $researchLab.tasks.push({type: "craft", id: _p, workLeft: setup.prosthetics[_p].craft})>>
+			<</link>>
+			<</capture>>
+			<br>
+			<</if>>
+		<</if>>
+	<</for>>
+
+	<br><br>
+	 <<= ResearchLabStockPile()>>
+<</if>>
diff --git a/src/interaction/researchLab.tw b/src/interaction/researchLab.tw
deleted file mode 100644
index 025372716e16d4b1719c6e58f42d0cb8f9455eab..0000000000000000000000000000000000000000
--- a/src/interaction/researchLab.tw
+++ /dev/null
@@ -1,268 +0,0 @@
-:: Research Lab [nobr]
-
-<<switch $temp>>
-
-<<case 0>>
-
-	<<set $nextButton = "Back", $nextLink = "Manage Arcology">>
-
-	//You switch one of the screens in your office to the feed from research facility.//<br><br>
-
-	<br>[[Decommission facility|Manage Arcology][$researchLab.built = "false",$researchLab.hired = 0,$menials += $researchLab.menials,$researchLab.menials = 0,$researchLab.research = "none",$researchLab.manufacture = "none",$researchLab.productionTime = 0]] //Warning! This will cancel all projects, remove all staff and shut down this facility.//
-
-	<br><br>[[Purchase cybernetics|Research Lab][$temp = 1]]
-<br><br>
-	__Personnel__<br><br>&nbsp;
-
-<br>
-	<<if $researchLab.aiModule == 1>>
-		[[Buy and install research module|Research Lab][cashX(-35000, "capEx"), $researchLab.aiModule = 2]] //This module enables your personal assistant to assist staff and direct menials assigned to your research facility, increasing efficiency. It costs <<print cashFormat(35000)>>//<br>
-	<</if>>
-	<<if ($researchLab.hired + $researchLab.menials) == 0>>
-		//Facility is currently unstaffed.//
-	<<else>>
-		//You have
-		<<if $researchLab.hired == 1>>
-			one scientist
-		<<elseif $researchLab.hired > 1>>
-			$researchLab.hired scientists
-		<</if>>
-		<<if $researchLab.menials != 0>> and<</if>>
-		<<if $researchLab.menials == 0>>
-		<<elseif $researchLab.menials == 1>>
-			one menial slave
-		<<elseif $researchLab.menials > 1>>
-			$researchLab.menials menials
-		<</if>>
-		working in your lab.
-			<<setAssistantPronouns>>
-			<<if $researchLab.aiModule != 0>>Occasionally you hear the voice of your assistant as _heA helps direct and organize work.<</if>>//
-	<</if>>
-	<br>
-
-	&nbsp;Currently, this facility can employ $researchLab.maxSpace people.
-	<<if $researchLab.maxSpace == 5>>
-		[[Expand facility|Research Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 10]]
-		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
-	<<elseif $researchLab.maxSpace == 10>>
-		[[Expand facility|Research Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 20]]
-		//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
-	<<elseif $researchLab.maxSpace == 20>>
-		[[Expand facility|Research Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 30]]
-		//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
-	<<elseif $researchLab.maxSpace == 30>>
-		[[Expand facility|Research Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 40]]
-		//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
-	<<elseif $researchLab.maxSpace == 40>>
-		[[Expand facility|Research Lab][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $researchLab.maxSpace = 50]]
-		//Costs <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>//
-	<<elseif $researchLab.maxSpace == 50>>
-		//Facility is fully expanded.//
-	<</if>>
-	<br><br>&nbsp;
-
-	<<if ($researchLab.hired + $researchLab.menials) < $researchLab.maxSpace>>
-		Hire [[x1|Research Lab][$researchLab.hired += 1,cashX(-5000, "lab")]]
-		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5>>
-			| [[x5|Research Lab][$researchLab.hired += 5,cashX(-25000, "lab")]]
-		<</if>>
-		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10>>
-			| [[x10|Research Lab][$researchLab.hired += 10,cashX(-50000, "lab")]]
-		<</if>>
-		scientists.<br>
-		&nbsp;&nbsp;&nbsp;//Each scientist will require an initial fee of <<print cashFormat(5000)>> and incur <<print cashFormat(300)>> weekly.//
-		<br>
-		<<if $menials > 0>>
-			Assign [[x1|Research Lab][$researchLab.menials += 1,$menials -= 1]]
-			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5 && $menials >= 5>>
-				| [[x5|Research Lab][$researchLab.menials += 5,$menials -= 5]]
-			<</if>>
-			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10 && $menials >= 10>>
-				| [[x10|Research Lab][$researchLab.menials += 10,$menials -= 10]]
-			<</if>>
-			menial slaves to lab.<br>
-		<<else>>You do not own any <<if $researchLab.menials != 0>>unassigned <</if>>menial slaves.<br>
-		<</if>>
-		&nbsp;&nbsp;&nbsp;//Using menial slaves is much cheaper than hiring scientists, but they are less effective. <<print cashFormat(100)>> per slave each week.//<br>
-	<<else>>
-		&nbsp;&nbsp;&nbsp;//Facility is fully staffed.//
-	<</if>>
-	<br>
-	<<if $researchLab.hired > 0>>&nbsp;
-		Fire [[x1|Research Lab][$researchLab.hired -= 1]]
-		<<if $researchLab.hired >= 5>>
-			| [[x5|Research Lab][$researchLab.hired -= 5]]
-		<</if>>
-		<<if $researchLab.hired >= 10>>
-			| [[x10|Research Lab][$researchLab.hired -= 10]]
-		<</if>>
-		| [[All|Research Lab][$researchLab.hired = 0]]
-		scientists.
-	<</if>>
-	<<if $researchLab.menials > 0>><br>&nbsp;
-		Dismiss [[x1|Research Lab][$researchLab.menials -= 1,$menials += 1]]
-		<<if $researchLab.menials >= 5>>
-			| [[x5|Research Lab][$researchLab.menials -= 5,$menials += 5]]
-		<</if>>
-		<<if $researchLab.menials >= 10>>
-			| [[x10|Research Lab][$researchLab.menials -= 10,$menials += 10]]
-		<</if>>
-		| [[All|Research Lab][$menials += $researchLab.menials,$researchLab.menials = 0]]
-		menial slaves.
-	<</if>>
-
-	<br><br>
-	__Research__
-	<br><br>&nbsp;
-	<<if $researchLab.research != "none">>
-		//Your lab staff is currently researching @@.yellow;$researchLab.research@@.//<br>
-		[[Cancel Research|Research Lab][$researchLab.productionTime = 0,$researchLab.research = "none"]]
-	<<elseif $researchLab.manufacture != "none">>
-		//Your lab staff is currently busy with other projects.//
-	<<else>>
-		//No research active.//<br>
-		<<if $researchLab.basicPLimbInterface == 0 && $stockpile.basicPLimbInterface > 0>><br>
-			[[Reverse engineer basic prosthetics interface|Research Lab][$researchLab.productionTime = 80,$researchLab.research = "Basic prosthetics interface"]]
-		<</if>>
-		<<if $researchLab.basicPLimbInterface != 0 && $researchLab.advPLimbInterface == 0 && $stockpile.advPLimbInterface > 0>><br>
-			[[Reverse engineer advanced prosthetics interface|Research Lab][$researchLab.productionTime = 120,$researchLab.research = "Advanced prosthetics interface"]]
-		<</if>>
-		<<if $researchLab.basicPLimb == 0 && $stockpile.basicPLimb > 0>><br>
-			[[Reverse engineer basic prosthetic limbs|Research Lab][$researchLab.productionTime = 80,$researchLab.research = "Basic prosthetic limbs"]]
-		<</if>>
-		<<if $researchLab.advSexPLimb == 0 && $stockpile.advSexPLimb > 0>><br>
-			[[Reverse engineer advanced sex limbs|Research Lab][$stockpile.advSexPLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced sex limbs"]]
-		<</if>>
-		<<if $researchLab.advGracePLimb == 0 && $stockpile.advGracePLimb > 0>><br>
-			[[Reverse engineer advanced beauty limbs|Research Lab][$stockpile.advGracePLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced beauty limbs"]]
-		<</if>>
-		<<if $researchLab.advCombatPLimb == 0 && $stockpile.advCombatPLimb > 0>><br>
-			[[Reverse engineer advanced combat limbs|Research Lab][$stockpile.advCombatPLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced combat limbs"]]
-		<</if>>
-		<<if $researchLab.cyberneticPLimb == 0 && $researchLab.advPLimbInterface == 1 && ($researchLab.advSexPLimb + $researchLab.advGracePLimb + $researchLab.advCombatPLimb) >= 1>><br>
-			[[Develop cybernetic limbs|Research Lab][$researchLab.productionTime = 300,$researchLab.research = "Cybernetic limbs"]]
-		<</if>>
-		<<if $researchLab.ocularImplant == 0 && $stockpile.ocularImplant > 0>><br>
-			[[Reverse engineer ocular implants|Research Lab][$stockpile.ocularImplant -= 1,$researchLab.productionTime = 100,$researchLab.research = "Ocular implants"]]
-		<</if>>
-		<<if $researchLab.cochlearImplant == 0 && $stockpile.cochlearImplant > 0>><br>
-			[[Reverse engineer cochlear implants|Research Lab][$stockpile.cochlearImplant -= 1,$researchLab.productionTime = 80,$researchLab.research = "Cochlear implants"]]
-		<</if>>
-		<<if $researchLab.electrolarynx == 0 && $stockpile.electrolarynx > 0>><br>
-			[[Reverse engineer electrolarynx|Research Lab][$stockpile.electrolarynx -= 1,$researchLab.productionTime = 80,$researchLab.research = "Electrolarynx"]]
-		<</if>>
-		/*<<if $researchLab.erectileImplant == 0 && $stockpile.erectileImplant > 0>><br>
-			[[Reverse engineer erectile implant|Research Lab][$stockpile.erectileImplant -= 1,$researchLab.productionTime = 100,$researchLab.research = "Erectile implant"]]
-		<</if>>*/
-	<</if>>
-
-	<br><br>
-	__Manufacture__
-	<br><br>&nbsp;
-	<<if $researchLab.research != "none">>
-		//Your lab staff is currently busy with research.//
-	<<elseif $researchLab.manufacture != "none">>
-		//Your lab staff is currently building @@.yellow;$researchLab.manufacture@@.//
-		[[Cancel Project|Research Lab][$researchLab.productionTime = 0,$researchLab.manufacture = "none"]]
-	<<else>>
-		//No projects currently active.//<br>
-		<<if $researchLab.basicPLimbInterface == 1>><br>
-			[[Build basic prosthetics interface|Research Lab][$researchLab.productionTime = 50,$researchLab.manufacture = "Basic prosthetics interface"]] // Currently have: $stockpile.basicPLimbInterface//
-		<</if>>
-		<<if $researchLab.advPLimbInterface == 1>><br>
-			[[Build advanced prosthetics interface|Research Lab][$researchLab.productionTime = 80,$researchLab.manufacture = "Advanced prosthetics interface"]] // Currently have: $stockpile.advPLimbInterface//
-		<</if>>
-		<<if $researchLab.basicPLimb == 1>><br>
-			[[Build basic prosthetic limbs|Research Lab][$researchLab.productionTime = 20,$researchLab.manufacture = "Basic prosthetic limbs"]] // Currently have: $stockpile.basicPLimb//
-		<</if>>
-		<<if $researchLab.advSexPLimb == 1>><br>
-			[[Build advanced sex limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced sex limbs"]] // Currently have: $stockpile.advSexPLimb//
-		<</if>>
-		<<if $researchLab.advGracePLimb == 1>><br>
-			[[Build advanced beauty limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced beauty limbs"]] // Currently have: $stockpile.advGracePLimb//
-		<</if>>
-		<<if $researchLab.advCombatPLimb == 1>><br>
-			[[Build advanced combat limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced combat limbs"]] // Currently have: $stockpile.advCombatPLimb//
-		<</if>>
-		<<if $researchLab.cyberneticPLimb == 1>><br>
-			[[Build cybernetic limbs|Research Lab][$researchLab.productionTime = 150,$researchLab.manufacture = "Cybernetic limbs"]] // Currently have: $stockpile.cyberneticPLimb//
-		<</if>>
-		<<if $researchLab.ocularImplant == 1>><br>
-			[[Build ocular implants|Research Lab][$researchLab.productionTime = 80,$researchLab.manufacture = "Ocular implants"]] // Currently have: $stockpile.ocularImplant//
-		<</if>>
-		<<if $researchLab.cochlearImplant == 1>><br>
-			[[Build cochlear implants|Research Lab][$researchLab.productionTime = 60,$researchLab.manufacture = "Cochlear implants"]] // Currently have: $stockpile.cochlearImplant//
-		<</if>>
-		<<if $researchLab.electrolarynx == 1>><br>
-			[[Build electrolarynx|Research Lab][$researchLab.productionTime = 60,$researchLab.manufacture = "Electrolarynx"]] // Currently have: $stockpile.electrolarynx//
-		<</if>>
-		/*<<if $researchLab.erectileImplant == 1>><br>
-			[[Build erectile implant|Research Lab][$researchLab.productionTime = 50,$researchLab.manufacture = "Erectile implant"]] // Costs <<print cashFormat(25000)>>. Currently have: $stockpile.erectileImplant//
-		<</if>>*/
-	<</if>>
-
-<<if $researchLab.manufacture != "none"||$researchLab.research != "none">>
-	<br><br> <<= ResearchLabStockPile()>>
-<</if>>
-
-<<case 1>>
-	<<set $temp = 0>>
-	<<set $nextLink = "Research Lab">>
-	//You contact a representative of one of the larger cybernetics companies and inquire about their products.<br>&nbsp;This is what they have to offer://<br><br>
-
-	__Hardware__<br>
-	[[Basic prosthetics interface|Research Lab][$temp = 1, cashX(-25000, "lab"), $stockpile.basicPLimbInterface += 1]] //Costs <<print cashFormat(25000)>>. Currently have: $stockpile.basicPLimbInterface//<br>
-	[[Advanced prosthetics interface|Research Lab][$temp = 1, cashX(-60000, "lab"), $stockpile.advPLimbInterface += 1]] //Costs <<print cashFormat(60000)>>. Currently have: $stockpile.advPLimbInterface//<br>
-	[[Basic prosthetic limbs|Research Lab][$temp = 1, cashX(-15000, "lab"), $stockpile.basicPLimb += 1]] //Costs <<print cashFormat(15000)>>. Currently have: $stockpile.basicPLimb//<br>
-	[[Advanced sex limbs|Research Lab][$temp = 1, cashX(-30000, "lab"), $stockpile.advSexPLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advSexPLimb//<br>
-	[[Advanced beauty limbs|Research Lab][$temp = 1, cashX(-30000, "lab"), $stockpile.advGracePLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advGracePLimb//<br>
-	[[Advanced combat limbs|Research Lab][$temp = 1, cashX(-30000, "lab"), $stockpile.advCombatPLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advCombatPLimb//<br>
-	[[Ocular implants|Research Lab][$temp = 1, cashX(-35000, "lab"), $stockpile.ocularImplant += 1]] //Costs <<print cashFormat(35000)>>. Currently have: $stockpile.ocularImplant//<br>
-	[[Cochlear implants|Research Lab][$temp = 1, cashX(-15000, "lab"), $stockpile.cochlearImplant += 1]] //Costs <<print cashFormat(15000)>>. Currently have: $stockpile.cochlearImplant//<br>
-	[[Electrolarynx|Research Lab][$temp = 1, cashX(-50000, "lab"), $stockpile.electrolarynx += 1]] //Costs <<print cashFormat(50000)>>. Currently have: $stockpile.electrolarynx//<br>
-	/*[[Erectile implant|Research Lab][$temp = 1, cashX(-25000, "lab"), $stockpile.erectileImplant += 1]] //Costs <<print cashFormat(25000)>>. Currently have: $stockpile.erectileImplant//*/
-
-	<br><br>__Schematics__<br>
-	<<if $researchLab.basicPLimbInterface != 1 && $researchLab.research != "Basic prosthetics interface">>
-		[[Basic prosthetics interface|Research Lab][$temp = 1, cashX(-85000, "lab"), $researchLab.basicPLimbInterface = 1]] //Costs <<print cashFormat(85000)>>.//<br>
-	<</if>>
-	<<if $researchLab.advPLimbInterface != 1 && $researchLab.research != "Advanced prosthetics interface">>
-	[[Advanced prosthetics interface|Research Lab][$temp = 1, cashX(-260000, "lab"), $researchLab.advPLimbInterface = 1]] //Costs <<print cashFormat(260000)>>.//<br>
-	<</if>>
-	<<if $researchLab.basicPLimb != 1 && $researchLab.research != "Basic prosthetic limbs">>
-	[[Basic prosthetic limbs|Research Lab][$temp = 1, cashX(-60000, "lab"), $researchLab.basicPLimb = 1]] //Costs <<print cashFormat(60000)>>.//<br>
-	<</if>>
-	<<if $researchLab.advSexPLimb != 1 && $researchLab.research != "Advanced sex limbs">>
-	[[Advanced sex limbs|Research Lab][$temp = 1, cashX(-120000, "lab"), $researchLab.advSexPLimb = 1]] //Costs <<print cashFormat(120000)>>.//<br>
-	<</if>>
-	<<if $researchLab.advGracePLimb != 1 && $researchLab.research != "Advanced beauty limbs">>
-	[[Advanced beauty limbs|Research Lab][$temp = 1, cashX(-120000, "lab"), $researchLab.advGracePLimb = 1]] //Costs <<print cashFormat(120000)>>.//<br>
-	<</if>>
-	<<if $researchLab.advCombatPLimb != 1 && $researchLab.research != "Advanced combat limbs">>
-	[[Advanced combat limbs|Research Lab][$temp = 1, cashX(-120000, "lab"), $researchLab.advCombatPLimb = 1]] //Costs <<print cashFormat(120000)>>.//<br>
-	<</if>>
-	<<if $researchLab.ocularImplant != 1 && $researchLab.research != "Ocular implants">>
-	[[Ocular implants|Research Lab][$temp = 1, cashX(-160000, "lab"), $researchLab.ocularImplant = 1]] //Costs <<print cashFormat(160000)>>.//<br>
-	<</if>>
-	<<if $researchLab.cochlearImplant != 1 && $researchLab.research != "Cochlear implants">>
-	[[Cochlear implants|Research Lab][$temp = 1, cashX(-125000, "lab"), $researchLab.cochlearImplant = 1]] //Costs <<print cashFormat(125000)>>.//<br>
-	<</if>>
-	<<if $researchLab.electrolarynx != 1 && $researchLab.research != "Electrolarynx">>
-	[[Electrolarynx|Research Lab][$temp = 1, cashX(-125000, "lab"), $researchLab.electrolarynx = 1]] //Costs <<print cashFormat(200000)>>.//<br>
-	<</if>>
-	/*<<if $researchLab.erectileImplant != 1 && $researchLab.research != "Erectile implant">>
-	[[Erectile implant|Research Lab][$temp = 1, cashX(-95000, "lab"), $researchLab.erectileImplant = 1]] //Costs <<print cashFormat(95000)>>.//
-	<</if>>*/
-
-<br><br>
-	//You contact a representative of one of the most popular Japanese cybernetics companies and inquire about their products.<br>&nbsp;This is what they have to offer://<br><br>
-
-	__Hardware__<br>
-	[[Neural Tail Interface|Research Lab][$temp = 1, cashX(-10000, "lab"), $stockpile.interfacePTail += 1]] //Costs <<print cashFormat(10000)>>. Currently have: $stockpile.interfacePTail//<br>
-	[[Modular Tail|Research Lab][$temp = 1, cashX(-3000, "lab"), $stockpile.modPTail += 1]] //Costs <<print cashFormat(5000)>>. Currently have: $stockpile.modPTail//<br>
-	[[Combat Tail|Research Lab][$temp = 1, cashX(-15000, "lab"), $stockpile.warPTail += 1]] //Costs <<print cashFormat(15000)>>. Currently have: $stockpile.warPTail//<br>
-	[[Pleasure Tail|Research Lab][$temp = 1, cashX(-10000, "lab"), $stockpile.sexPTail += 1]] //Costs <<print cashFormat(10000)>>. Currently have: $stockpile.sexPTail//<br>
-
-	<br><br>__Schematics__<br>
-	They do not currently offer schematics for sale.
-<</switch>>
\ No newline at end of file
diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js
index 930cc39b1a28aefa073b9e1d81e3451cd6bdc3de..95575dbabc3c673ff9796331f618e12979c27b4a 100644
--- a/src/js/DefaultRules.js
+++ b/src/js/DefaultRules.js
@@ -9,7 +9,10 @@ window.DefaultRules = (function() {
 	let him;
 	let his;
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {object}
+	 */
 	function DefaultRules(slave) {
 		if (slave.useRulesAssistant === 0) return r; // exempted
 
@@ -77,7 +80,10 @@ window.DefaultRules = (function() {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {map} 
+	 */
 	function MergeRules(slave) {
 		// merge all rules applying on a slave into one big rule
 		const rules = V.defaultRules.filter((x) => ruleAppliesP(x.condition, slave));
@@ -85,7 +91,11 @@ window.DefaultRules = (function() {
 		return mergeRules(rules.map((x) => ProcessAssignments(slave, Object.assign({}, x.set))));
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule	// not sure about this
+	 * @returns {object}	// not sure about this
+	 */
 	function ProcessAssignments(slave, rule) {
 		// Before merging rules, we process assignments for each rule separately so we can remove slaves from facilities when they no longer qualify, even if the final "winning" rule assigns them elsewhere
 		// We also ignore inapplicable assignments for the current slave, so we only merge assignments that are valid
@@ -172,7 +182,7 @@ window.DefaultRules = (function() {
 				break;
 
 			case "work in the dairy":
-				if ((V.dairy > V.dairySlaves+V.bioreactorsXY+V.bioreactorsXX+V.bioreactorsHerm+V.bioreactorsBarren)) {
+				if ((V.dairy > V.dairySlaves + V.bioreactorsXY + V.bioreactorsXX + V.bioreactorsHerm + V.bioreactorsBarren)) {
 					if ((slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) {
 						break;
 					} else if (((slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (slave.breedingMark === 1 && V.propOutcome === 1 && V.dairyRestraintsSetting > 0) || ((V.dairyPregSetting > 0) && ((slave.bellyImplant !== -1) || (slave.broodmother !== 0)))) {
@@ -223,7 +233,7 @@ window.DefaultRules = (function() {
 
 			case "learn in the schoolroom":
 				if ((V.schoolroomSlaves < V.schoolroom && slave.fetish !== "mindbroken" && (slave.devotion >= -20 || slave.trust < -50 || (slave.devotion >= -50 && slave.trust < -20)))) {
-					if ((slave.intelligenceImplant < 30) || (slave.voice !== 0 && slave.accent+V.schoolroomUpgradeLanguage > 2) || (slave.skill.oral <= 10+V.schoolroomUpgradeSkills*20) || (slave.skill.whoring <= 10+V.schoolroomUpgradeSkills*20) || (slave.skill.entertainment <= 10+V.schoolroomUpgradeSkills*20) || (slave.skill.anal < 10+V.schoolroomUpgradeSkills*20) || ((slave.vagina >= 0) && (slave.skill.vaginal < 10+V.schoolroomUpgradeSkills*20))) {
+					if ((slave.intelligenceImplant < 30) || (slave.voice !== 0 && slave.accent + V.schoolroomUpgradeLanguage > 2) || (slave.skill.oral <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.whoring <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.entertainment <= 10 + V.schoolroomUpgradeSkills * 20) || (slave.skill.anal < 10 + V.schoolroomUpgradeSkills * 20) || ((slave.vagina >= 0) && (slave.skill.vaginal < 10 + V.schoolroomUpgradeSkills * 20))) {
 						break;
 					} else {
 						RAFacilityRemove(slave, rule); // before deleting rule.setAssignment
@@ -295,13 +305,16 @@ window.DefaultRules = (function() {
 				break;
 
 			default:
-				r += "<span class=\"red\">raWidgets missing case for assignment 'V.{rule.setAssignment}'</span>.";
+				r += `<span class="red">raWidgets missing case for assignment 'V.{rule.setAssignment}'</span>.`;
 				break;
 		}
 		return rule;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function AssignJobToSlave(slave, rule) {
 		// place slave on assignment defined by the rule
 		if ((rule.setAssignment !== undefined && rule.setAssignment !== "no default setting")) {
@@ -358,7 +371,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessClothing(slave, rule) {
 		// apply clothes to slave
 		if ((rule.clothes !== undefined) && (rule.clothes !== "no default setting")) {
@@ -376,7 +392,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessCollar(slave, rule) {
 		// apply collar to slave
 		if ((rule.collar !== undefined) && (rule.collar !== "no default setting")) {
@@ -404,7 +423,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessEyewear(slave, rule) {
 		// apply glasses, contacts to slave
 		if ((rule.eyewear !== undefined) && (rule.eyewear !== "no default setting")) {
@@ -495,7 +517,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessEarwear(slave, rule) {
 		// apply earplugs to slave
 		if ((rule.earwear !== undefined) && (rule.earwear !== "no default setting")) {
@@ -555,7 +580,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessDildos(slave, rule) {
 		// apply vaginal dildos to slave
 		if (slave.vagina === 0) {
@@ -568,7 +596,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessVVirginDildos(slave, rule) {
 		// apply vaginal dildos to vaginal virgins
 		if ((rule.virginAccessory !== undefined) && (rule.virginAccessory !== "no default setting")) {
@@ -626,7 +657,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAVirginDildos(slave, rule) {
 		// apply vaginal dildos to anal virgins
 		if ((rule.aVirginAccessory !== undefined) && (rule.aVirginAccessory !== "no default setting")) {
@@ -684,7 +718,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessNonVirginDildos(slave, rule) {
 		// apply vaginal dildos to non-virgins
 		if ((rule.vaginalAccessory !== undefined) && (rule.vaginalAccessory !== "no default setting")) {
@@ -741,7 +778,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessVaginalAttachments(slave, rule) {
 		// apply vaginal accessories to slaves
 		if (slave.vaginalAccessory === "none" && slave.vaginalAttachment === "vibrator") {
@@ -778,7 +818,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessDickAccessories(slave, rule) {
 		// apply dick accessories to slave
 		if ((slave.dick > 0)) {
@@ -808,7 +851,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessChastity(slave, rule) {
 		// apply chastity to slave
 		if ((rule.chastityVagina !== undefined) && (rule.chastityVagina !== "no default setting")) {
@@ -847,7 +893,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessShoes(slave, rule) {
 		// apply shoes to slave
 		if ((rule.shoes !== undefined) && (rule.shoes !== "no default setting")) {
@@ -860,7 +909,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessBellyAccessories(slave, rule) {
 		// apply belly accessories to slave
 		if ((rule.bellyAccessory !== undefined) && (rule.bellyAccessory !== "no default setting")) {
@@ -880,7 +932,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessLegAccessory(slave, rule) {
 		if (rule.legAccessory !== undefined && rule.legAccessory !== "no default setting" && slave.amp !== 1 && slave.legAccessory !== rule.legAccessory) {
 			slave.legAccessory = rule.legAccessory;
@@ -888,7 +943,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAnalAccessories(slave, rule) {
 		// apply buttplugs and buttplug accessories to slave
 		if (slave.chastityAnus !== 1) {
@@ -901,7 +959,10 @@ window.DefaultRules = (function() {
 		ProcessButtplugAttachments(slave, rule);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAnalVirginButtplugs(slave, rule) {
 		// apply buttplugs to virgins
 		if ((rule.aVirginButtplug !== undefined) && (rule.aVirginButtplug !== "no default setting")) {
@@ -959,7 +1020,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessNonVirginButtplugs(slave, rule) {
 		// apply buttplugs to non-virgins
 		if ((rule.buttplug !== undefined) && (rule.buttplug !== "no default setting")) {
@@ -1017,7 +1081,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessButtplugAttachments(slave, rule) {
 		// apply buttplug accessories to slaves
 		if (slave.buttplug === "none" && slave.buttplugAttachment !== "none") {
@@ -1038,29 +1105,32 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessBellyImplant(slave, rule) {
 		// Here is belly implant size control, it's used in Surgery Degradation passage to setup devotion and trust changes.
 		// silent calls to surgery degradation have been replaced with a js function, which is less hacky
 		if ((rule.bellyImplantVol !== undefined) && slave.bellyImplant >= 0 && rule.bellyImplantVol >= 0) {
 			r += "<br>";
-			if (slave.health > -10 ) {
+			if (slave.health > -10) {
 				let diff = rule.bellyImplantVol - slave.bellyImplant;
 				if (diff >= 5000 && slave.bellyPain === 0 && slave.health > 50) {
 					r += `${slave.slaveName}'s belly is way too small, so ${he} has been directed to have intensive belly implant filling procedures throughout this week.`;
 					slave.bellyImplant += 1000;
 					slave.bellyPain += 2;
 					BellySurgery(slave, diff);
-				} else if (diff >= 500 && slave.bellyPain < 2 ) {
+				} else if (diff >= 500 && slave.bellyPain < 2) {
 					r += `${slave.slaveName}'s belly has not reached the desired size, so ${he} has been directed to have belly implant filling procedures throughout this week.`;
 					slave.bellyImplant += 500;
 					slave.bellyPain += 1;
 					BellySurgery(slave, diff);
-				} else if (diff <= -5000 ) {
+				} else if (diff <= -5000) {
 					r += `${slave.slaveName}'s belly is way too big, so ${he} has been directed to have intensive belly implant draining procedures throughout this week.`;
 					slave.bellyImplant -= 1000;
 					BellySurgery(slave, diff);
-				} else if (diff <= -500 ) {
+				} else if (diff <= -500) {
 					r += `${slave.slaveName}'s belly is too big, so ${he} has been directed to have belly implant draining procedures throughout this week.`;
 					slave.bellyImplant -= 500;
 					BellySurgery(slave, diff);
@@ -1071,7 +1141,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} volume
+	 */
 	function BellySurgery(slave, volume) {
 		// this is a port of the belly implant portion of surgeryDegradation.tw
 		// that way, we don't have to use ugly hacks
@@ -1114,7 +1187,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessContraceptives(slave, rule) {
 		if ((rule.preg !== undefined) && (rule.preg !== "no default setting")) {
 			if (rule.preg === true && slave.preg === 0) {
@@ -1127,7 +1203,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAbortions(slave, rule) {
 		if ((rule.abortion !== undefined) && (rule.abortion !== "no default setting")) {
 			if (rule.abortion === "all") {
@@ -1208,7 +1287,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAssetGrowthDrugs(slave, rule) {
 		// Asset Growth
 		const growthDrugs = new Set(["breast injections", "breast redistributors", "butt injections", "butt redistributors", "hyper breast injections", "hyper butt injections", "hyper penis enhancement", "hyper testicle enhancement", "intensive breast injections", "intensive butt injections", "intensive penis enhancement", "intensive testicle enhancement", "lip atrophiers", "lip injections", "penis atrophiers", "penis enhancement", "testicle atrophiers", "testicle enhancement"]);
@@ -1223,60 +1305,50 @@ window.DefaultRules = (function() {
 			if (rule.growth_boobs !== "no default setting") {
 				let _priority;
 				if (slave.boobs < rule.growth_boobs) {
-					_priority = {drug: "breast injections", weight: (rule.growth_boobs-slave.boobs)/rule.growth_boobs};
+					_priority = {drug: "breast injections", weight: (rule.growth_boobs - slave.boobs) / rule.growth_boobs};
 					_priorities.push(_priority);
-				} else if ((slave.boobs > parseInt(rule.growth_boobs)+200) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
-					_priority = {
-						drug: "breast redistributors",
-						weight: (1+((slave.boobs-slave.boobsImplant-slave.boobsMilk-rule.growth_boobs)/rule.growth_boobs))};
+				} else if ((slave.boobs > parseInt(rule.growth_boobs) + 200) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
+					_priority = {drug: "breast redistributors", weight: (1 + ((slave.boobs - slave.boobsImplant - slave.boobsMilk - rule.growth_boobs) / rule.growth_boobs))};
 					_priorities.push(_priority);
 				}
 			}
 			if (rule.growth_butt !== "no default setting") {
 				let _priority;
 				if (slave.butt < rule.growth_butt) {
-					_priority = {drug: "butt injections", weight: (rule.growth_butt-slave.butt)/rule.growth_butt};
+					_priority = {drug: "butt injections", weight: (rule.growth_butt - slave.butt) / rule.growth_butt};
 					_priorities.push(_priority);
 				} else if ((Math.trunc(slave.butt) > rule.growth_butt) && slave.weight < 100 && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
-					_priority = {
-						drug: "butt redistributors",
-						weight: (1+((slave.butt-slave.buttImplant-rule.growth_butt)/rule.growth_butt))};
+					_priority = {drug: "butt redistributors", weight: (1 + ((slave.butt - slave.buttImplant - rule.growth_butt) / rule.growth_butt))};
 					_priorities.push(_priority);
 				}
 			}
 			if (rule.growth_lips !== "no default setting") {
 				let _priority;
 				if (slave.lips < rule.growth_lips) {
-					_priority = {drug: "lip injections", weight: (rule.growth_lips-slave.lips)/rule.growth_lips};
+					_priority = {drug: "lip injections", weight: (rule.growth_lips - slave.lips) / rule.growth_lips};
 					_priorities.push(_priority);
 				} else if ((slave.lips > rule.growth_lips) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
-					_priority = {
-						drug: "lip atrophiers",
-						weight: (1+((slave.lips-slave.lipsImplant-rule.growth_lips)/rule.growth_lips))};
+					_priority = {drug: "lip atrophiers", weight: (1 + ((slave.lips - slave.lipsImplant - rule.growth_lips) / rule.growth_lips))};
 					_priorities.push(_priority);
 				}
 			}
 			if (rule.growth_dick !== "no default setting" && slave.dick) {
 				let _priority;
 				if (slave.dick < rule.growth_dick) {
-					_priority = {drug: "penis enhancement", weight: (rule.growth_dick-slave.dick)/rule.growth_dick};
+					_priority = {drug: "penis enhancement", weight: (rule.growth_dick - slave.dick) / rule.growth_dick};
 					_priorities.push(_priority);
 				} else if ((slave.dick > rule.growth_dick) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
-					_priority = {
-						drug: "penis atrophiers",
-						weight: (1+((slave.dick-rule.growth_dick)/rule.growth_dick))};
+					_priority = {drug: "penis atrophiers", weight: (1 + ((slave.dick - rule.growth_dick) / rule.growth_dick))};
 					_priorities.push(_priority);
 				}
 			}
 			if (rule.growth_balls !== "no default setting" && slave.balls) {
 				let _priority;
 				if (slave.balls < rule.growth_balls) {
-					_priority = {drug: "testicle enhancement", weight: (rule.growth_balls-slave.balls)/rule.growth_balls};
+					_priority = {drug: "testicle enhancement", weight: (rule.growth_balls - slave.balls) / rule.growth_balls};
 					_priorities.push(_priority);
 				} else if ((slave.balls > rule.growth_balls) && (V.arcologies[0].FSSlimnessEnthusiastResearch === 1)) {
-					_priority = {
-						drug: "testicle atrophiers",
-						weight: (1+((slave.balls-rule.growth_balls)/rule.growth_balls))};
+					_priority = {drug: "testicle atrophiers", weight: (1 + ((slave.balls - rule.growth_balls) / rule.growth_balls))};
 					_priorities.push(_priority);
 				}
 			}
@@ -1304,9 +1376,9 @@ window.DefaultRules = (function() {
 						r += `${Math.trunc(_priorities[0].weight*100)}% `;
 					}
 					if (_priorities[0].weight < 1) {
-						r+= "below ";
+						r += "below ";
 					} else {
-						r+= "above ";
+						r += "above ";
 					}
 					r += "the targeted size.";
 				}
@@ -1374,7 +1446,7 @@ window.DefaultRules = (function() {
 			}
 			if (V.arcologies[0].FSSlimnessEnthusiastResearch === 1) {
 				if (rule.growth_boobs !== "no default setting") {
-					if (slave.boobs-slave.boobsImplant-slave.boobsMilk > parseInt(rule.growth_boobs)+200 && slave.weight < 100) {
+					if (slave.boobs - slave.boobsImplant - slave.boobsMilk > parseInt(rule.growth_boobs) + 200 && slave.weight < 100) {
 						if (slave.drugs !== "breast redistributors") {
 							slave.drugs = "breast redistributors";
 							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
@@ -1383,7 +1455,7 @@ window.DefaultRules = (function() {
 					}
 				}
 				if (rule.growth_butt !== "no default setting") {
-					if (Math.trunc(slave.butt-slave.buttImplant) > rule.growth_butt && slave.weight < 100) {
+					if (Math.trunc(slave.butt - slave.buttImplant) > rule.growth_butt && slave.weight < 100) {
 						if (slave.drugs !== "butt redistributors") {
 							slave.drugs = "butt redistributors";
 							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
@@ -1392,7 +1464,7 @@ window.DefaultRules = (function() {
 					}
 				}
 				if (rule.growth_lips !== "no default setting") {
-					if (slave.lips-slave.lipsImplant > rule.growth_lips) {
+					if (slave.lips - slave.lipsImplant > rule.growth_lips) {
 						if (slave.drugs !== "lip atrophiers") {
 							slave.drugs = "lip atrophiers";
 							r += `<br>${slave.slaveName} has been put on ${slave.drugs}.`;
@@ -1426,7 +1498,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessOtherDrugs(slave, rule) {
 		// Other Drugs
 		if (slave.indentureRestrictions < 2 && rule.drug !== "no default setting" && slave.drugs !== rule.drug) {
@@ -1582,8 +1657,7 @@ window.DefaultRules = (function() {
 					}
 					break;
 
-				default:
-					break;
+
 			}
 			if (flag) {
 				slave.drugs = rule.drug;
@@ -1595,7 +1669,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessEnema(slave, rule) {
 		if ((rule.inflationType !== undefined) && (rule.inflationType !== "no default setting")) {
 			if (slave.inflationType !== rule.inflationType) {
@@ -1608,6 +1685,7 @@ window.DefaultRules = (function() {
 					slave.cumSource = 0;
 					SetBellySize(slave);
 				} else if ((rule.inflationType === "curative" && slave.health > 90) || (rule.inflationType === "tightener" && slave.anus <= 1 && slave.vagina <= 1)) {
+					// empty block
 				} else {
 					r += `<br>${slave.slaveName}'s current enema regimen has been set to ${rule.inflationType}.`;
 					slave.inflation = 1;
@@ -1636,7 +1714,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessDiet(slave, rule) {
 		// Diet Setting
 		if (rule.diet !== undefined && rule.diet !== "no default setting") {
@@ -1672,12 +1753,12 @@ window.DefaultRules = (function() {
 							r += `<br>${slave.slaveName} is too skinny so ${his} diet has been set to fattening.`;
 						}
 					} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) {
-						if ((slave.muscles >= rule.muscles+8)) {
+						if ((slave.muscles >= rule.muscles + 8)) {
 							if ((slave.diet !== "slimming")) {
 								slave.diet = "slimming";
 								r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
 							}
-						} else if ((slave.muscles <= rule.muscles-2)) {
+						} else if ((slave.muscles <= rule.muscles - 2)) {
 							if ((slave.diet !== "muscle building")) {
 								slave.diet = "muscle building";
 								r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
@@ -1706,12 +1787,12 @@ window.DefaultRules = (function() {
 							r += `<br>${slave.slaveName} is too skinny so ${his} diet has been set to fattening.`;
 						}
 					} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) {
-						if ((slave.muscles >= rule.muscles+8)) {
+						if ((slave.muscles >= rule.muscles + 8)) {
 							if ((slave.diet !== "slimming")) {
 								slave.diet = "slimming";
 								r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
 							}
-						} else if ((slave.muscles <= rule.muscles-2)) {
+						} else if ((slave.muscles <= rule.muscles - 2)) {
 							if ((slave.diet !== "muscle building")) {
 								slave.diet = "muscle building";
 								r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
@@ -1787,12 +1868,12 @@ window.DefaultRules = (function() {
 				}
 			}
 		} else if ((rule.muscles !== undefined) && (rule.muscles !== "no default setting") && (slave.amp !== 1)) { // no diet rule, muscles only
-			if ((slave.muscles >= rule.muscles+8)) {
+			if ((slave.muscles >= rule.muscles + 8)) {
 				if ((slave.diet !== "slimming")) {
 					slave.diet = "slimming";
 					r += `<br>${slave.slaveName} has been put on a slimming exercise regime.`;
 				}
-			} else if ((slave.muscles <= rule.muscles-2)) {
+			} else if ((slave.muscles <= rule.muscles - 2)) {
 				if ((slave.diet !== "muscle building")) {
 					slave.diet = "muscle building";
 					r += `<br>${slave.slaveName} has been put on a muscle building exercise regime.`;
@@ -1814,7 +1895,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessCuratives(slave, rule) {
 		if ((rule.curatives !== undefined) && (rule.curatives !== "no default setting")) {
 			if (slave.curatives !== rule.curatives) {
@@ -1836,7 +1920,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessAphrodisiacs(slave, rule) {
 		if ((rule.aphrodisiacs !== undefined) && (rule.aphrodisiacs !== "no default setting")) {
 			if (slave.aphrodisiacs !== rule.aphrodisiacs) {
@@ -1846,7 +1933,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessPenisHormones(slave, rule) {
 		if ((slave.dick > 0)) {
 			if ((slave.balls === 0)) {
@@ -1885,7 +1975,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessFemaleHormones(slave, rule) {
 		if ((slave.vagina > -1) && (slave.dick === 0) && (rule.XX !== undefined) && (rule.XX !== "no default setting")) {
 			if ((slave.hormones !== rule.XX)) {
@@ -1901,7 +1994,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessPregnancyDrugs(slave, rule) {
 		if (slave.pregKnown === 1 && rule.pregSpeed !== "no default setting" && (slave.breedingMark !== 1 || V.propOutcome === 0) && slave.indentureRestrictions < 1 && slave.broodmother === 0) {
 			if (rule.pregSpeed === "slow" && slave.preg < slave.pregData.minLiveBirth) {
@@ -1928,7 +2024,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessLivingStandard(slave, rule) {
 		if ((rule.livingRules !== undefined) && (rule.livingRules !== "no default setting")) {
 			if (setup.facilityCareers.includes(slave.assignment)) {
@@ -1942,7 +2041,7 @@ window.DefaultRules = (function() {
 				}
 			} else if (slave.livingRules !== rule.livingRules) {
 				if (rule.livingRules !== "luxurious") {
-					if (V.roomsPopulation <= V.rooms-0.5) {
+					if (V.roomsPopulation <= V.rooms - 0.5) {
 						slave.livingRules = rule.livingRules;
 						r += `<br>${slave.slaveName}'s living standard has been set to ${rule.livingRules}.`;
 						if (slave.relationship >= 4) {
@@ -1962,7 +2061,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessSpeech(slave, rule) {
 		if ((rule.speechRules !== undefined) && (rule.speechRules !== "no default setting") && (slave.speechRules !== rule.speechRules)) {
 			if (slave.fetish === "mindbroken") {
@@ -1993,11 +2095,14 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessRelationship(slave, rule) {
 		if ((slave.fetish !== "mindbroken")) {
 			if ((rule.relationshipRules !== undefined) && (rule.relationshipRules !== "no default setting")) {
-				if ((slave.relationshipRules !== rule.relationshipRules )) {
+				if ((slave.relationshipRules !== rule.relationshipRules)) {
 					slave.relationshipRules = rule.relationshipRules;
 					r += `<br>${slave.slaveName}'s relationship rules have been set to ${rule.relationshipRules}.`;
 				}
@@ -2005,7 +2110,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessRelease(slave, rule) {
 		if ((rule.releaseRules !== undefined) && (rule.releaseRules !== "no default setting")) {
 			let _release = 0;
@@ -2028,7 +2136,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessPunishment(slave, rule) {
 		if ((rule.standardPunishment !== undefined) && (rule.standardPunishment !== "no default setting")) {
 			if ((slave.standardPunishment !== rule.standardPunishment)) {
@@ -2038,7 +2149,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessReward(slave, rule) {
 		if ((rule.standardReward !== undefined) && (rule.standardReward !== "no default setting")) {
 			if ((slave.standardReward !== rule.standardReward)) {
@@ -2048,7 +2162,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessToyHole(slave, rule) {
 		if ((rule.toyHole !== undefined) && (rule.toyHole !== "no default setting")) {
 			if (rule.toyHole === "pussy") {
@@ -2082,7 +2199,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessDietCum(slave, rule) {
 		if ((rule.dietCum !== undefined) && (rule.dietCum !== "no default setting")) {
 			if (slave.dietCum !== rule.dietCum) {
@@ -2099,7 +2219,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessDietMilk(slave, rule) {
 		if ((rule.dietMilk !== undefined) && (rule.dietMilk !== "no default setting")) {
 			if (slave.dietMilk !== rule.dietMilk) {
@@ -2116,7 +2239,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessSolidFood(slave, rule) {
 		if ((rule.onDiet !== undefined) && (rule.onDiet !== "no default setting")) {
 			if ((slave.onDiet !== rule.onDiet)) {
@@ -2130,7 +2256,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessTeeth(slave, rule) {
 		if ((rule.teeth !== undefined) && (rule.teeth !== "no default setting")) {
 			if ((rule.teeth === "universal")) {
@@ -2172,7 +2301,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessStyle(slave, rule) {
 		if (rule.eyeColor !== undefined && (rule.eyeColor !== "no default setting")) {
 			if ((slave.eyeColor !== rule.eyeColor)) {
@@ -2232,7 +2364,7 @@ window.DefaultRules = (function() {
 						cashX(forceNeg(V.modCost), "slaveMod", slave);
 						r += `<br>${slave.slaveName}'s hair has been cut; it `;
 					} else {
-						cashX(forceNeg(V.modCost*Math.trunc((rule.hLength-slave.hLength)/10)), "slaveMod", slave);
+						cashX(forceNeg(V.modCost * Math.trunc((rule.hLength - slave.hLength) / 10)), "slaveMod", slave);
 						r += `<br>${slave.slaveName} has been given extensions; ${his} hair `;
 					}
 					r += `is now ${lengthToEitherUnit(rule.hLength)} long.`;
@@ -2424,7 +2556,7 @@ window.DefaultRules = (function() {
 					}
 
 					if (rule.clitPiercing === 3) {
-						cashX(-1000, "slaveMod", slave);
+						cashX(forceNeg(V.SPcost), "slaveMod", slave);
 					} else {
 						cashX(forceNeg(V.modCost), "slaveMod", slave);
 					}
@@ -2567,7 +2699,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessSmartPiercings(slave, rule) {
 		if ((slave.clitPiercing === 3)) {
 			let _used = 0;
@@ -2634,7 +2769,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessTattoos(slave, rule) {
 		if (rule.boobsTat !== undefined && (rule.boobsTat !== "no default setting")) {
 			if ((slave.boobsTat !== rule.boobsTat)) {
@@ -2735,13 +2873,16 @@ window.DefaultRules = (function() {
 					}
 					slave.trust -= 5;
 					slave.health -= 10;
-					r += `<br>${slave.slaveName} has been branded, with <span class="gold">fear</span>${slave.devotion < 18? ", <span class=\"mediumorchid\">regard,</span>":""} and <span class="red">health</span> consequences.`;
+					r += `<br>${slave.slaveName} has been branded, with <span class="gold">fear</span>${slave.devotion < 18 ? `, <span class="mediumorchid">regard,</span>` : ``} and <span class="red">health</span> consequences.`;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessPornFeedEnabled(slave, rule) {
 		if (rule.pornFeed === undefined || rule.pornFeed === "no default setting") {
 			return;
@@ -2768,7 +2909,10 @@ window.DefaultRules = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {object} rule
+	 */
 	function ProcessLabel(slave, rule) {
 		if (rule.label !== "no default setting" && !slave.custom.label.includes(`[${rule.label}]`)) {
 			slave.custom.label = `${slave.custom.label }[${ rule.label }]`;
diff --git a/src/js/PenthouseNaming.js b/src/js/PenthouseNaming.js
index 2df44f652f07d3cc675630f57efad64c2aa24eff..6e85f6ab59a4e61cc0f9708a1031132165704503 100644
--- a/src/js/PenthouseNaming.js
+++ b/src/js/PenthouseNaming.js
@@ -1,7 +1,7 @@
 /**
  * @return {string}
  */
-window.MasterSuiteUIName = function () {
+window.MasterSuiteUIName = function() {
 	const V = State.variables;
 	const name = (V.masterSuiteNameCaps === "The Master Suite") ? "Master Suite" : V.masterSuiteNameCaps;
 	return `<<link "${name}""Master Suite">><</link>> `;
@@ -10,7 +10,7 @@ window.MasterSuiteUIName = function () {
 /**
  * @return {string}
  */
-window.HeadGirlSuiteUIName = function () {
+window.HeadGirlSuiteUIName = function() {
 	const V = State.variables;
 	const name = (V.HGSuiteNameCaps === "The Head Girl Suite") ? "Head Girl Suite" : V.HGSuiteNameCaps;
 	return `<<link "${name}""Head Girl Suite">><</link>> `;
@@ -19,7 +19,7 @@ window.HeadGirlSuiteUIName = function () {
 /**
  * @return {string}
  */
-window.ServantQuartersUIName = function () {
+window.ServantQuartersUIName = function() {
 	const V = State.variables;
 	const name = (V.servantsQuartersNameCaps === "The Servants' Quarters") ? "Servants' Quarters" : V.servantsQuartersNameCaps;
 	return `<<link "${name}""Servants' Quarters">><</link>> `;
@@ -37,7 +37,7 @@ window.SpaUIName = function() {
 /**
  * @return {string}
  */
-window.NurseryUIName = function () {
+window.NurseryUIName = function() {
 	const V = State.variables;
 	const name = (V.nurseryNameCaps === "The Nursery") ? "Nursery" : V.nurseryNameCaps;
 	return `<<link "${name}""Nursery">><</link>> `;
@@ -46,7 +46,7 @@ window.NurseryUIName = function () {
 /**
  * @return {string}
  */
-window.ClinicUIName = function () {
+window.ClinicUIName = function() {
 	const V = State.variables;
 	const name = (V.clinicNameCaps === "The Clinic") ? "Clinic" : V.clinicNameCaps;
 	return `<<link "${name}""Clinic">><</link>> `;
@@ -55,7 +55,7 @@ window.ClinicUIName = function () {
 /**
  * @return {string}
  */
-window.SchoolRoomUIName = function () {
+window.SchoolRoomUIName = function() {
 	const V = State.variables;
 	const name = (V.schoolroomNameCaps === "The Schoolroom") ? "Schoolroom" : V.schoolroomNameCaps;
 	return `<<link "${name}""Schoolroom">><</link>> `;
@@ -64,7 +64,7 @@ window.SchoolRoomUIName = function () {
 /**
  * @return {string}
  */
-window.CellblockUIName = function () {
+window.CellblockUIName = function() {
 	const V = State.variables;
 	const name = (V.cellblockNameCaps === "The Cellblock") ? "Cellblock" : V.cellblockNameCaps;
 	return `<<link "${name}""Cellblock">><</link>> `;
@@ -73,7 +73,7 @@ window.CellblockUIName = function () {
 /**
  * @return {string}
  */
-window.IncubatorUIName = function () {
+window.IncubatorUIName = function() {
 	const V = State.variables;
 	const name = (V.incubatorNameCaps === "The Incubator") ? "Incubator" : V.incubatorNameCaps;
 	return `<<link "${name}""Incubator">><</link>> `;
diff --git a/src/js/SetBellySize.js b/src/js/SetBellySize.js
index 78d2eec4a50fdf0a59d1e954863fd2848acf0610..abe9d645c9d6eb5f404fce22772d2b8d6bdef957 100644
--- a/src/js/SetBellySize.js
+++ b/src/js/SetBellySize.js
@@ -1,4 +1,6 @@
-/** @param {App.Entity.SlaveState} slave */
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
 window.SetBellySize = function SetBellySize(slave) {
 	WombNormalizePreg(slave); /* now with support for legacy code that advances pregnancy by setting .preg++ */
 
@@ -14,5 +16,5 @@ window.SetBellySize = function SetBellySize(slave) {
 		slave.bellyFluid = 0;
 	}
 
-	slave.belly = slave.bellyPreg+slave.bellyFluid+_implantSize;
+	slave.belly = slave.bellyPreg + slave.bellyFluid + _implantSize;
 };
diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js
index 17f928eb2aed368f386559caf3ecca06bc75284a..3554944697d05b69931d5a87eec0014b443ec15a 100644
--- a/src/js/SlaveState.js
+++ b/src/js/SlaveState.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /**
  * Encapsulates the full description of a slave state. Serializable by the SugarCube state
  * management.
@@ -18,7 +17,7 @@ App.Entity.SlavePornPerformanceState = class {
 		this.fame = {
 			/** generic porn fame */
 			general: 0,
-			/** fuckdoll porn fame */
+			/** Fuckdoll porn fame */
 			fuckdoll: 0,
 			/** rape porn fame */
 			rape: 0,
@@ -276,18 +275,18 @@ App.Entity.SlaveCustomAddonsState = class SlaveCustomAddonsState {
 		 * @property {string} format one of "png", "jpg", "gif" or "webm"
 		 */
 		/**
-		* holds the custom slave image file name (used if images are enabled)
-		*
-		* null: no custom image
-		* @type {CustomImage}
-		*/
+		 * holds the custom slave image file name (used if images are enabled)
+		 *
+		 * null: no custom image
+		 * @type {CustomImage}
+		 */
 		this.image = null;
 		/**
-		* holds the custom hair vector base file name
-		*
-		* used if vector images are enabled
-		* @type {number|string}
-		*/
+		 * holds the custom hair vector base file name
+		 *
+		 * used if vector images are enabled
+		 * @type {number|string}
+		 */
 		this.hairVector = 0;
 	}
 };
@@ -369,7 +368,7 @@ App.Entity.SlaveState = class SlaveState {
 		 * * 3: friends with benefits with relationshipTarget
 		 * * 4: lover with relationshipTarget
 		 * * 5: relationshipTarget 's slave wife
-		*/
+		 */
 		this.relationship = 0;
 		/** target of relationship (ID) */
 		this.relationshipTarget = 0;
@@ -555,7 +554,7 @@ App.Entity.SlaveState = class SlaveState {
 		 * "neko", "inu", "kit", "tanuki" */
 		this.earT = "none";
 		/** kemonomimi ear color
-		* "hairless" */
+		 * "hairless" */
 		this.earTColor = "hairless";
 		/** sense of smell
 		0 - yes, -1 - no */
@@ -640,8 +639,8 @@ App.Entity.SlaveState = class SlaveState {
 		/**
 		 * What level of prosthetic interface she has installed
 		 * * 0: no interface
-		 * * 1: basic interface (used both in and out of cyberMod)
-		 * * 2: advanced interface (used only in cyberMod)
+		 * * 1: basic interface
+		 * * 2: advanced interface
 		 */
 		this.PLimb = 0;
 		/**
@@ -1564,9 +1563,9 @@ App.Entity.SlaveState = class SlaveState {
 		 * * 10+: dependent
 		 */
 		this.addict = 0;
-		/** fuckdoll degree
+		/** Fuckdoll degree
 		 *
-		 * 0: not; 1+: fuckdoll */
+		 * 0: not; 1+: Fuckdoll */
 		this.fuckdoll = 0;
 		/** 0: no; 1: yes */
 		this.choosesOwnClothes = 0;
@@ -1748,22 +1747,22 @@ App.Entity.SlaveState = class SlaveState {
 		 */
 		this.dickAccessory = "none";
 		/**
-		* whether the slave has a chastity device on their anus
-		* 0 - no
-		* 1 - yes
-		*/
+		 * whether the slave has a chastity device on their anus
+		 * 0 - no
+		 * 1 - yes
+		 */
 		this.chastityAnus = 0;
 		/**
-		* whether the slave has a chastity device on their penis
-		* 0 - no
-		* 1 - yes
-		*/
+		 * whether the slave has a chastity device on their penis
+		 * 0 - no
+		 * 1 - yes
+		 */
 		this.chastityPenis = 0;
 		/**
-		* whether the slave has a chastity device on their vagina
-		* 0 - no
-		* 1 - yes
-		*/
+		 * whether the slave has a chastity device on their vagina
+		 * 0 - no
+		 * 1 - yes
+		 */
 		this.chastityVagina = 0;
 		/**
 		 * may accept strings, use at own risk
@@ -1864,7 +1863,7 @@ App.Entity.SlaveState = class SlaveState {
 		 * *if both attrXX and attrXY > 95, slave will be omnisexual*
 		 *
 		 * *if energy > 95 and either attrXX or attrXY > 95, slave will be nymphomaniac*
-		*/
+		 */
 		this.attrXY = 0;
 		/** 0: no; 1: yes */
 		this.attrKnown = 0;
@@ -1952,8 +1951,8 @@ App.Entity.SlaveState = class SlaveState {
 		 */
 		this.sexualQuirk = "none";
 		/** 0: does not have; 1: carrier; 2: active
-		* * heterochromia is an exception. String = active
-		*/
+		 * * heterochromia is an exception. String = active
+		 */
 		this.geneticQuirks = {
 			/** Oversized breasts. Increased growth rate, reduced shrink rate. Breasts try to return to oversized state if reduced. */
 			macromastia: 0,
@@ -2136,7 +2135,7 @@ App.Entity.SlaveState = class SlaveState {
 		 * * 8000+: looks full term
 		 * * 16000+: hyperpregnant 1
 		 * * 32000+: hyperpregnant 2
-		*/
+		 */
 		this.bellyImplant = -1;
 		/** How saggy her belly is after being distended for too long.
 		 *
@@ -2219,14 +2218,12 @@ App.Entity.SlaveState = class SlaveState {
 		 */
 		this.pregControl = "none";
 		/**
-		 * Array that holds an amputee 's constructed limbs for anon's hotswap mod.
+		 * Array that holds a slaves fitted prosthetics. Opjects are used to ensure easier expansion later (tatoos for limbs and similar).
 		 *
 		 * Elements of the array should be objects.
-		 * * .type: type of prosthetic limb, ranges from -1 to -5, see.amp for more information
-		 * * .armsTat: any string, see.armsTat for standard strings
-		 * * .legsTat: any string, see.legsTat for standard strings
-		 * @type {Array.<{type:number, armsTat:string, legsTat:string}>} */
-		this.readyLimbs = [];
+		 * * .id: ID of the prosthetic, see setup.prostheticIDs
+		 * @type {Array.<{id:string}>} */
+		this.readyProsthetics = [];
 		/**  */
 		this.ageAdjust = 0;
 		/** Slave has undergone hair removal surgery
@@ -2366,9 +2363,9 @@ App.Entity.SlaveState = class SlaveState {
 	 */
 	static makeSkeleton() {
 		return {
-			counter: { },
+			counter: {},
 			porn: {
-				fame: { }
+				fame: {}
 			},
 			skill: {},
 			custom: {},
diff --git a/src/js/accordianJS.js b/src/js/accordianJS.js
index 88c9f9abd3903366b41f8945ccdbcb55f4b88078..34158aa86d151a03748c25af995f13ab36e4994d 100644
--- a/src/js/accordianJS.js
+++ b/src/js/accordianJS.js
@@ -11,27 +11,27 @@
  * might benefit.
  *
  * 000-250-006 03092017
-*/
+ */
 
-postdisplay["doAccordionSet"] = function (content) {
+postdisplay["doAccordionSet"] = function() {
 	if (variables().useAccordion === 1) {
 		Array.prototype.slice.call(document.querySelectorAll(".macro-include"))
-			.forEach(function (element) {
+			.forEach(function(element) {
 				element.classList.add("accHidden");
 			});
 	}
 };
 
-postdisplay["doAccordion"] = function (content) {
+postdisplay["doAccordion"] = function() {
 	const acc = document.getElementsByClassName("accordion");
 
 	for (let i = 0; i < acc.length; i += 1) {
-		acc[i].onclick = function () {
+		acc[i].onclick = function() {
 			this.classList.toggle("active");
 			let panel = this.nextElementSibling;
 			if (panel === null || panel === undefined) {
 				panel = document.getElementById(`${this.id }accHidden`);
-				if ( panel.style.display === "none" ) {
+				if (panel.style.display === "none") {
 					panel.style.display = "";
 				} else {
 					panel.style.display = "none";
diff --git a/src/js/assayJS.js b/src/js/assayJS.js
index cb39697b400b65af7f7d113c23b9aeb79739c6db..a2e7d5913a14a4fbb5ff1ab55015235b9dd488a0 100644
--- a/src/js/assayJS.js
+++ b/src/js/assayJS.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
 window.sameAssignmentP = function sameAssignmentP(A, B) {
 	return A.assignment === B.assignment;
 };
@@ -16,22 +14,39 @@ window.isRivalP = function isRivalP(slave, target) {
 	return slave.rivalryTarget === target.ID;
 };
 
-window.supremeRaceP = /** @param {App.Entity.SlaveState} slave */ function supremeRaceP(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.supremeRaceP = function supremeRaceP(slave) {
 	return State.variables.arcologies[0].FSSupremacistRace === slave.race;
 };
 
-window.inferiorRaceP = /** @param {App.Entity.SlaveState} slave */ function inferiorRaceP(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.inferiorRaceP = function inferiorRaceP(slave) {
 	return State.variables.arcologies[0].FSSubjugationistRace === slave.race;
 };
 
-window.hasVisibleHeterochromia = /** @param {App.Entity.SlaveState} slave */ function hasVisibleHeterochromia(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.hasVisibleHeterochromia = function hasVisibleHeterochromia(slave) {
 	return slave.geneticQuirks.heterochromia !== 0 && slave.geneticQuirks.heterochromia !== 1 && slave.geneticQuirks.albinism !== 2 && slave.geneticQuirks.heterochromia !== slave.eyeColor && slave.eyeColor === slave.origEye;
 };
 
-window.isLeaderP = /** @param {App.Entity.SlaveState} slave */ function isLeaderP(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}	// I think
+ */
+window.isLeaderP = function isLeaderP(slave) {
 	const V = State.variables;
-	/** @type {App.Entity.SlaveState[]}*/
-	const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, V.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V. Farmer, V.Stewardess, V.Schoolteacher, V.Wardeness];
+	/**
+	 * @type {App.Entity.SlaveState[]}*/
+	const leaders = [V.HeadGirl, V.Bodyguard, V.Recruiter, V.Concubine, V.Nurse, V.Attendant, V.Matron, V.Madam, V.DJ, V.Milkmaid, V.Farmer, V.Stewardess, V.Schoolteacher, V.Wardeness];
 	return leaders.some(leader => leader.ID && leader.ID === slave.ID);
 };
 
@@ -51,7 +66,10 @@ window.properMaster = function properMaster() {
 	else return "Mistress";
 };
 
-window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.newSlave = function newSlave(slave) {
 	const V = State.variables;
 
 	if (slave.override_Eye_Color !== 1) {
@@ -91,7 +109,7 @@ window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(
 			slave.origSkin = slave.skin;
 		}
 	}
-
+	/* eslint-disable camelcase */
 	slave.override_Race = 0;
 	slave.override_H_Color = 0;
 	slave.override_Arm_H_Color = 0;
@@ -99,6 +117,7 @@ window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(
 	slave.override_Brow_H_Color = 0;
 	slave.override_Skin = 0;
 	slave.override_Eye_Color = 0;
+	/* eslint-enable camelcase */
 
 	if (V.surnamesForbidden === 1) {
 		slave.slaveSurname = 0;
@@ -147,7 +166,7 @@ window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(
 	if (slave.actualAge > 35 && slave.face < 40 && slave.skill.anal <= 30) {
 		V.REMILFCheckinIDs.push(slave.ID);
 	}
-	if (slave.attrXY <= 60 && slave.attrXX > 60 ) {
+	if (slave.attrXY <= 60 && slave.attrXX > 60) {
 		V.REOrientationCheckinIDs.push(slave.ID);
 	}
 	if (slave.face < -10) {
@@ -168,19 +187,17 @@ window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(
 		V.genePool.push(slave);
 		/* Store non-albino stats in genePool */
 		if (slave.geneticQuirks.albinism === 2) {
-			const albInd = V.genePool.findIndex(function(s) { return s.ID === slave.ID; });
-			V.genePool.genePool[albInd].origSkin = slave.albinismOverride.skin;
-			V.genePool.genePool[albInd].origEye = slave.albinismOverride.eyeColor;
-			V.genePool.genePool[albInd].origHColor = slave.albinismOverride.hColor;
-			V.genePool.genePool[albInd].underArmHColor = slave.albinismOverride.hColor;
-			V.genePool.genePool[albInd].pubicHColor = slave.albinismOverride.hColor;
-			V.genePool.genePool[albInd].eyebrowHColor = slave.albinismOverride.hColor;
+			const albInd = V.genePool.findIndex(function(s) {return s.ID === slave.ID;});
+			V.genePool[albInd].origSkin = slave.albinismOverride.skin;
+			V.genePool[albInd].origEye = slave.albinismOverride.eyeColor;
+			V.genePool[albInd].origHColor = slave.albinismOverride.hColor;
+			V.genePool[albInd].underArmHColor = slave.albinismOverride.hColor;
+			V.genePool[albInd].pubicHColor = slave.albinismOverride.hColor;
+			V.genePool[albInd].eyebrowHColor = slave.albinismOverride.hColor;
 			slave.albinismOverride = 0;
 		}
 	} else {
-		if (V.genePool.findIndex(function(s) { return s.ID === slave.ID; }) === -1) {
-			V.genePool.push(slave);
-		}
+		if (V.genePool.findIndex(function(s) {return s.ID === slave.ID;}) === -1) {V.genePool.push(slave);}
 	}
 
 	assignJob(slave, slave.assignment);
@@ -191,7 +208,10 @@ window.newSlave = /** @param {App.Entity.SlaveState} slave */ function newSlave(
 	}
 };
 
-window.newChild = /** @param {App.Entity.SlaveState} slave */ function newChild(child) {
+/**
+ * @param {App.Entity.SlaveState} child
+ */
+window.newChild = function newChild(child) {
 	const V = State.variables;
 
 	child.age = 0; /* not sure if this is the correct way to do this or if more is required */
@@ -230,7 +250,7 @@ window.newChild = /** @param {App.Entity.SlaveState} slave */ function newChild(
 	if (child.override_Skin !== 1) {
 		child.origSkin = child.skin;
 	}
-
+	/* eslint-disable */
 	child.override_Race = 0;
 	child.override_H_Color = 0;
 	child.override_Arm_H_Color = 0;
@@ -238,6 +258,7 @@ window.newChild = /** @param {App.Entity.SlaveState} slave */ function newChild(
 	child.override_Brow_H_Color = 0;
 	child.override_Skin = 0;
 	child.override_Eye_Color = 0;
+	/* eslint-enable */
 
 	if (V.surnamesForbidden === 1) {
 		child.childSurname = 0;
@@ -273,7 +294,10 @@ window.newChild = /** @param {App.Entity.SlaveState} slave */ function newChild(
 	State.variables.nurseryBabies++;
 };
 
-window.addSlave = /** @param {App.Entity.SlaveState} slave */ function addSlave(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.addSlave = function addSlave(slave) {
 	State.variables.slaves.push(slave);
 	State.variables.slaveIndices[slave.ID] = State.variables.slaves.length - 1;
 };
@@ -291,26 +315,38 @@ window.slaves2indices = function slaves2indices() {
 	State.variables.slaves.forEach((slave, i) => obj[slave.ID] = i);
 	return obj;
 };
-window.getSlave = /** @returns {App.Entity.SlaveState} */ function getSlave(ID) {
+/**
+ * @param {number} ID
+ * @returns {App.Entity.SlaveState}
+ */
+window.getSlave = function getSlave(ID) {
 	const index = State.variables.slaveIndices[ID];
 	if (index === undefined) return undefined;
 	else return State.variables.slaves[index];
 };
 window.getChild = function getChild(ID) {
 	const V = State.variables;
-	return V.cribs.find(function(s) { return s.ID === ID; });
+	return V.cribs.find(function(s) {return s.ID === ID;});
 };
-window.getPronouns = /** @param {App.Entity.SlaveState} slave */ function getPronouns(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.getPronouns = function getPronouns(slave) {
 	return {
 		pronoun: slave.pronoun,
 		possessivePronoun: slave.possessivePronoun,
 		possessive: slave.possessive,
 		object: slave.object,
 		objectReflexive: slave.objectReflexive,
-		noun: slave.noun};
+		noun: slave.noun
+	};
 };
 
-window.SlavePronouns = /** @param {App.Entity.SlaveState} slave */ function SlavePronouns(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.SlavePronouns = function SlavePronouns(slave) {
 	const V = State.variables;
 	const pronouns = getPronouns(slave);
 	V.pronoun = pronouns.pronoun;
@@ -320,7 +356,11 @@ window.SlavePronouns = /** @param {App.Entity.SlaveState} slave */ function Slav
 	V.object = pronouns.object;
 };
 
-window.WrittenMaster = /** @param {App.Entity.SlaveState} slave */ function WrittenMaster(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}	// I think
+ */
+window.WrittenMaster = function WrittenMaster(slave) {
 	const V = State.variables;
 	if (slave !== undefined)
 		Enunciate(slave);
@@ -329,7 +369,10 @@ window.WrittenMaster = /** @param {App.Entity.SlaveState} slave */ function Writ
 	return V.writtenTitle;
 };
 
-window.Enunciate = /** @param {App.Entity.SlaveState} slave */ function Enunciate(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.Enunciate = function Enunciate(slave) {
 	const V = State.variables;
 	if (SlaveStatsChecker.checkForLisp(slave)) {
 		if (V.PC.customTitleLisp !== undefined)
@@ -470,24 +513,32 @@ window.Enunciate = /** @param {App.Entity.SlaveState} slave */ function Enunciat
 	}
 };
 
-window.fetishChangeChance = /** @param {App.Entity.SlaveState} slave */ function fetishChangeChance(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.fetishChangeChance = function fetishChangeChance(slave) {
 	const V = State.variables;
-	let chance = 0, sex = 0;
+	let chance = 0,
+		sex = 0;
 
 	if (slave.clitSetting !== slave.fetish) {
 		if (slave.balls) {
 			sex = V.potencyAge - slave.actualAge;
-		}
-		else if (slave.ovaries || slave.mpreg) {
+		} else if (slave.ovaries || slave.mpreg) {
 			sex = V.fertilityAge - slave.actualAge;
 		}
-		chance = Math.trunc(Math.clamp((slave.devotion/4)-(slave.fetishStrength/4)-(Math.max(sex, 0)*10), 0, 100));
+		chance = Math.trunc(Math.clamp((slave.devotion / 4) - (slave.fetishStrength / 4) - (Math.max(sex, 0) * 10), 0, 100));
 	}
 
 	return chance;
 };
 
-window.SlaveFullName = /** @param {App.Entity.SlaveState} slave */ function SlaveFullName(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.SlaveFullName = function SlaveFullName(slave) {
 	const V = State.variables;
 	const pair = slave.slaveSurname ? [slave.slaveName, slave.slaveSurname] : [slave.slaveName];
 	if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2))
@@ -495,7 +546,11 @@ window.SlaveFullName = /** @param {App.Entity.SlaveState} slave */ function Slav
 	return pair.join(" ");
 };
 
-window.SlaveFullBirthName = /** @param {App.Entity.SlaveState} slave */ function SlaveFullBirthName(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.SlaveFullBirthName = function SlaveFullBirthName(slave) {
 	const V = State.variables;
 	const pair = slave.birthSurname ? [slave.birthName, slave.birthSurname] : [slave.birthName];
 	if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2))
@@ -597,8 +652,7 @@ window.PCTitle = function PCTitle() {
 			case "Exodus":
 				titles.push("The Abandoned");
 				break;
-			default:
-				break;
+
 		}
 	}
 
@@ -911,7 +965,9 @@ window.PCTitle = function PCTitle() {
 		titles.push("Caretaker of the Youth");
 	}
 
-	const schoolsPresent = []; const schoolsPerfected = []; let schoolTitle = "";
+	const schoolsPresent = [];
+	const schoolsPerfected = [];
+	let schoolTitle = "";
 	if (V.TSS.schoolProsperity >= 10) {
 		schoolsPerfected.push("The Slave School");
 	} else if (V.TSS.schoolPresent === 1) {
@@ -1047,7 +1103,11 @@ window.PCTitle = function PCTitle() {
 	}
 };
 
-window.PoliteRudeTitle = /** @param {App.Entity.SlaveState} slave */ function PoliteRudeTitle(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.PoliteRudeTitle = function PoliteRudeTitle(slave) {
 	const V = State.variables;
 	const PC = V.PC;
 	const s = V.sEnunciate;
@@ -1061,9 +1121,9 @@ window.PoliteRudeTitle = /** @param {App.Entity.SlaveState} slave */ function Po
 			r += (PC.surname ? PC.surname : `${PC.name}${s}an`);
 		}
 	} else {
-		if (slave.intelligence+slave.intelligenceImplant < -95) {
+		if (slave.intelligence + slave.intelligenceImplant < -95) {
 			r += V.titleEnunciate;
-		} else if (slave.intelligence+slave.intelligenceImplant > 50) {
+		} else if (slave.intelligence + slave.intelligenceImplant > 50) {
 			r += (PC.title > 0 ? `Ma${s}ter` : `Mi${s}tre${ss}`);
 		} else if (slave.trust > 0) {
 			r += PC.name;
@@ -1074,7 +1134,11 @@ window.PoliteRudeTitle = /** @param {App.Entity.SlaveState} slave */ function Po
 	return r;
 };
 
-window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTitle(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.SlaveTitle = function SlaveTitle(slave) {
 	const V = State.variables;
 	let r = "";
 	if (V.newDescriptions === 1) {
@@ -1209,16 +1273,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 		if (slave.indenture > -1) {
 			r = `indentured ${ r}`;
 		}
-		if (slave.actualAge > 3) {	/* TODO: this might need some tweaking */
-			if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown === 1) {
-				r = "pregnant " + r;
-			} else if (slave.bellyFluid >= 5000) {
-				r = "bloated " + r;
-			} else if (slave.belly >= 5000) {
-				r = "gravid " + r;
-			}
-		}
-		if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown === 1) {
+
+		if (slave.preg > slave.pregData.normalBirth / 4 && slave.pregKnown === 1) {
 			r = `pregnant ${ r}`;
 		} else if (slave.bellyFluid >= 5000) {
 			r = `bloated ${ r}`;
@@ -1231,7 +1287,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 		}
 	} else {
 		r = "slave"; /* I don't tihnk there is an 'else'? */
-		if ((slave.dick === 0) && (slave.vagina === -1)) { /* NULLS */
+		if ((slave.dick === 0) && (slave.vagina === -1)) {
+			/* NULLS */
 			r = "null";
 			if ((slave.lactation > 0) && (slave.boobs > 2000)) {
 				r = `${r } cow`;
@@ -1255,7 +1312,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 			}
 		}
 
-		if ((slave.dick === 0) && (slave.vagina !== -1)) { /* FEMALES */
+		if ((slave.dick === 0) && (slave.vagina !== -1)) {
+			/* FEMALES */
 			if (slave.visualAge > 55) {
 				r = "GILF";
 			} else if (slave.visualAge > 35) {
@@ -1279,9 +1337,11 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 		}
 
 		if ((slave.dick !== 0) && (slave.vagina !== -1)) {
-			if (slave.balls > 0) { /* FUTANARI: cock & balls & vagina */
+			if (slave.balls > 0) {
+				/* FUTANARI: cock & balls & vagina */
 				r = "futanari ";
-			} else { /* FUTANARI: cock & vagina */
+			} else {
+				/* FUTANARI: cock & vagina */
 				r = "futa ";
 			}
 			if ((slave.lactation > 0) && (slave.boobs > 2000)) {
@@ -1309,7 +1369,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 			}
 		}
 
-		if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0) && (slave.boobs > 300) && (slave.butt > 2)) { /* SHEMALES: cock & balls, T&A above minimum */
+		if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0) && (slave.boobs > 300) && (slave.butt > 2)) {
+			/* SHEMALES: cock & balls, T&A above minimum */
 			if (slave.visualAge > 55) {
 				r = "sheGILF";
 			} else if (slave.visualAge > 35) {
@@ -1335,7 +1396,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 		if ((slave.boobs < 300) || (slave.butt < 2)) {
 			if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0)) {
 				if ((slave.shoulders < 1) || (slave.muscles <= 30)) {
-					if ((slave.faceShape === "masculine") || (slave.faceShape === "androgynous")) { /* SISSIES: feminine shoulders or muscles, masculine faces */
+					if ((slave.faceShape === "masculine") || (slave.faceShape === "androgynous")) {
+						/* SISSIES: feminine shoulders or muscles, masculine faces */
 						if (slave.visualAge > 55) {
 							r = "sissyGILF";
 						} else if (slave.visualAge > 35) {
@@ -1343,7 +1405,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 						} else {
 							r = "sissy";
 						}
-					} else { /* TRAPS: feminine shoulders or muscles, feminine faces */
+					} else {
+						/* TRAPS: feminine shoulders or muscles, feminine faces */
 						if (slave.visualAge > 55) {
 							r = "trapGILF";
 						} else if (slave.visualAge > 35) {
@@ -1365,7 +1428,8 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 
 		if ((slave.boobs < 300) || (slave.butt < 2)) {
 			if ((slave.dick !== 0) && (slave.vagina === -1) && (slave.balls > 0)) {
-				if ((slave.shoulders > 1) || (slave.muscles >= 30)) { /* BITCHES: masculine shoulders or muscles */
+				if ((slave.shoulders > 1) || (slave.muscles >= 30)) {
+					/* BITCHES: masculine shoulders or muscles */
 					r = "bitch";
 					if ((slave.muscles > 30) && (slave.height < 185)) {
 						r = `muscle${ r}`;
@@ -1433,7 +1497,7 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 			r = `indentured ${ r}`;
 		}
 
-		if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown === 1) {
+		if (slave.preg > slave.pregData.normalBirth / 4 && slave.pregKnown === 1) {
 			r = `pregnant ${ r}`;
 		} else if (slave.bellyFluid >= 5000) {
 			r = `bloated ${ r}`;
@@ -1448,7 +1512,10 @@ window.SlaveTitle = /** @param {App.Entity.SlaveState} slave */ function SlaveTi
 	return r;
 };
 
-window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function DegradingName(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.DegradingName = function DegradingName(slave) {
 	const V = State.variables;
 	const leadershipPosition = [
 		"be the Attendant",
@@ -1464,7 +1531,8 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 		"be the Nurse",
 		"be your Head Girl",
 		"guard you",
-		"recruit girls"];
+		"recruit girls"
+	];
 	const names = [];
 	const suffixes = [];
 
@@ -1513,8 +1581,7 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 				case "mixed race":
 					names.push("Mixed", "Mulatto", "Mutt");
 					break;
-				default:
-					break;
+
 			}
 		}
 		names.push(slave.hColor);
@@ -1563,7 +1630,7 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 				names.push("Fertile");
 			}
 		}
-		if (slave.boobs*slave.lactation > 1000) {
+		if (slave.boobs * slave.lactation > 1000) {
 			names.push("Creamy", "Milky");
 			suffixes.push("Cow");
 		}
@@ -1593,7 +1660,7 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 			names.push("Potent");
 			suffixes.push("Cannon", "Daddy");
 		}
-		if (slave.preg > slave.pregData.normalBirth/1.33) {
+		if (slave.preg > slave.pregData.normalBirth / 1.33) {
 			if (slave.broodmother === 2) {
 				names.push("Bursting", "Seeded");
 				suffixes.push("Factory", "Nursery");
@@ -1655,12 +1722,12 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 		if (slave.skill.anal > 95) {
 			suffixes.push("Asspussy", "Sphincter");
 		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
+		if (slave.intelligence + slave.intelligenceImplant > 50) {
 			names.push("Bright", "Clever", "Smart");
 			if (slave.intelligenceImplant >= 15) {
 				names.push("College", "Graduate", "Nerdy");
 			}
-		} else if (slave.intelligence+slave.intelligenceImplant < -50) {
+		} else if (slave.intelligence + slave.intelligenceImplant < -50) {
 			names.push("Cretin", "Dumb", "Retarded", "Stupid");
 		}
 		if (slave.vagina === 1 && slave.skill.vaginal <= 10) {
@@ -1705,16 +1772,20 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 				suffixes.push("Futa");
 			} else {
 				if (slave.balls > 0) {
-					if (slave.boobs > 300 && slave.butt > 2) { /* SHEMALES: cock & balls, T&A above minimum */
+					if (slave.boobs > 300 && slave.butt > 2) {
+						/* SHEMALES: cock & balls, T&A above minimum */
 						suffixes.push("Shemale");
 					} else {
 						if (slave.shoulders < 1 && slave.muscles <= 30) {
-							if (slave.faceShape === "masculine" || slave.faceShape === "androgynous") { /* SISSIES: feminine shoulders or muscles, masculine faces */
+							if (slave.faceShape === "masculine" || slave.faceShape === "androgynous") {
+								/* SISSIES: feminine shoulders or muscles, masculine faces */
 								suffixes.push("Sissy");
-							} else { /* TRAPS: feminine shoulders or muscles, feminine faces */
+							} else {
+								/* TRAPS: feminine shoulders or muscles, feminine faces */
 								suffixes.push("Trap");
 							}
-						} else { /* BITCHES: masculine shoulders or muscles */
+						} else {
+							/* BITCHES: masculine shoulders or muscles */
 							suffixes.push("Bitch");
 						}
 					}
@@ -1836,8 +1907,7 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 			case "recruit girls":
 				slave.slaveName = jsEither(["Cam", "Recruiter"]);
 				break;
-			default:
-				break;
+
 		}
 	}
 	const surname = jsEither(suffixes);
@@ -1848,7 +1918,11 @@ window.DegradingName = /** @param {App.Entity.SlaveState} slave */ function Degr
 	slave.slaveSurname = surname;
 };
 
-window.SlaveSort = /** @param {App.Entity.SlaveState[]} slaves */ function SlaveSort(slaves, main = false) {
+/**
+ * @param {App.Entity.SlaveState[]} slaves
+ * @param {boolean} main
+ */
+window.SlaveSort = function SlaveSort(slaves, main = false) {
 	const V = State.variables;
 	if (main) {
 		switch (V.sortSlavesBy) {
@@ -1903,7 +1977,12 @@ window.SlaveSort = /** @param {App.Entity.SlaveState[]} slaves */ function Slave
 	}
 };
 
-window.slaveSortMinor = /** @param {App.Entity.SlaveState[]} slaves */ function slaveSortMinor(slaves) {
+/**
+ * @param {App.Entity.SlaveState[]} slaves
+ */
+// this line is giving a false positive for some reason
+// eslint-disable-next-line no-unused-vars
+window.slaveSortMinor = function slaveSortMinor(slaves) {
 	slaves = slaves.sort((a, b) => a.slaveName < b.slaveName ? -1 : 1);
 };
 
@@ -1961,7 +2040,12 @@ window.MenialPopCap = function MenialPopCap() {
 	return r;
 };
 
-window.faceIncrease = /** @param {App.Entity.SlaveState} slave */ function faceIncrease(slave, amount) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {number} amount
+ * @returns {string}
+ */
+window.faceIncrease = function faceIncrease(slave, amount) {
 	const pronouns = getPronouns(slave);
 	const his = pronouns.possessive;
 	const His = capFirstChar(his);
@@ -1981,9 +2065,13 @@ window.faceIncrease = /** @param {App.Entity.SlaveState} slave */ function faceI
 	slave.face = Math.clamp(slave.face + amount, -100, 100);
 	if (slave.face > 95) slave.face = 100;
 	return r;
-};
+}
 
-window.Deadliness = /** @param {App.Entity.SlaveState} slave */ function Deadliness(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.Deadliness = function Deadliness(slave) {
 	const V = State.variables;
 	let deadliness = 2;
 
diff --git a/src/js/assignJS.js b/src/js/assignJS.js
index f3e7b9462b266e9f0ad7572f45ae0d052acc01ed..e36c6b3e5bff089e0e223d6fb82c2bf6f6c0c651 100644
--- a/src/js/assignJS.js
+++ b/src/js/assignJS.js
@@ -1,5 +1,4 @@
 /* eslint-disable no-case-declarations */
-/* eslint-disable no-undef */
 window.assignJob = function assignJob(slave, job) {
 	"use strict";
 	const V = State.variables;
@@ -304,7 +303,7 @@ window.assignJob = function assignJob(slave, job) {
 	}
 
 	if (slave.assignmentVisible === 0 && Array.isArray(V.personalAttention)) {
-		const awi = V.personalAttention.findIndex(function(s) { return s.ID === slave.ID; });
+		const awi = V.personalAttention.findIndex(function(s) {return s.ID === slave.ID;});
 		if (awi !== -1) {
 			V.personalAttention.deleteAt(awi);
 			if (V.personalAttention.length === 0) {
@@ -490,12 +489,15 @@ window.removeJob = function removeJob(slave, assignment) {
 			case "be your agent":
 			case "live with your agent":
 				slave.assignment = "rest";
-				const _leaderIndex = V.leaders.findIndex(function(x) { return x.ID === slave.ID; });
+				const _leaderIndex = V.leaders.findIndex(function(x) {
+					return x.ID === slave.ID;
+				});
 				if (_leaderIndex !== -1)
 					V.leaders.deleteAt(_leaderIndex);
 
-				if (slave.relationshipTarget > 0) { /* following code assumes there can be at most one companion */
-					const _lover = V.slaves.findIndex(function(s) { return haveRelationshipP(s, slave) && s.assignment === "live with your agent"; });
+				if (slave.relationshipTarget > 0) {
+					/* following code assumes there can be at most one companion */
+					const _lover = V.slaves.findIndex(function(s) {return haveRelationshipP(s, slave) && s.assignment === "live with your agent";});
 					if (_lover !== -1) {
 						V.slaves[_lover].assignment = "rest";
 						V.slaves[_lover].assignmentVisible = 1;
@@ -522,7 +524,8 @@ window.removeJob = function removeJob(slave, assignment) {
 	return r;
 };
 
-window.resetJobIDArray = function resetJobIDArray() { /* todo: expand to all assignments */
+window.resetJobIDArray = function resetJobIDArray() {
+	/* todo: expand to all assignments */
 	const slaves = State.variables.slaves;
 	const JobIDArray = {
 		"rest": [],
@@ -537,7 +540,7 @@ window.resetJobIDArray = function resetJobIDArray() { /* todo: expand to all ass
 		"be a subordinate slave": []
 	};
 
-	slaves.forEach(function (slave) {
+	slaves.forEach(function(slave) {
 		if (JobIDArray.hasOwnProperty(slave.assignment))
 			JobIDArray[slave.assignment].push(slave.ID);
 	});
@@ -548,7 +551,7 @@ window.resetJobIDArray = function resetJobIDArray() { /* todo: expand to all ass
 /**
  * Generates string with links for changing slave assignment
  */
-App.UI.jobLinks = function () {
+App.UI.jobLinks = function() {
 	"use strict";
 	const facilitiesOrder = [
 		/* sorted by improvement before work, within improvement in order of progress, within work alphabetical for facilities*/
@@ -567,10 +570,7 @@ App.UI.jobLinks = function () {
 		App.Entity.facilities.servantsQuarters
 	];
 
-	return {
-		assignments: assignmentLinks,
-		transfers: transferLinks
-	};
+	return {assignments: assignmentLinks, transfers: transferLinks};
 
 	/**
 	 * Generates assignment links
@@ -616,7 +616,7 @@ App.UI.jobLinks = function () {
 }();
 
 App.UI.SlaveInteract = {
-	fucktoyPref: function () {
+	fucktoyPref: function() {
 		let elem = jQuery('#fucktoypref');
 		elem.empty();
 		let res = "";
@@ -651,7 +651,7 @@ App.UI.SlaveInteract = {
 		elem.append(ins);
 	},
 
-	assignmentBlock: function (blockId) {
+	assignmentBlock: function(blockId) {
 		let res = App.UI.jobLinks.assignments(-1, undefined, () => {
 			return `<<replace "#assign">>$activeSlave.assignment<</replace>><<replace "#${blockId}">><<= App.UI.SlaveInteract.assignmentBlock("${blockId}")>><<= App.UI.SlaveInteract.fucktoyPref()>><</replace>>`;
 		});
diff --git a/src/js/colorModeJS.js b/src/js/colorModeJS.js
index 38131f52fe3e43f0350ddbf4d7a97361358ca1d1..3c495cdb5229aa5ffa74cd92fb3820adc9554b35 100644
--- a/src/js/colorModeJS.js
+++ b/src/js/colorModeJS.js
@@ -1,5 +1,4 @@
-/* eslint-disable no-undef */
-window.flipColors = function (lightColorMap) {
+window.flipColors = function(lightColorMap) {
 	if (!window.savedColorMap) {
 		window.savedColorMap = setColors(lightColorMap);
 	} else {
@@ -8,7 +7,7 @@ window.flipColors = function (lightColorMap) {
 	}
 };
 
-window.setColors = function (colorMap) {
+window.setColors = function(colorMap) {
 	let originalState = [];
 	let props = ["color", "backgroundColor", "backgroundImage"];
 	let styleSheetArray = Array.from(document.styleSheets);
@@ -25,13 +24,11 @@ window.setColors = function (colorMap) {
 						let newVal = colorMap[currentValue];
 						if (typeof newVal !== "undefined") {
 							cssRule.style[propName] = newVal;
-							originalState.push(
-								{
-									element: cssRule,
-									propName: propName,
-									value: currentValue
-								}
-							);
+							originalState.push({
+								element: cssRule,
+								propName: propName,
+								value: currentValue
+							});
 						}
 					}
 				});
diff --git a/src/js/colorinput.js b/src/js/colorinput.js
index 4aa2438276d69dfd21d06d4b4b0666526e90be97..066743e17728444ceeb71145bdbf4b66f7f96bf4 100644
--- a/src/js/colorinput.js
+++ b/src/js/colorinput.js
@@ -1,26 +1,26 @@
 Macro.add("colorinput", {
 	handler: function() {
 		if (this.args.length < 2) {
-			var e = [];
+			let e = [];
 			return this.args.length < 1 && e.push("variable name"), this.args.length < 2 && e.push("default value"), this.error("no " + e.join(" or ") + " specified");
 		}
-		if ("string" != typeof this.args[0]) return this.error("variable name argument is not a string");
-		var varName = this.args[0].trim();
+		if ("string" !== typeof this.args[0]) return this.error("variable name argument is not a string");
+		let varName = this.args[0].trim();
 		if ("$" !== varName[0] && "_" !== varName[0]) return this.error('variable name "' + this.args[0] + '" is missing its sigil ($ or _)');
 		Config.debug && this.debugView.modes({
 			block: true
 		});
-		var r = Util.slugify(varName);
-		var value = this.args[1];
-		var inputElement = document.createElement("input"),
+		let r = Util.slugify(varName);
+		let value = this.args[1];
+		let inputElement = document.createElement("input"),
 			passage = void 0;
-		var setargs = null;
+		let setargs = null;
 		if (this.args.length > 3) {
 			passage = this.args[2];
 		} else if (this.args.length > 2) {
 			passage = this.args[2];
 		}
-		if (passage !== (void 0) && typeof(passage) === "object") {
+		if (passage !== (void 0) && typeof (passage) === "object") {
 			passage = passage.link;
 		}
 		if (!passage) {
@@ -29,27 +29,28 @@ Macro.add("colorinput", {
 
 		function gotoPassage() {
 			if (passage) {
-				var currentScrollPosition = window.pageYOffset;
-				var currentPassage = State.passage;
+				let currentScrollPosition = window.pageYOffset;
+				const currentPassage = State.passage;
 				if (setargs) {
 					Scripting.evalTwineScript(setargs);
 				}
 				Engine.play(passage);
-				if (currentPassage == passage) {
+				if (currentPassage === passage) {
 					Scripting.evalJavaScript("window.scrollTo(0, " + currentScrollPosition + ");");
 				}
 			}
 		}
 
 		jQuery(inputElement).attr({
-			id: this.name + "-" + r,
-			name: this.name + "-" + r,
-			type: 'color',
-			value: value,
-			tabindex: 0
-		}).addClass("macro-" + this.name)
+				id: this.name + "-" + r,
+				name: this.name + "-" + r,
+				type: 'color',
+				value: value,
+				tabindex: 0
+			}).addClass("macro-" + this.name)
 			.on("change", function() {
 				State.setVar(varName, this.value);
+				// eslint-disable-next-line eqeqeq
 				if (this.value != value) { // If the value has actually changed, reload the page.  Note != and not !== because types might be different
 					gotoPassage();
 				}
diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js
index 1edb9708fd8882990bb8000f099b3981b251ee0d..2bdf933b8dd6984491f4a3c28a8778a4eaffa69e 100644
--- a/src/js/datatypeCleanupJS.js
+++ b/src/js/datatypeCleanupJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /**
  * Applies data scheme updates to the slave object
  *
@@ -6,19 +5,23 @@
  * and in general pays no attention to the property values unless they need to be changed due
  * to the schema change.
  */
-App.Entity.Utils.SlaveDataSchemeCleanup = (function () {
+App.Entity.Utils.SlaveDataSchemeCleanup = (function() {
 	"use strict";
 	return SlaveDataSchemeCleanup;
 
-	/** @param {App.Entity.SlaveState} slave */
-	function SlaveDataSchemeCleanup(slave) { // eslint-disable-line no-unused-vars
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
+	function SlaveDataSchemeCleanup(slave) {
 		migratePorn(slave);
 		migrateSkills(slave);
 		migrateCounters(slave);
 		migrateCustomProperties(slave);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function migratePorn(slave) {
 		if (!slave.hasOwnProperty("porn")) {
 			slave.porn = new App.Entity.SlavePornPerformanceState();
@@ -45,7 +48,9 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function migrateSkills(slave) {
 		if (!slave.hasOwnProperty("skill")) {
 			slave.skill = new App.Entity.SlaveSkillsState();
@@ -91,7 +96,9 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function migrateCounters(slave) {
 		if (!slave.hasOwnProperty("counter")) {
 			slave.counter = new App.Entity.SlaveActionsCountersState();
@@ -123,7 +130,9 @@ App.Entity.Utils.SlaveDataSchemeCleanup = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function migrateCustomProperties(slave) {
 		if (!slave.hasOwnProperty("custom")) {
 			slave.custom = new App.Entity.SlaveCustomAddonsState();
@@ -223,7 +232,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		generatePronouns(slave);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveAgeDatatypeCleanup(slave) {
 		slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0;
 		if (slave.age > 0) { // delete slave.age?
@@ -241,7 +252,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slavePhysicalDatatypeCleanup(slave) {
 		if (typeof slave.nationality !== "string") {
 			slave.nationality = "slave";
@@ -270,7 +283,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.hips = Math.clamp(+slave.hips, -2, 3) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveFaceDatatypeCleanup(slave) {
 		slave.face = Math.clamp(+slave.face, -100, 100) || 0;
 		if (typeof slave.faceShape !== "string") {
@@ -294,7 +309,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveHairDatatypeCleanup(slave) {
 		if (typeof slave.hColor !== "string") {
 			slave.hColor = "brown";
@@ -333,7 +350,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveBoobsDatatypeCleanup(slave) {
 		slave.boobs = Math.max(+slave.boobs, 100) || 200;
 		if (typeof slave.boobShape !== "string") {
@@ -354,7 +373,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveButtDatatypeCleanup(slave) {
 		if (slave.butt !== 0) {
 			slave.butt = Math.clamp(+slave.butt, 0, 20) || 1;
@@ -363,7 +384,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.analArea = Math.max(+slave.analArea, 0) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveNekoDatatypeCleanup(slave) {
 		if (typeof slave.earShape !== "string") {
 			slave.earShape = "normal";
@@ -391,7 +414,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slavePregnancyDatatypeCleanup(slave) {
 		slave.induce = Math.clamp(+slave.induce, 0, 1) || 0;
 		slave.labor = Math.clamp(+slave.labor, 0, 1) || 0;
@@ -417,7 +442,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		WombNormalizePreg(slave);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveBellyDatatypeCleanup(slave) {
 		slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0;
 		if (typeof slave.inflationType !== "string") {
@@ -437,7 +464,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		SetBellySize(slave);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveGenitaliaDatatypeCleanup(slave) {
 		slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0;
 		slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0;
@@ -456,7 +485,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveImplantsDatatypeCleanup(slave) {
 		slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0;
 		slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0;
@@ -473,7 +504,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slavePiercingsDatatypeCleanup(slave) {
 		slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0;
 		slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0;
@@ -490,7 +523,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveTattooDatatypeCleanup(slave) {
 		if (typeof slave.shouldersTat !== "string") {
 			slave.shouldersTat = 0;
@@ -533,7 +568,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveCosmeticsDatatypeCleanup(slave) {
 		slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0;
 		slave.nails = Math.clamp(+slave.nails, 0, 9) || 0;
@@ -595,7 +632,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveDietDatatypeCleanup(slave) {
 		if (typeof slave.diet !== "string") {
 			slave.diet = "healthy";
@@ -612,7 +651,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slavePornDatatypeCleanup(slave) {
 		slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0;
 		slave.pornFame = Math.max(+slave.pornFame, 0) || 0;
@@ -664,7 +705,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.porn.fame.pregnancy = Math.max(+slave.porn.fame.pregnancy, 0) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveRelationDatatypeCleanup(slave) {
 		slave.mother = +slave.mother || 0;
 		slave.father = +slave.father || 0;
@@ -679,7 +722,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.cloneID = +slave.cloneID || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveSkillsDatatypeCleanup(slave) {
 		slave.skill.oral = Math.clamp(+slave.skill.oral, 0, 100) || 0;
 		slave.skill.vaginal = Math.clamp(+slave.skill.vaginal, 0, 100) || 0;
@@ -705,7 +750,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.skill.whore = Math.clamp(+slave.skill.whore, 0, 200) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveStatCountDatatypeCleanup(slave) {
 		slave.counter.oral = Math.max(+slave.counter.oral, 0) || 0;
 		slave.counter.vaginal = Math.max(+slave.counter.vaginal, 0) || 0;
@@ -726,7 +773,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slavePreferencesDatatypeCleanup(slave) {
 		slave.energy = Math.clamp(+slave.energy, 0, 100) || 0;
 		slave.need = Math.max(+slave.need, 0) || 0;
@@ -737,7 +786,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveRulesDatatypeCleanup(slave) {
 		if (typeof slave.standardPunishment !== "string") {
 			slave.standardPunishment = "situational";
@@ -755,7 +806,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveCustomStatsDatatypeCleanup(slave) {
 		if (typeof slave.custom.label !== "string") {
 			slave.custom.label = "";
@@ -776,7 +829,9 @@ window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function slaveMiscellaneousDatatypeCleanup(slave) {
 		slave.weekAcquired = Math.max(+slave.weekAcquired, 0) || 0;
 		slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0;
@@ -1390,7 +1445,7 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() {
 	PC.ballsImplant = Math.clamp(+PC.ballsImplant, 0, 4) || 0;
 	PC.degeneracy = Math.max(+PC.degeneracy, 0) || 0;
 	PC.birthWeek = Math.clamp(+PC.birthWeek, 0, 51) || 0;
-	if (PC.sexualEnergy !== 0 ) {
+	if (PC.sexualEnergy !== 0) {
 		PC.sexualEnergy = +PC.sexualEnergy || 4;
 	}
 	PC.refreshmentType = Math.clamp(+PC.refreshmentType, 0, 6) || 0;
@@ -1557,11 +1612,11 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() {
 	}
 	generateAssistantPronouns();
 
-	V.foodCost = Math.trunc(2500/V.economy);
-	V.drugsCost = Math.trunc(10000/V.economy);
-	V.rulesCost = Math.trunc(10000/V.economy);
-	V.modCost = Math.trunc(5000/V.economy);
-	V.surgeryCost = Math.trunc(30000/V.economy);
+	V.foodCost = Math.trunc(2500 / V.economy);
+	V.drugsCost = Math.trunc(10000 / V.economy);
+	V.rulesCost = Math.trunc(10000 / V.economy);
+	V.modCost = Math.trunc(5000 / V.economy);
+	V.surgeryCost = Math.trunc(30000 / V.economy);
 	V.facilityCost = +V.facilityCost || 100;
 	V.policyCost = +V.policyCost || 5000;
 
@@ -1856,11 +1911,13 @@ window.FacilityDatatypeCleanup = (function() {
  * It removes all the unneeded properties for the gene pool attributes.
  * @todo remove after refactoring the slave state class
  */
-App.Entity.Utils.GenePoolRecordCleanup = (function () {
+App.Entity.Utils.GenePoolRecordCleanup = (function() {
 	"use strict";
 	return GenePoolRecordCleanup;
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function GenePoolRecordCleanup(slave) {
 		App.Entity.Utils.SlaveDataSchemeCleanup(slave);
 
diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js
index 350876cb0288e52902abac342be681c05b481686..cd503f1ab64be3e99df30b19e79387cfdbab47e7 100644
--- a/src/js/descriptionWidgets.js
+++ b/src/js/descriptionWidgets.js
@@ -1,8 +1,8 @@
 /**
  * @param {App.Entity.SlaveState} slave
- * @return {string} The slave's eyes
+ * @return {string} Slave's eyes
  */
-App.Desc.eyes = function (slave) {
+App.Desc.eyes = function(slave) {
 	"use strict";
 	const V = State.variables;
 	let r = ``;
@@ -43,15 +43,15 @@ App.Desc.eyes = function (slave) {
 		if (slave.intelligence > 95) {
 			r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; `;
 			if (slave.intelligence + slave.intelligenceImplant >= 130) {
-				r += `with ${his} education, ${he} is so far <span class=deepskyblue>beyond brilliant</span> that ${he} is nearly peerless. `;
+				r += `with ${his} education, ${he} is so far <span class="deepskyblue">beyond brilliant</span> that ${he} is nearly peerless. `;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `${he} is both <span class=deepskyblue>brilliant</span> and `;
+				r += `${he} is both <span class="deepskyblue">brilliant</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `${he} is so <span class=deepskyblue>brilliant</span> that ${his} `;
+				r += `${he} is so <span class="deepskyblue">brilliant</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
 				} else {
@@ -61,15 +61,15 @@ App.Desc.eyes = function (slave) {
 			}
 		} else if (slave.intelligence > 50) {
 			if (slave.intelligence + slave.intelligenceImplant > 95) {
-				r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class=deepskyblue>brilliant.</span>`;
+				r += `but ${his} facial expressions reveal ${he} is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `but ${his} face is alive with intelligence; ${he} is both <span class=deepskyblue>highly intelligent</span> and `;
+				r += `but ${his} face is alive with intelligence; ${he} is both <span class="deepskyblue">highly intelligent</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `but ${his} face is alive with intelligence; ${he} is so <span class=deepskyblue>highly intelligent</span> that ${his} `;
+				r += `but ${his} face is alive with intelligence; ${he} is so <span class="deepskyblue">highly intelligent</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
 				} else {
@@ -79,19 +79,19 @@ App.Desc.eyes = function (slave) {
 			}
 		} else if (slave.intelligence > 15) {
 			if (slave.intelligence + slave.intelligenceImplant > 50) {
-				r += `but ${his} face is alive with intelligence; with ${his} education, ${he} can be considered <span class=deepskyblue>highly intelligent.</span>`;
+				r += `but ${his} face is alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class=deepskyblue>above average intelligence</span> and`;
+				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class="deepskyblue">above average intelligence</span> and`;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class=deepskyblue>above average intelligence</span> despite being undereducated. `;
+				r += `but ${his} facial expressions reveal ${his} cleverness; ${he} is of <span class="deepskyblue">above average intelligence</span> despite being undereducated. `;
 			}
 		} else if (slave.intelligence >= -15) {
 			if (slave.intelligence + slave.intelligenceImplant > 15) {
-				r += `but ${his} facial expressions reveal ${his} cleverness; with ${his} education, ${he} can be considered of <span class=deepskyblue>above average intelligence.</span>`;
+				r += `but ${his} facial expressions reveal ${his} cleverness; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `but ${his} facial expressions reveal ${his} alertness; ${he} is of average intelligence due to being `;
 				if (slave.intelligenceImplant >= 30) {
@@ -105,19 +105,19 @@ App.Desc.eyes = function (slave) {
 			if (slave.intelligence + slave.intelligenceImplant >= -15) {
 				r += `but ${his} facial expressions reveal ${his} alertness; with ${his} education, ${he} can be considered of average intelligence. `;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class=orangered>below average intelligence</span> despite having been `;
+				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class="orangered">below average intelligence</span> despite having been `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `thoroughly `;
 				}
 				r += `educated. `;
 			} else {
-				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class=orangered>below average intelligence</span> and is poorly educated. `;
+				r += `but ${his} facial expressions reveal ${he} is rather dim; ${he} is of <span class="orangered">below average intelligence</span> and is poorly educated. `;
 			}
 		} else if (slave.intelligence >= -95) {
 			if (slave.intelligence + slave.intelligenceImplant >= -50) {
-				r += `but ${his} facial expressions reveal ${he} is rather dim; even with ${his} education, ${he} can only be considered of <span class=orangered>below average intelligence.</span>`;
+				r += `but ${his} facial expressions reveal ${he} is rather dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class=orangered>quite stupid</span> despite having `;
+				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class="orangered">quite stupid</span> despite having `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `an advanced`;
 				} else {
@@ -125,31 +125,31 @@ App.Desc.eyes = function (slave) {
 				}
 				r += ` education. `;
 			} else {
-				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class=orangered>quite stupid</span> and ignorant. `;
+				r += `but ${his} facial expressions reveal ${he} is as dull as ${his} eyes; ${he} is <span class="orangered">quite stupid</span> and ignorant. `;
 			}
 		} else {
 			r += `though you doubt it would be much different if ${he} could see; `;
 			if (slave.intelligence + slave.intelligenceImplant >= -95) {
-				r += `even with ${his} education, ${he} is still <span class=orangered>really stupid.</span>`;
+				r += `even with ${his} education, ${he} is still <span class="orangered">really stupid.</span>`;
 			} else if (slave.intelligenceImplant > 0) {
-				r += `${he} is <span class=orangered>a moron,</span> yet somehow still remembers the basics of an education. `;
+				r += `${he} is <span class="orangered">a moron,</span> yet somehow still remembers the basics of an education. `;
 			} else {
-				r += `${he} is <span class=orangered>a moron,</span> and ignorant to boot. `;
+				r += `${he} is <span class="orangered">a moron,</span> and ignorant to boot. `;
 			}
 		}
 	} else {
 		if (slave.intelligence > 95) {
 			r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; `;
 			if (slave.intelligence + slave.intelligenceImplant >= 130) {
-				r += `with ${his} education, ${he} is so far <span class=deepskyblue>beyond brilliant</span> that ${he} is nearly peerless. `;
+				r += `with ${his} education, ${he} is so far <span class="deepskyblue">beyond brilliant</span> that ${he} is nearly peerless. `;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `${he} is both <span class=deepskyblue>brilliant</span> and `;
+				r += `${he} is both <span class="deepskyblue">brilliant</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `${he} is so <span class=deepskyblue>brilliant</span> that ${his} `;
+				r += `${he} is so <span class="deepskyblue">brilliant</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
 				} else {
@@ -159,15 +159,15 @@ App.Desc.eyes = function (slave) {
 			}
 		} else if (slave.intelligence > 50) {
 			if (slave.intelligence + slave.intelligenceImplant > 95) {
-				r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class=deepskyblue>brilliant.</span>`;
+				r += `${His} ${slave.eyeColor}-eyed gaze is incisive, quick, cunning; with ${his} education, ${he} can be considered <span class="deepskyblue">brilliant.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is both <span class=deepskyblue>highly intelligent</span> and `;
+				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is both <span class="deepskyblue">highly intelligent</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is so <span class=deepskyblue>highly intelligent</span> that ${his} `;
+				r += `${His} ${slave.eyeColor} eyes are alive with intelligence; ${he} is so <span class="deepskyblue">highly intelligent</span> that ${his} `;
 				if (slave.intelligenceImplant > 0) {
 					r += `meager`;
 				} else {
@@ -178,20 +178,20 @@ App.Desc.eyes = function (slave) {
 		} else if (slave.intelligence > 15) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant > 50) {
-				r += `alive with intelligence; with ${his} education, ${he} can be considered <span class=deepskyblue>highly intelligent.</span>`;
+				r += `alive with intelligence; with ${his} education, ${he} can be considered <span class="deepskyblue">highly intelligent.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `clever; ${he} is of <span class=deepskyblue>above average intelligence</span> and `;
+				r += `clever; ${he} is of <span class="deepskyblue">above average intelligence</span> and `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `well `;
 				}
 				r += `educated. `;
 			} else {
-				r += `clever; ${he} is of <span class=deepskyblue>above average intelligence</span> despite being undereducated. `;
+				r += `clever; ${he} is of <span class="deepskyblue">above average intelligence</span> despite being undereducated. `;
 			}
 		} else if (slave.intelligence >= -15) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant > 15) {
-				r += `clever; with ${his} education, ${he} can be considered of <span class=deepskyblue>above average intelligence.</span>`;
+				r += `clever; with ${his} education, ${he} can be considered of <span class="deepskyblue">above average intelligence.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
 				r += `alert; ${he} is of average intelligence due to being`;
 				if (slave.intelligenceImplant >= 30) {
@@ -206,20 +206,20 @@ App.Desc.eyes = function (slave) {
 			if (slave.intelligence + slave.intelligenceImplant >= -15) {
 				r += `alert; with ${his} education, ${he} can be considered of average intelligence. `;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `dim; ${he} is of <span class=orangered>below average intelligence</span> despite having been `;
+				r += `dim; ${he} is of <span class="orangered">below average intelligence</span> despite having been `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `thoroughly `;
 				}
 				r += `educated. `;
 			} else {
-				r += `dim; ${he} is of <span class=orangered>below average intelligence</span> and is poorly educated. `;
+				r += `dim; ${he} is of <span class="orangered">below average intelligence</span> and is poorly educated. `;
 			}
 		} else if (slave.intelligence >= -95) {
 			r += `${His} ${slave.eyeColor} eyes are `;
 			if (slave.intelligence + slave.intelligenceImplant >= -50) {
-				r += `dim; even with ${his} education, ${he} can only be considered of <span class=orangered>below average intelligence.</span>`;
+				r += `dim; even with ${his} education, ${he} can only be considered of <span class="orangered">below average intelligence.</span>`;
 			} else if (slave.intelligenceImplant >= 15) {
-				r += `dull; ${he} is <span class=orangered>quite stupid</span> despite having `;
+				r += `dull; ${he} is <span class="orangered">quite stupid</span> despite having `;
 				if (slave.intelligenceImplant >= 30) {
 					r += `an advanced`;
 				} else {
@@ -227,16 +227,16 @@ App.Desc.eyes = function (slave) {
 				}
 				r += ` education. `;
 			} else {
-				r += `dull; ${he} is <span class=orangered>quite stupid</span> and ignorant. `;
+				r += `dull; ${he} is <span class="orangered">quite stupid</span> and ignorant. `;
 			}
 		} else {
 			r += `${His} ${slave.eyeColor}-eyed gaze betrays near-total insensibility; `;
 			if (slave.intelligence + slave.intelligenceImplant >= -95) {
-				r += `even with ${his} education, ${he} is still <span class=orangered>really stupid.</span>`;
+				r += `even with ${his} education, ${he} is still <span class="orangered">really stupid.</span>`;
 			} else if (slave.intelligenceImplant > 0) {
-				r += `${he} is <span class=orangered>a moron,</span> yet somehow still remembers the basics of an education. `;
+				r += `${he} is <span class="orangered">a moron,</span> yet somehow still remembers the basics of an education. `;
 			} else {
-				r += `${he} is <span class=orangered>a moron,</span> and ignorant to boot. `;
+				r += `${he} is <span class="orangered">a moron,</span> and ignorant to boot. `;
 			}
 		}
 	}
@@ -247,7 +247,7 @@ App.Desc.eyes = function (slave) {
  * @param {App.Entity.SlaveState} slave
  * @returns {string} Slave's eye color
  */
-App.Desc.eyeColor = function (slave) {
+App.Desc.eyeColor = function(slave) {
 	"use strict";
 	let r;
 
@@ -263,9 +263,9 @@ App.Desc.eyeColor = function (slave) {
 
 /**
  * @param {App.Entity.SlaveState} slave
- * @returns {string} The slave's age and health
+ * @returns {string} Slave's age and health
  */
-App.Desc.ageAndHealth = function (slave) {
+App.Desc.ageAndHealth = function(slave) {
 	"use strict";
 	const V = State.variables;
 	let r = ``;
@@ -295,17 +295,17 @@ App.Desc.ageAndHealth = function (slave) {
 
 	if (!slave.fuckdoll) {
 		if (slave.health < -90) {
-			r += `${He} is nearly unresponsive. ${He}'s obviously <span class=red>dangerously sick,</span>`;
+			r += `${He} is nearly unresponsive. ${He}'s obviously <span class="red">dangerously sick,</span>`;
 		} else if (slave.health < -50) {
-			r += `${He} seems <span class=red>very sick,</span>`;
+			r += `${He} seems <span class="red">very sick,</span>`;
 		} else if (slave.health < -20) {
-			r += `${He} seems <span class=red>ill,</span>`;
+			r += `${He} seems <span class="red">ill,</span>`;
 		} else if (slave.health <= 20) {
-			r += `${He} seems reasonably <span class=yellow>healthy,</span>`;
+			r += `${He} seems reasonably <span class="yellow">healthy,</span>`;
 		} else if (slave.health <= 50) {
-			r += `${He} shines with <span class=green>good health,</span>`;
+			r += `${He} shines with <span class="green">good health,</span>`;
 		} else {
-			r += `${He} almost gleams; ${he}'s in the absolute <span class=green>best of health,</span>`;
+			r += `${He} almost gleams; ${he}'s in the absolute <span class="green">best of health,</span>`;
 		}
 		age = slave.actualAge + 1;
 		r += ` and ${he}'s `;
@@ -454,13 +454,13 @@ App.Desc.ageAndHealth = function (slave) {
 				}
 				r += ` ${He} appears to be slave.visualAge years old and ${he} `;
 				if (slave.visualAge <= 8) {
-					r += `has induced <span class=orange>NCS</span> and will always have a ${bodyNCS} body, no matter how long ${he} lives.`;
+					r += `has induced <span class="orange">NCS</span> and will always have a ${bodyNCS} body, no matter how long ${he} lives.`;
 				} else if (slave.visualAge < 13) {
-					r += `has induced <span class=orange>NCS</span> and will have a ${bodyNCS} body for the rest of ${his} life.`;
+					r += `has induced <span class="orange">NCS</span> and will have a ${bodyNCS} body for the rest of ${his} life.`;
 				} else if (slave.visualAge < 20) {
-					r += `still has a teen body for now, but with ${his} <span class=orange>NCS,</span> ${he} will eventually regress in age to look like a little $girl again.`;
+					r += `still has a teen body for now, but with ${his} <span class="orange">NCS,</span> ${he} will eventually regress in age to look like a little $girl again.`;
 				} else {
-					r += `still has the body of an adult, but ${his} <span class=orange>NCS</span> has `;
+					r += `still has the body of an adult, but ${his} <span class="orange">NCS</span> has `;
 					if (slave.physicalAge - slave.visualAge <= 5) {
 						r += `not really begun to youthen ${his} appearance yet.`;
 					} else if (slave.physicalAge - slave.visualAge <= 10) {
@@ -551,126 +551,134 @@ App.Desc.ageAndHealth = function (slave) {
 	} else {
 		r += ` The Fuckdoll gives no external indication of ${his} health or age, but upon query ${his} systems reports that ${he} is`;
 		if (slave.health < -90) {
-			r += `<span class=red>dangerously sick</span>`;
+			r += `<span class="red">dangerously sick</span>`;
 		} else if (slave.health < -50) {
-			r += `<span class=red>very sick</span>`;
+			r += `<span class="red">very sick</span>`;
 		} else if (slave.health < -20) {
-			r += `<span class=red>ill</span>`;
+			r += `<span class="red">ill</span>`;
 		} else if (slave.health <= 20) {
-			r += `<span class=yellow>healthy</span>`;
+			r += `<span class="yellow">healthy</span>`;
 		} else if (slave.health <= 50) {
-			r += `<span class=green>very health</span>`;
+			r += `<span class="green">very health</span>`;
 		} else {
-			r += `<span class=green>extremely healthy</span>`;
+			r += `<span class="green">extremely healthy</span>`;
 		}
 		r += ` and ${slave.physicalAge} years old.`;
 	}
 	return r;
 };
 
-App.Desc.brand =
-	/**
-	 * @param {App.Entity.SlaveState} slave
-	 * @returns {string} Slave's brand
-	 */
-	function (slave) {
-		"use strict";
-		let r = ``;
-		let bellyAccessory;
-		/* eslint-disable */
-		let pronouns = getPronouns(slave);
-		let he = pronouns.pronoun;
-		let him = pronouns.object;
-		let his = pronouns.possessive;
-		let hers = pronouns.possessivePronoun;
-		let himself = pronouns.objectReflexive;
-		let boy = pronouns.noun;
-		let He = capFirstChar(he);
-		let His = capFirstChar(his);
-		/* eslint-enable */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string} Slave's brand
+ */
+App.Desc.brand = function(slave) {
+	"use strict";
+	let r = ``;
+	let bellyAccessory;
+	/* eslint-disable */
+	let pronouns = getPronouns(slave);
+	let he = pronouns.pronoun;
+	let him = pronouns.object;
+	let his = pronouns.possessive;
+	let hers = pronouns.possessivePronoun;
+	let himself = pronouns.objectReflexive;
+	let boy = pronouns.noun;
+	let He = capFirstChar(he);
+	let His = capFirstChar(his);
+	/* eslint-enable */
 
-		if (slave.brand) {
-			bellyAccessory = slave.bellyAccessory;
-			if (setup.fakeBellies.includes(bellyAccessory) && slave.brandLocation === "belly") {
-				r += `${His} fake belly has ${slave.brand} branded on it. `;
-			} else {
-				r += `${He} has ${slave.brand} branded into the flesh of ${his} ${slave.brandLocation}. `;
-			}
+	if (slave.brand) {
+		bellyAccessory = slave.bellyAccessory;
+		if (setup.fakeBellies.includes(bellyAccessory) && slave.brandLocation === "belly") {
+			r += `${His} fake belly has ${slave.brand} branded on it. `;
+		} else {
+			r += `${He} has ${slave.brand} branded into the flesh of ${his} ${slave.brandLocation}. `;
 		}
 		return r;
-	};
+	}
+}
 
-App.Desc.amputee =
-	/**
-	 * @param {App.Entity.SlaveState} slave
-	 * @returns {string} Description of slave's amputation, if present
-	 */
-	function (slave) {
-		"use strict";
-		let r = ``;
-		/* eslint-disable */
-		let pronouns = getPronouns(slave);
-		let he = pronouns.pronoun;
-		let him = pronouns.object;
-		let his = pronouns.possessive;
-		let hers = pronouns.possessivePronoun;
-		let himself = pronouns.objectReflexive;
-		let boy = pronouns.noun;
-		let He = capFirstChar(he);
-		let His = capFirstChar(his);
-		/* eslint-enable */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string} Description of slave's amputation, if present
+ */
+App.Desc.amputee = function(slave) {
+	"use strict";
+	let r = ``;
+	/* eslint-disable */
+	let pronouns = getPronouns(slave);
+	let he = pronouns.pronoun;
+	let him = pronouns.object;
+	let his = pronouns.possessive;
+	let hers = pronouns.possessivePronoun;
+	let himself = pronouns.objectReflexive;
+	let boy = pronouns.noun;
+	let He = capFirstChar(he);
+	let His = capFirstChar(his);
+	/* eslint-enable */
 
-		if (slave.amp) {
-			if (slave.amp === -1) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with a set of modern prosthetic limbs that allow ${him} a fairly normal life. `;
-			} else if (slave.amp === -2) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for sex. ${His} fingertips vibrate, ${his} finger joints are masked to prevent pinching, and ${his} hands can dispense lube. `;
-			} else if (slave.amp === -3) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized to look natural. They are covered in a material that closely mimics living ${slave.skin} skin, and their servos are noise dampened. `;
-			} else if (slave.amp === -4) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for combat. They're hardened, strengthened, and more responsive, and they conceal taser knuckles and extensible forearm blades. `;
-			} else if (slave.amp === -5) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> but ${he}'s equipped with advanced cybernetic P-Limbs. The ultimate fusion of combat effectiveness and instruments of pleasure, they're capable of performing multiple functions. They can enhance sex through ${his} vibrating hands and increase ${his} combat skills with hardened, yet flexible artificial muscles. They have an advanced artificial skin that can send electrical impulses that can cause stimulation or extreme pain. `;
-			} else if (slave.amp > 0) {
-				r += `${slave.slaveName} is a <span class=pink>quadruple amputee,</span> making ${him} a convenient torso-only sex toy. `;
-			} else {
-				r += `The most obvious thing about ${slave.slaveName} is that ${he} is a <span class=pink>quadruple amputee:</span> ${he} has neither arms nor legs. `;
-			}
+	if (slave.amp) {
+		if (slave.amp === -1) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> but ${he}'s equipped with a set of modern prosthetic limbs that allow ${him} a fairly normal life. `;
+		} else if (slave.amp === -2) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for sex. ${His} fingertips vibrate, ${his} finger joints are masked to prevent pinching, and ${his} hands can dispense lube. `;
+		} else if (slave.amp === -3) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized to look natural. They are covered in a material that closely mimics living ${slave.skin} skin, and their servos are noise dampened. `;
+		} else if (slave.amp === -4) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> but ${he}'s equipped with P-Limbs customized for combat. They're hardened, strengthened, and more responsive, and they conceal taser knuckles and extensible forearm blades. `;
+		} else if (slave.amp === -5) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> but ${he}'s equipped with advanced cybernetic P-Limbs. The ultimate fusion of combat effectiveness and instruments of pleasure, they're capable of performing multiple functions. They can enhance sex through ${his} vibrating hands and increase ${his} combat skills with hardened, yet flexible artificial muscles. They have an advanced artificial skin that can send electrical impulses that can cause stimulation or extreme pain. `;
+		} else if (slave.amp > 0) {
+			r += `${slave.slaveName} is a <span class="pink">quadruple amputee,</span> making ${him} a convenient torso-only sex toy. `;
+		} else {
+			r += `The most obvious thing about ${slave.slaveName} is that ${he} is a <span class="pink">quadruple amputee:</span> ${he} has neither arms nor legs. `;
 		}
 		return r;
-	};
+	}
+}
+
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string} Description of slave's waist
+ */
+App.Desc.waist = function(slave) {
+	"use strict";
+	const V = State.variables;
+	let r = ``;
+	let belly;
+	let woman;
+	/* eslint-disable */
+	let pronouns = getPronouns(slave);
+	let he = pronouns.pronoun;
+	let him = pronouns.object;
+	let his = pronouns.possessive;
+	let hers = pronouns.possessivePronoun;
+	let himself = pronouns.objectReflexive;
+	let boy = pronouns.noun;
+	let He = capFirstChar(he);
+	let His = capFirstChar(his);
+	/* eslint-enable */
 
-App.Desc.waist =
-	/**
-	 * @param {App.Entity.SlaveState} slave
-	 * @returns {string} Description of slave's waist
-	 */
-	function (slave) {
-		"use strict";
-		const V = State.variables;
-		let r = ``;
-		let belly;
-		let woman;
-		/* eslint-disable */
-		let pronouns = getPronouns(slave);
-		let he = pronouns.pronoun;
-		let him = pronouns.object;
-		let his = pronouns.possessive;
-		let hers = pronouns.possessivePronoun;
-		let himself = pronouns.objectReflexive;
-		let boy = pronouns.noun;
-		let He = capFirstChar(he);
-		let His = capFirstChar(his);
-		/* eslint-enable */
+	(boy === "girl" ? woman = "woman" : woman = "man");
+	if (slave.belly >= 1500) {
+		belly = bellyAdjective(slave);
+	}
 
-		(boy === "girl" ? woman = "woman" : woman = "man");
-		if (slave.belly >= 1500) {
-			belly = bellyAdjective(slave);
+	r += `${He} has `;
+	if (slave.waist > 95) {
+		r += `a badly <span class="red">masculine waist</span> that ruins ${his} figure`;
+		if (slave.weight > 30) {
+			r += ` and greatly exaggerates how fat ${he} is. `;
+		} else if (slave.weight < -30) {
+			r += ` despite how thin ${he} is. `;
+		} else {
+			r += `. `;
 		}
 
 		r += `${He} has `;
 		if (slave.waist > 95) {
-			r += `a badly <span class=red>masculine waist</span> that ruins ${his} figure`;
+			r += `a badly <span class="red">masculine waist</span> that ruins ${his} figure`;
 			if (slave.weight > 30) {
 				r += ` and greatly exaggerates how fat ${he} is. `;
 			} else if (slave.weight < -30) {
@@ -688,32 +696,32 @@ App.Desc.waist =
 							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 						}
 					}
-				} else if (slave.belly < 300000) {
-					r += `${His} ${belly} belly is hidden by ${his} thick waist. `;
-				} else if (slave.belly < 450000) {
-					r += `${His} ${belly} belly can be seen around ${his} thick waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} thick waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 300000) {
+				r += `${His} ${belly} belly is hidden by ${his} thick waist. `;
+			} else if (slave.belly < 450000) {
+				r += `${His} ${belly} belly can be seen around ${his} thick waist. `;
+			} else if (slave.belly < 600000) {
+				r += `${His} ${belly} belly can clearly be seen around ${his} thick waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
-				} else if (slave.belly < 750000) {
-					r += `${His} ${belly} belly lewdly bulges around ${his} thick waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 750000) {
+				r += `${His} ${belly} belly lewdly bulges around ${his} thick waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
 		} else if (slave.waist > 40) {
-			r += `a broad, <span class=red>ugly waist</span> that makes ${him} look mannish`;
+			r += `a broad, <span class="red">ugly waist</span> that makes ${him} look mannish`;
 			if (slave.weight > 30) {
 				r += ` and exaggerates how fat ${he} is. `;
 			} else if (slave.weight < -30) {
@@ -744,19 +752,23 @@ App.Desc.waist =
 							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 						}
 					}
-				} else if (slave.belly < 750000) {
-					r += `${His} ${belly} belly lewdly bulges around ${his} chunky waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 150000) {
+				r += `${His} ${belly} belly is hidden by ${his} chunky waist. `;
+			} else if (slave.belly < 450000) {
+				r += `${His} ${belly} belly can be seen around ${his} chunky waist. `;
+			} else if (slave.belly < 600000) {
+				r += `${His} ${belly} belly can clearly be seen around ${his} chunky waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
 		} else if (slave.waist > 10) {
-			r += `an <span class=red>unattractive waist</span> that conceals ${his} `;
+			r += `an <span class="red">unattractive waist</span> that conceals ${his} `;
 			if (slave.visualAge > 25) {
 				r += `girlish`;
 			} else {
@@ -770,195 +782,211 @@ App.Desc.waist =
 			} else {
 				r += `. `;
 			}
-			if (slave.belly >= 1500) {
-				if (slave.belly >= 750000) {
-					r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 10000) {
-					r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 200000) {
-					r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 300000) {
-					r += `${His} ${belly} belly can be seen around ${his} waist. `;
-				} else if (slave.belly < 450000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 750000) {
-					r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+		}
+	} else if (slave.waist > 10) {
+		r += `an <span class="red">unattractive waist</span> that conceals ${his} `;
+		if (slave.visualAge > 25) {
+			r += `girlish`;
+		} else {
+			r += `womanly`;
+		}
+		r += ` figure`;
+		if (slave.weight > 30) {
+			r += ` and accentuates how fat ${he} is. `;
+		} else if (slave.weight < -30) {
+			r += ` despite how thin ${he} is. `;
+		} else {
+			r += `. `;
+		}
+		if (slave.belly >= 1500) {
+			if (slave.belly >= 750000) {
+				r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
-		} else if (slave.waist > -10) {
-			r += `an average waist for a `;
-			if (slave.visualAge > 25) {
-				r += `${boy}`;
-			} else {
-				r += `${woman}`;
+		} else if (slave.belly < 150000) {
+			r += `${His} ${belly} belly is hidden by ${his} chunky waist. `;
+		} else if (slave.belly < 450000) {
+			r += `${His} ${belly} belly can be seen around ${his} chunky waist. `;
+		} else if (slave.belly < 600000) {
+			r += `${His} ${belly} belly can clearly be seen around ${his} chunky waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
 			}
-			if (slave.weight > 30) {
-				r += `, though it looks broader since ${he}'s fat. `;
-			} else if (slave.weight < -30) {
-				r += `, though it looks narrower since ${he}'s thin. `;
-			} else {
-				r += `. `;
+		} else if (slave.belly < 750000) {
+			r += `${His} ${belly} belly lewdly bulges around ${his} chunky waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
 			}
-			if (slave.belly >= 1500) {
-				if (slave.belly >= 750000) {
-					r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 10000) {
-					r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 200000) {
-					r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 300000) {
-					r += `${His} ${belly} belly can be seen around ${his} waist. `;
-				} else if (slave.belly < 450000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 750000) {
-					r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+		}
+	} else if (slave.waist > -10) {
+		r += `an average waist for a `;
+		if (slave.visualAge > 25) {
+			r += `${boy}`;
+		} else {
+			r += `${woman}`;
+		}
+		if (slave.weight > 30) {
+			r += `, though it looks broader since ${he}'s fat. `;
+		} else if (slave.weight < -30) {
+			r += `, though it looks narrower since ${he}'s thin. `;
+		} else {
+			r += `. `;
+		}
+		if (slave.belly >= 1500) {
+			if (slave.belly >= 750000) {
+				r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
-		} else if (slave.waist > -40) {
-			r += `a nice <span class=pink>feminine waist</span> that gives ${him} a `;
-			if (slave.visualAge > 25) {
-				r += `girlish`;
-			} else {
-				r += `womanly`;
+		} else if (slave.belly < 10000) {
+			r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
+		} else if (slave.belly < 200000) {
+			r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
+		} else if (slave.belly < 300000) {
+			r += `${His} ${belly} belly can be seen around ${his} waist. `;
+		} else if (slave.belly < 450000) {
+			r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+		} else if (slave.belly < 600000) {
+			r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
 			}
-			r += ` figure`;
-			if (slave.weight > 30) {
-				r += ` despite ${his} extra weight. `;
-			} else if (slave.weight < -30) {
-				r += ` and accentuates how thin ${he} is. `;
-			} else {
-				r += `. `;
+		} else if (slave.belly < 750000) {
+			r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
 			}
-			if (slave.belly >= 1500) {
-				if (slave.belly >= 750000) {
-					r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 10000) {
-					r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 100000) {
-					r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 300000) {
-					r += `${His} ${belly} belly can be seen around ${his} waist. `;
-				} else if (slave.belly < 450000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
-				} else if (slave.belly < 750000) {
-					r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+		}
+	} else if (slave.waist > -40) {
+		r += `a nice <span class="pink">feminine waist</span> that gives ${him} a `;
+		if (slave.visualAge > 25) {
+			r += `girlish`;
+		} else {
+			r += `womanly`;
+		}
+		r += ` figure`;
+		if (slave.weight > 30) {
+			r += ` despite ${his} extra weight. `;
+		} else if (slave.weight < -30) {
+			r += ` and accentuates how thin ${he} is. `;
+		} else {
+			r += `. `;
+		}
+		if (slave.belly >= 1500) {
+			if (slave.belly >= 750000) {
+				r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
-		} else if (slave.waist > -95) {
-			r += `a hot <span class=pink>wasp waist</span> that gives ${him} an hourglass figure`;
-			if (slave.weight > 30) {
-				r += ` despite $his extra weight. `;
-			} else if (slave.weight < -30) {
-				r += ` further accentuated by how thin $he is. `;
-			} else {
-				r += `. `;
+		} else if (slave.belly < 10000) {
+			r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
+		} else if (slave.belly < 200000) {
+			r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
+		} else if (slave.belly < 300000) {
+			r += `${His} ${belly} belly can be seen around ${his} waist. `;
+		} else if (slave.belly < 450000) {
+			r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+		} else if (slave.belly < 600000) {
+			r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
 			}
-			if (slave.belly >= 1500) {
-				if (slave.belly >= 750000) {
-					r += `${His} ${belly} belly grotesquely bulges around ${his} narrow waist and continues `;
-					if (slave.belly >= 1000000) {
-						r += `quite the distance`;
+		} else if (slave.belly < 750000) {
+			r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
+			if (slave.preg > 3) {
+				if (slave.belly > (slave.pregAdaptation * 1000)) {
+					r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
+				} else {
+					r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+				}
+			}
+		}
+
+	} else if (slave.waist > -40) {
+		r += `a nice <span class="pink">feminine waist</span> that gives ${him} a `
+		if (slave.visualAge > 25) {
+			r += `girlish`;
+		} else {
+			r += `womanly`;
+		}
+		r += ` figure`;
+		if (slave.weight > 30) {
+			r += ` despite ${his} extra weight. `;
+		} else if (slave.weight < -30) {
+			r += ` and accentuates how thin ${he} is. `;
+		} else {
+			r += `. `;
+		}
+		if (slave.belly >= 1500) {
+			if (slave.belly >= 750000) {
+				r += `${His} ${belly} belly grotesquely bulges around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
 					} else {
-						r += `over half a `;
-						if (V.showInches === 2) {
-							r += `yard`;
-						} else {
-							r += `meter`;
-						}
-						r += ` farther to either side. `;
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 10000) {
+				r += `From behind, ${his} figure hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 100000) {
+				r += `From behind, ${his} figure barely hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 300000) {
+				r += `${His} ${belly} belly can be seen around ${his} waist. `;
+			} else if (slave.belly < 450000) {
+				r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+			} else if (slave.belly < 600000) {
+				r += `${His} ${belly} belly can clearly be seen around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
-				} else if (slave.belly < 5000) {
-					r += `From behind, ${his} narrow figure hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 80000) {
-					r += `From behind, ${his} narrow figure barely hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 100000) {
-					r += `${His} ${belly} belly can be seen around ${his} narrow waist. `;
-				} else if (slave.belly < 450000) {
-					r += `${His} ${belly} belly lewdly extends past ${his} narrow waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 750000) {
+				r += `${His} ${belly} belly lewdly bulges around ${his} waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				} else if (slave.belly < 750000) {
 					r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `;
@@ -967,18 +995,11 @@ App.Desc.waist =
 					} else {
 						r += `meter`;
 					}
-					r += `in both directions. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
-					}
+					r += ` farther to either side. `;
 				}
 			}
 		} else {
-			r += `an <span class=pink>absurdly narrow waist</span> that gives ${him} a cartoonishly hourglass figure`;
+			r += `an <span class="pink">absurdly narrow waist</span> that gives ${him} a cartoonishly hourglass figure`;
 			if (slave.weight > 30) {
 				r += ` made even more ludicrous by ${his} extra weight. `;
 			} else if (slave.weight < -30) {
@@ -992,39 +1013,39 @@ App.Desc.waist =
 					if (slave.belly >= 1000000) {
 						r += `quite the distance`;
 					} else {
-						r += `over half a `;
-						if (V.showInches === 2) {
-							r += `yard`;
-						} else {
-							r += `meter`;
-						}
-						r += ` farther to either side. `;
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 5000) {
+				r += `From behind, ${his} narrow figure hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 80000) {
+				r += `From behind, ${his} narrow figure barely hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 100000) {
+				r += `${His} ${belly} belly can be seen around ${his} narrow waist. `;
+			} else if (slave.belly < 450000) {
+				r += `${His} ${belly} belly lewdly extends past ${his} narrow waist. `;
+			} else if (slave.belly < 600000) {
+				r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
-				} else if (slave.belly < 2000) {
-					r += `From behind, ${his} narrow figure hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 5000) {
-					r += `From behind, ${his} narrow figure barely hides ${his} ${belly} belly. `;
-				} else if (slave.belly < 8000) {
-					r += `${His} ${belly} belly can be seen around ${his} narrow waist. `;
-				} else if (slave.belly < 15000) {
-					r += `${His} ${belly} belly lewdly extends past ${his} narrow waist. `;
-				} else if (slave.belly < 45000) {
-					r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
-				} else if (slave.belly < 600000) {
-					r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+				}
+			} else if (slave.belly < 750000) {
+				r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `
+				if (V.showInches === 2) {
+					r += `yard`;
+				} else {
+					r += `meter`;
+				}
+				r += `in both directions. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				} else if (slave.belly < 750000) {
 					r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `;
@@ -1033,16 +1054,51 @@ App.Desc.waist =
 					} else {
 						r += `meter`;
 					}
-					r += ` in both directions. `;
-					if (slave.preg > 3) {
-						if (slave.belly > (slave.pregAdaptation * 1000)) {
-							r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline barely visible from behind. `;
-						} else {
-							r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
-						}
+					r += ` farther to either side. `;
+				}
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is horribly distended by ${his} bursting womb in a last ditch effort to find more room for ${his} children, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+					}
+				}
+			} else if (slave.belly < 2000) {
+				r += `From behind, ${his} narrow figure hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 5000) {
+				r += `From behind, ${his} narrow figure barely hides ${his} ${belly} belly. `;
+			} else if (slave.belly < 8000) {
+				r += `${His} ${belly} belly can be seen around ${his} narrow waist. `;
+			} else if (slave.belly < 15000) {
+				r += `${His} ${belly} belly lewdly extends past ${his} narrow waist. `;
+			} else if (slave.belly < 45000) {
+				r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
+			} else if (slave.belly < 600000) {
+				r += `${His} ${belly} belly lewdly distends far to either side of ${his} narrow waist. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is swollen wider than usual by ${his} crowded womb in its search for more room, leaving ${his} original waistline only visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
+					}
+				}
+			} else if (slave.belly < 750000) {
+				r += `${His} ${belly} belly lewdly bulges to either side of ${his} narrow waist and continues for nearly half a `
+				if (V.showInches === 2) {
+					r += `yard`;
+				} else {
+					r += `meter`;
+				}
+				r += ` in both directions. `;
+				if (slave.preg > 3) {
+					if (slave.belly > (slave.pregAdaptation * 1000)) {
+						r += `${His} waist is greatly distended by ${his} overfilled womb in its desperate search for more room, leaving ${his} original waistline barely visible from behind. `;
+					} else {
+						r += `However, ${his} body is so adapted to pregnancy that ${his} womb rests forward enough to preserve the shape of ${his} waistline. `;
 					}
 				}
 			}
 		}
 		return r;
-	};
+	}
+}
diff --git a/src/js/displayVariables.js b/src/js/displayVariables.js
index c153952509e31eab3818533944d8eaf82e651061..2863f516b41e556f9a58ef191266429ad3f187dd 100644
--- a/src/js/displayVariables.js
+++ b/src/js/displayVariables.js
@@ -1,2 +1,2 @@
 /*! <<checkvars>> macro for SugarCube 2.x */
-!function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<checkvars>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("checkvars",{handler:function(){function toString(value,indent){var baseType=typeof value;switch(baseType){case"number":return isNaN(value)?"NaN":isFinite(value)?String(value):"Infinity";case"string":return JSON.stringify(value);case"function":return"(function)";default:if("object"!==baseType||null==value)return String(value);var objType=Object.prototype.toString.call(value);if("[object Date]"===objType)return'(object: Date, value: "'+value.toISOString()+'")';if("[object RegExp]"===objType)return"(object: RegExp, value: "+value.toString()+")";var opener,closer,result=[],indentText="  ";return indent||(indent=""),("[object Set]"===objType||value instanceof Set)&&(value=Array.from(value)),Array.isArray(value)?(opener="[\n",closer="\n"+indent+"]",value.forEach(function(p,i){result.push(indent+indentText+i+" ⇒ "+toString(value[i],indent+indentText))}),Object.keys(value).forEach(function(p){/^\d+$/.test(p)||result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})):"[object Map]"===objType||value instanceof Map?(opener="{\n",closer="\n"+indent+"}",Array.from(value).map(function(kv){result.push(indent+indentText+toString(kv[0],indent+indentText)+" ⇒ "+toString(kv[1],indent+indentText))})):(opener="{\n",closer="\n"+indent+"}",Object.keys(value).forEach(function(p){result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})),opener+result.join(",\n")+closer}}var dialog,sv=State.variables,names=Object.keys(sv);if(dialog=UI.setup("Story $variables","checkvars"),0===names.length)return dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><p><em>No $variables currently set…</em></p>",void UI.open();dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody></tbody></table>"+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>');var tbody=dialog.querySelector("tbody");names.sort(function(a,b){return Util.isNumeric(a)&&Util.isNumeric(b)?Number(a)-Number(b):a.localeCompare(b)});for(var i=0;i<names.length;i++){var tr=document.createElement("tr"),tdName=document.createElement("td"),tdValue=document.createElement("td");tdName.textContent="$"+names[i],tdValue.textContent = toString(sv[names[i]]),tr.appendChild(tdName),tr.appendChild(tdValue),tbody.appendChild(tr)}UI.open()}})}();
+!function(){"use strict";if("undefined"==typeof version||"undefined"==typeof version.title||"SugarCube"!==version.title||"undefined"==typeof version.major||version.major<2)throw new Error("<<checkvars>> macro requires SugarCube 2.0 or greater, aborting load");Macro.add("checkvars",{handler:function(){function toString(value,indent){var baseType=typeof value;switch(baseType){case"number":return isNaN(value)?"NaN":isFinite(value)?String(value):"Infinity";case"string":return JSON.stringify(value);case"function":return"(function)";default:if("object"!==baseType||null==value)return String(value);var objType=Object.prototype.toString.call(value);if("[object Date]"===objType)return'(object: Date, value: "'+value.toISOString()+'")';if("[object RegExp]"===objType)return"(object: RegExp, value: "+value.toString()+")";var opener,closer,result=[],indentText="  ";return indent||(indent=""),("[object Set]"===objType||value instanceof Set)&&(value=Array.from(value)),Array.isArray(value)?(opener="[\n",closer="\n"+indent+"]",value.forEach(function(p,i){result.push(indent+indentText+i+" ⇒ "+toString(value[i],indent+indentText))}),Object.keys(value).forEach(function(p){/^\d+$/.test(p)||result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})):"[object Map]"===objType||value instanceof Map?(opener="{\n",closer="\n"+indent+"}",Array.from(value).map(function(kv){result.push(indent+indentText+toString(kv[0],indent+indentText)+" ⇒ "+toString(kv[1],indent+indentText))})):(opener="{\n",closer="\n"+indent+"}",Object.keys(value).forEach(function(p){result.push(indent+indentText+toString(p)+" ⇒ "+toString(value[p],indent+indentText))})),opener+result.join(",\n")+closer}}var dialog,sv=State.variables,names=Object.keys(sv);if(dialog=UI.setup("Story $variables","checkvars"),0===names.length)return dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><p><em>No $variables currently set…</em></p>",void UI.open();dialog.innerHTML="<h1>Story $variables (<code>State.variables</code>):</h1><table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody></tbody></table>"+(/applewebkit|chrome/.test(Browser.userAgent)?"":'<div class="scroll-pad">&nbsp;</div>');var tbody=dialog.querySelector("tbody");names.sort(function(a,b){return Util.isNumeric(a)&&Util.isNumeric(b)?Number(a)-Number(b):a.localeCompare(b)});for(var i=0;i<names.length;i++){var tr=document.createElement("tr"),tdName=document.createElement("td"),tdValue=document.createElement("td");tdName.textContent="$"+names[i],tdValue.textContent = toString(sv[names[i]]),tr.appendChild(tdName),tr.appendChild(tdValue),tbody.appendChild(tr)}UI.open()}})}();
\ No newline at end of file
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index 33aa4a624cfaac310cf04f04179ed2a6109c07c1..970863e4f81ca2df95beb098beba9f53a34ea804 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -1,13 +1,42 @@
 window.LivingRule = Object.freeze({LUXURIOUS: 'luxurious', NORMAL: 'normal', SPARE: 'spare'});
 window.Job = Object.freeze({
-	DAIRY: 'work in the dairy', MILKMAID: 'be the Milkmaid', MASTER_SUITE: 'serve in the master suite', CONCUBINE: 'be your Concubine',
-	BABY_FACTORY: 'labor in the production line', BROTHEL: 'work in the brothel', MADAM: 'be the Madam', ARCADE: 'be confined in the arcade',
-	SERVANT: 'work as a servant', SERVER: 'be a servant', STEWARD: 'be the Stewardess', CLUB: 'serve in the club', DJ: 'be the DJ',
-	JAIL: 'be confined in the cellblock', WARDEN: 'be the Wardeness', CLINIC: 'get treatment in the clinic', NURSE: 'be the Nurse',
-	HGTOY: 'live with your Head Girl', SCHOOL: 'learn in the schoolroom', TEACHER: 'be the Schoolteacher', SPA: 'rest in the spa', ATTEND: 'be the Attendant',
-	NANNY: 'work as a nanny', MATRON: 'be the Matron', FARMYARD: 'work as a farmhand', FARMER: 'be the Farmer', REST: 'rest'
+	DAIRY: 'work in the dairy',
+	MILKMAID: 'be the Milkmaid',
+	MASTER_SUITE: 'serve in the master suite',
+	CONCUBINE: 'be your Concubine',
+	BABY_FACTORY: 'labor in the production line',
+	BROTHEL: 'work in the brothel',
+	MADAM: 'be the Madam',
+	ARCADE: 'be confined in the arcade',
+	SERVANT: 'work as a servant',
+	SERVER: 'be a servant',
+	STEWARD: 'be the Stewardess',
+	CLUB: 'serve in the club',
+	DJ: 'be the DJ',
+	JAIL: 'be confined in the cellblock',
+	WARDEN: 'be the Wardeness',
+	CLINIC: 'get treatment in the clinic',
+	NURSE: 'be the Nurse',
+	HGTOY: 'live with your Head Girl',
+	SCHOOL: 'learn in the schoolroom',
+	TEACHER: 'be the Schoolteacher',
+	SPA: 'rest in the spa',
+	ATTEND: 'be the Attendant',
+	NANNY: 'work as a nanny',
+	MATRON: 'be the Matron',
+	FARMYARD: 'work as a farmhand',
+	FARMER: 'be the Farmer',
+	REST: 'rest'
+});
+window.PersonalAttention = Object.freeze({
+	TRADE: 'trading',
+	WAR: 'warfare',
+	SLAVING: 'slaving',
+	ENGINEERING: 'engineering',
+	MEDICINE: 'medicine',
+	MAID: 'upkeep',
+	HACKING: 'hacking'
 });
-window.PersonalAttention = Object.freeze({TRADE: 'trading', WAR: 'warfare', SLAVING: 'slaving', ENGINEERING: 'engineering', MEDICINE: 'medicine', MAID: 'upkeep', HACKING: 'hacking'});
 
 window.predictCost = function(array) {
 	const array2 = array;
@@ -34,20 +63,20 @@ window.predictCost = function(array) {
 	getRecruiterCosts() +
 	getSchoolCosts() +
 	getPolicyCosts() +
-	getCyberModCosts() +
+	getProstheticsCosts() +
 	getPCTrainingCosts() +
 	getPCCosts() +
 	predictTotalSlaveCosts(array2)
 	);
 
-	//these two apply a multiplicative effect to all costs so far.
+	// these two apply a multiplicative effect to all costs so far.
 	totalCosts = getEnvironmentCosts(totalCosts);
 	totalCosts = getPCMultiplierCosts(totalCosts);
 
-	//in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now.
+	// in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now.
 	totalCosts += (
 		getSFCosts() +
-	getWeatherCosts()
+		getWeatherCosts()
 	);
 	/*
 	// clean up
@@ -86,30 +115,30 @@ window.getCost = function(array) {
 	cashX(forceNeg(getRecruiterCosts()), "recruiter");
 	cashX(forceNeg(getSchoolCosts()), "schoolBacking");
 	cashX(forceNeg(getPolicyCosts()), "policies");
-	cashX(forceNeg(getCyberModCosts()), "lab");
+	cashX(forceNeg(getProstheticsCosts()), "lab");
 	cashX(forceNeg(getPCTrainingCosts()), "PCtraining");
 	cashX(forceNeg(getPCCosts()), "PCmedical");
 	getTotalSlaveCosts(array2);
 
 
-	//these two apply a multiplicative effect to all costs so far.
+	// these two apply a multiplicative effect to all costs so far.
 	// Calculate what the deduced expenses would be, then subtract
-	costSoFar = (oldCash - State.variables.cash); //How much we have spent by this point; expected to be positive.
-	cashX(costSoFar - getEnvironmentCosts(costSoFar), "environment"); //getEnv takes total costs and makes it worse. Figure out how much worse and record it
+	costSoFar = (oldCash - State.variables.cash); // How much we have spent by this point; expected to be positive.
+	cashX(costSoFar - getEnvironmentCosts(costSoFar), "environment"); // getEnv takes total costs and makes it worse. Figure out how much worse and record it
 
 	costSoFar = (oldCash - State.variables.cash);
 	cashX(costSoFar - getPCMultiplierCosts(costSoFar), "PCskills");
 
-	//in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now.
+	// in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now.
 	cashX(forceNeg(getSFCosts()), "specialForces");
 	cashX(forceNeg(getWeatherCosts()), "weather");
 	return (oldCash - State.variables.cash);
 };
 
-//slave expenses
+// slave expenses
 window.predictTotalSlaveCosts = function(array3) {
 	let loopCosts = 0;
-	//slave expenses
+	// slave expenses
 	for (const slave of array3) {
 		loopCosts += getSlaveCost(slave);
 		loopCosts += getSlaveMinorCosts(slave);
@@ -126,10 +155,10 @@ window.getTotalSlaveCosts = function(array3) {
 		slaveCostMinor = getSlaveMinorCosts(slave);
 		cashX(Math.abs(slaveCostMinor), "houseServant", slave);
 	}
-	//nothing to return, cashX already billed.
+	// nothing to return, cashX already billed.
 };
 
-//facility expenses
+// facility expenses
 window.getBrothelCosts = function() {
 	const facilityCost = State.variables.facilityCost;
 	const brothel = State.variables.brothel;
@@ -148,9 +177,9 @@ window.getBrothelAdsCosts = function() {
 };
 
 window.getArcadeCosts = function() {
-	var facilityCost = State.variables.facilityCost;
-	var arcade = State.variables.arcade;
-	var costs = (arcade * facilityCost * 0.05);
+	const facilityCost = State.variables.facilityCost;
+	const arcade = State.variables.arcade;
+	let costs = (arcade * facilityCost * 0.05);
 	costs += (0.02 * State.variables.arcadeUpgradeInjectors * arcade * facilityCost) + (0.05 * State.variables.arcadeUpgradeCollectors * arcade * facilityCost) + (0.02 * State.variables.arcadeUpgradeHealth * arcade * facilityCost);
 	return costs;
 };
@@ -178,9 +207,9 @@ window.getClubAdsCosts = function() {
 window.getDairyCosts = function() {
 	const facilityCost = State.variables.facilityCost;
 	const dairy = State.variables.dairy;
-	let costs = (dairy * facilityCost) + (0.2 * State.variables.dairyFeedersUpgrade * dairy * facilityCost)
-	+ (0.1 * State.variables.dairyPregUpgrade * dairy * facilityCost)
-	+ (0.2 * State.variables.dairyStimulatorsUpgrade * facilityCost);
+	let costs = (dairy * facilityCost) + (0.2 * State.variables.dairyFeedersUpgrade * dairy * facilityCost) +
+		(0.1 * State.variables.dairyPregUpgrade * dairy * facilityCost) +
+		(0.2 * State.variables.dairyStimulatorsUpgrade * facilityCost);
 	if (dairy > 0) {
 		costs += ((State.variables.bioreactorsXY + State.variables.bioreactorsXX + State.variables.bioreactorsHerm + State.variables.bioreactorsBarren) * 100);
 	}
@@ -191,11 +220,11 @@ window.getIncubatorCosts = function() {
 	const facilityCost = State.variables.facilityCost;
 	const incubator = State.variables.incubator;
 	let costs = (State.variables.incubator * facilityCost * 10);
-	costs += (0.2 * State.variables.incubatorUpgradeWeight * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeMuscles * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeReproduction * incubator * facilityCost)
-	+ (0.2 * State.variables.incubatorUpgradeGrowthStims * incubator * facilityCost)
-	+ (0.5 * State.variables.incubatorUpgradeSpeed * incubator * facilityCost);
+	costs += (0.2 * State.variables.incubatorUpgradeWeight * incubator * facilityCost) +
+		(0.2 * State.variables.incubatorUpgradeMuscles * incubator * facilityCost) +
+		(0.2 * State.variables.incubatorUpgradeReproduction * incubator * facilityCost) +
+		(0.2 * State.variables.incubatorUpgradeGrowthStims * incubator * facilityCost) +
+		(0.5 * State.variables.incubatorUpgradeSpeed * incubator * facilityCost);
 	if (incubator > 0) {
 		costs += ((State.variables.incubatorWeightSetting + State.variables.incubatorMusclesSetting + State.variables.incubatorReproductionSetting + State.variables.incubatorGrowthStimsSetting) * 500);
 	}
@@ -235,7 +264,7 @@ window.getFarmyardCosts = function() {
 };
 
 window.getSecurityExpansionCost = function() {
-	//security expansion
+	// security expansion
 	let secExpCost = 0;
 	let soldierMod = 0;
 	if (State.variables.secExp === 1) {
@@ -259,11 +288,9 @@ window.getSecurityExpansionCost = function() {
 		}
 		if (State.variables.soldierWages === 0) {
 			soldierMod = 1;
-		}
-		else if (State.variables.soldierWages === 1) {
+		} else if (State.variables.soldierWages === 1) {
 			soldierMod = 1.5;
-		}
-		else {
+		} else {
 			soldierMod = 2;
 		}
 		if (State.variables.militiaUnits !== null) {
@@ -291,7 +318,7 @@ window.getSecurityExpansionCost = function() {
 	return secExpCost;
 };
 
-//general arcology costs
+// general arcology costs
 
 window.getLifestyleCosts = function() {
 	let costs = 0;
@@ -443,31 +470,27 @@ window.getPolicyCosts = function() {
 	return costs;
 };
 
-window.getCyberModCosts = function() {
-	let costs = 0;
-	if (State.variables.cyberMod !== 0 && State.variables.researchLab.built === 'true') {
-		costs += ((100 * State.variables.researchLab.maxSpace) + (300 * State.variables.researchLab.hired) + (100 * State.variables.researchLab.hired));
-	}
-	return costs;
+window.getProstheticsCosts = function() {
+	return ((100 * State.variables.researchLab.maxSpace) + (300 * State.variables.researchLab.hired) + (100 * State.variables.researchLab.hired));
 };
 
 
-//player expenses
+// player expenses
 window.getPCTrainingCosts = function() {
 	let costs = 0;
 	if (State.variables.PC.actualAge >= State.variables.IsInPrimePC && State.variables.PC.actualAge < State.variables.IsPastPrimePC) {
 		if (State.variables.personalAttention === PersonalAttention.TRADE) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		} else if (State.variables.personalAttention === PersonalAttention.WAR) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		} else if (State.variables.personalAttention === PersonalAttention.SLAVING) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		} else if (State.variables.personalAttention === PersonalAttention.ENGINEERING) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		} else if (State.variables.personalAttention === PersonalAttention.MEDICINE) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		} else if (State.variables.personalAttention === PersonalAttention.HACKING) {
-			costs += 10000*State.variables.AgeEffectOnTrainerPricingPC;
+			costs += 10000 * State.variables.AgeEffectOnTrainerPricingPC;
 		}
 	}
 	return costs;
@@ -520,7 +543,8 @@ window.getEnvironmentCosts = function(cost) {
 window.getSFCosts = function() {
 	let costs = 0;
 	if (State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy !== undefined) {
-		Count(); costs += Math.ceil(State.temporary.SFSubsidy);
+		Count();
+		costs += Math.ceil(State.temporary.SFSubsidy);
 	}
 	return costs;
 };
@@ -582,7 +606,9 @@ window.getSlaveMinorCosts = function(slave) {
 };
 
 window.getSlaveCost = function(s) {
-	if (!s) { return 0; }
+	if (!s) {
+		return 0;
+	}
 	// Data duplicated from Cost Report
 	let cost = 0;
 	const rulesCost = State.variables.rulesCost;
@@ -621,7 +647,8 @@ window.getSlaveCost = function(s) {
 				cost += rulesCost;
 			}
 			break;
-		case Job.SCHOOL: case Job.CLUB:
+		case Job.SCHOOL:
+		case Job.CLUB:
 			cost += rulesCost * 1.5;
 			break;
 		case Job.CLINIC:
@@ -633,7 +660,8 @@ window.getSlaveCost = function(s) {
 				cost += rulesCost;
 			}
 			break;
-		case Job.SPA: case Job.NANNY:
+		case Job.SPA:
+		case Job.NANNY:
 			if (s.livingRules === LivingRule.LUXURIOUS) {
 				cost += rulesCost * 1.75;
 			} else if (s.livingRules === LivingRule.NORMAL) {
@@ -660,7 +688,16 @@ window.getSlaveCost = function(s) {
 				cost += rulesCost * 0.90;
 			}
 			break;
-		case Job.MADAM: case Job.DJ: case Job.NURSE: case Job.WARDEN: case Job.ATTEND: case Job.STEWARD: case Job.MILKMAID: case Job.FARMER: case Job.TEACHER: case Job.MATRON:
+		case Job.MADAM:
+		case Job.DJ:
+		case Job.NURSE:
+		case Job.WARDEN:
+		case Job.ATTEND:
+		case Job.STEWARD:
+		case Job.MILKMAID:
+		case Job.FARMER:
+		case Job.TEACHER:
+		case Job.MATRON:
 			cost += rulesCost * 2;
 			break;
 		default:
@@ -677,10 +714,12 @@ window.getSlaveCost = function(s) {
 	// Food
 	cost += foodCost * 4;
 	switch (s.diet) {
-		case 'fattening': case 'muscle building':
+		case 'fattening':
+		case 'muscle building':
 			cost += foodCost;
 			break;
-		case 'restricted': case 'slimming':
+		case 'restricted':
+		case 'slimming':
 			cost -= foodCost;
 			break;
 	}
@@ -701,14 +740,14 @@ window.getSlaveCost = function(s) {
 		cost -= foodCost;
 	}
 	if (s.lactation > 0) {
-		cost += foodCost * s.lactation * (1 + Math.trunc(s.boobs/10000));
+		cost += foodCost * s.lactation * (1 + Math.trunc(s.boobs / 10000));
 	}
-	if (s.preg > s.pregData.normalBirth/8) {
+	if (s.preg > s.pregData.normalBirth / 8) {
 		if (s.assignment === Job.DAIRY && State.variables.dairyFeedersSetting > 0) {
 			// Extra feeding costs to support pregnancy are covered by dairy feeders.
 			// TODO: Include them here anyway?
-		} else if ((s.assignment === Job.MASTER_SUITE || s.assignment === Job.CONCUBINE)
-			&& State.variables.masterSuiteUpgradePregnancy === 1) {
+		} else if ((s.assignment === Job.MASTER_SUITE || s.assignment === Job.CONCUBINE) &&
+			State.variables.masterSuiteUpgradePregnancy === 1) {
 			// Extra feeding costs to support pregnancy are covered by master suite luxuries.
 			// TODO: Include them here anyway?
 		} else {
@@ -733,12 +772,12 @@ window.getSlaveCost = function(s) {
 	}
 
 	// Accessibility costs
-	if (State.variables.boobAccessibility !== 1 && s.boobs > 20000
-		&& (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
+	if (State.variables.boobAccessibility !== 1 && s.boobs > 20000 &&
+		(s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
 		cost += 50;
 	}
-	if (State.variables.pregAccessibility !== 1
-		&& (s.belly >= 60000) && s.assignment !== Job.BABY_FACTORY && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
+	if (State.variables.pregAccessibility !== 1 &&
+		(s.belly >= 60000) && s.assignment !== Job.BABY_FACTORY && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
 		cost += 100;
 	}
 	if (State.variables.dickAccessibility !== 1 && s.dick > 45 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) {
@@ -807,7 +846,9 @@ window.getSlaveCost = function(s) {
 			case 'food':
 				cost += (foodCost * 4);
 				break;
-			case 'curative': case 'aphrodisiac': case 'tightener':
+			case 'curative':
+			case 'aphrodisiac':
+			case 'tightener':
 				cost += (100 + (drugsCost * 2));
 				break;
 		}
@@ -819,7 +860,9 @@ window.getSlaveCost = function(s) {
 			case 'food':
 				cost += (foodCost * 2);
 				break;
-			case 'curative': case 'aphrodisiac': case 'tightener':
+			case 'curative':
+			case 'aphrodisiac':
+			case 'tightener':
 				cost += (50 + (drugsCost * 2));
 				break;
 		}
@@ -831,7 +874,9 @@ window.getSlaveCost = function(s) {
 			case 'food':
 				cost += (foodCost);
 				break;
-			case 'curative': case 'aphrodisiac': case 'tightener':
+			case 'curative':
+			case 'aphrodisiac':
+			case 'tightener':
 				cost += (25 + (drugsCost * 2));
 				break;
 		}
@@ -842,17 +887,26 @@ window.getSlaveCost = function(s) {
 		case 'anti-aging cream':
 			cost += drugsCost * 10;
 			break;
-		case 'female hormone injections': case 'male hormone injections': case 'intensive breast injections':
-		case 'intensive butt injections': case 'intensive penis enhancement': case 'intensive testicle enhancement':
-		case 'intensive lip injections': case 'hyper breast injections': case 'hyper butt injections':
-		case 'hyper penis enhancement': case 'hyper testicle enhancement': case 'hyper lip injections':
+		case 'female hormone injections':
+		case 'male hormone injections':
+		case 'intensive breast injections':
+		case 'intensive butt injections':
+		case 'intensive penis enhancement':
+		case 'intensive testicle enhancement':
+		case 'intensive lip injections':
+		case 'hyper breast injections':
+		case 'hyper butt injections':
+		case 'hyper penis enhancement':
+		case 'hyper testicle enhancement':
+		case 'hyper lip injections':
 		case 'growth stimulants':
 			cost += drugsCost * 5;
 			break;
 		case 'sag-B-gone':
 			cost += Math.trunc(drugsCost * 0.1);
 			break;
-		case 'no drugs': case 'none':
+		case 'no drugs':
+		case 'none':
 			break;
 		default:
 			cost += drugsCost * 2;
@@ -877,7 +931,7 @@ window.getSlaveCost = function(s) {
 	// Promotion costs
 	if (State.variables.studio === 1) {
 		if (s.pornFameSpending > 0) {
-			cost += (s.pornFameSpending/State.variables.PCSlutContacts);
+			cost += (s.pornFameSpending / State.variables.PCSlutContacts);
 		}
 	}
 
@@ -925,7 +979,7 @@ window.slaveJobValues = function() {
 	V.slavesGettingHelp = 0;
 
 	// This section is for specific slaves or non-unique slaves adding their values to the whole
-	// Accounting for fuckdolls
+	// Accounting for Fuckdolls
 	if (V.fuckdolls > 0) {
 		slaveJobValues.arcade += (V.fuckdolls - (V.arcade - V.arcadeSlaves)) * 140 + (V.arcade - V.arcadeSlaves) * (175 + 35 * V.arcadeUpgradeInjectors);
 	}
@@ -936,23 +990,23 @@ window.slaveJobValues = function() {
 	});
 	if (V.DJ !== 0) {
 		if (!canTalk(V.DJ)) {
-			//''__@@.pink;$DJ.slaveName@@__'' can't speak @@.yellow;and cannot serve as your DJ any more.@@<br>
+			// <strong><u><span class="pink">$DJ.slaveName</span></u></strong> can't speak <span class="yellow">and cannot serve as your DJ any more.</span><br>
 			V.DJ = 0;
 			V.unDJ = 1;
 		} else if (V.DJ.preg > 37 && V.DJ.broodmother === 2) {
-			//''__@@.pink;$DJ.slaveName@@__'' spends so much time giving birth and laboring that @@.yellow;$he cannot effectively serve as your DJ any longer.@@
+			// <strong><u><span class="pink">$DJ.slaveName</span></u></strong> spends so much time giving birth and laboring that <span class="yellow">$he cannot effectively serve as your DJ any longer.</span>
 			V.DJ = 0;
 			V.unDJ = 2;
 		} else if (V.DJ.fetish === "mindbroken") {
-			//''__@@.pink;$DJ.slaveName@@__'' is mindbroken @@.yellow;and cannot serve as your DJ any more.@@<br>
+			// <strong><u><span class="pink">$DJ.slaveName</span></u></strong> is mindbroken <span class="yellow">and cannot serve as your DJ any more.</span><br>
 			V.DJ = 0;
 			V.unDJ = 3;
 		} else if (!canWalk(V.DJ)) {
-			//''__@@.pink;$DJ.slaveName@@__'' is no longer independently mobile @@.yellow;and cannot serve as your DJ any more.@@<br>
+			// <strong><u><span class="pink">$DJ.slaveName</span></u></strong> is no longer independently mobile <span class="yellow">and cannot serve as your DJ any more.</span><br>
 			V.DJ = 0;
 			V.unDJ = 4;
 		} else if (!canHear(V.DJ)) {
-			//''__@@.pink;$DJ.slaveName@@__'' can no longer hear @@.yellow;and cannot serve as your DJ any more.@@<br>
+			// <strong><u><span class="pink">$DJ.slaveName</span></u></strong> can no longer hear <span class="yellow">and cannot serve as your DJ any more.</span><br>
 			V.DJ = 0;
 			V.unDJ = 5;
 		}
@@ -960,44 +1014,44 @@ window.slaveJobValues = function() {
 	if (V.DJ !== 0) {
 		if (V.DJ.relationship === -3 && V.DJ.devotion > 50) {
 			DJRepBonus += 0.1;
-			//$He tries $his best to be your energetic, cheerful wife.
+			// $He tries $his best to be your energetic, cheerful wife.
 		}
 		if (V.DJ.eyes === -2) {
 			DJRepBonus += 0.15;
 		}
 		if (V.DJ.skill.entertainment <= 10) {
-			//Though $DJ.slaveName does $his best to lead on the club, with $his lack of skill $he can do little.
+			// Though $DJ.slaveName does $his best to lead on the club, with $his lack of skill $he can do little.
 		} else if (V.DJ.skill.entertainment <= 30) {
 			DJRepBonus += 0.05;
-			//$DJ.slaveName's basic skills marginally @@.green;improve@@ the atmosphere on $clubName.
+			// $DJ.slaveName's basic skills marginally <span class="green">improve</span> the atmosphere on $clubName.
 		} else if (V.DJ.skill.entertainment <= 60) {
 			DJRepBonus += 0.1;
-			//$DJ.slaveName's skills @@.green;improve@@ the atmosphere on $clubName.
+			// $DJ.slaveName's skills <span class="green">improve</span> the atmosphere on $clubName.
 		} else if (V.DJ.skill.entertainment < 100) {
 			DJRepBonus += 0.15;
-			//$DJ.slaveName's skills greatly @@.green;improve@@ the atmosphere on $clubName.
+			// $DJ.slaveName's skills greatly <span class="green">improve</span> the atmosphere on $clubName.
 		} else if (V.DJ.skill.entertainment >= 100) {
 			DJRepBonus += 0.20;
-			//$DJ.slaveName's mastery immensely @@.green;improves@@ the atmosphere on $clubName.
+			// $DJ.slaveName's mastery immensely <span class="green">;improves</span> the atmosphere on $clubName.
 		}
 		if (V.DJ.muscles > 5 && V.DJ.muscles <= 95) {
 			V.DJRepBonus += 0.05;
-			//$His toned body helps $him lead $his fellow club girls by letting $him dance all night.
+			// $His toned body helps $him lead $his fellow club girls by letting $him dance all night.
 		}
 		if (V.DJ.intelligence + V.DJ.intelligenceImplant > 15) {
-			DJRepBonus += 0.05 * Math.floor((V.DJ.intelligence + V.DJ.intelligenceImplant)/32);
-			//$He's smart enough to make an actual contribution to the music, greatly enhancing the entire experience.
+			DJRepBonus += 0.05 * Math.floor((V.DJ.intelligence + V.DJ.intelligenceImplant) / 32);
+			// $He's smart enough to make an actual contribution to the music, greatly enhancing the entire experience.
 		}
 		if (V.DJ.face > 95) {
 			DJRepBonus += 0.05;
-			//$His great beauty is a further draw, even when $he's in $his DJ booth, but especially when $he comes out to dance.
+			// $His great beauty is a further draw, even when $he's in $his DJ booth, but especially when $he comes out to dance.
 		}
 		if (setup.DJCareers.includes(V.DJ.career)) {
 			DJRepBonus += 0.05;
-			//$He has musical experience from $his life before $he was a slave, a grounding that gives $his tracks actual depth.
+			// $He has musical experience from $his life before $he was a slave, a grounding that gives $his tracks actual depth.
 		} else if (V.DJ.skill.DJ >= V.masteredXP) {
 			DJRepBonus += 0.05;
-			//$He has musical experience from working for you, giving $his tracks actual depth.
+			// $He has musical experience from working for you, giving $his tracks actual depth.
 		}
 
 		// The DJ adding to 'club'
@@ -1038,7 +1092,8 @@ window.slaveJobValues = function() {
 	});
 
 	function SJVClub(s) {
-		let toTheClub = 0, beautyMultiplier = 1;
+		let toTheClub = 0,
+			beautyMultiplier = 1;
 		s.minorInjury = 0;
 
 		// The beauty multiplier
@@ -1057,77 +1112,77 @@ window.slaveJobValues = function() {
 				if (V.clubAdsStacked === 1) {
 					if (isStacked(s) === true) {
 						beautyMultiplier += 0.05;
-						//$His stacked body fits $clubName's ad campaign, getting $him more attention.
+						// $His stacked body fits $clubName's ad campaign, getting $him more attention.
 					}
 				} else if (V.clubAdsStacked === -1) {
 					if (isSlim(s) === true) {
 						beautyMultiplier += 0.05;
-						//$His slim body fits $clubName's ad campaign, getting $him more attention.
+						// $His slim body fits $clubName's ad campaign, getting $him more attention.
 					}
 				}
 				if (V.clubAdsPreg === 1) {
 					if (isPreg(s) === true) {
 						beautyMultiplier += 0.05;
-						//$His gravid body fits $clubName's ad campaign, getting $him more attention.
+						// $His gravid body fits $clubName's ad campaign, getting $him more attention.
 					}
 				} else if (V.clubAdsPreg === -1) {
 					if (isNotPreg(s) === true) {
 						beautyMultiplier += 0.05;
-						//$His flat belly fits $clubName's ad campaign, getting $him more attention.
+						// $His flat belly fits $clubName's ad campaign, getting $him more attention.
 					}
 				}
 				if (V.clubAdsModded === 1) {
 					if (SlaveStatsChecker.isModded(s) === true) {
 						beautyMultiplier += 0.05;
-						//Body art like $hers is a major draw.
+						// Body art like $hers is a major draw.
 					}
 				} else if (V.clubAdsModded === -1) {
 					if (SlaveStatsChecker.isUnmodded(s) === true) {
 						beautyMultiplier += 0.05;
-						//Very clean bodies like $hers are a major draw.
+						// Very clean bodies like $hers are a major draw.
 					}
 				}
 				if (V.clubAdsImplanted === 1) {
 					if (isSurgicallyImproved(s) === true) {
 						beautyMultiplier += 0.05;
-						//Many citizens come to $clubName looking to fuck a plastic slut like $him.
+						// Many citizens come to $clubName looking to fuck a plastic slut like $him.
 					}
 				} else if (V.clubAdsImplanted === -1) {
 					if (isPure(s) === true) {
 						beautyMultiplier += 0.05;
-						//Many citizens come to $clubName looking to get with a natural $girl like $him.
+						// Many citizens come to $clubName looking to get with a natural $girl like $him.
 					}
 				}
 				if (V.clubAdsOld === 1) {
 					if (isYoung(s) === false) {
 						beautyMultiplier += 0.05;
-						//$He's perfect for $clubName, which practically exists to match citizens up with mature slaves.
+						// $He's perfect for $clubName, which practically exists to match citizens up with mature slaves.
 					}
 				} else if (V.clubAdsOld === -1) {
 					if (isYoung(s) === true && s.physical >= 18) {
 						beautyMultiplier += 0.05;
-						//$He's perfect for $clubName, which practically exists to match citizens up with young slaves.
+						// $He's perfect for $clubName, which practically exists to match citizens up with young slaves.
 					}
 				} else if (V.clubAdsOld === -2) {
 					if (s.physical <= 18 && s.physical >= 13) {
 						beautyMultiplier += 0.05;
-						//$He's perfect for $clubName, which practically exists to match citizens up with teenage slaves.
+						// $He's perfect for $clubName, which practically exists to match citizens up with teenage slaves.
 					}
 				} else if (V.clubAdsOld === -3) {
 					if (s.physical < 13) {
 						beautyMultiplier += 0.05;
-						//$He's perfect for $clubName, which practically exists to match citizens up with $loli slaves.
+						// $He's perfect for $clubName, which practically exists to match citizens up with $loli slaves.
 					}
 				}
 				if (V.clubAdsXX === 1) {
 					if (s.dick === 0) {
 						beautyMultiplier += 0.05;
-						//Almost everyone who comes to $clubName is looking to fuck a $girl like $him.
+						// Almost everyone who comes to $clubName is looking to fuck a $girl like $him.
 					}
 				} else if (V.clubAdsXX === -1) {
 					if (s.dick > 0) {
 						beautyMultiplier += 0.05;
-						//Almost everyone who comes to $clubName is looking to poke a $girl who cums when buttfucked.
+						// Almost everyone who comes to $clubName is looking to poke a $girl who cums when buttfucked.
 					}
 				}
 			}
@@ -1137,10 +1192,10 @@ window.slaveJobValues = function() {
 		}
 		if (canHear(s) === false) {
 			beautyMultiplier -= 0.15;
-			//$His inability to move to the rhythm of the music is very off putting to those looking to party.
+			// $His inability to move to the rhythm of the music is very off putting to those looking to party.
 		}
 
-		//Injuries
+		// Injuries
 		if (s.curatives < 1 || s.inflationType !== "curative") {
 			if (s.health < -50) {
 				s.health -= 8;
@@ -1150,7 +1205,7 @@ window.slaveJobValues = function() {
 				s.minorInjury = 1;
 			} else if (!canDoVaginal(s)) {
 				if (canDoAnal(s)) {
-					if (jsRandom(1, 100) > 40+(10*(s.skill.anal + s.skill.oral))) {
+					if (jsRandom(1, 100) > 40 + (10 * (s.skill.anal + s.skill.oral))) {
 						s.health -= 5;
 						s.minorInjury = 1;
 					}
@@ -1159,7 +1214,7 @@ window.slaveJobValues = function() {
 					s.minorInjury = 1;
 				}
 			} else if (s.skill.anal + s.skill.oral + s.skill.vaginal < 300) {
-				if (jsRandom(1, 100) > 10+((s.skill.anal + s.skill.oral + s.skill.vaginal)/10)) {
+				if (jsRandom(1, 100) > 10 + ((s.skill.anal + s.skill.oral + s.skill.vaginal) / 10)) {
 					s.minorInjury = 1;
 				}
 			}
@@ -1364,8 +1419,8 @@ window.corpDivWhoreSlavesRoom = function() {
 	return 0;
 };
 
-//Corporation race blacklisting/whitelisting
-//race is the lowercase string representing the race, 'blacklist' is either 1 or 0. 1 means we are blacklisting and 0 means we are whitelisting said race
+// Corporation race blacklisting/whitelisting
+// race is the lowercase string representing the race, 'blacklist' is either 1 or 0. 1 means we are blacklisting and 0 means we are whitelisting said race
 window.corpBlacklistRace = function(race, blacklist) {
 	let raceArray = State.variables.corpSpecRaces;
 	if (raceArray.length > 0 && blacklist === 1) {
@@ -1382,8 +1437,14 @@ window.getSlaveStatisticData = function(s, facility) {
 	if (!s || !facility) {
 		// Base data, even without facility
 		return {
-			ID: s.ID, slaveName: s.slaveName, customLabel: s.custom.label,
-			income: 0, adsIncome: 0, rep: 0, food: 0, cost: getSlaveCost(s),
+			ID: s.ID,
+			slaveName: s.slaveName,
+			customLabel: s.custom.label,
+			income: 0,
+			adsIncome: 0,
+			rep: 0,
+			food: 0,
+			cost: getSlaveCost(s),
 			customers: 0 /* brothel, club, ... */
 		};
 	}
@@ -1397,8 +1458,14 @@ window.getSlaveStatisticData = function(s, facility) {
 	}
 
 	const data = {
-		ID: s.ID, slaveName: s.slaveName, customLabel: s.custom.label,
-		income: 0, adsIncome: 0, rep: 0, food: 0, cost: getSlaveCost(s),
+		ID: s.ID,
+		slaveName: s.slaveName,
+		customLabel: s.custom.label,
+		income: 0,
+		adsIncome: 0,
+		rep: 0,
+		food: 0,
+		cost: getSlaveCost(s),
 		customers: 0 /* brothel, club, ... */
 	};
 	facility.income.set(s.ID, data);
@@ -1450,38 +1517,38 @@ window.cashX = function(cost, what, who) {
 		return 0;
 	}
 
-	//remove fractions from the money
+	// remove fractions from the money
 	cost = Math.trunc(cost);
 
-	//Spend the money
+	// Spend the money
 	V.cash += cost;
 
-	//INCOME
+	// INCOME
 	if (cost > 0) {
-		//record the action
+		// record the action
 		if (typeof V.lastWeeksCashIncome[what] !== 'undefined') {
 			V.lastWeeksCashIncome[what] += cost;
 		} else {
 			V.lastWeeksCashErrors += `Unknown place "${what}" gained you ${cost}<br>`;
 		}
 
-		//record the slave, if available
+		// record the slave, if available
 		if (typeof who !== 'undefined') {
 			who.lastWeeksCashIncome += cost;
 			who.lifetimeCashIncome += cost;
 		}
 	}
 
-	//EXPENSES
+	// EXPENSES
 	else if (cost < 0) {
-		//record the action
+		// record the action
 		if (typeof V.lastWeeksCashExpenses[what] !== 'undefined') {
 			V.lastWeeksCashExpenses[what] += cost;
 		} else {
 			V.lastWeeksCashErrors += `Unknown place "${what}" charged you ${cost}<br>`;
 		}
 
-		//record the slave, if available
+		// record the slave, if available
 		if (typeof who !== 'undefined') {
 			if (what === "slaveTransfer") {
 				who.slaveCost = cost;
@@ -1501,57 +1568,59 @@ window.repX = function(rep, what, who) {
 		return 0;
 	}
 
-	//round the change
+	// round the change
 	rep = Math.trunc(rep);
 
-	//INCOME
-	//These are all scaled relative to current rep except when recording the who, to keep comparisons between slaves possible across times. This quite drastically reduces rep income at high levels of rep and only slightly at low levels.
+	// INCOME
+	// These are all scaled relative to current rep except when recording the who, to keep comparisons between slaves possible across times. This quite drastically reduces rep income at high levels of rep and only slightly at low levels.
 	if (rep > 0) {
-		//record the slave, if available
+		// record the slave, if available
 		if (typeof who !== 'undefined') {
 			who.lastWeeksRepIncome += rep;
 			who.lifetimeRepIncome += rep;
 		}
 
-		//record the action
+		// record the action
 		if (what === "cheating" || passage() === "init" || passage() === "init Nationalities") {
-			/*we don't want to curve startup or cheating.*/
+			/* we don't want to curve startup or cheating.*/
 			V.lastWeeksRepIncome[what] += rep;
 		} else if (typeof V.lastWeeksRepIncome[what] !== 'undefined') {
-			rep = Math.round(Math.pow(1000 * rep + Math.pow(V.rep, 2), 0.5) - V.rep)* (V.corpEasy + 1);
+			rep = Math.round(Math.pow(1000 * rep + Math.pow(V.rep, 2), 0.5) - V.rep) * (V.corpEasy + 1);
 			V.lastWeeksRepIncome[what] += rep;
 		} else {
 			V.lastWeeksRepErrors += `Unknown place "${what}" gained you ${rep}<br>`;
 		}
 	}
 
-	//EXPENSES
+	// EXPENSES
 	else if (rep < 0) {
-		//record the action
+		// record the action
 		if (typeof V.lastWeeksRepExpenses[what] !== 'undefined') {
 			V.lastWeeksRepExpenses[what] += rep;
 		} else {
 			V.lastWeeksRepErrors += `Unknown place "${what}" cost you ${rep}<br>`;
 		}
 
-		//record the slave, if available
+		// record the slave, if available
 		if (typeof who !== 'undefined') {
 			who.lastWeeksRepExpenses += rep;
 			who.lifetimeRepExpenses += rep;
 		}
 	}
 
-	//Apply the reputation change
+	// Apply the reputation change
 	V.rep += rep;
 
-	//Check if total rep is over cap, and use "overflow" category to expense it down if needed.
+	// Check if total rep is over cap, and use "overflow" category to expense it down if needed.
 	if (V.rep > 20000) {
-		V.lastWeeksRepExpenses.overflow += (20000 - V.rep); V.rep = 20000;
+		V.lastWeeksRepExpenses.overflow += (20000 - V.rep);
+		V.rep = 20000;
 	}
 
-	//Rep should never be lower than 0.  Record this rounding purely to keep the books balanced.
+	// Rep should never be lower than 0.  Record this rounding purely to keep the books balanced.
 	else if (V.rep < 0) {
-		V.lastWeeksRepIncome.overflow += (0 - V.rep); V.rep = 0;
+		V.lastWeeksRepIncome.overflow += (0 - V.rep);
+		V.rep = 0;
 	}
 
 	return rep;
diff --git a/src/js/eventSelectionJS.js b/src/js/eventSelectionJS.js
index 6b33b8d77be4e46282a7b0ea5666a71396d0011b..1929e3b90510eae0046b88b25fd1488d45ccd93e 100644
--- a/src/js/eventSelectionJS.js
+++ b/src/js/eventSelectionJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 window.generateRandomEventPoolStandard = function(eventSlave) {
 	/* STANDARD EVENTS */
 
@@ -1071,10 +1070,10 @@ window.generateRandomEventPoolStandard = function(eventSlave) {
 					if (eventSlave.trust >= -50) {
 						if (eventSlave.devotion > 0) {
 							if (eventSlave.devotion <= 50) {
-								if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000))
-									|| ((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500))
-									|| (eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000)
-									|| (eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
+								if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000)) ||
+									((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500)) ||
+									(eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000) ||
+									(eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
 									State.variables.RESSevent.push("hot PC");
 								}
 							}
@@ -2483,10 +2482,10 @@ window.generateRandomEventPoolServant = function(eventSlave) {
 					if (eventSlave.trust >= -50) {
 						if (eventSlave.devotion > 0) {
 							if (eventSlave.devotion <= 50) {
-								if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000))
-									|| ((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500))
-									|| (eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000)
-									|| (eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
+								if (((eventSlave.attrXX >= 50) && (State.variables.PC.boobs === 1 || State.variables.PC.title === 0) && (State.variables.PC.belly < 5000)) ||
+									((eventSlave.attrXY >= 50) && (State.variables.PC.dick === 1) && (State.variables.PC.boobs === 0) && (State.variables.PC.belly < 1500)) ||
+									(eventSlave.fetish === "pregnancy" && State.variables.PC.belly >= 5000) ||
+									(eventSlave.fetish === "boobs" && State.variables.PC.belly < 5000 && State.variables.PC.boobsBonus > 0)) {
 									State.variables.RESSevent.push("hot PC");
 								}
 							}
diff --git a/src/js/extendedFamilyModeJS.js b/src/js/extendedFamilyModeJS.js
index a44dd4c8ea5efeac41560bec0a4f105fb37de352..a040b9f2f9ebfeac1828758cdc634ac7f2c572eb 100644
--- a/src/js/extendedFamilyModeJS.js
+++ b/src/js/extendedFamilyModeJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /* see documentation for details /devNotes/Extended Family Mode Explained.txt */
 
 window.isMotherP = function isMotherP(daughter, mother) {
@@ -13,21 +12,26 @@ window.isParentP = function isParentP(daughter, parent) {
 	return isMotherP(daughter, parent) || isFatherP(daughter, parent);
 };
 
-window.sameDad = function (slave1, slave2) {
+window.sameDad = function(slave1, slave2) {
 	if ((slave1.father === slave2.father) && (slave1.father !== 0 && slave1.father !== -2)) {
 		return true;
 	}
 	return false;
 };
 
-window.sameMom = function (slave1, slave2) {
+window.sameMom = function(slave1, slave2) {
 	if ((slave1.mother === slave2.mother) && (slave1.mother !== 0 && slave1.mother !== -2)) {
 		return true;
 	}
 	return false;
 };
 
-window.isAunt = /** @param {App.Entity.SlaveState} niece, @param {App.Entity.SlaveState} aunt */ function (niece, aunt) {
+/**
+ * @param {App.Entity.SlaveState} niece
+ * @param {App.Entity.SlaveState} aunt
+ * @returns {boolean}
+ */
+window.isAunt = function(niece, aunt) {
 	if (!State.variables.showDistantRelatives) {
 		return false;
 	}
@@ -36,8 +40,8 @@ window.isAunt = /** @param {App.Entity.SlaveState} niece, @param {App.Entity.Sla
 		return false;
 	}
 
-	var mother;
-	var father;
+	let mother;
+	let father;
 
 	if ((mother = getSlave(niece.mother)) && (mother.ID !== aunt.ID) && !sameTParent(mother, aunt) && sameMom(mother, aunt) && sameDad(mother, aunt)) {
 		return true;
@@ -49,7 +53,7 @@ window.isAunt = /** @param {App.Entity.SlaveState} niece, @param {App.Entity.Sla
 };
 
 // testtest catches the case if a mother is a father or a father a mother - thank you familyAnon, for this code
-window.sameTParent = function (slave1, slave2) {
+window.sameTParent = function(slave1, slave2) {
 	if (slave1.mother === -1 && slave1.father === -1 && slave2.mother === -1 && slave2.father === -1) {
 		return 1;
 	} else if (slave1.mother === slave2.father && slave1.father === slave2.mother && slave1.mother !== 0 && slave1.mother !== -2 && slave1.father !== 0 && slave1.father !== -2 && slave1.mother !== slave1.father) {
@@ -70,7 +74,7 @@ window.sameTParent = function(slave1, slave2) {
 };
 */
 
-window.areTwins = function (slave1, slave2) {
+window.areTwins = function(slave1, slave2) {
 	if (!sameDad(slave1, slave2)) {
 		return false;
 	} else if (!sameMom(slave1, slave2)) {
@@ -81,28 +85,28 @@ window.areTwins = function (slave1, slave2) {
 	return false;
 };
 
-window.areSisters = function (slave1, slave2) {
+window.areSisters = function(slave1, slave2) {
 	if (slave1.ID === slave2.ID) {
-		return 0; //you are not your own sister
+		return 0; // you are not your own sister
 	} else if (((slave1.father === 0) || (slave1.father === -2)) && ((slave1.mother === 0) || (slave1.mother === -2))) {
-		return 0; //not related
+		return 0; // not related
 	} else {
 		if (!sameDad(slave1, slave2) && sameMom(slave1, slave2)) {
-			return 3; //half sisters
+			return 3; // half sisters
 		} else if (sameDad(slave1, slave2) && !sameMom(slave1, slave2)) {
-			return 3; //half sisters
+			return 3; // half sisters
 		} else if (sameTParent(slave1, slave2) === 3) {
-			return 3; //half sisters
+			return 3; // half sisters
 		} else if (sameTParent(slave1, slave2) === 2) {
-			return 2; //sisters
+			return 2; // sisters
 		} else if (sameDad(slave1, slave2) && sameMom(slave1, slave2)) {
 			if (slave1.actualAge === slave2.actualAge && slave1.birthWeek === slave2.birthWeek) {
-				return 1; //twins
+				return 1; // twins
 			} else {
-				return 2; //sisters
+				return 2; // sisters
 			}
 		} else {
-			return 0; //not related
+			return 0; // not related
 		}
 	}
 };
@@ -130,7 +134,12 @@ window.areSisters = function(c1, c2) {
 	}
 }
 */
-window.areCousins = /** @param {App.Entity.SlaveState} slave1, @param {App.Entity.SlaveState} slave2 */ function (slave1, slave2) {
+/**
+ * @param {App.Entity.SlaveState} slave1
+ * @param {App.Entity.SlaveState} slave2
+ * @returns {boolean}
+ */
+window.areCousins = function(slave1, slave2) {
 	if (!State.variables.showDistantRelatives) {
 		return false;
 	}
@@ -139,10 +148,10 @@ window.areCousins = /** @param {App.Entity.SlaveState} slave1, @param {App.Entit
 		return false;
 	}
 
-	var slave1Mom;
-	var slave1Dad;
-	var slave2Mom;
-	var slave2Dad;
+	let slave1Mom;
+	let slave1Dad;
+	let slave2Mom;
+	let slave2Dad;
 
 	if ((slave1Mom = getSlave(slave1.mother)) && (slave2Mom = getSlave(slave2.mother)) && !sameTParent(slave1Mom, slave2Mom) && sameMom(slave1Mom, slave2Mom) && sameDad(slave1Mom, slave2Mom)) {
 		return true;
@@ -157,13 +166,22 @@ window.areCousins = /** @param {App.Entity.SlaveState} slave1, @param {App.Entit
 	return false;
 };
 
-window.areRelated = /** @param {App.Entity.SlaveState} slave1, @param {App.Entity.SlaveState} slave2 */
-	function (slave1, slave2) {
+/**
+ * @param {App.Entity.SlaveState} slave1
+ * @param {App.Entity.SlaveState} slave2
+ * @returns {boolean}
+ */
+window.areRelated =
+	function(slave1, slave2) {
 		return (slave1.father === slave2.ID || slave1.mother === slave2.ID || slave2.father === slave1.ID || slave2.mother === slave1.ID || areSisters(slave1, slave2) > 0);
 	};
 
-window.totalRelatives = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	var relatives = 0;
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.totalRelatives = function(slave) {
+	let relatives = 0;
 	if (slave.mother > 0) {
 		relatives += 1;
 	}
@@ -183,14 +201,19 @@ window.totalRelatives = /** @param {App.Entity.SlaveState} slave */ function (sl
  * @param {App.Entity.SlaveState} slave1
  * @param {App.Entity.SlaveState} slave2
  * @param {App.Entity.SlaveState[]} slaves
+ * @returns {Array}	// I think
  */
-window.mutualChildren = function (slave1, slave2, slaves) {
-	return slaves.filter(function (s) {
+window.mutualChildren = function(slave1, slave2, slaves) {
+	return slaves.filter(function(s) {
 		return s.ID !== slave1.ID && s.ID !== slave2.ID && s.mother > 0 && s.father > 0 && ((s.mother === slave1.ID && s.father === slave2.ID) || (s.mother === slave2.ID && s.father === slave1.ID));
 	}).length;
 };
 
-window.isSlaveAvailable = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isSlaveAvailable = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.assignment === "be your agent") {
@@ -213,18 +236,23 @@ window.randomRelatedSlave = function(slave, filterFunction) {
 }
 */
 
-window.randomRelatedSlave = /** @param {App.Entity.SlaveState} slave */ function (slave, filterFunction) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {function} filterFunction	// I think
+ * @returns {object}	// I think
+ */
+window.randomRelatedSlave = function(slave, filterFunction) {
 	if (!slave || !SugarCube) {
 		return undefined;
 	}
 	if (typeof filterFunction !== 'function') {
-		filterFunction = function ( /*s, index, array*/ ) {
+		filterFunction = function( /* s, index, array*/ ) {
 			return true;
 		};
 	}
-	var arr = State.variables.slaves.filter(filterFunction);
+	const arr = State.variables.slaves.filter(filterFunction);
 	arr.shuffle();
-	return arr.find(function (s) {
+	return arr.find(function(s) {
 		return areSisters(slave, s) ||
 			slave.ID === s.mother ||
 			slave.ID === s.father ||
@@ -233,62 +261,98 @@ window.randomRelatedSlave = /** @param {App.Entity.SlaveState} slave */ function
 	});
 };
 
-window.randomRelatedAvailableSlave = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomRelatedAvailableSlave = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return isSlaveAvailable(s);
 	});
 };
 
-window.randomSister = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomSister = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return areSisters(slave, s);
 	});
 };
 
-window.randomTwinSister = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
-		return areSisters(slave, s) === 1;
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomTwinSister = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
+		return areSisters(slave, s);
 	});
 };
 
-window.randomAvailableSister = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomAvailableSister = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return isSlaveAvailable(s) && areSisters(slave, s);
 	});
 };
 
-window.randomAvailableTwinSister = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
-		return isSlaveAvailable(s) && areSisters(slave, s) === 1;
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomAvailableTwinSister = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
+		return isSlaveAvailable(s) && areSisters(slave, s);
 	});
 };
 
-window.randomDaughter = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomDaughter = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return s.mother === slave.ID || s.father === slave.ID;
 	});
 };
 
-window.randomAvailableDaughter = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomAvailableDaughter = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return isSlaveAvailable(s) && (s.mother === slave.ID || s.father === slave.ID);
 	});
 };
 
-window.randomParent = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomParent = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return s.ID === slave.mother || s.ID === slave.father;
 	});
 };
 
-window.randomAvailableParent = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	return randomRelatedSlave(slave, function (s) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.randomAvailableParent = function(slave) {
+	return randomRelatedSlave(slave, function(s) {
 		return isSlaveAvailable(s) && (s.ID === slave.mother || s.ID === slave.father);
 	});
 };
 
-window.totalPlayerRelatives = function (pc) {
-	var relatives = 0;
+window.totalPlayerRelatives = function(pc) {
+	let relatives = 0;
 	if (pc.mother > 0) {
 		relatives += 1;
 	}
@@ -304,10 +368,15 @@ window.totalPlayerRelatives = function (pc) {
 	return relatives;
 };
 
-window.relativeTerm = /** @param {App.Entity.SlaveState} slave1 @param {App.Entity.SlaveState} slave2 */
-	function (slave1, slave2) {
+/**
+ * @param {App.Entity.SlaveState} slave1
+ * @param {App.Entity.SlaveState} slave2
+ * @returns {string}
+ */
+window.relativeTerm =
+	function(slave1, slave2) {
 		if (slave2.mother === slave1.ID || slave2.father === slave1.ID) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "son";
 			} else {
 				return "daughter";
@@ -316,32 +385,32 @@ window.relativeTerm = /** @param {App.Entity.SlaveState} slave1 @param {App.Enti
 			return "mother";
 		} else if (slave1.father === slave2.ID) {
 			return "father";
-		} else if (areSisters(slave2, slave1) === 1) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+		} else if (areSisters(slave2, slave1)) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "twin brother";
 			} else {
 				return "twin sister";
 			}
 		} else if (areSisters(slave2, slave1) === 2) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "brother";
 			} else {
 				return "sister";
 			}
 		} else if (areSisters(slave2, slave1) === 3) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "half-brother";
 			} else {
 				return "half-sister";
 			}
 		} else if (isAunt(slave1, slave2)) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "nephew";
 			} else {
 				return "niece";
 			}
 		} else if (isAunt(slave2, slave1)) {
-			if (slave2.genes === "XY" && State.variables.diversePronouns === 1) {
+			if (slave2.genes === "XY" && State.variables.diversePronouns) {
 				return "uncle";
 			} else {
 				return "aunt";
diff --git a/src/js/familyTreeJS.js b/src/js/familyTreeJS.js
index 491dfcd9d01c0e7699e1e4cb50dbfaaf260b21bf..87f9bab59ea5c47bd0056d63b80d008df6d8c50e 100644
--- a/src/js/familyTreeJS.js
+++ b/src/js/familyTreeJS.js
@@ -1,7 +1,6 @@
+/* eslint-disable camelcase */
 /* eslint-disable no-console */
-/* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
-var lastActiveSlave, lastSlaves, lastPC;
+let lastActiveSlave, lastSlaves, lastPC;
 
 /*
 	To use, add something like:
@@ -20,16 +19,16 @@ var lastActiveSlave, lastSlaves, lastPC;
 window.renderFamilyTree = function(slaves, filterID) {
 	'use strict';
 
-	var ftreeWidth, ftreeHeight;
-	var chartWidth, chartHeight;
-	var margin;
+	let ftreeWidth, ftreeHeight;
+	let chartWidth, chartHeight;
+	let margin;
 	d3.select('#ftree-canvas').remove();
-	var svg = d3.select('#familyTree')
+	let svg = d3.select('#familyTree')
 		.append('svg')
 		.attr('id', 'ftree-canvas');
-	var chartLayer = svg.append('g').classed('chartLayer', true);
+	let chartLayer = svg.append('g').classed('chartLayer', true);
 
-	var data = buildFamilyTree(slaves, filterID);
+	let data = buildFamilyTree(slaves, filterID);
 
 	initFtreeSVG(data);
 	runFtreeSim(data);
@@ -48,7 +47,7 @@ window.renderFamilyTree = function(slaves, filterID) {
 			ftreeHeight = 1200;
 		}
 
-		margin = { top: 0, left: 0, bottom: 0, right: 0 };
+		margin = {top: 0, left: 0, bottom: 0, right: 0};
 
 
 		chartWidth = ftreeWidth - (margin.left + margin.right);
@@ -79,15 +78,20 @@ window.renderFamilyTree = function(slaves, filterID) {
 	}
 
 	function runFtreeSim(data) {
-		var simulation = d3.forceSimulation()
-			.force('link', d3.forceLink().id(function (d) { return d.index; }))
-			.force('collide', d3.forceCollide(function (d) { return 60; }).iterations(4))
+		let simulation = d3.forceSimulation()
+			.force('link', d3.forceLink().id(function(d) {
+				return d.index;
+			}))
+			// eslint-disable-next-line no-unused-vars
+			.force('collide', d3.forceCollide(function(d) {
+				return 60;
+			}).iterations(4))
 			.force('charge', d3.forceManyBody().strength(-200).distanceMin(100).distanceMax(1000))
 			.force('center', d3.forceCenter(chartWidth / 2, chartHeight / 2))
 			.force('y', d3.forceY(100))
 			.force('x', d3.forceX(200));
 
-		var link = svg.append('g')
+		let link = svg.append('g')
 			.attr('class', 'link')
 			.selectAll('link')
 			.data(data.links)
@@ -106,7 +110,7 @@ window.renderFamilyTree = function(slaves, filterID) {
 			.attr('stroke-width', 2)
 			.attr('fill', 'none');
 
-		var node = svg.selectAll('.node')
+		let node = svg.selectAll('.node')
 			.data(data.nodes)
 			.enter().append('g')
 			.attr('class', 'node')
@@ -116,7 +120,7 @@ window.renderFamilyTree = function(slaves, filterID) {
 				.on('end', dragended));
 
 		node.append('circle')
-			.attr('r', function (d) { return d.r; })
+			.attr('r', function(d) { return d.r; })
 			.attr('stroke', function(d) {
 				if (d.ID === filterID) {
 					return '#ffff20';
@@ -129,7 +133,7 @@ window.renderFamilyTree = function(slaves, filterID) {
 
 		node.append('text')
 			.text(function(d) {
-				var ssym;
+				let ssym;
 				if (d.ID === -1) {
 					if (d.dick === 1 && d.vagina === 1) {
 						ssym = '☿';
@@ -150,7 +154,9 @@ window.renderFamilyTree = function(slaves, filterID) {
 				return `${d.name }(${ssym})`;
 			})
 			.attr('dy', 4)
-			.attr('dx', function(d) { return -(8*d.name.length)/2; })
+			.attr('dx', function(d) {
+				return -(8 * d.name.length) / 2;
+			})
 			.attr('class', 'node-text')
 			.style('fill', function(d) {
 				if (d.is_mother && d.is_father) {
@@ -169,15 +175,15 @@ window.renderFamilyTree = function(slaves, filterID) {
 		svg.selectAll('.node-circle');
 		svg.selectAll('.node-text');
 
-		var ticked = function () {
+		let ticked = function() {
 			link
-				.attr('x1', function (d) { return d.source.x; })
-				.attr('y1', function (d) { return d.source.y; })
-				.attr('x2', function (d) { return d.target.x; })
-				.attr('y2', function (d) { return d.target.y; });
+				.attr('x1', function(d) {return d.source.x;})
+				.attr('y1', function(d) {return d.source.y;})
+				.attr('x2', function(d) {return d.target.x;})
+				.attr('y2', function(d) {return d.target.y;});
 
 			node
-				.attr("transform", function (d) { return `translate(${ d.x }, ${ d.y })`; });
+				.attr("transform", function(d) {return `translate(${ d.x }, ${ d.y })`;});
 		};
 
 		simulation.nodes(data.nodes)
@@ -206,12 +212,9 @@ window.renderFamilyTree = function(slaves, filterID) {
 };
 
 window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
-	var family_graph = {
-		nodes: [],
-		links: []
-	};
-	var node_lookup = {};
-	var preset_lookup = {
+	let family_graph = {nodes: [], links: []};
+	let node_lookup = {};
+	let preset_lookup = {
 		'-2': 'A citizen',
 		'-3': 'Former master',
 		'-4': 'An arcology owner',
@@ -219,11 +222,11 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 		'-6': 'Social elite',
 		'-7': 'Gene lab'
 	};
-	var outdads = {};
-	var outmoms = {};
-	var kids = {};
+	let outdads = {};
+	let outmoms = {};
+	let kids = {};
 
-	var fake_pc = {
+	let fake_pc = {
 		slaveName: `${State.variables.PC.name }(You)`,
 		mother: State.variables.PC.mother,
 		father: State.variables.PC.father,
@@ -231,11 +234,11 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 		vagina: State.variables.PC.vagina,
 		ID: State.variables.PC.ID
 	};
-	var charList = [fake_pc];
+	let charList = [fake_pc];
 	charList.push.apply(charList, slaves);
 	charList.push.apply(charList, State.variables.tanks);
 
-	var unborn = {};
+	let unborn = {};
 	for (let i = 0; i < State.variables.tanks.length; i++) {
 		unborn[State.variables.tanks[i].ID] = true;
 	}
@@ -244,8 +247,8 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 	}
 
 	for (let i = 0; i < charList.length; i++) {
-		var mom = charList[i].mother;
-		var dad = charList[i].father;
+		let mom = charList[i].mother;
+		let dad = charList[i].father;
 
 		if (mom) {
 			if (!kids[mom]) {
@@ -262,7 +265,7 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 	}
 
 	for (let i = 0; i < charList.length; i++) {
-		var character = charList[i];
+		let character = charList[i];
 		if (character.mother === 0 && character.father === 0 && !kids[character.ID]) {
 			continue;
 		}
@@ -270,8 +273,16 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 		if (mom < -6) {
 			if (mom in State.variables.missingTable && State.variables.showMissingSlaves) {
 				node_lookup[mom] = family_graph.nodes.length;
-				var missing = State.variables.missingTable[mom];
-				charList.push({ID: mom, mother: 0, father: 0, is_mother: true, dick: missing.dick, vagina: missing.vagina, slaveName: missing.slaveName});
+				let missing = State.variables.missingTable[mom];
+				charList.push({
+					ID: mom,
+					mother: 0,
+					father: 0,
+					is_mother: true,
+					dick: missing.dick,
+					vagina: missing.vagina,
+					slaveName: missing.slaveName
+				});
 			} else {
 				if (typeof outmoms[mom] === 'undefined') {
 					outmoms[mom] = [];
@@ -280,7 +291,15 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			}
 		} else if (mom < 0 && typeof node_lookup[mom] === 'undefined' && typeof preset_lookup[mom] !== 'undefined') {
 			node_lookup[mom] = family_graph.nodes.length;
-			charList.push({ID: mom, mother: 0, father: 0, is_father: true, dick: 0, vagina: 1, slaveName: preset_lookup[mom]});
+			charList.push({
+				ID: mom,
+				mother: 0,
+				father: 0,
+				is_father: true,
+				dick: 0,
+				vagina: 1,
+				slaveName: preset_lookup[mom]
+			});
 		}
 
 		let dad = character.father;
@@ -288,7 +307,15 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			if (dad in State.variables.missingTable && State.variables.showMissingSlaves) {
 				node_lookup[dad] = family_graph.nodes.length;
 				let missing = State.variables.missingTable[dad];
-				charList.push({ID: dad, mother: 0, father: 0, is_father: true, dick: missing.dick, vagina: missing.vagina, slaveName: missing.slaveName});
+				charList.push({
+					ID: dad,
+					mother: 0,
+					father: 0,
+					is_father: true,
+					dick: missing.dick,
+					vagina: missing.vagina,
+					slaveName: missing.slaveName
+				});
 			} else {
 				if (typeof outdads[dad] === 'undefined') {
 					outdads[dad] = [];
@@ -297,14 +324,22 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			}
 		} else if (dad < 0 && typeof node_lookup[dad] === 'undefined' && typeof preset_lookup[dad] !== 'undefined') {
 			node_lookup[dad] = family_graph.nodes.length;
-			charList.push({ID: dad, mother: 0, father: 0, is_father: true, dick: 1, vagina: -1, slaveName: preset_lookup[dad]});
+			charList.push({
+				ID: dad,
+				mother: 0,
+				father: 0,
+				is_father: true,
+				dick: 1,
+				vagina: -1,
+				slaveName: preset_lookup[dad]
+			});
 		}
 	}
-	var mkeys = Object.keys(outmoms);
+	let mkeys = Object.keys(outmoms);
 	for (let i = 0; i < mkeys.length; i++) {
-		var name;
-		var key = mkeys[i];
-		var names = outmoms[key];
+		let name;
+		let key = mkeys[i];
+		let names = outmoms[key];
 		if (names.length === 1) {
 			name = names[0];
 		} else if (names.length === 2) {
@@ -314,11 +349,19 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			name = names.join(', ');
 		}
 		node_lookup[key] = family_graph.nodes.length;
-		//Outside extant slaves set
-		charList.push({ID: key, mother: 0, father: 0, is_mother: true, dick: 0, vagina: 1, slaveName: `${name}'s mother`});
+		// Outside extant slaves set
+		charList.push({
+			ID: key,
+			mother: 0,
+			father: 0,
+			is_mother: true,
+			dick: 0,
+			vagina: 1,
+			slaveName: `${name}'s mother`
+		});
 	}
 
-	var dkeys = Object.keys(outdads);
+	let dkeys = Object.keys(outdads);
 	for (let i = 0; i < dkeys.length; i++) {
 		let name;
 		let key = dkeys[i];
@@ -332,18 +375,27 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			name = names.join(', ');
 		}
 		node_lookup[key] = family_graph.nodes.length;
-		//Outside extant slaves set
-		charList.push({ID: key, mother: 0, father: 0, is_father: true, dick: 1, vagina: -1, slaveName: `${name}'s father`});
+		// Outside extant slaves set
+		charList.push({
+			ID: key,
+			mother: 0,
+			father: 0,
+			is_father: true,
+			dick: 1,
+			vagina: -1,
+			slaveName: `${name}'s father`
+		});
 	}
 
-	var charHash = {};
+	let charHash = {};
 	for (let i = 0; i < charList.length; i++) {
 		charHash[charList[i].ID] = charList[i];
 	}
 
-	var related = {};
-	var seen = {};
-	var saveTree = {};
+	let related = {};
+	let seen = {};
+	let saveTree = {};
+
 	function relatedTo(character, targetID, relIDs = {tree: {}, related: false}) {
 		relIDs.tree[character.ID] = true;
 		if (related[character.ID]) {
@@ -371,13 +423,13 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 	}
 	if (filterID) {
 		if (charHash[filterID]) {
-			var relIDs = relatedTo(charHash[filterID], filterID);
+			let relIDs = relatedTo(charHash[filterID], filterID);
 			for (let k in relIDs.tree) {
 				related[k] = true;
 			}
 			for (let i = 0; i < charList.length; i++) {
 				if (charHash[charList[i].ID]) {
-					var pRelIDs = relatedTo(charHash[charList[i].ID], filterID);
+					let pRelIDs = relatedTo(charHash[charList[i].ID], filterID);
 					if (pRelIDs.related) {
 						for (let k in pRelIDs.tree) {
 							related[k] = true;
@@ -404,7 +456,7 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			continue;
 		}
 		node_lookup[char_id] = family_graph.nodes.length;
-		var char_obj = {
+		let char_obj = {
 			ID: char_id,
 			name: character.slaveName,
 			dick: character.dick,
@@ -437,7 +489,7 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			continue;
 		}
 		if (typeof node_lookup[character.mother] !== 'undefined') {
-			var ltype;
+			let ltype;
 			if (character.mother === character.father) {
 				ltype = 'homologous';
 			} else {
@@ -445,25 +497,21 @@ window.buildFamilyTree = function(slaves = State.variables.slaves, filterID) {
 			}
 			family_graph.links.push({
 				type: ltype,
-				target: node_lookup[char_id]*1,
-				source: node_lookup[character.mother]*1
+				target: node_lookup[char_id] * 1,
+				source: node_lookup[character.mother] * 1
 			});
 		}
 		if (character.mother === character.father) {
 			continue;
 		}
 		if (typeof node_lookup[character.father] !== 'undefined') {
-			family_graph.links.push({
-				type: 'paternal',
-				target: node_lookup[char_id]*1,
-				source: node_lookup[character.father]*1
-			});
+			family_graph.links.push({type: 'paternal', target: node_lookup[char_id] * 1, source: node_lookup[character.father] * 1});
 		}
 	}
 	return family_graph;
 };
 
-/*Old version. To use, do something like:
+/* Old version. To use, do something like:
 <div id="editFamily">
 	<div id="graph"></div>
 </div>
@@ -482,10 +530,10 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 	lastActiveSlave = activeSlave;
 	lastSlaves = slaves;
 	lastPC = PC;
-	var treeDepth = 0;
-	var numTreeNodes = 0;
+	let treeDepth = 0;
+	let numTreeNodes = 0;
 
-	var graphElement = document.getElementById("graph");
+	let graphElement = document.getElementById("graph");
 	if (!graphElement)
 		return;
 	graphElement.innerHTML = "";
@@ -509,7 +557,11 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 			if (slaves[i].ID === id)
 				return slaves[i];
 		}
-		return {"slaveName": "-", "ID": id, "genes": expectedGenes};
+		return {
+			"slaveName": "-",
+			"ID": id,
+			"genes": expectedGenes
+		};
 	}
 
 	function slaveInfo(slave, activeSlaveId, recursionProtectSlaveId = {}) {
@@ -536,22 +588,23 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 		}
 		return slaveInfo_(slave, activeSlaveId);
 	}
-	function slaveInfo_(slave, activeSlaveId, slavesAdded={}, depth = 1) {
+
+	function slaveInfo_(slave, activeSlaveId, slavesAdded = {}, depth = 1) {
 		numTreeNodes += 1;
 		treeDepth = Math.max(treeDepth, depth);
-		var shouldAddChildren = false;
+		let shouldAddChildren = false;
 		if (!slavesAdded[slave.ID]) {
 			shouldAddChildren = true;
 			slavesAdded[slave.ID] = true;
 		}
-		var data = {
-			"name": slave.slaveName + (slave.physicalAge?(`&nbsp;(${ slave.physicalAge })`):""),
+		let data = {
+			"name": slave.slaveName + (slave.physicalAge ? (`&nbsp;(${slave.physicalAge})`) : ""),
 			"class": slave.genes,
-			"textClass": (activeSlaveId === slave.ID)?"emphasis":"",
+			"textClass": (activeSlaveId === slave.ID) ? "emphasis" : "",
 			"marriages": [],
 		};
 
-		var spouseToChild = {};
+		let spouseToChild = {};
 
 		function maybeAddSpouseToChild(child) {
 			if (child.ID === slave.ID)
@@ -574,24 +627,24 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 		maybeAddSpouseToChild(getSlave(-1));
 
 		for (let i = 0; i < slaves.length; ++i) {
-			var child = slaves[i];
+			let child = slaves[i];
 			if (child.ID !== activeSlave.ID)
 				maybeAddSpouseToChild(child);
 		}
 
 		for (let key in spouseToChild) {
 			if (spouseToChild.hasOwnProperty(key)) {
-				var children = shouldAddChildren?spouseToChild[key]:[];
-				var spouse = getSlave(key, (slaves.genes === "XX")?"unknownXY":(slaves.genes === "XY")?"unknownXX":"unknown");
-				var spouseName;
+				let children = shouldAddChildren?spouseToChild[key]:[];
+				let spouse = getSlave(key, (slaves.genes === "XX") ? "unknownXY" : (slaves.genes === "XY") ? "unknownXX" : "unknown");	// FIXME: nested ternary
+				let spouseName;
 				if (spouse.ID !== slave.ID){
 					spouseName = spouse.slaveName + (spouse.physicalAge?(`&nbsp;(${ spouse.physicalAge })`):"");
 				} else {
-					spouseName = (spouse.ID === -1)?"(yourself)":"(themselves)";
+					spouseName = (spouse.ID === -1) ? "(yourself)" : "(themselves)";
 				}
-				var marriage = {
+				let marriage = {
 					"spouse": {"name": spouseName, "class": spouse.genes},
-					"children": children.map(function (x) { return slaveInfo_(x, activeSlaveId, slavesAdded, depth + 1);} ),
+					"children": children.map(function(x) {return slaveInfo_(x, activeSlaveId, slavesAdded, depth + 1);}),
 				};
 				data.marriages.push(marriage);
 			}
@@ -604,23 +657,23 @@ window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastS
 	const treeData = [slaveInfo(activeSlave, activeSlave.ID)];
 	console.log("Family tree is", treeData, 'and has:', numTreeNodes);
 
-	var parentWidth = document.getElementById('editFamily').offsetWidth;
+	let parentWidth = document.getElementById('editFamily').offsetWidth;
 
 	console.log(parentWidth, document.getElementById('passages').offsetWidth);
 	if (!parentWidth)
 		parentWidth = document.body.offsetWidth - 483;
 
-	console.log(parentWidth, Math.min(200 + 40*numTreeNodes, parentWidth-200) + 200);
+	console.log(parentWidth, Math.min(200 + 40 * numTreeNodes, parentWidth - 200) + 200);
 
 	dTree.init(treeData, {
 		target: "#graph",
 		debug: true,
-		height: 50 + 50*treeDepth, /* very rough heuristics */
-		width: Math.min(200 + 40*numTreeNodes,
-			parentWidth-200) + 200,
+		height: 50 + 50 * treeDepth,
+		/* very rough heuristics */
+		width: Math.min(200 + 40 * numTreeNodes,
+			parentWidth - 200) + 200,
 		callbacks: {
-			nodeClick: function(/*name, extra*/) {
-			}
+			nodeClick: function( /* name, extra*/ ) {}
 		}
 	});
 };
diff --git a/src/js/food.js b/src/js/food.js
index 6286f78f796a6a2a4f056d98479dde4267c3b328..d92bffb1bb4642ba02958506a08e09c5fede630c 100644
--- a/src/js/food.js
+++ b/src/js/food.js
@@ -1,6 +1,8 @@
-/* eslint-disable no-undef */
-/** @param {App.Entity.SlaveState} slave */
-window.foodAmount = function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.foodAmount = function(slave) {
 	const V = State.variables;
 	let food = 400;													// kg / food produced by base slave / week
 	if (!slave) {
@@ -8,7 +10,7 @@ window.foodAmount = function (slave) {
 	} else {
 		if (V.Farmer !== 0) {										// if a farmer is assigned
 			food *= 1.1;											// TODO: expand this to account for farmer XP and skill
-			if (V.Farmer.skill.farmer >= V.masteredXP) {					// if farmer is master
+			if (V.Farmer.skill.farmer >= V.masteredXP) {			// if farmer is master
 				food *= 1.1;
 			}
 		}
@@ -55,8 +57,11 @@ window.foodAmount = function (slave) {
 	}
 };
 
-/** @param {App.Entity.SlaveState} slave */
-window.farmShowsIncome = function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.farmShowsIncome = function(slave) {
 																	// TODO: incorporate farmyardRestraints
 	const V = State.variables;
 	let arcology = V.arcologies[0];
@@ -66,7 +71,7 @@ window.farmShowsIncome = function (slave) {
 	} else {
 		if (V.Farmer !== 0) {										// farmer is assigned
 			cash *= 1.1;
-			if (V.Farmer.skill.farmer >= V.masteredXP) {					// farmer is master
+			if (V.Farmer.skill.farmer >= V.masteredXP) {			// farmer is master
 				cash *= 1.1;
 			}
 		}
diff --git a/src/js/foreachMacroJS.js b/src/js/foreachMacroJS.js
deleted file mode 100644
index 5aa54d90562c88b890c9458d1a7da4a2567a1c1f..0000000000000000000000000000000000000000
--- a/src/js/foreachMacroJS.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* eslint-disable no-undef */
-Macro.add('foreach', {
-	skipArgs : true,
-	tags : null,
-
-	handler() {
-		const payload = this.payload[0].contents.replace(/\n$/, '');
-		let statement = this.args.raw.trim();
-		let variable;
-		let array;
-		let result;
-
-		if (statement.length !== 0) {
-			const parts = statement.match(/^(\S+?)\s+of\s+(\S.*?)\s*$/i);
-			if(parts !== null) {
-				variable = parts[1];
-				array = parts[2];
-			}
-		}
-		if(!variable || !array) {
-			return this.error('invalid syntax, format: <<foreach variable of array-expression>>... <</foreach>>');
-		}
-
-		try {
-			result = Scripting.evalTwineScript(array);
-		} catch (ex) {
-			return this.error(`bad evaluation: ${typeof ex === 'object' ? ex.message : ex}`);
-		}
-
-		let resultLength = result['length'];
-
-		// We don't check for "instanceof Array" to also be able to pass arguments or other strange objects
-		if(typeof resultLength !== 'number' || (resultLength % 1) !== 0) {
-			return this.error(`bad evaluation: '${ result }' is not an array or array-like object`);
-		}
-
-		if(resultLength > Config.macros.maxLoopIterations) {
-			return this.error(`Array too large for maxLoopIterations (${ resultLength } > ${ Config.macros.maxLoopIterations })`);
-		}
-
-		if(!new RegExp(`^(${Patterns.variable})$`).test(variable)) {
-			return this.error(`not a variable identifier: ${ variable}`);
-		}
-
-		if(resultLength <= 0) {
-			// Don't bother with empty stuff
-			return;
-		}
-
-		Config.debug && this.debugView.modes({block: true});
-
-		payload.replace(/^\n/, '');
-		for(let i = 0; i < resultLength; ++ i) {
-			Wikifier.setValue(variable, result[i]);
-			new Wikifier(this.output, payload);
-		}
-	}
-});
diff --git a/src/js/futureSocietyJS.js b/src/js/futureSocietyJS.js
index 2cbdac435bd4877aeb91e6a7cd00bb4e0806bc22..0cf8241d6f110e96569e12045d167cfd317679de 100644
--- a/src/js/futureSocietyJS.js
+++ b/src/js/futureSocietyJS.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-console */
-/* eslint-disable no-undef */
 window.FutureSocieties = (function() {
 	return {
 		remove: removeFS,
@@ -15,6 +13,7 @@ window.FutureSocieties = (function() {
 		const FSSMR = `${FS }SMR`;
 		let FSLaw = `${FS }Law`;
 		if (arcology[FS] === undefined) {
+			// eslint-disable-next-line no-console
 			console.log(`ERROR: bad FS reference, $arcologies[0].${FS} not defined`);
 			return;
 		}
@@ -102,13 +101,13 @@ window.FutureSocieties = (function() {
 		if (V.arcologies[0].FSNull > 0) { // possibly recalculate for multiculturalism
 			activeFS--;
 			if (V.FSCreditCount === 4)
-				activeFS += V.arcologies[0].FSNull/25;
+				activeFS += V.arcologies[0].FSNull / 25;
 			else if (V.FSCreditCount === 6)
-				activeFS += V.arcologies[0].FSNull/17;
+				activeFS += V.arcologies[0].FSNull / 17;
 			else if (V.FSCreditCount === 7)
-				activeFS += V.arcologies[0].FSNull/15;
+				activeFS += V.arcologies[0].FSNull / 15;
 			else
-				activeFS += V.arcologies[0].FSNull/20;
+				activeFS += V.arcologies[0].FSNull / 20;
 		}
 		V.FSCredits = Math.max(Math.trunc(V.FSGotRepCredits - activeFS), 0);
 	}
@@ -165,10 +164,12 @@ window.FutureSocieties = (function() {
 		if (activeFS === "standard") {
 			// nothing to do
 		} else if (activeFS === undefined) {
+			// eslint-disable-next-line no-console
 			console.log(`Error: $${decoration} is ${V[decoration]}`);
 			V[decoration] = "standard";
 		} else if (!Number.isFinite(V.arcologies[0][activeFS])) {
 			if (V.arcologies[0][activeFS] !== "unset") {
+				// eslint-disable-next-line no-console
 				console.log(`Error: $arcologies[0].${activeFS} is ${V.arcologies[0][activeFS]}`);
 			}
 			V[decoration] = "standard";
@@ -422,7 +423,7 @@ window.FSChange = function FSChange(FS, magnitude, bonusMultiplier = 1) {
 			}
 			break;
 		default:
-			errorMessage += '<span class=\'red\'>ERROR: bad FS reference</span>';
+			errorMessage += `<span class="red">ERROR: bad FS reference</span>`;
 	}
 	return errorMessage;
 };
diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js
index 76a391f91bd45c18220195ce96f3dd1696e69eea..72a4d3a04c489b1b9cd9275e86992074c83f6c2d 100644
--- a/src/js/generateGenetics.js
+++ b/src/js/generateGenetics.js
@@ -11,9 +11,35 @@ window.generateGenetics = (function() {
 
 	function generateGenetics(actor1, actor2, x) {
 		V = State.variables;
-		genes = {gender: "XX", name: "blank", surname: 0, mother: 0, motherName: "none", father: 0, fatherName: "none", nationality: "Stateless", race: "white", intelligence: 0, face: 0, faceShape: "cute", eyeColor: "brown", hColor: "black", skin: "white", markings: "none", behavioralFlaw: "none", sexualFlaw: "none", pubicHStyle: "bushy", underArmHStyle: "bushy", clone: 0, cloneID: 0, geneticQuirks: 0};
+		genes = {
+			gender: "XX",
+			name: "blank",
+			surname: 0,
+			mother: 0,
+			motherName: "none",
+			father: 0,
+			fatherName: "none",
+			nationality: "Stateless",
+			race: "white",
+			intelligence: 0,
+			face: 0,
+			faceShape: "cute",
+			eyeColor: "brown",
+			hColor: "black",
+			skin: "white",
+			markings: "none",
+			behavioralFlaw: "none",
+			sexualFlaw: "none",
+			pubicHStyle: "bushy",
+			underArmHStyle: "bushy",
+			clone: 0,
+			cloneID: 0,
+			geneticQuirks: 0
+		};
 		if (actor1.ID > 0) {
-			mother = V.genePool.find(function(s) { return s.ID === actor1.ID; });
+			mother = V.genePool.find(function(s) {
+				return s.ID === actor1.ID;
+			});
 			if (mother === undefined) {
 				mother = actor1;
 			}
@@ -26,7 +52,9 @@ window.generateGenetics = (function() {
 			mother = V.PC;
 		}
 		if (actor2 > 0) {
-			father = V.genePool.find(function(s) { return s.ID === actor2; });
+			father = V.genePool.find(function(s) {
+				return s.ID === actor2;
+			});
 			activeFather = V.slaves[V.slaveIndices[actor2]];
 			if (father === undefined) {
 				father = V.slaves[V.slaveIndices[actor2]];
@@ -34,13 +62,17 @@ window.generateGenetics = (function() {
 			}
 			if (father === undefined) {
 				if (V.incubator > 0) {
-					father = V.tanks.find(function(s) { return s.ID === actor2; });
+					father = V.tanks.find(function(s) {
+						return s.ID === actor2;
+					});
 					activeFather = 0; // activeFather = father?
 				}
 			}
 			if (father === undefined) {
 				if (V.nursery > 0) {
-					father = V.cribs.find(function(s) { return s.ID === actor2; });
+					father = V.cribs.find(function(s) {
+						return s.ID === actor2;
+					});
 					activeFather = 0; // activeFather = father?
 				}
 			}
@@ -90,7 +122,7 @@ window.generateGenetics = (function() {
 		if (mother.geneticQuirks.girlsOnly === 2) {
 			gender = "XX";
 		} else if (V.seeDicksAffectsPregnancy === 1) {
-			gender = Math.floor(Math.random()*100) < V.seeDicks ? "XY" : "XX";
+			gender = Math.floor(Math.random() * 100) < V.seeDicks ? "XY" : "XX";
 		} else if (V.adamPrinciple === 1) {
 			if (father !== 0) {
 				if (father.genes === "XX" && mother.genes === "XX") {
@@ -124,10 +156,14 @@ window.generateGenetics = (function() {
 		let motherName;
 		if (activeMother.ID === -1) {
 			motherName = activeMother.name;
-			if (activeMother.surname !== 0 && activeMother.surname !== "") { motherName += ` ${activeMother.surname}`; }
+			if (activeMother.surname !== 0 && activeMother.surname !== "") {
+				motherName += ` ${activeMother.surname}`;
+			}
 		} else {
 			motherName = activeMother.slaveName;
-			if (activeMother.slaveSurname !== 0 && activeMother.slaveSurname !== "") { motherName += ` ${activeMother.slaveSurname}`; }
+			if (activeMother.slaveSurname !== 0 && activeMother.slaveSurname !== "") {
+				motherName += ` ${activeMother.slaveSurname}`;
+			}
 		}
 		return motherName;
 	}
@@ -143,10 +179,14 @@ window.generateGenetics = (function() {
 		if (father !== 0) {
 			if (father.ID === -1) {
 				fatherName = activeFather.name;
-				if (activeFather.surname !== 0 && activeFather.surname !== "") { fatherName += ` ${activeFather.surname}`; }
+				if (activeFather.surname !== 0 && activeFather.surname !== "") {
+					fatherName += ` ${activeFather.surname}`;
+				}
 			} else {
 				fatherName = activeFather.slaveName;
-				if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") { fatherName += ` ${activeFather.slaveSurname}`; }
+				if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") {
+					fatherName += ` ${activeFather.slaveSurname}`;
+				}
 			}
 		} else {
 			switch (actor2) {
@@ -219,7 +259,7 @@ window.generateGenetics = (function() {
 		return race;
 	}
 
-	//skin
+	// skin
 	function setSkin(father, mother, actor2) {
 		let fatherSkin = 0;
 		let dadSkinIndex;
@@ -311,13 +351,13 @@ window.generateGenetics = (function() {
 				} else if (mother.origEye === "red" || mother.origEye === "pale red" || mother.origEye === "light red" || mother.origEye === "pale gray" || mother.origEye === "milky white") {
 					eyeColor = fatherEye;
 				} else if (fatherEye === "blue") {
-					if (jsRandom(1,4) === 2) {
+					if (jsRandom(1, 4) === 2) {
 						eyeColor = mother.origEye;
 					} else {
 						eyeColor = fatherEye;
 					}
 				} else if (fatherEye === "blue") {
-					if (jsRandom(1,4) === 2) {
+					if (jsRandom(1, 4) === 2) {
 						eyeColor = fatherEye;
 					} else {
 						eyeColor = mother.origEye;
@@ -329,7 +369,7 @@ window.generateGenetics = (function() {
 				eyeColor = mother.origEye;
 			}
 		}
-		//just in case something wrong gets through
+		// just in case something wrong gets through
 		switch (eyeColor) {
 			case "blind blue":
 				eyeColor = "deep blue";
@@ -338,6 +378,7 @@ window.generateGenetics = (function() {
 			case "implant":
 				eyeColor = jsEither(["blue", "brown", "dark blue", "dark green", "green", "hazel", "light blue", "light green"]);
 				break;
+
 		}
 		return eyeColor;
 	}
@@ -369,7 +410,7 @@ window.generateGenetics = (function() {
 		if (mother.geneticQuirks.heterochromia !== 0 && mother.geneticQuirks.heterochromia !== 1) {
 			eyeColorArray.push(mother.geneticQuirks.heterochromia);
 		}
-		//just in case something wrong gets through
+		// just in case something wrong gets through
 		switch (hEyeColor) {
 			case "blind blue":
 				hEyeColor = ["deep blue"];
@@ -378,6 +419,7 @@ window.generateGenetics = (function() {
 			case "implant":
 				hEyeColor = jsEither(["blue", "green", "brown", "hazel", "light blue", "light green", "dark green", "dark blue"]);
 				break;
+
 		}
 		return jsEither(eyeColorArray);
 	}
@@ -415,7 +457,7 @@ window.generateGenetics = (function() {
 				if (mother.origHColor === fatherHair) {
 					hairColor = mother.origHColor;
 				} else if (mother.origHColor === "white") {
-					hairColor = jsRandom(1,100) === 69 ? mother.origHColor : fatherHair;
+					hairColor = jsRandom(1, 100) === 69 ? mother.origHColor : fatherHair;
 				} else if (mother.origHColor === "black") {
 					hairColor = jsEither([fatherHair, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor]);
 				} else if (fatherHair === "black") {
@@ -520,11 +562,11 @@ window.generateGenetics = (function() {
 		} else {
 			fetish = jsEither(["none", "none", "none", "none", "none", mother.fetish, mother.fetish]);
 		}
-		if (fetish === "mindbroken") { fetish = "none"; }
+		if (fetish === "mindbroken") {fetish = "none";}
 		return fetish;
 	}
 
-	//intelligence
+	// intelligence
 	function setIntelligence(father, mother, activeMother, actor2) {
 		let smarts;
 		if (mother.ID === -1) {
@@ -576,7 +618,7 @@ window.generateGenetics = (function() {
 		return Math.clamp(smarts, -100, 100);
 	}
 
-	//face
+	// face
 	function setFace(father, mother, activeMother, actor2, genes) {
 		let face;
 		if (genes.pFace > 0 && genes.uFace > 0) {
@@ -648,7 +690,24 @@ window.generateGenetics = (function() {
 
 	// genetic quirks
 	function setGeneticQuirks(father, mother, sex) {
-		let quirks = {macromastia: 0, gigantomastia: 0, fertility: 0, hyperFertility: 0, superfetation: 0, gigantism: 0, dwarfism: 0, pFace: 0, uFace: 0, albinism: 0, heterochromia: 0, rearLipedema: 0, wellHung: 0, wGain: 0, wLoss: 0, androgyny: 0};
+		let quirks = {
+			macromastia: 0,
+			gigantomastia: 0,
+			fertility: 0,
+			hyperFertility: 0,
+			superfetation: 0,
+			gigantism: 0,
+			dwarfism: 0,
+			pFace: 0,
+			uFace: 0,
+			albinism: 0,
+			heterochromia: 0,
+			rearLipedema: 0,
+			wellHung: 0,
+			wGain: 0,
+			wLoss: 0,
+			androgyny: 0
+		};
 		let chance = 0;
 
 		// fertility
@@ -794,7 +853,7 @@ window.generateGenetics = (function() {
 			}
 		}
 
-		//perfect face
+		// perfect face
 		if (father !== 0) {
 			if (mother.geneticQuirks.pFace + father.geneticQuirks.pFace >= 4) {
 				quirks.pFace = 2;
@@ -805,7 +864,7 @@ window.generateGenetics = (function() {
 			quirks.pFace = 1;
 		}
 
-		//ugly face
+		// ugly face
 		if (father !== 0) {
 			if (mother.geneticQuirks.uFace + father.geneticQuirks.uFace >= 4) {
 				quirks.uFace = 2;
@@ -816,7 +875,7 @@ window.generateGenetics = (function() {
 			quirks.uFace = 1;
 		}
 
-		//albinism
+		// albinism
 		if (father !== 0) {
 			// Add treatment to force albinism
 			if (mother.geneticQuirks.albinism === 2 && father.geneticQuirks.albinism === 2) {
@@ -848,7 +907,7 @@ window.generateGenetics = (function() {
 			}
 		}
 
-		//heterochromia
+		// heterochromia
 		if (father !== 0) {
 			if (mother.geneticQuirks.heterochromia === 2 && father.geneticQuirks.heterochromia === 2) {
 				if (jsRandom(1, 4) === 1) {
@@ -879,7 +938,7 @@ window.generateGenetics = (function() {
 			}
 		}
 
-		//rear lipedema
+		// rear lipedema
 		if (father !== 0) {
 			if (mother.geneticQuirks.rearLipedema === 2 && father.geneticQuirks.rearLipedema === 2) {
 				if (jsRandom(1, 4) >= 3) {
@@ -912,7 +971,7 @@ window.generateGenetics = (function() {
 			}
 		}
 		
-		//gigantomastia
+		// Gigantomastia
 		if (father !== 0) {
 			if (mother.geneticQuirks.gigantomastia >= 2 && father.geneticQuirks.gigantomastia >= 2) {
 				if (jsRandom(1, 4) === 1) {
@@ -943,7 +1002,7 @@ window.generateGenetics = (function() {
 			}
 		}
 		
-		//macromastia
+		// Macromastia
 		if (father !== 0) {
 			if (mother.geneticQuirks.macromastia >= 2 && father.geneticQuirks.macromastia >= 2) {
 				if (jsRandom(1, 4) === 1) {
@@ -980,13 +1039,13 @@ window.generateGenetics = (function() {
 	return generateGenetics;
 })();
 
-window.generateChild = function (mother, ova, destination) {
+window.generateChild = function(mother, ova, destination) {
 	let V = State.variables;
-	let genes = ova.genetics; //maybe just argument this? We'll see.
+	let genes = ova.genetics; // maybe just argument this? We'll see.
 	let pregUpgrade = V.pregnancyMonitoringUpgrade;
 	let child = {};
 
-	if (!destination) { //does extra work for the incubator if defined, otherwise builds a simple object
+	if (!destination) { // does extra work for the incubator if defined, otherwise builds a simple object
 		if (genes.gender === "XX") {
 			child.genes = "XX";
 			child.slaveSurname = genes.surname;
@@ -1189,7 +1248,11 @@ window.generateChild = function (mother, ova, destination) {
 		child.fetish = genes.fetish;
 		child.geneticQuirks = clone(genes.geneticQuirks);
 		if (child.geneticQuirks.albinism === 2) {
-			child.albinismOverride = {skin: genes.skin, eyeColor: genes.eyeColor, hColor: genes.hColor};
+			child.albinismOverride = {
+				skin: genes.skin,
+				eyeColor: genes.eyeColor,
+				hColor: genes.hColor
+			};
 			child.hColor = "white";
 			child.pubicHColor = child.hColor;
 			child.underArmHColor = child.hColor;
@@ -1251,6 +1314,7 @@ window.generateChild = function (mother, ova, destination) {
 	} else {
 		V.activeSlaveOneTimeMinAge = V.targetAge;
 		V.activeSlaveOneTimeMaxAge = V.targetAge;
+		// eslint-disable-next-line camelcase
 		V.one_time_age_overrides_pedo_mode = 1;
 		V.ageAdjustOverride = 1;
 
@@ -1473,19 +1537,11 @@ window.generateChild = function (mother, ova, destination) {
 		child.birthWeek = 0;
 		child.energy = 0;
 		child.anus = 0;
-		if (child.vagina > 0) { child.vagina = 0; }
-		if (child.fetish !== "none") { child.fetishStrength = 20; }
-		if (child.dick > 0) {
-			child.foreskin = 1;
-			child.balls = 1;
-			child.scrotum = 1;
-		}
-		if (genes.faceShape !== undefined) {
-			child.faceShape = genes.faceShape;
-		}
-		if (mother.addict > 0) {
-			child.addict = Math.trunc(mother.addict / 2);
-		}
+		if (child.vagina > 0) {child.vagina = 0;}
+		if (child.fetish !== "none") {child.fetishStrength = 20;}
+		if (child.dick > 0) {child.foreskin = 1; child.balls = 1; child.scrotum = 1;}
+		if (genes.faceShape !== undefined) {child.faceShape = genes.faceShape;}
+		if (mother.addict > 0) {child.addict = Math.trunc(mother.addict / 2);}
 		child.career = "a slave since birth";
 		child.birthName = child.slaveName;
 		child.birthSurname = child.slaveSurname;
diff --git a/src/js/generateNewSlaveJS.js b/src/js/generateNewSlaveJS.js
index eea1a3df11d06081641e53ac5819d669beeec78a..d928bccf609fa592fc6501e699c33af75d36c239 100644
--- a/src/js/generateNewSlaveJS.js
+++ b/src/js/generateNewSlaveJS.js
@@ -1,8 +1,10 @@
-/* eslint-disable no-undef */
+/* eslint-disable camelcase */
 window.GenerateNewSlave = (function() {
 	"use strict";
-	let V; let chance;
-	/** @type {App.Entity.SlaveState} */
+	let V;
+	let chance;
+	/**
+	 * @type {App.Entity.SlaveState} */
 	let slave;
 
 	function GenerateNewSlave(sex) {
@@ -111,7 +113,7 @@ window.GenerateNewSlave = (function() {
 
 	function generateXXBodyProportions() {
 		slave.height = Math.round(Height.random(slave));
-		if (slave.height >= Height.mean(slave) * 170/162.5) {
+		if (slave.height >= Height.mean(slave) * 170 / 162.5) {
 			slave.hips = jsEither([-1, 0, 0, 1, 1, 2, 2]);
 			slave.shoulders = jsEither([-1, -1, 0, 0, 0, 1]);
 		} else {
@@ -139,7 +141,7 @@ window.GenerateNewSlave = (function() {
 	function generateXYBodyProportions() {
 		slave.height = Math.round(Height.random(slave));
 		if (slave.physicalAge <= 13) {
-			if (slave.height > Height.mean(slave) * 170/172.5) {
+			if (slave.height > Height.mean(slave) * 170 / 172.5) {
 				slave.hips = jsEither([-2, -1, -1, 0, 1]);
 				slave.shoulders = jsEither([-1, -1, 0, 0, 0, 1]);
 			} else {
@@ -147,7 +149,7 @@ window.GenerateNewSlave = (function() {
 				slave.shoulders = jsEither([-2, -1, -1, 0, 0, 1]);
 			}
 		} else {
-			if (slave.height > Height.mean(slave) * 170/172.5) {
+			if (slave.height > Height.mean(slave) * 170 / 172.5) {
 				slave.hips = jsEither([-2, -1, -1, 0, 1]);
 				slave.shoulders = jsEither([-1, 0, 1, 1, 2, 2]);
 			} else {
@@ -209,7 +211,7 @@ window.GenerateNewSlave = (function() {
 
 		if (slave.energy < jsRandom(1, 80)) {
 			slave.vaginaLube = 0;
-		} else if ( slave.physicalAge > jsRandom(35, 60)) {
+		} else if (slave.physicalAge > jsRandom(35, 60)) {
 			slave.vaginaLube = 0;
 		} else {
 			slave.vaginaLube = 1;
@@ -927,7 +929,7 @@ window.GenerateNewSlave = (function() {
 		} else if (slave.physicalAge <= 11) {
 			slave.pregAdaptation = slave.physicalAge - 1;
 		} else if (slave.physicalAge <= 14) {
-			slave.pregAdaptation = 4*(slave.physicalAge - 12) + 14;
+			slave.pregAdaptation = 4 * (slave.physicalAge - 12) + 14;
 		} else if (slave.physicalAge <= 15) {
 			slave.pregAdaptation = 28;
 		} else if (slave.physicalAge <= 16) {
@@ -945,7 +947,7 @@ window.GenerateNewSlave = (function() {
 		} else if (slave.physicalAge <= 11) {
 			slave.pregAdaptation = slave.physicalAge - 1;
 		} else if (slave.physicalAge <= 15) {
-			slave.pregAdaptation = 2*(slave.physicalAge - 12) + 12;
+			slave.pregAdaptation = 2 * (slave.physicalAge - 12) + 12;
 		} else {
 			slave.pregAdaptation = 20;
 		}
@@ -980,7 +982,7 @@ window.GenerateNewSlave = (function() {
 	}
 
 	function generateXXTeeth() {
-		let femaleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant;
+		let femaleCrookedTeethGen = slave.intelligence + slave.intelligenceImplant;
 		if ("American" === slave.nationality) {
 			femaleCrookedTeethGen += 20;
 		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
@@ -1001,7 +1003,7 @@ window.GenerateNewSlave = (function() {
 	}
 
 	function generateXYTeeth() {
-		let maleCrookedTeethGen = slave.intelligence+slave.intelligenceImplant;
+		let maleCrookedTeethGen = slave.intelligence + slave.intelligenceImplant;
 		if ("American" === slave.nationality) {
 			maleCrookedTeethGen += 22;
 		} else if (["Andorran", "Antiguan", "Argentinian", "Aruban", "Australian", "Austrian", "Bahamian", "Bahraini", "Barbadian", "Belarusian", "Belgian", "Bermudian", "Brazilian", "British", "Bruneian", "Bulgarian", "Canadian", "Catalan", "Chilean", "a Cook Islander", "Croatian", "Curaçaoan", "Cypriot", "Czech", "Danish", "Dutch", "Emirati", "Estonian", "Finnish", "French", "German", "Greek", "Greenlandic", "Guamanian", "Hungarian", "Icelandic", "Irish", "Israeli", "Italian", "Japanese", "Kazakh", "Korean", "Kuwaiti", "Latvian", "a Liechtensteiner", "Lithuanian", "Luxembourgian", "Malaysian", "Maltese", "Mauritian", "Monégasque", "Montenegrin", "New Caledonian", "a New Zealander", "Niuean", "Norwegian", "Omani", "Palauan", "Panamanian", "Polish", "Portuguese", "Puerto Rican", "Qatari", "Romanian", "Russian", "Sammarinese", "Saudi", "Seychellois", "Singaporean", "Slovak", "Slovene", "Spanish", "Swedish", "Swiss", "Taiwanese", "Trinidadian", "Uruguayan", "Vatican"].includes(slave.nationality)) {
@@ -1217,7 +1219,7 @@ window.GenerateNewSlave = (function() {
 		slave.visualAge = slave.actualAge;
 		slave.physicalAge = slave.actualAge;
 		slave.ovaryAge = slave.actualAge;
-		slave.age = slave.actualAge; /*compatibility*/
+		slave.age = slave.actualAge; /* compatibility */
 		slave.pubertyAgeXX = V.fertilityAge;
 		slave.pubertyAgeXY = V.potencyAge;
 	}
@@ -1226,14 +1228,15 @@ window.GenerateNewSlave = (function() {
 		const gaussian = gaussianPair();
 		slave.intelligence = Intelligence.random();
 		if (V.AgePenalty === 1 && slave.actualAge <= 24) {
-			if (gaussian[0] < gaussian[1] + slave.intelligence/29 + (slave.actualAge - 24)/8 - 0.35) {
+			if (gaussian[0] < gaussian[1] + slave.intelligence / 29 + (slave.actualAge - 24) / 8 - 0.35) {
 				slave.intelligenceImplant = 15;
 				if (slave.intelligenceImplant > 0 && jsRandom(15, 150) < slave.intelligence) {
 					slave.intelligenceImplant = 30;
 				}
 			}
 		} else {
-			if (gaussian[0] < gaussian[1] + slave.intelligence/29 - 0.35) { /* 40.23% chance if intelligence is 0, 99.26% chance if intelligence is 100 */
+			if (gaussian[0] < gaussian[1] + slave.intelligence / 29 - 0.35) {
+				/* 40.23% chance if intelligence is 0, 99.26% chance if intelligence is 100 */
 				slave.intelligenceImplant = 15;
 				if (slave.intelligenceImplant > 0 && jsRandom(15, 150) < slave.intelligence) {
 					slave.intelligenceImplant = 30;
@@ -1409,13 +1412,13 @@ window.GenerateNewSlave = (function() {
 			if (slave.weight < -10 && slave.boobs > 200) {
 				slave.boobs -= 100;
 			} else if (slave.weight > 190 && slave.boobs < 3000) {
-				slave.boobs += (jsRandom(3, 8)*100);
+				slave.boobs += (jsRandom(3, 8) * 100);
 			} else if (slave.weight > 160 && slave.boobs < 1500) {
-				slave.boobs += (jsRandom(2, 6)*100);
+				slave.boobs += (jsRandom(2, 6) * 100);
 			} else if (slave.weight > 130 && slave.boobs < 1500) {
-				slave.boobs += (jsRandom(1, 4)*100);
+				slave.boobs += (jsRandom(1, 4) * 100);
 			} else if (slave.weight > 95 && slave.boobs < 1200) {
-				slave.boobs += (jsRandom(1, 3)*100);
+				slave.boobs += (jsRandom(1, 3) * 100);
 			} else if (slave.weight > 30 && slave.boobs < 1000) {
 				slave.boobs += 100;
 			}
@@ -1482,35 +1485,35 @@ window.GenerateNewSlave = (function() {
 					const rolled = jsEither(disList);
 					switch (rolled) {
 						case "hearNot":
-							if ((jsRandom(1, 100)-(disableCount*2)) > 90) {
+							if ((jsRandom(1, 100) - (disableCount * 2)) > 90) {
 								slave.hears = -2;
 							}
 							disList.delete("hearNot");
 							disableCount++;
 							break;
 						case "seeNot":
-							if ((jsRandom(1, 100)-(disableCount*2)) > 90) {
+							if ((jsRandom(1, 100) - (disableCount * 2)) > 90) {
 								slave.eyes = -2;
 							}
 							disList.delete("seeNot");
 							disableCount++;
 							break;
 						case "speakNot":
-							if ((jsRandom(1, 100)-(disableCount*2)) > 90) {
+							if ((jsRandom(1, 100) - (disableCount * 2)) > 90) {
 								slave.voice = 0;
 							}
 							disList.delete("speakNot");
 							disableCount++;
 							break;
 						case "smellNot":
-							if ((jsRandom(1, 100)-(disableCount*2)) > 90) {
+							if ((jsRandom(1, 100) - (disableCount * 2)) > 90) {
 								slave.smells = -1;
 							}
 							disList.delete("smellNot");
 							disableCount++;
 							break;
 						case "tasteNot":
-							if ((jsRandom(1, 100)-(disableCount*2)) > 90) {
+							if ((jsRandom(1, 100) - (disableCount * 2)) > 90) {
 								slave.tastes = -1;
 							}
 							disList.delete("tasteNot");
@@ -1525,7 +1528,11 @@ window.GenerateNewSlave = (function() {
 
 	function generateGeneticQuirkTweaks() {
 		if (slave.geneticQuirks.albinism === 2) {
-			slave.albinismOverride = {skin: slave.skin, eyeColor: slave.eyeColor, hColor: slave.hColor};
+			slave.albinismOverride = {
+				skin: slave.skin,
+				eyeColor: slave.eyeColor,
+				hColor: slave.hColor
+			};
 			slave.hColor = "white";
 			slave.eyeColor = "red";
 			switch (slave.race) {
diff --git a/src/js/hTagMacroJS.js b/src/js/hTagMacroJS.js
index a0908716ab2f36f3a701760f96851d23201c3b35..be89c63fff6baddf9def7050ddf7f381a4a9d392 100644
--- a/src/js/hTagMacroJS.js
+++ b/src/js/hTagMacroJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /*
  * <<htag>> macro
  * A simple macro which allows to create wrapping html elements with dynamic IDs.
@@ -19,7 +18,8 @@ Macro.add('htag', {
 		const payload = this.payload[0].contents.replace(/(^\n+|\n+$)/, '');
 		let htag = 'div';
 		let attributes;
-		function munge (val, key) {
+
+		function munge(val, key) {
 			return `${key }="${ val }"`;
 		}
 
@@ -32,7 +32,9 @@ Macro.add('htag', {
 		else
 			attributes = `id="${ String(this.args[0]).trim() }"`;
 		if (Config.debug)
-			this.debugView.modes({block: true});
+			this.debugView.modes({
+				block: true
+			});
 
 		jQuery(`<${ htag } ${ attributes } />`)
 			.wiki(payload)
diff --git a/src/js/heroCreator.js b/src/js/heroCreator.js
index 51fc8409a74ea4bb6ec8e3854dfac567913cb6b3..1539fecb5f492203adaaca8f0e0bfd473ee99032 100644
--- a/src/js/heroCreator.js
+++ b/src/js/heroCreator.js
@@ -1,10 +1,9 @@
-/* eslint-disable no-undef */
 /**
  * @param {App.Entity.SlaveState} heroSlave
  * @param {App.Entity.SlaveState} baseHeroSlave
  * @return {App.Entity.SlaveState}
  */
-App.Utils.getHeroSlave = function (heroSlave, baseHeroSlave) {
+App.Utils.getHeroSlave = function(heroSlave, baseHeroSlave) {
 	function isObject(o) {
 		return (o !== undefined && typeof o === 'object' && !Array.isArray(o));
 	}
diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js
index 76505432686551847b17fed3b504e22284ecde93..e7c07a12666a2f575993554907eb1203eb0b66fa 100644
--- a/src/js/itemAvailability.js
+++ b/src/js/itemAvailability.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /* intended to condense the clothing/toy/etc availability checks into something less asinine */
 
 /**
@@ -12,7 +11,8 @@ window.isItemAccessible = function(string) {
 	if (V.cheatMode === 1) {
 		return true;
 	}
-	switch (string) { /* no breaks needed because we always return */
+	switch (string) {
+		/* no breaks needed because we always return */
 		case "attractive lingerie for a pregnant woman":
 			return (V.arcologies[0].FSRepopulationFocus > 0 || V.clothesBoughtMaternityLingerie === 1);
 		case "a bunny outfit":
@@ -76,9 +76,9 @@ window.isItemAccessible = function(string) {
 			return (V.clothesBoughtCareer === 1 || V.PC.career === "servant");
 		case "a ball gown":
 		case "a gothic lolita dress":
-			//case 'a halter top dress':
-			//case 'a mini dress':
-			//case 'a slave gown':
+			// case 'a halter top dress':
+			// case 'a mini dress':
+			// case 'a slave gown':
 			return (V.clothesBoughtDresses === 1);
 		case "a cybersuit":
 		case "a latex catsuit":
@@ -132,7 +132,8 @@ window.isItemAccessible = function(string) {
 			return (V.arcologies[0].FSGenderFundamentalist > 0 || V.clothesBoughtBunny === 1);
 		case "ancient Egyptian":
 			return (V.arcologies[0].FSEgyptianRevivalist > 0 || V.clothesBoughtEgypt === 1);
-		case "pasties": /* an option in saChoosesOwnClothes.tw, but everything else (e.g. descriptions, artwork, option in wardrobeUse.tw) is missing or not hooked up correctly */
+		case "pasties":
+			/* an option in saChoosesOwnClothes.tw, but everything else (e.g. descriptions, artwork, option in wardrobeUse.tw) is missing or not hooked up correctly */
 			return false;
 		case "massive dildo gag":
 			return (V.toysBoughtGags === 1);
diff --git a/src/js/nurseryWidgets.js b/src/js/nurseryWidgets.js
index f4a8493ab0866eeb10c9ef07613c42e38b8d29ed..92bff88e24a4ed978dacf9ecdca00a8b818e3f01 100644
--- a/src/js/nurseryWidgets.js
+++ b/src/js/nurseryWidgets.js
@@ -1,7 +1,7 @@
-App.Facilities.Nursery.ChildSummary = function (child) {
+App.Facilities.Nursery.ChildSummary = function(child) {
     const V = State.variables;
     let r = ``;
     r += `${child} will stay in ${V.nurseryName} for another ${child.weeksLeft} weeks. `;
-    SlaveSummary(child);
+    r += SlaveSummary(child);
     return r;
 };
diff --git a/src/js/optionsMacro.js b/src/js/optionsMacro.js
index 25de71e2e3cd7fba75161cf3d1826d9199bb33a0..54c9e134d33fd9db6611a8288e94e747c496e376 100644
--- a/src/js/optionsMacro.js
+++ b/src/js/optionsMacro.js
@@ -1,6 +1,5 @@
+/* eslint-disable camelcase */
 /* eslint-disable no-empty */
-/* eslint-disable no-console */
-/* eslint-disable no-undef */
 /* Use like:
 	<<options $varname "New Passage (defaults to current passage)">>
 	  A title
@@ -21,20 +20,20 @@ Macro.add('options', {
 	skipArgs : false,
 	tags	 : ['option', 'comment', 'optionlt', 'optionlte', 'optiongt', 'optiongte',
 				'optiondefault', 'optionif'],
-	handler : function () {
+	handler : function() {
 		try {
-			var currentOption = this.payload[0].args[0];
-			var currentOptionIsNumber = typeof currentOption === "number";
-			var variable = null;
-			var title = this.payload[0].contents || '';
-			var passageName = this.payload[0].args[1] || passage();
-			var found = false;
-			var found_index = 0;
-			var comment = null;
-			var hasMultipleOptionsWithSameValue = false;
-			var description = "";
-			var hasCurrentOption = this.payload[0].args.full &&
-			this.payload[0].args.full !== '""' && this.payload[0].args.full !== "''";
+			let currentOption = this.payload[0].args[0];
+			let currentOptionIsNumber = typeof currentOption === "number";
+			let variable = null;
+			let title = this.payload[0].contents || '';
+			let passageName = this.payload[0].args[1] || passage();
+			let found = false;
+			let found_index = 0;
+			let comment = null;
+			let hasMultipleOptionsWithSameValue = false;
+			let description = "";
+			let hasCurrentOption = this.payload[0].args.full &&
+				this.payload[0].args.full !== '""' && this.payload[0].args.full !== "''";
 
 			/* Check if we have a first argument - if we do, it should be a
 			   variable like $foo
@@ -43,10 +42,11 @@ Macro.add('options', {
 				if (currentOption === undefined)
 					currentOption = false;
 				if (this.payload[0].args.full.startsWith("State.temporary.")) {
-					variable = "_" + this.payload[0].args.full.split(' ',1)[0].substring("State.temporary.".length);
+					variable = "_" + this.payload[0].args.full.split(' ', 1)[0].substring("State.temporary.".length);
 				} else if (this.payload[0].args.full.startsWith("State.variables.")) {
-					variable = "$" + this.payload[0].args.full.split(' ',1)[0].substring("State.variables.".length);
+					variable = "$" + this.payload[0].args.full.split(' ', 1)[0].substring("State.variables.".length);
 				} else {
+					// eslint-disable-next-line no-console
 					console.log(this.payload[0].args.full);
 					throw new Error("First parameter to 'options' must be a variable");
 				}
@@ -93,9 +93,7 @@ Macro.add('options', {
 							found = true;
 							found_index = i;
 						}
-					} else if (this.payload[i].name === 'comment') {
-					} else if (this.payload[i].name === 'optionif') {
-					} else {
+					} else if (this.payload[i].name === 'comment') {} else if (this.payload[i].name === 'optionif') {} else {
 						throw new Error("Only valid tag is 'option' inside 'options'");
 					}
 				}
@@ -111,22 +109,20 @@ Macro.add('options', {
 					} else {
 						throw new Error("Missing variable to <<options>>");
 					}
-
 				}
-
 			}
 
-			var showSelectedOption = true; //this.payload.length !== 3 || !description;
+			let showSelectedOption = true; // this.payload.length !== 3 || !description;
 			/* Now print out the list of options */
-			var output = "";
-			var optionIfIsFalse = false;
+			let output = "";
+			let optionIfIsFalse = false;
 			for (let i = 1, len = this.payload.length; i < len; ++i) {
 				if (this.payload[i].name === "optionif") {
 					if (this.payload[i].args.length === 0) {
 						optionIfIsFalse = false; /* No options means to turn off optionif */
 					} else if (this.payload[i].args.length === 1) {
 						// Evaluate it and see if is false
-						if (typeof(this.payload[i].args[0]) !== 'boolean') {
+						if (typeof (this.payload[i].args[0]) !== 'boolean') {
 							throw new Error("optionif requires true or false for the first (and only) parameter");
 						}
 						optionIfIsFalse = !this.payload[i].args[0];
@@ -138,25 +134,32 @@ Macro.add('options', {
 				if (optionIfIsFalse) {
 					continue;
 				} else if (this.payload[i].name.startsWith('option')) {
-					var args = this.payload[i].args;
-					var hasComparitor = this.payload[i].name !== "option" && this.payload[i].name !== "optiondefault";
-					var argText = args[hasComparitor ? 2 : 1] || "";
+					let args = this.payload[i].args;
+					let hasComparitor = this.payload[i].name !== "option" && this.payload[i].name !== "optiondefault";
+					let argText = args[hasComparitor ? 2 : 1] || "";
 					if (args.length === 0) {
 						output += this.payload[i].contents.trim();
 					} else {
-						var extraComment = args[hasComparitor ? 4: 3];
+						let extraComment = args[hasComparitor ? 4 : 3];
 						extraComment = extraComment ? ' ' + extraComment : '';
 						// We use a very crude heuristic for styling 'Enable'
 						// and 'Disable' buttons differently.
 						const isEnableOption = argText && (argText.startsWith("Enable") || argText === "Yes" || argText.startsWith("Allow"));
 						const isDisableOption = argText && (argText.startsWith("Disable") || argText === "No" || argText.startsWith("Deny"));
-						var className = "optionMacroOption " + (isEnableOption ? "optionMacroEnable" : isDisableOption ? "optionMacroDisable" : "");
+						let className = "optionMacroOption ";
+						if (isEnableOption === "optionMacroEnable") {
+							className += isDisableOption;
+						} else {
+							if (isDisableOption) {
+								className += "optionMacroDisable";
+							}
+						}
 						if (found_index !== i || hasMultipleOptionsWithSameValue) {
-							var onClickChange = args[hasComparitor ? 3 : 2];
+							let onClickChange = args[hasComparitor ? 3 : 2];
 							onClickChange = onClickChange ? ', ' + onClickChange : '';
-							output += '<span class="' + className + '">[[' + argText + extraComment + '|' + passageName + "][" + variable + " = " + JSON.stringify(args[hasComparitor ? 1 : 0]) + onClickChange + "]]" + "</span>";
+							output += `<span class=${className}>[[${argText}${extraComment}|${passageName}][${variable}=${JSON.stringify(args[hasComparitor ? 1 : 0])}${onClickChange}]]</span>`;
 						} else if (showSelectedOption) {
-							output +='<span class="optionMacroSelected ' + className + '">' + argText + extraComment + '</span>';
+							output += `<span class=${optionMacroSelected}${className}>${argText}${extraComment}</span>`;
 						}
 					}
 				} else if (this.payload[i].name === 'comment') {
@@ -164,13 +167,11 @@ Macro.add('options', {
 				}
 			}
 			jQuery(this.output).wiki(
-				'<span class="optionMacro ' + (currentOptionIsNumber ? 'optionMacroNumber' : '') + '">' +
-					'<span class="optionDescription">' + title + ' ' + description + "</span>" +
-					'<span class="optionValue">' + output + "</span>" +
-					(comment ? '<span class="optionComment">//' + comment + "//</span>" : '') +
-				'</span>');
-		}
-		catch (ex) {
+				`<span class=optionMacro ${currentOptionIsNumber ? 'optionMacroNumber' : ``}>` +
+				`<span class=optionDescription> ${title} ${description} </span>` +
+				`<span class=optionValue> ${output} </span> ${comment ? `<span class=optionComment>// ${comment} //</span>` : ``}` +
+				`</span>`);
+		} catch (ex) {
 			return this.error('bad options expression: ' + ex.message);
 		}
 	}
diff --git a/src/js/pregJS.js b/src/js/pregJS.js
index f9ddf6030ec983b663cea2838f5ae20140bee947..641ef7329c818484e4baec887d273b81f071fc89 100644
--- a/src/js/pregJS.js
+++ b/src/js/pregJS.js
@@ -1,65 +1,64 @@
-/* eslint-disable no-empty */
-/* eslint-disable no-undef */
 /* Major props to the anons who worked together to forge the Super Pregnancy Project. Let your legacy go unforgotten.*/
 window.getPregBellySize = function(s) {
-	var targetLen;
-	var gestastionWeek = s.preg;
-	var fetuses = s.pregType;
-	var phi = 1.618;
+	let targetLen;
+	let gestastionWeek = s.preg;
+	let fetuses = s.pregType;
+	let phi = 1.618;
 
-	if(gestastionWeek <= 32) {
+	if (gestastionWeek <= 32) {
 		targetLen = ((0.00006396 * Math.pow(gestastionWeek, 4)) - (0.005501 * Math.pow(gestastionWeek, 3)) + (0.161 * Math.pow(gestastionWeek, 2)) - (0.76 * gestastionWeek) + 0.208);
-	} else if(gestastionWeek <= 106) {
+	} else if (gestastionWeek <= 106) {
 		targetLen = ((-0.0000004675 * Math.pow(gestastionWeek, 4)) + (0.0001905 * Math.pow(gestastionWeek, 3)) - (0.029 * Math.pow(gestastionWeek, 2)) + (2.132 * gestastionWeek) - 16.575);
 	} else {
-		targetLen = ((-0.00003266 * Math.pow(gestastionWeek,2)) + (0.076 * gestastionWeek) + 43.843);
+		targetLen = ((-0.00003266 * Math.pow(gestastionWeek, 2)) + (0.076 * gestastionWeek) + 43.843);
 	}
 
-	var bellySize = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)) * fetuses);
+	let bellySize = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)) * fetuses);
 	return bellySize;
 };
 
-/** @param {App.Entity.SlaveState} slave */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
 window.bellyAdjective = function(slave) {
 	slave = slave || State.variables.activeSlave;
-	if(slave.belly >= 1500) {
-		if(slave.belly >= 1000000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
+	if (slave.belly >= 1500) {
+		if (slave.belly >= 1000000) {
+			if (slave.preg > slave.pregData.normalBirth/4) {
 				return 'unfathomably distended, brimming with life';
 			} else {
-				return 'unfathomable';
+				return `unfathomable`;
 			}
-		} else if(slave.belly >= 750000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
+		} else if (slave.belly >= 750000) {
+			if (slave.preg > slave.pregData.normalBirth/4) {
 				return 'monolithic bulging';
 			} else {
-				return 'monolithic';
+				return `monolithic`;
 			}
-		} else if(slave.belly >= 600000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
+		} else if (slave.belly >= 600000) {
+			if (slave.preg > slave.pregData.normalBirth/4) {
 				return 'titanic bulging';
 			} else {
-				return 'titanic';
+				return `titanic`;
 			}
-		} else if(slave.belly >= 450000) {
-			if(slave.preg > slave.pregData.normalBirth/4) {
+		} else if (slave.belly >= 450000) {
+			if (slave.preg > slave.pregData.normalBirth/4) {
 				return 'gigantic bulgy';
 			} else {
-				return 'gigantic';
+				return `gigantic`;
 			}
-		} else if(slave.belly >= 300000) {
+		} else if (slave.belly >= 300000) {
 			return 'massive';
-		} else if(slave.belly >= 100000) {
+		} else if (slave.belly >= 100000) {
 			return 'giant';
-		} else if(slave.belly >= 15000) {
+		} else if (slave.belly >= 15000) {
 			return 'huge';
-		} else if(slave.belly >= 10000) {
+		} else if (slave.belly >= 10000) {
 			return 'big';
 		} else {
-			return 'swollen';
+			return `swollen`;
 		}
-	} else {
-		return '';
 	}
 };
 
@@ -67,12 +66,12 @@ window.bellyAdjective = function(slave) {
 window.setPregType = function(actor) {
 	/* IMHO rework is possible. Can be more interesting to play, if this code will take in account more body conditions - age, fat, food, hormone levels, etc. */
 
-	var ovum = jsRandom(actor.pregData.normalOvaMin, actor.pregData.normalOvaMax); //for default human profile it's always 1.
-	var fertilityStack = 0; // adds an increasing bonus roll for stacked fertility drugs
+	let ovum = jsRandom(actor.pregData.normalOvaMin, actor.pregData.normalOvaMax); // for default human profile it's always 1.
+	let fertilityStack = 0; // adds an increasing bonus roll for stacked fertility drugs
 
 	/* Suggestion for better animal pregnancy support - usage of another variable then ovum for fertility drugs bonus, and then adding actor.pregData.drugsEffect multiplier to it before adding to ovum. Example:
 
-		var bonus = 0;
+		let bonus = 0;
 
 		... (code below where ovum changed to bonus)
 
@@ -81,301 +80,301 @@ window.setPregType = function(actor) {
 
 	*/
 
-	if(actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now.
-		if(typeof actor.readyOva === "number" && actor.readyOva !== 0) {
-			ovum = actor.readyOva; //just single override; for delayed impregnation cases
-		} else if(actor.ID === -1) {
-			if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
-				if(actor.fertDrugs === 1) {
+	if (actor.broodmother < 1) { // Broodmothers should be not processed here. Necessary now.
+		if (typeof actor.readyOva === "number" && actor.readyOva !== 0) {
+			ovum = actor.readyOva; // just single override; for delayed impregnation cases
+		} else if (actor.ID === -1) {
+			if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
+				if (actor.fertDrugs === 1) {
 					ovum += jsEither([2, 3, 3, 3, 3, 4, 4, 5]);
 				} else {
 					ovum += jsEither([1, 1, 2, 2, 3, 3, 4]);
 				}
-				if(actor.forcedFertDrugs > 0) {
+				if (actor.forcedFertDrugs > 0) {
 					ovum += jsEither([3, 3, 4, 4, 5]);
 				}
-			} else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
-				if(actor.fertDrugs === 1) {
+			} else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
+				if (actor.fertDrugs === 1) {
 					ovum += jsEither([1, 2, 2, 2, 2, 3, 3, 4]);
 				} else {
 					ovum += jsEither([0, 1, 1, 1, 1, 1, 2, 3]);
 				}
-				if(actor.forcedFertDrugs > 0) {
+				if (actor.forcedFertDrugs > 0) {
 					ovum += jsEither([2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4]);
 				}
-			} else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins
-				if(actor.fertDrugs === 1) {
+			} else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins
+				if (actor.fertDrugs === 1) {
 					ovum += jsEither([1, 1, 2, 2, 2, 2, 3, 3]);
 				} else {
 					ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 1, 1, 2]);
 				}
-				if(actor.forcedFertDrugs > 0) {
+				if (actor.forcedFertDrugs > 0) {
 					ovum += jsEither([1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4]);
 				}
 			} else {
-				if(actor.fertDrugs === 1) {
+				if (actor.fertDrugs === 1) {
 					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3]);
 				} else {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
 				}
-				if(actor.forcedFertDrugs > 0) {
+				if (actor.forcedFertDrugs > 0) {
 					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4]);
 				}
 			}
 			ovum = Math.clamp(ovum, 0, 8);
-		} else if(actor.pregType === 0) {
-			if(actor.eggType === "horse" || actor.eggType === "cow") {
-				if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
+		} else if (actor.pregType === 0) {
+			if (actor.eggType === "horse" || actor.eggType === "cow") {
+				if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 1]);
 					fertilityStack += .8;
-				} else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
+				} else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
 					fertilityStack += .4;
-				} else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins
+				} else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins
 					fertilityStack += .2;
 				}
-				if(actor.ovaImplant === "fertility") {
+				if (actor.ovaImplant === "fertility") {
 					fertilityStack += .3;
 				}
-				if(actor.hormones === 2) {
+				if (actor.hormones === 2) {
 					fertilityStack += .2;
 				}
-				if(actor.hormoneBalance >= 200) {
+				if (actor.hormoneBalance >= 200) {
 					fertilityStack += .3;
 				}
-				if(actor.diet === "fertility") {
+				if (actor.diet === "fertility") {
 					fertilityStack += .3;
 				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
+				if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
 					fertilityStack += .5;
 				}
-				if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
+				if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
 					fertilityStack += .2;
 				}
-				if(actor.drugs === "super fertility drugs") {
+				if (actor.drugs === "super fertility drugs") {
 					fertilityStack += 1.6;
-				} else if(actor.drugs === "fertility drugs") {
+				} else if (actor.drugs === "fertility drugs") {
 					fertilityStack += .6;
 				}
 				fertilityStack = Math.floor(fertilityStack);
-				if(State.variables.seeHyperPreg === 1) {
-					if(actor.drugs === "super fertility drugs") {
+				if (State.variables.seeHyperPreg === 1) {
+					if (actor.drugs === "super fertility drugs") {
 						ovum += jsRandom(0, fertilityStack*2);
 					} else {
 						ovum += jsRandom(0, fertilityStack);
 					}
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
 					}
 				} else {
 					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
-						if(ovum > 4) {
+						if (ovum > 4) {
 							ovum = 4;
 						}
-					} else if(ovum > 3) {
+					} else if (ovum > 3) {
 						ovum = 3;
 					}
 				}
-			} else if(actor.eggType === "dog") {
-				if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
+			} else if (actor.eggType === "dog") {
+				if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
 					ovum += jsEither([1, 2, 2, 3]);
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
+				} else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
 					ovum += jsEither([0, 1, 1, 2]);
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins
+				} else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins
 					ovum += jsEither([0, 0, 0, 0, 1]);
 					fertilityStack++;
 				}
-				if(actor.ovaImplant === "fertility") {
+				if (actor.ovaImplant === "fertility") {
 					ovum += jsEither([0, 0, 0, 0, 1]);
 					fertilityStack++;
 				}
-				if(actor.hormones === 2) {
+				if (actor.hormones === 2) {
 					ovum += jsEither([0, 0, 0, 1, 1, 1, 1, 2]);
 					fertilityStack++;
 				}
-				if(actor.hormoneBalance >= 200) {
+				if (actor.hormoneBalance >= 200) {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]);
 					fertilityStack++;
 				}
-				if(actor.diet === "fertility") {
+				if (actor.diet === "fertility") {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1]);
 					fertilityStack++;
 				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
+				if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
 					ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]);
 					fertilityStack++;
 					fertilityStack++;
 				}
-				if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
+				if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
 					fertilityStack++;
 				}
-				if(actor.drugs === "super fertility drugs") {
+				if (actor.drugs === "super fertility drugs") {
 					ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]);
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.drugs === "fertility drugs") {
+				} else if (actor.drugs === "fertility drugs") {
 					ovum += jsEither([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]);
 					fertilityStack++;
 				}
-				if(State.variables.seeHyperPreg === 1) {
-					if(actor.drugs === "super fertility drugs") {
+				if (State.variables.seeHyperPreg === 1) {
+					if (actor.drugs === "super fertility drugs") {
 						ovum += jsRandom(0, fertilityStack*2);
 					} else {
 						ovum += jsRandom(0, fertilityStack);
 					}
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
 					}
 				} else {
 					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
-						if(ovum > 8) {
+						if (ovum > 8) {
 							ovum = jsEither([6, 8]);
 						}
-					} else if(ovum > 8) {
+					} else if (ovum > 8) {
 						ovum = jsRandom(6, 8);
 					}
 				}
-			} else if(actor.eggType === "pig") {
-				if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
+			} else if (actor.eggType === "pig") {
+				if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
 					ovum += jsRandom(4, 8);
 					fertilityStack += 16;
-				} else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
+				} else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
 					ovum += jsRandom(2, 6);
 					fertilityStack += 10;
-				} else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins
+				} else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins
 					ovum += jsRandom(2, 4);
 					fertilityStack += 6;
 				}
-				if(actor.ovaImplant === "fertility") {
+				if (actor.ovaImplant === "fertility") {
 					ovum += jsRandom(4, 12);
 					fertilityStack += 6;
 				}
-				if(actor.hormones === 2) {
+				if (actor.hormones === 2) {
 					ovum += jsRandom(0, 4);
 					fertilityStack += 3;
 				}
-				if(actor.hormoneBalance >= 200) {
+				if (actor.hormoneBalance >= 200) {
 					ovum += jsRandom(0, 4);
 					fertilityStack += 3;
 				}
-				if(actor.diet === "fertility") {
+				if (actor.diet === "fertility") {
 					ovum += jsRandom(4, 10);
 					fertilityStack += 6;
 				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
+				if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
 					ovum += jsRandom(8, 16);
 					fertilityStack += 10;
 				}
-				if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
+				if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
 					fertilityStack += 2;
 				}
-				if(actor.drugs === "super fertility drugs") {
+				if (actor.drugs === "super fertility drugs") {
 					ovum += jsRandom(10, 40);
 					fertilityStack += 32;
-				} else if(actor.drugs === "fertility drugs") {
+				} else if (actor.drugs === "fertility drugs") {
 					ovum += jsRandom(10, 20);
 					fertilityStack += 16;
 				}
-				if(State.variables.seeHyperPreg === 1) {
-					if(actor.drugs === "super fertility drugs") {
+				if (State.variables.seeHyperPreg === 1) {
+					if (actor.drugs === "super fertility drugs") {
 						ovum += jsRandom(fertilityStack/2, fertilityStack*2);
 					} else {
-						ovum += jsRandom(fertilityStack/4, fertilityStack);
+						ovum += jsRandom(fertilityStack / 4, fertilityStack);
 					}
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
 					}
 				} else {
 					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
-						if(ovum > 76) {
+						if (ovum > 76) {
 							ovum = jsEither([70, 72, 74, 76]);
 						}
-					} else if(ovum > 75) {
+					} else if (ovum > 75) {
 						ovum = jsRandom(60, 75);
 					}
 				}
 			} else {
-				if(actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
+				if (actor.geneticQuirks.fertility === 2 && actor.geneticQuirks.hyperFertility === 2) { // Do not mix with sperm
 					ovum += jsEither([1, 2, 2, 3]);
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
+				} else if (actor.geneticQuirks.hyperFertility === 2) { // Predisposed to multiples
 					ovum += jsEither([0, 1, 1, 2]);
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.geneticQuirks.fertility === 2) { // Predisposed to twins
+				} else if (actor.geneticQuirks.fertility === 2) { // Predisposed to twins
 					ovum += jsEither([0, 0, 0, 0, 1]);
 					fertilityStack++;
 				} else {
-					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); //base chance for twins
+					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); // base chance for twins
 				}
-				if(actor.ovaImplant === "fertility") {
+				if (actor.ovaImplant === "fertility") {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
 					fertilityStack++;
 				}
-				if(actor.hormones === 2) {
+				if (actor.hormones === 2) {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2]);
 					fertilityStack++;
 				}
-				if(actor.hormoneBalance >= 200) {
+				if (actor.hormoneBalance >= 200) {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2]);
 					fertilityStack++;
 				}
-				if(actor.diet === "fertility") {
+				if (actor.diet === "fertility") {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
 					fertilityStack++;
 				}
-				if(State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
+				if (State.variables.masterSuitePregnancyFertilitySupplements === 1 && ((actor.assignment === "serve in the master suite" || actor.assignment === "be your Concubine"))) {
 					ovum += jsEither([0, 0, 0, 1, 1, 2, 2, 2, 3, 3]);
 					fertilityStack++;
 					fertilityStack++;
 				}
-				if(State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
+				if (State.variables.reproductionFormula === 1 && (State.variables.week-actor.weekAcquired > 0)) {
 					fertilityStack++;
 				}
-				if(actor.drugs === "super fertility drugs") {
+				if (actor.drugs === "super fertility drugs") {
 					ovum += jsEither([1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5]);
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
 					fertilityStack++;
-				} else if(actor.drugs === "fertility drugs") {
+				} else if (actor.drugs === "fertility drugs") {
 					ovum += jsEither([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3]);
 					fertilityStack++;
 				}
-				if(State.variables.seeHyperPreg === 1) {
-					if(actor.drugs === "super fertility drugs") {
+				if (State.variables.seeHyperPreg === 1) {
+					if (actor.drugs === "super fertility drugs") {
 						ovum += jsRandom(0, fertilityStack*2);
 					} else {
 						ovum += jsRandom(0, fertilityStack);
 					}
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
 					}
 				} else {
 					ovum += jsRandom(0, fertilityStack);
-					if(actor.ovaImplant === "sympathy") {
+					if (actor.ovaImplant === "sympathy") {
 						ovum *= 2;
-						if(ovum > 12) {
+						if (ovum > 12) {
 							ovum = jsEither([10, 12]);
 						}
-					} else if(ovum > 12) {
+					} else if (ovum > 12) {
 						ovum = jsRandom(6, 12);
 					}
 				}
@@ -400,15 +399,15 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) {
 	const V = State.variables;
 	let pronouns;
 	let He;
-	let r = "";
+	let r = ``;
 	if (target.ID !== -1) {
 		pronouns = getPronouns(target);
 		He = capFirstChar(pronouns.pronoun);
 	}
 	if (V.seePreg !== 0) {
-		if (jsRandom(0,99) < (chance + (V.reproductionFormula*((target.pregSource <= 0) ? ((target.ID === -1) ? 0 : 10) : 20)))) {
+		// eslint-disable-next-line no-nested-ternary
+		if (jsRandom(0, 99) < (chance + (V.reproductionFormula * ((target.pregSource <= 0) ? ((target.ID === -1) ? 0 : 10) : 20)))) {
 			if (target.mpreg === hole) {
-
 				if (target.pregWeek <= 0) {
 					target.preg = 1;
 					target.pregSource = (!fatherID ? 0 : fatherID);
@@ -421,20 +420,18 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) {
 				WombImpregnate(target, target.pregType, target.pregSource, 1);
 
 				if (V.menstruation === 1) {
-				}
-				else if (!displayOverride) {
+					//
+				} else if (!displayOverride) {
 					target.pregKnown = 1;
 					if (target.ID === -1) {
-						/* r += "@@.lime;You have gotten pregnant.@@"; */
+						/* r += "<span class="lime">You have gotten pregnant.</span>"; */
 					} else {
 						r += `<span class="lime">${He} has become pregnant.</span>`;
 					}
 				} else {
 					target.pregKnown = 1;
 				}
-
 			} else if (hole === 2) {
-
 				if (target.pregWeek <= 0) {
 					target.preg = 1;
 					target.pregSource = (!fatherID ? 0 : fatherID);
@@ -447,11 +444,11 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) {
 				WombImpregnate(target, target.pregType, target.pregSource, 1);
 
 				if (V.menstruation === 1) {
-				}
-				else if (!displayOverride) {
+					//
+				} else if (!displayOverride) {
 					target.pregKnown = 1;
 					if (target.ID === -1) {
-						/* r += "@@.lime;You have gotten pregnant.@@"; */
+						/* r += "<span class="lime">You have gotten pregnant.</span>"; */
 					} else {
 						r += `<span class="lime">${He} has become pregnant.</span>`;
 					}
@@ -478,13 +475,11 @@ window.knockMeUp = function(target, chance, hole, fatherID, displayOverride) {
 	return r;
 };
 
-window.getIncubatorReserved = function(/*slaves*/) {
-
+window.getIncubatorReserved = function(/* slaves */) {
 	return FetusGlobalReserveCount("incubator");
 };
 
-window.getNurseryReserved = function (/*slaves*/) {
-
+window.getNurseryReserved = function(/* slaves */) {
 	return FetusGlobalReserveCount("nursery");
 };
 
@@ -495,12 +490,16 @@ window.findFather = function(fatherID) {
 	father = V.slaves[V.slaveIndices[fatherID]];
 	if (father === undefined) {
 		if (V.incubator > 0) {
-			father = V.tanks.find(function(s) { return s.ID === fatherID; });
+			father = V.tanks.find(function(s) {
+				return s.ID === fatherID;
+			});
 		}
 	}
 	if (father === undefined) {
 		if (V.nursery > 0) {
-			father = V.cribs.find(function(s) { return s.ID === fatherID; });
+			father = V.cribs.find(function(s) {
+				return s.ID === fatherID;
+			});
 		}
 	}
 
@@ -539,7 +538,10 @@ window.adjustFatherProperty = function(actor, property, newValue) {
 */
 
 /* not to be used until that last part is defined. It may become slave.boobWomb.volume or some shit */
-/** @param {App.Entity.SlaveState} slave */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
 window.getBaseBoobs = function(slave) {
-	return slave.boobs-slave.boobsImplant-slave.boobsMilk-slave.boobsWombVolume;
+	return slave.boobs - slave.boobsImplant - slave.boobsMilk - slave.boobsWombVolume;
 };
diff --git a/src/js/quickListJS.js b/src/js/quickListJS.js
index 66f91135143c858f09bd7aef04c43d3156ba3168..6d90ef8373ada8fbd8a48b22491138a659782ece 100644
--- a/src/js/quickListJS.js
+++ b/src/js/quickListJS.js
@@ -1,10 +1,10 @@
-/* eslint-disable no-undef */
-window.sortDomObjects = function (objects, attrName, reverse = 0) {
+window.sortDomObjects = function(objects, attrName, reverse = 0) {
 	reverse = (reverse) ? -1 : 1;
-	function sortingByAttr (a, b) {
-		var aVal = a.getAttribute(attrName);
-		var bVal = b.getAttribute(attrName);
-		var aInt = parseInt(aVal);
+
+	function sortingByAttr(a, b) {
+		let aVal = a.getAttribute(attrName);
+		let bVal = b.getAttribute(attrName);
+		let aInt = parseInt(aVal);
 		if (!isNaN(aInt))
 			return ((parseInt(bVal) - aInt) * reverse);
 		else if (bVal > aVal)
@@ -14,27 +14,28 @@ window.sortDomObjects = function (objects, attrName, reverse = 0) {
 	return objects.toArray().sort(sortingByAttr);
 };
 
-window.sortButtonsByDevotion = function () {
-	var $sortedButtons = $('#qlWrapper button').remove();
+window.sortButtonsByDevotion = function() {
+	let $sortedButtons = $('#qlWrapper button').remove();
 	$sortedButtons = sortDomObjects($sortedButtons, 'data-devotion');
 	$($sortedButtons).appendTo($('#qlWrapper'));
 	quickListBuildLinks();
 };
 
-window.sortButtonsByTrust = function () {
-	var $sortedButtons = $('#qlWrapper button').remove();
+window.sortButtonsByTrust = function() {
+	let $sortedButtons = $('#qlWrapper button').remove();
 	$sortedButtons = sortDomObjects($sortedButtons, 'data-trust');
 	$($sortedButtons).appendTo($('#qlWrapper'));
 	quickListBuildLinks();
 };
 
-window.quickListBuildLinks = function () {
+window.quickListBuildLinks = function() {
 	$("[data-scroll-to]").click(function() {
-		var $this = $(this), $toElement = $this.attr('data-scroll-to');
+		let $this = $(this),
+			$toElement = $this.attr('data-scroll-to');
 		// note the * 1 enforces $offset to be an integer, without
 		// it we scroll to True, which goes nowhere fast.
-		var $offset = $this.attr('data-scroll-offset') * 1 || 0;
-		var $speed = $this.attr('data-scroll-speed') * 1 || 500;
+		let $offset = $this.attr('data-scroll-offset') * 1 || 0;
+		let $speed = $this.attr('data-scroll-speed') * 1 || 500;
 		// Use javascript scrollTop animation for in page navigation.
 		$('html, body').animate({
 			scrollTop: $($toElement).offset().top + $offset
@@ -42,32 +43,32 @@ window.quickListBuildLinks = function () {
 	});
 };
 
-window.sortIncubatorPossiblesByName = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
+window.sortIncubatorPossiblesByName = function() {
+	let $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
 	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-name');
 	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
 };
 
-window.sortIncubatorPossiblesByPregnancyWeek = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
+window.sortIncubatorPossiblesByPregnancyWeek = function() {
+	let $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
 	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-week');
 	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
 };
 
-window.sortIncubatorPossiblesByPregnancyCount = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
+window.sortIncubatorPossiblesByPregnancyCount = function() {
+	let $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
 	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-preg-count');
 	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
 };
 
-window.sortIncubatorPossiblesByReservedSpots = function () {
-	var $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
+window.sortIncubatorPossiblesByReservedSpots = function() {
+	let $sortedIncubatorPossibles = $('#qlIncubator div.possible').detach();
 	$sortedIncubatorPossibles = sortDomObjects($sortedIncubatorPossibles, 'data-reserved-spots');
 	$($sortedIncubatorPossibles).appendTo($('#qlIncubator'));
 };
 
-window.sortIncubatorPossiblesByPreviousSort = function () {
-	var sort = State.variables.sortIncubatorList;
+window.sortIncubatorPossiblesByPreviousSort = function() {
+	let sort = State.variables.sortIncubatorList;
 	if ('unsorted' !== sort) {
 		if ('Name' === sort) {
 			sortIncubatorPossiblesByName();
@@ -81,32 +82,32 @@ window.sortIncubatorPossiblesByPreviousSort = function () {
 	}
 };
 
-window.sortNurseryPossiblesByName = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
+window.sortNurseryPossiblesByName = function() {
+	let $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
 	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-name');
 	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
 };
 
-window.sortNurseryPossiblesByPregnancyWeek = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
+window.sortNurseryPossiblesByPregnancyWeek = function() {
+	let $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
 	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-week');
 	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
 };
 
-window.sortNurseryPossiblesByPregnancyCount = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
+window.sortNurseryPossiblesByPregnancyCount = function() {
+	let $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
 	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-preg-count');
 	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
 };
 
-window.sortNurseryPossiblesByReservedSpots = function () {
-	var $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
+window.sortNurseryPossiblesByReservedSpots = function() {
+	let $sortedNurseryPossibles = $('#qlNursery div.possible').detach();
 	$sortedNurseryPossibles = sortDomObjects($sortedNurseryPossibles, 'data-reserved-spots');
 	$($sortedNurseryPossibles).appendTo($('#qlNursery'));
 };
 
-window.sortNurseryPossiblesByPreviousSort = function () {
-	var sort = State.variables.sortNurseryList;
+window.sortNurseryPossiblesByPreviousSort = function() {
+	let sort = State.variables.sortNurseryList;
 	if ('unsorted' !== sort) {
 		if ('Name' === sort) {
 			sortNurseryPossiblesByName();
diff --git a/src/js/rbuttonJS.js b/src/js/rbuttonJS.js
index 8c37e7336e3da3cdf4b56975ae41eb9b304c04ba..b74200cf4d6c02b309548077699c21d3dd76b367 100644
--- a/src/js/rbuttonJS.js
+++ b/src/js/rbuttonJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /* This is modified radiobutton macro, for automatic checked state setup*/
 /* Usage (be sure to use quotes around parameters):
 
@@ -13,8 +12,8 @@ Macro.add('rbutton', {
 	handler() {
 		if (this.args.length < 2) {
 			const errors = [];
-			if (this.args.length < 1) { errors.push('variable name'); }
-			if (this.args.length < 2) { errors.push('checked value'); }
+			if (this.args.length < 1) {errors.push('variable name');}
+			if (this.args.length < 2) {errors.push('checked value');}
 			return this.error(`no ${errors.join(' or ')} specified`);
 		}
 
@@ -35,8 +34,8 @@ Macro.add('rbutton', {
 		const checkValue = this.args[1];
 		const el = document.createElement('input');
 
-		var replaceID = "";
-		var replaceText = "";
+		let replaceID = "";
+		let replaceText = "";
 		if (typeof this.args[2] === 'string') {
 			replaceID = this.args[2];
 		}
@@ -60,37 +59,35 @@ Macro.add('rbutton', {
 		*/
 		jQuery(el)
 			.attr({
-				id : `${this.name}-${varId}-${TempState[this.name][varId]++}`,
-				name : `${this.name}-${varId}`,
-				type : 'radio',
-				tabindex : 0 // for accessibility
+				id: `${this.name}-${varId}-${TempState[this.name][varId]++}`,
+				name: `${this.name}-${varId}`,
+				type: 'radio',
+				tabindex: 0 // for accessibility
 			})
 			.addClass(`macro-${this.name}`)
-			.on('change', function () {
+			.on('change', function() {
 				if (this.checked) {
 					Wikifier.setValue(varName, checkValue);
 
-					if (replaceID.length > 0 && replaceText.length > 0){
+					if (replaceID.length > 0 && replaceText.length > 0) {
 
-						var replaceEl = document.getElementById(replaceID);
-						//alert (replaceEl);
+						let replaceEl = document.getElementById(replaceID);
+						// alert (replaceEl);
 						if (replaceEl !== null) {
 							replaceEl.innerHTML = replaceText;
 						}
-
 					}
 				}
 			})
-			.ready (function () {
-			//alert ("DOM finished");
-				if (el.checked && replaceID.length > 0 && replaceText.length > 0){
+			.ready(function() {
+				// alert ("DOM finished");
+				if (el.checked && replaceID.length > 0 && replaceText.length > 0) {
 
-					var replaceEl = document.getElementById(replaceID);
-					//alert (replaceEl);
+					let replaceEl = document.getElementById(replaceID);
+					// alert (replaceEl);
 					if (replaceEl !== null) {
 						replaceEl.innerHTML = replaceText;
 					}
-
 				}
 			})
 			.appendTo(this.output);
diff --git a/src/js/relationshipChecks.js b/src/js/relationshipChecks.js
index 4c8cd40cee79a6aa58570f1ba6d1a5338d4ab625..6507db75550936deff4929d2eed5760f90ca1a3b 100644
--- a/src/js/relationshipChecks.js
+++ b/src/js/relationshipChecks.js
@@ -1,4 +1,4 @@
-window.rivalryTerm = function (id) {
+window.rivalryTerm = function(id) {
 	if (id.rivalry === 1) {
 		return `growing rival`;
 	} else if (id.rivalry === 2) {
@@ -7,7 +7,7 @@ window.rivalryTerm = function (id) {
 		return `bitter rival`;
 	}
 };
-window.relationshipTerm = function (id) {
+window.relationshipTerm = function(id) {
 	if (id.relationship === 1) {
 		return `friend`;
 	} else if (id.relationship === 2) {
@@ -20,7 +20,7 @@ window.relationshipTerm = function (id) {
 		return `slave wife`;
 	}
 };
-window.relationshipTermShort = function (id) {
+window.relationshipTermShort = function(id) {
 	if (id.relationship === 1) {
 		return `friend`;
 	} else if (id.relationship === 2) {
diff --git a/src/js/removeActiveSlave.js b/src/js/removeActiveSlave.js
index ac53c3d5b3285b9899c115f468f5e596572bd65a..d271a6b8d8eb05f3e9548199359f85d5897d3206 100644
--- a/src/js/removeActiveSlave.js
+++ b/src/js/removeActiveSlave.js
@@ -125,7 +125,7 @@ window.removeActiveSlave = function removeActiveSlave() {
 		}
 
 		if (Array.isArray(V.personalAttention)) {
-			const _rasi = V.personalAttention.findIndex(function(s) { return s.ID === AS_ID; });
+			const _rasi = V.personalAttention.findIndex(function(s) {return s.ID === AS_ID;});
 			if (_rasi !== -1) {
 				V.personalAttention.deleteAt(_rasi);
 				if (V.personalAttention.length === 0) {
@@ -187,31 +187,35 @@ window.removeActiveSlave = function removeActiveSlave() {
 				_o--;
 			}
 		}
-		for (_o = 0; _o < V.limbs.length; _o++) {
-			if (V.limbs[_o].ID === AS_ID) {
-				V.limbs.deleteAt(_o);
-				V.limbsCompleted--;
+		for (_o = 0; _o < V.adjustProsthetics.length; _o++) {
+			if (V.adjustProsthetics[_o].ID === AS_ID) {
+				V.adjustProsthetics.deleteAt(_o);
+				V.adjustProstheticsCompleted--;
 				_o--;
 			}
 		}
 
-		const _geneIndex = V.genePool.findIndex(function(s) { return s.ID === AS_ID; });
+		const _geneIndex = V.genePool.findIndex(function(s) {return s.ID === AS_ID;});
 		if (_geneIndex !== -1) {
 			let keep = false;
 			if (V.traitor !== 0) {
-				if (isImpregnatedBy(V.traitor, V.activeSlave) || V.traitor.ID === AS_ID) { /* did we impregnate the traitor, or are we the traitor? */
+				if (isImpregnatedBy(V.traitor, V.activeSlave) || V.traitor.ID === AS_ID) {
+					/* did we impregnate the traitor, or are we the traitor? */
 					keep = true;
 				}
 			}
 			if (V.boomerangSlave !== 0) {
-				if (isImpregnatedBy(V.boomerangSlave, V.activeSlave) || V.boomerangSlave.ID === AS_ID) { /* did we impregnate the boomerang, or are we the boomerang? */
+				if (isImpregnatedBy(V.boomerangSlave, V.activeSlave) || V.boomerangSlave.ID === AS_ID) {
+					/* did we impregnate the boomerang, or are we the boomerang? */
 					keep = true;
 				}
 			}
-			if (isImpregnatedBy(V.PC, V.activeSlave)) { /* did we impregnate the PC */
+			if (isImpregnatedBy(V.PC, V.activeSlave)) {
+				/* did we impregnate the PC */
 				keep = true;
 			}
-			if (!keep) { /* avoid going through this loop if possible */
+			if (!keep) {
+				/* avoid going through this loop if possible */
 				keep = V.slaves.some(slave => {
 					/* have we impregnated a slave that is not ourselves? */
 					return (slave.ID !== AS_ID && isImpregnatedBy(slave, V.activeSlave));
@@ -230,7 +234,8 @@ window.removeActiveSlave = function removeActiveSlave() {
 				vagina: V.activeSlave.vagina,
 				ID: V.missingParentID
 			};
-			if (V.traitor.ID === V.activeSlave.ID) { /* To link developing fetuses to their parent */
+			if (V.traitor.ID === V.activeSlave.ID) {
+				/* To link developing fetuses to their parent */
 				V.traitor.missingParentTag = V.missingParentID;
 			} else if (V.boomerangSlave.ID === V.activeSlave.ID) {
 				V.boomerangSlave.missingParentTag = V.missingParentID;
@@ -328,13 +333,15 @@ window.removeNonNGPSlave = function removeNonNGPSlave(removedSlave) {
 			}
 		});
 
-		const _geneIndex = V.genePool.findIndex(function(s) { return s.ID === ID; });
+		const _geneIndex = V.genePool.findIndex(function(s) {return s.ID === ID;});
 		if (_geneIndex !== -1) {
 			let keep = false;
-			if (isImpregnatedBy(V.PC, removedSlave)) { /* did we impregnate the PC */
+			if (isImpregnatedBy(V.PC, removedSlave)) {
+				/* did we impregnate the PC */
 				keep = true;
 			}
-			if (!keep) { /* avoid going through this loop if possible */
+			if (!keep) {
+				/* avoid going through this loop if possible */
 				keep = V.slaves.some(slave => {
 					/* have we impregnated a slave that is not ourselves? */
 					return (slave.ID !== ID && isImpregnatedBy(slave, removedSlave));
diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js
index 591f4222a886d9379b0f80685a99fbb14ddcc33b..9e9d855940e5b4e661588062d043cffb422a58ef 100644
--- a/src/js/rulesAssistant.js
+++ b/src/js/rulesAssistant.js
@@ -2,8 +2,8 @@
  * @param {App.Entity.SlaveState} slave
  * @param {Object[]} rules
  * @returns {boolean}
-*/
-window.hasSurgeryRule = function (slave, rules) {
+ */
+window.hasSurgeryRule = function(slave, rules) {
 	return rules.some(
 		rule => ruleApplied(slave, rule) && rule.set.autoSurgery > 0);
 };
@@ -13,7 +13,7 @@ window.hasSurgeryRule = function (slave, rules) {
  * @param {Object[]} rules
  * @param {string} what
  * @returns {boolean}
-*/
+ */
 window.hasRuleFor = function(slave, rules, what) {
 	return rules.some(
 		rule => ruleApplied(slave, rule) && rule[what] !== "no default setting");
@@ -23,7 +23,7 @@ window.hasRuleFor = function(slave, rules, what) {
  * @param {App.Entity.SlaveState} slave
  * @param {Object[]} rules
  * @returns {boolean}
-*/
+ */
 window.hasHColorRule = function(slave, rules) {
 	return hasRuleFor(slave, rules, "hColor");
 };
@@ -51,7 +51,7 @@ window.hasEyeColorRule = function(slave, rules) {
  * @param {App.Entity.SlaveState} slave
  * @param {Object[]} rules
  * @returns {boolean}
-*/
+ */
 window.lastPregRule = function(slave, rules) {
 	return rules.some(rule =>
 		ruleApplied(slave, rule) && rule.set.preg === -1);
@@ -84,7 +84,7 @@ window.mergeRules = function mergeRules(rules) {
  * @param {App.Entity.SlaveState} slave
  * @param {Object} rule
  * @returns {boolean}
-*/
+ */
 window.ruleApplied = function(slave, rule) {
 	return slave.currentRules.includes(rule.ID);
 };
@@ -94,7 +94,7 @@ window.ruleApplied = function(slave, rule) {
  * @param {App.Entity.SlaveState} slave
  * @param {Object} rule
  * @returns {string}
-*/
+ */
 window.RAFacilityRemove = function RAFacilityRemove(slave, rule) {
 	const V = State.variables;
 	let r = "";
@@ -131,7 +131,7 @@ window.RAFacilityRemove = function RAFacilityRemove(slave, rule) {
 		case "work as farmhand":
 			if (slave.assignment === rule.setAssignment) {
 				r += `<br>${slave.slaveName} has been removed from ${V.farmyardName} and has been assigned to ${rule.removalAssignment}.`;
-				assignJob(slave. rule.removalAssignment);
+				assignJob(slave.rule.removalAssignment);
 			}
 			break;
 
@@ -253,6 +253,8 @@ window.emptyDefaultRule = function emptyDefaultRule() {
 			selectedSlaves: [],
 			excludedSlaves: [],
 		},
+		/* eslint-disable */
+		// TODO: rename properties in snake_case to camelCase?
 		set: {
 			releaseRules: "no default setting",
 			toyHole: "no default setting",
@@ -364,6 +366,7 @@ window.emptyDefaultRule = function emptyDefaultRule() {
 			surgery_faceShape: "no default setting",
 			surgery_lips: "no default setting",
 			surgery_holes: "no default setting",
+			surgery_tummy: "no default setting",
 			surgery_hair: "no default setting",
 			surgery_bodyhair: "no default setting",
 			surgery_vasectomy: "no default setting",
@@ -380,6 +383,7 @@ window.emptyDefaultRule = function emptyDefaultRule() {
 			skinColor: "no default setting",
 			inflationType: "no default setting",
 		}
+		/* eslint-enable */
 	};
 	return rule;
 };
@@ -387,7 +391,9 @@ window.emptyDefaultRule = function emptyDefaultRule() {
 /**
  * Saves the slave, silently fires the RA, saves the slave's after-RA state, and then reverts the slave.
  * Call and then check potential change against $slaveAfterRA to see if the RA would revert it.
- * @param {App.Entity.SlaveState} slave */
+ * @param {App.Entity.SlaveState} slave
+ * 
+ */
 window.RulesDeconfliction = function RulesDeconfliction(slave) {
 	const before = clone(slave);
 	DefaultRules(slave);
diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js
index 7bd075e22fea34b3e754d64794b98f7b05f4c46f..bcfb6fd9668bf2f47a1cbee4ac5bbb9242cab34f 100644
--- a/src/js/rulesAssistantOptions.js
+++ b/src/js/rulesAssistantOptions.js
@@ -1,5 +1,5 @@
+/* eslint-disable camelcase */
 /* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
 // rewrite of the rules assistant options page in javascript
 // uses an object-oriented widget pattern
 // wrapped in a closure so as not to pollute the global namespace
@@ -26,7 +26,7 @@ window.rulesAssistantOptions = (function() {
 		const root = new Root(element);
 	}
 
-	function returnP(e) { return e.keyCode === 13; }
+	function returnP(e) {return e.keyCode === 13;}
 
 	function newRule(root) {
 		const rule = emptyDefaultRule();
@@ -49,7 +49,7 @@ window.rulesAssistantOptions = (function() {
 		if (V.defaultRules.length === 1) return; // nothing to swap with
 		const idx = V.defaultRules.findIndex(rule => rule.ID === current_rule.ID);
 		if (idx === 0) return; // no lower rule
-		arraySwap(V.defaultRules, idx, idx-1);
+		arraySwap(V.defaultRules, idx, idx - 1);
 		reload(root);
 	}
 
@@ -57,7 +57,7 @@ window.rulesAssistantOptions = (function() {
 		if (V.defaultRules.length === 1) return; // nothing to swap with
 		const idx = V.defaultRules.findIndex(rule => rule.ID === current_rule.ID);
 		if (idx === V.defaultRules.length - 1) return; // no higher rule
-		arraySwap(V.defaultRules, idx, idx+1);
+		arraySwap(V.defaultRules, idx, idx + 1);
 		reload(root);
 	}
 
@@ -77,7 +77,7 @@ window.rulesAssistantOptions = (function() {
 	const parse = {
 		integer(string) {
 			let n = parseInt(string, 10);
-			return isNaN(n)? 0: n;
+			return isNaN(n) ? 0 : n;
 		},
 		boobs(string) {
 			return Math.clamp(parse.integer(string), 0, 48000);
@@ -125,7 +125,7 @@ window.rulesAssistantOptions = (function() {
 	}
 
 	class Section extends Element {
-		constructor(header, hidden=false) {
+		constructor(header, hidden = false) {
 			super(header);
 			this.hidey = this.element.querySelector("div");
 			if (hidden) this.toggle_hidey();
@@ -150,7 +150,7 @@ window.rulesAssistantOptions = (function() {
 		}
 
 		toggle_hidey() {
-			switch(this.hidey.style.display) {
+			switch (this.hidey.style.display) {
 				case "none":
 					this.hidey.style.display = "initial";
 					break;
@@ -166,13 +166,13 @@ window.rulesAssistantOptions = (function() {
 	// value display can optionally be an editable text input field
 	// it can be "bound" to a variable by setting its "onchange" method
 	class EditorWithShortcuts extends Element {
-		constructor(prefix, data=[], editor=false, ...args) {
+		constructor(prefix, data = [], editor = false, ...args) {
 			super(`${prefix }: `, editor, ...args);
 			this.selectedItem = null;
 			data.forEach(item => this.appendChild(new ListItem(...item)));
 		}
 
-		createEditor(...args) { return null; }
+		createEditor(...args) {return null;}
 
 		render(prefix, editor, ...args) {
 			const elem = document.createElement("div");
@@ -204,12 +204,10 @@ window.rulesAssistantOptions = (function() {
 				this.value.innerHTML = `${what}`;
 		}
 
-		getData(what) {
-			return (this.value.tagName === "INPUT" ? this.parse(this.value.value): this.selectedItem.data);
-		}
+		getData(what) {return (this.value.tagName === "INPUT" ? this.parse(this.value.value) : this.selectedItem.data);}
 
 		// customizable input field parser / sanity checker
-		parse(what) { return what; }
+		parse(what) {return what;}
 
 		propagateChange() {
 			if (this.onchange instanceof Function)
@@ -221,7 +219,7 @@ window.rulesAssistantOptions = (function() {
 	class ListItem extends Element {
 		constructor(displayvalue, data) {
 			super(displayvalue);
-			this.data = data !== undefined ? data: displayvalue;
+			this.data = data !== undefined ? data : displayvalue;
 			this.selected = false;
 		}
 
@@ -257,12 +255,8 @@ window.rulesAssistantOptions = (function() {
 			res.setAttribute("type", "text");
 			res.classList.add("rajs-value"); //
 			// call the variable binding when the input field is no longer being edited, and when the enter key is pressed
-			res.onblur = () => {
-				this.inputEdited();
-			};
-			res.onkeypress = (e) => {
-				if (returnP(e)) this.inputEdited();
-			};
+			res.onblur = () => { this.inputEdited(); };
+			res.onkeypress = (e) => { if (returnP(e)) this.inputEdited(); };
 			return res;
 		}
 	}
@@ -279,18 +273,12 @@ window.rulesAssistantOptions = (function() {
 			res.setAttribute("min", min);
 			res.setAttribute("max", max);
 			res.classList.add("rajs-value"); //
-			res.onblur = () => {
-				this.inputEdited();
-			};
-			res.onkeypress = (e) => {
-				if (returnP(e)) this.inputEdited();
-			};
+			res.onblur = () => { this.inputEdited(); };
+			res.onkeypress = (e) => { if (returnP(e)) this.inputEdited(); };
 			return res;
 		}
 
-		parse(what) {
-			return what === "" ? this.nullValue : parseInt(what);
-		}
+		parse(what) {return what === "" ? this.nullValue : parseInt(what);}
 	}
 
 	// a way to organize lists with too many elements in subsections
@@ -319,9 +307,9 @@ window.rulesAssistantOptions = (function() {
 
 	// similar to list, but is just a collection of buttons
 	class Options extends Element {
-		constructor(elements=[]) {
+		constructor(elements = []) {
 			super();
-			elements.forEach(element => { this.appendChild(element); });
+			elements.forEach(element => {this.appendChild(element);});
 		}
 
 		render() {
@@ -363,11 +351,11 @@ window.rulesAssistantOptions = (function() {
 			);
 		}
 
-		onchange() { return; }
+		onchange() {return;}
 	}
 
 	class ButtonItem extends Element {
-		constructor(label, setvalue, selected=false) {
+		constructor(label, setvalue, selected = false) {
 			super(label, selected);
 			this.selected = selected;
 			this.setvalue = setvalue ? setvalue : label;
@@ -407,7 +395,9 @@ window.rulesAssistantOptions = (function() {
 
 		render() {
 			let element = document.getElementById("importfield");
-			if (element !== null) { return element; }
+			if (element !== null) {
+				return element;
+			}
 			const container = document.createElement("div");
 			container.id = "importfield";
 			const textarea = document.createElement("textarea");
@@ -441,7 +431,7 @@ window.rulesAssistantOptions = (function() {
 	class Root extends Element {
 		constructor(element) {
 			super(element);
-			if(V.defaultRules.length === 0) {
+			if (V.defaultRules.length === 0) {
 				const paragraph = document.createElement("p");
 				paragraph.innerHTML = "<strong>No rules</strong>";
 				this.appendChild(new Element(paragraph));
@@ -479,7 +469,7 @@ window.rulesAssistantOptions = (function() {
 		constructor(root) {
 			super("Current rule", V.defaultRules.map(i => [i.name, i]));
 			this.setValue(current_rule.name);
-			this.onchange = function (rule) {
+			this.onchange = function(rule) {
 				V.currentRule = rule.ID;
 				reload(root);
 			};
@@ -586,7 +576,7 @@ window.rulesAssistantOptions = (function() {
 			this.appendChild(this.fnlist);
 			this.fneditor = null;
 
-			switch(current_rule.condition.function) {
+			switch (current_rule.condition.function) {
 				case false:
 				case true:
 					break;
@@ -667,11 +657,11 @@ window.rulesAssistantOptions = (function() {
 				this.show_custom_editor(CustomEditor, current_rule.condition.data);
 			} else if (this.betweenP(value)) {
 				current_rule.condition.function = "between";
-				current_rule.condition.data = { attribute: value, value: [null, null] };
+				current_rule.condition.data = {attribute: value, value: [null, null]};
 				this.show_custom_editor(RangeEditor, current_rule.condition.function, current_rule.condition.data);
 			} else if (this.belongsP(value)) {
 				current_rule.condition.function = "belongs";
-				current_rule.condition.data = { attribute: value, value: [] };
+				current_rule.condition.data = {attribute: value, value: []};
 				this.show_custom_editor(ItemEditor, current_rule.condition.function, current_rule.condition.data);
 			}
 		}
@@ -707,7 +697,7 @@ window.rulesAssistantOptions = (function() {
 			const min = document.createElement("input");
 			min.setAttribute("type", "text");
 			min.value = `${ data.value[0]}`;
-			min.onkeypress = e => { if (returnP(e)) this.setmin(min.value); };
+			min.onkeypress = e => {if (returnP(e)) this.setmin(min.value);};
 			min.onblur = e => this.setmin(min.value);
 			this.min = min;
 			elem.appendChild(min);
@@ -721,7 +711,7 @@ window.rulesAssistantOptions = (function() {
 			const max = document.createElement("input");
 			max.setAttribute("type", "text");
 			max.value = `${ data.value[1]}`;
-			max.onkeypress = e => { if (returnP(e)) this.setmax(max.value); };
+			max.onkeypress = e => {if (returnP(e)) this.setmax(max.value);};
 			max.onblur = e => this.setmax(max.value);
 			this.max = max;
 			elem.appendChild(max);
@@ -769,7 +759,7 @@ window.rulesAssistantOptions = (function() {
 				"intelligence": "From moronic to brilliant: [-100, 100]",
 				"accent": "No accent: 0, Nice accent: 1, Bad accent: 2, Can't speak language: 3 and above",
 				"waist": "Masculine waist: (95, ∞), Ugly waist: (40, 95], Unattractive waist: (10, 40], Average waist: [-10, 10], Feminine waist: [-40, -10), Wasp waist: [-95, -40), Absurdly narrow: (-∞, -95)",
-			}[attribute] || " ");
+			} [attribute] || " ");
 		}
 	}
 
@@ -780,7 +770,7 @@ window.rulesAssistantOptions = (function() {
 			const input = document.createElement("input");
 			input.setAttribute("type", "text");
 			input.value = JSON.stringify(data.value);
-			input.onkeypress = e => { if (returnP(e)) this.setValue(input); };
+			input.onkeypress = e => {if (returnP(e)) this.setValue(input);};
 			input.onblur = e => this.setValue(input);
 			this.input = input;
 			elem.appendChild(input);
@@ -861,7 +851,7 @@ window.rulesAssistantOptions = (function() {
 				"Nursery": "work as a nanny",
 				"Clinic": "get treatment in the clinic",
 				"Cellblock": "be confined in the cellblock",
-			}[what];
+			} [what];
 		}
 	}
 
@@ -908,9 +898,7 @@ window.rulesAssistantOptions = (function() {
 				current_rule.condition.selectedSlaves.includes(slave.ID))));
 		}
 
-		onchange() {
-			current_rule.condition.selectedSlaves = this.getSelection();
-		}
+		onchange() {current_rule.condition.selectedSlaves = this.getSelection();}
 	}
 
 	class SlaveExclusion extends ButtonList {
@@ -922,9 +910,7 @@ window.rulesAssistantOptions = (function() {
 				current_rule.condition.excludedSlaves.includes(slave.ID))));
 		}
 
-		onchange() {
-			current_rule.condition.excludedSlaves = this.getSelection();
-		}
+		onchange() {current_rule.condition.excludedSlaves = this.getSelection();}
 	}
 
 	// parent section for effect editing
@@ -1111,6 +1097,7 @@ window.rulesAssistantOptions = (function() {
 			this.appendChild(new ButtSurgeryList());
 			this.appendChild(new BreastSurgeryList());
 			this.appendChild(new TighteningSurgeryList());
+			this.appendChild(new TummyTuckSurgeryList());
 			this.appendChild(new BodyHairSurgeryList());
 			this.appendChild(new HairSurgeryList());
 			if (V.bellyImplants > 0)
@@ -1233,8 +1220,8 @@ window.rulesAssistantOptions = (function() {
 				["Toga (FS)", "a toga"],
 				["Western clothing (FS)", "Western clothing"],
 			];
-			spclothes.forEach(pair => { if (isItemAccessible(pair[1])) nclothes.push(pair); });
-			fsnclothes.forEach(pair => { if (isItemAccessible(pair[1])) nclothes.push(pair); });
+			spclothes.forEach(pair => {if (isItemAccessible(pair[1])) nclothes.push(pair);});
+			fsnclothes.forEach(pair => {if (isItemAccessible(pair[1])) nclothes.push(pair);});
 			const nice = new ListSubSection(this, "Nice", nclothes);
 			this.appendChild(nice);
 
@@ -1248,7 +1235,7 @@ window.rulesAssistantOptions = (function() {
 			const fshclothes = [
 				["Chains (FS)", "chains"],
 			];
-			fshclothes.forEach(pair => { if (isItemAccessible(pair[1])) hclothes.push(pair); });
+			fshclothes.forEach(pair => {if (isItemAccessible(pair[1])) hclothes.push(pair);});
 
 			const harsh = new ListSubSection(this, "Harsh", hclothes);
 			this.appendChild(harsh);
@@ -1281,7 +1268,7 @@ window.rulesAssistantOptions = (function() {
 				["Bowtie collar", "bowtie"],
 				["Ancient Egyptian", "ancient Egyptian"],
 			];
-			fsncollars.forEach(pair => { if (isItemAccessible(pair[1])) ncollars.push(pair); });
+			fsncollars.forEach(pair => {if (isItemAccessible(pair[1])) ncollars.push(pair);});
 			const nice = new ListSubSection(this, "Nice", ncollars);
 			this.appendChild(nice);
 
@@ -1311,9 +1298,7 @@ window.rulesAssistantOptions = (function() {
 	class CorsetList extends List {
 		constructor() {
 			const bellies = [];
-			setup.bellyAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					bellies.push([acc.name, acc.value]);
+			setup.bellyAccessories.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)bellies.push([acc.name, acc.value]);
 				else if (acc.fs === "repopulation" && V.arcologies[0].FSRepopulationFocus !== "unset")
 					bellies.push([`${acc.name } (FS)`, acc.value]);
 				else if (acc.rs === "boughtBelly" && V.clothesBoughtBelly === 1)
@@ -1355,9 +1340,7 @@ window.rulesAssistantOptions = (function() {
 	class VagAccVirginsList extends List {
 		constructor() {
 			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.vaginalAccessories.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1370,9 +1353,7 @@ window.rulesAssistantOptions = (function() {
 	class VagAccAVirginsList extends List {
 		constructor() {
 			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.vaginalAccessories.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1385,9 +1366,7 @@ window.rulesAssistantOptions = (function() {
 	class VagAccOtherList extends List {
 		constructor() {
 			const accs = [];
-			setup.vaginalAccessories.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.vaginalAccessories.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1400,9 +1379,7 @@ window.rulesAssistantOptions = (function() {
 	class VaginalAttachmentsList extends List {
 		constructor() {
 			const accs = [];
-			setup.vaginalAttachments.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.vaginalAttachments.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyVaginalAttachments" && V.toysBoughtVaginalAttachments === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1457,9 +1434,7 @@ window.rulesAssistantOptions = (function() {
 	class ButtplugsVirginsList extends List {
 		constructor() {
 			const accs = [];
-			setup.buttplugs.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.buttplugs.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1472,9 +1447,7 @@ window.rulesAssistantOptions = (function() {
 	class ButtplugsOtherList extends List {
 		constructor() {
 			const accs = [];
-			setup.buttplugs.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.buttplugs.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyBigPlugs" && V.toysBoughtButtPlugs === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1487,9 +1460,7 @@ window.rulesAssistantOptions = (function() {
 	class ButtplugAttachmentsList extends List {
 		constructor() {
 			const accs = [];
-			setup.buttplugAttachments.forEach(acc => {
-				if (acc.fs === undefined && acc.rs === undefined)
-					accs.push([acc.name, acc.value]);
+			setup.buttplugAttachments.forEach(acc => {if (acc.fs === undefined && acc.rs === undefined)accs.push([acc.name, acc.value]);
 				else if (acc.rs === "buyTails" && V.toysBoughtButtPlugTails === 1)
 					accs.push([`${acc.name } (Purchased)`, acc.value]);
 			});
@@ -1582,9 +1553,8 @@ window.rulesAssistantOptions = (function() {
 		}
 
 		nds() {
-			[this.breasts, this.butts, this.lips, this.dicks, this.balls].forEach(i => {
-				i.setValue("no default change");
-				i.propagateChange();
+			[this.breasts, this.butts, this.lips, this.dicks, this.balls].forEach(i => {i.setValue("no default change");
+			i.propagateChange();
 			});
 		}
 
@@ -1625,9 +1595,7 @@ window.rulesAssistantOptions = (function() {
 		}
 
 		none() {
-			this.sublists.forEach(i => {
-				i.setValue(0);
-				i.propagateChange();
+			this.sublists.forEach(i => {i.setValue(0); i.propagateChange();
 			});
 		}
 	}
@@ -1964,9 +1932,7 @@ window.rulesAssistantOptions = (function() {
 			];
 			super("Diet base", pairs);
 			this.setValue(this.value2string(current_rule.set.dietCum, current_rule.set.dietMilk));
-			this.onchange = (value) => {
-				current_rule.set.dietCum = value.cum;
-				current_rule.set.dietMilk = value.milk;
+			this.onchange = (value) => { current_rule.set.dietCum = value.cum; current_rule.set.dietMilk = value.milk;
 				this.setValue(this.value2string(current_rule.set.dietCum, current_rule.set.dietMilk));
 			};
 		}
@@ -2180,7 +2146,7 @@ window.rulesAssistantOptions = (function() {
 
 	class RelationshipList extends List {
 		constructor() {
-			const pairs =[
+			const pairs = [
 				["No default setting", "no default setting"],
 				["Permissive", "permissive"],
 				["Just friends", "just friends"],
@@ -2209,7 +2175,7 @@ window.rulesAssistantOptions = (function() {
 		constructor() {
 			const pairs = [
 				["No default setting", "no default setting"],
-				/*["No broadcasting", -1], **This has changed, it would now use .pornFeed** */
+				/* ["No broadcasting", -1], **This has changed, it would now use .pornFeed** */
 				["No subsidy", 0],
 				["1000", 1000],
 				["2000", 2000],
@@ -2227,6 +2193,7 @@ window.rulesAssistantOptions = (function() {
 		constructor() {
 			const pairs = [
 				["no default setting"],
+				["none"],
 				["correct with glasses"],
 				["correct with contacts"],
 				["universal glasses"],
@@ -2270,7 +2237,7 @@ window.rulesAssistantOptions = (function() {
 
 		setValue(val) {
 			if (val === undefined) val = this.combine();
-			this.label.innerText = val + " ";
+			this.label.innerText = `${val} `;
 			current_rule.set.eyeColor = val;
 		}
 	}
@@ -2294,9 +2261,7 @@ window.rulesAssistantOptions = (function() {
 				"orange",
 				"amber",
 				"red"
-			].forEach(i => items.push(new OptionsItem(i, item => {
-				this.value = item.label;
-				this.parent.setValue();
+			].forEach(i => items.push(new OptionsItem(i, item => {this.value = item.label; this.parent.setValue();
 			})));
 			super(items);
 		}
@@ -2320,10 +2285,7 @@ window.rulesAssistantOptions = (function() {
 				"bright",
 				"teary",
 				"vacant"
-			].forEach(i => items.push(new OptionsItem(i, item => {
-				this.value = item.label;
-				this.parent.setValue();
-			})));
+			].forEach(i => items.push(new OptionsItem(i, item => {this.value = item.label; this.parent.setValue();})));
 			super(items);
 		}
 	}
@@ -2332,6 +2294,7 @@ window.rulesAssistantOptions = (function() {
 		constructor() {
 			const pairs = [
 				["no default setting"],
+				["none"],
 				["correct with hearing aids"],
 				["muffle with ear plugs"],
 				["deafen with ear plugs"]
@@ -3541,6 +3504,19 @@ window.rulesAssistantOptions = (function() {
 		}
 	}
 
+	class TummyTuckSurgeryList extends List {
+		constructor() {
+			const items = [
+				["no default setting"],
+				["tuck", 1],
+			];
+			super("Tummy Tuck", items);
+			this.setValue(current_rule.set.surgery_tummy);
+			this.onchange = (value) => current_rule.set.surgery_tummy = value;
+		}
+	}
+
+
 	class BodyHairSurgeryList extends List {
 		constructor() {
 			const items = [
diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js
index 7d8181cf8da63b1384b33f7c4804e9ee517cf04e..6cc77c4bfc933687327546a1629a77fc70fe2e29 100644
--- a/src/js/rulesAutosurgery.js
+++ b/src/js/rulesAutosurgery.js
@@ -1,3 +1,4 @@
+/* eslint-disable camelcase */
 window.rulesAutosurgery = (function() {
 	"use strict";
 	let V;
@@ -114,8 +115,8 @@ window.rulesAutosurgery = (function() {
 				thisSurgery = autoSurgerySelector(
 					slave,
 					V.defaultRules
-						.filter(x => ruleApplied(slave, x) && x.set.autoSurgery === 1)
-						.map(x => x.set));
+					.filter(x => ruleApplied(slave, x) && x.set.autoSurgery === 1)
+					.map(x => x.set));
 				if ((thisSurgery.surgery_hips !== "no default setting") && (thisSurgery.surgery_butt !== "no default setting")) {
 					if (slave.hips < -1) {
 						if (thisSurgery.surgery_butt > 2) {
@@ -130,7 +131,7 @@ window.rulesAutosurgery = (function() {
 							thisSurgery.surgery_butt = 8;
 						}
 					} else if (slave.hips > 1) {
-					// true
+						// true
 					} else {
 						if (thisSurgery.surgery_butt > 6) {
 							thisSurgery.surgery_butt = 6;
@@ -382,7 +383,7 @@ window.rulesAutosurgery = (function() {
 				surgeries.push("undo vasectomy");
 				V.surgeryType = "vasectomy undo";
 				if (V.PC.medicine >= 100) {
-					slave.health -=5;
+					slave.health -= 5;
 				} else {
 					slave.health -= 10;
 				}
@@ -394,15 +395,15 @@ window.rulesAutosurgery = (function() {
 			if (slave.faceImplant <= 15 && slave.face <= 95 && thisSurgery.surgery_cosmetic > 0) {
 				surgeries.push("a nicer face");
 				if (slave.faceShape === "masculine") slave.faceShape = "androgynous";
-				slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-				slave.face = Math.clamp(slave.face+20, -100, 100);
+				slave.faceImplant += 25 - 5 * Math.trunc(V.PC.medicine / 50) - 5 * V.surgeryUpgrade;
+				slave.face = Math.clamp(slave.face + 20, -100, 100);
 				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
 				if (V.PC.medicine >= 100) slave.health -= 5;
 				else slave.health -= 10;
 			} else if (slave.faceImplant <= 15 && slave.ageImplant !== 1 && slave.visualAge >= 25 && thisSurgery.surgery_cosmetic > 0) {
 				surgeries.push("an age lift");
 				slave.ageImplant = 1;
-				slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
+				slave.faceImplant += 25 - 5 * Math.trunc(V.PC.medicine / 50) - 5 * V.surgeryUpgrade;
 				if (slave.visualAge > 80) slave.visualAge -= 40;
 				else if (slave.visualAge >= 70) slave.visualAge -= 30;
 				else if (slave.visualAge > 50) slave.visualAge -= 20;
@@ -428,7 +429,7 @@ window.rulesAutosurgery = (function() {
 				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
 				if (V.PC.medicine >= 100) slave.health -= 5;
 				else slave.health -= 10;
-			} else if ((slave.bellySagPreg > 0 || slave.bellySag > 0) && thisSurgery.surgery_cosmetic > 0) {
+			} else if ((slave.bellySagPreg > 0 || slave.bellySag > 0) && (thisSurgery.surgery_cosmetic > 0 || thisSurgery.surgery_tummy > 0 )) {
 				surgeries.push("a tummy tuck");
 				slave.bellySag = 0;
 				slave.bellySagPreg = 0;
@@ -471,8 +472,8 @@ window.rulesAutosurgery = (function() {
 			} else if (slave.faceImplant <= 45 && slave.face <= 95 && thisSurgery.surgery_cosmetic === 2) {
 				surgeries.push("a nicer face");
 				if (slave.faceShape === "masculine") slave.faceShape = "androgynous";
-				slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
-				slave.face = Math.clamp(slave.face+20, -100, 100);
+				slave.faceImplant += 25 - 5 * Math.trunc(V.PC.medicine / 50) - 5 * V.surgeryUpgrade;
+				slave.face = Math.clamp(slave.face + 20, -100, 100);
 				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
 				if (V.PC.medicine >= 100) slave.health -= 5;
 				else slave.health -= 10;
@@ -490,7 +491,7 @@ window.rulesAutosurgery = (function() {
 				} else {
 					slave.visualAge -= 5;
 				}
-				slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/50)-5*V.surgeryUpgrade;
+				slave.faceImplant += 25 - 5 * Math.trunc(V.PC.medicine / 50) - 5 * V.surgeryUpgrade;
 				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
 				if (V.PC.medicine >= 100) slave.health -= 5;
 				else slave.health -= 10;
@@ -519,7 +520,7 @@ window.rulesAutosurgery = (function() {
 				else slave.health -= 10;
 			} else if (slave.waist >= -95 && V.seeExtreme === 1 && thisSurgery.surgery_cosmetic === 2) {
 				surgeries.push("a narrower waist");
-				slave.waist = Math.clamp(slave.waist-20, -100, 100);
+				slave.waist = Math.clamp(slave.waist - 20, -100, 100);
 				cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave);
 				if (V.PC.medicine >= 100) slave.health -= 5;
 				else slave.health -= 10;
@@ -588,7 +589,9 @@ window.rulesAutosurgery = (function() {
 		r += `${V.assistantName === "your personal assistant" ? "Your personal assistant" : V.assistantName}, ordered to apply surgery, gives ${slave.slaveName} <span class="lime">${surgeriesDisplay}.</span>`;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function bellyIn(slave) {
 		// less hacky version of calling surgery degradation silently
 		if (slave.devotion > 50) {
diff --git a/src/js/sexActsJS.js b/src/js/sexActsJS.js
index 4b095e0228f0968eca53e5e719ae8d1c71d78b95..e509a760fdb4c79d684891f1dd614546cb75e9f3 100644
--- a/src/js/sexActsJS.js
+++ b/src/js/sexActsJS.js
@@ -7,7 +7,7 @@ window.AnalVCheck = function AnalVCheck(times = 1) {
 	const slave = V.activeSlave;
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
-	//him = pronouns.object,
+	// him = pronouns.object,
 	const his = pronouns.possessive;
 	// hers = pronouns.possessivePronoun,
 	// himself = pronouns.objectReflexive,
@@ -16,13 +16,13 @@ window.AnalVCheck = function AnalVCheck(times = 1) {
 	const His = capFirstChar(his);
 	let r = ``;
 	if (canDoAnal(slave) && slave.anus === 0) {
-		r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
+		r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin ass.</span> `;
 		if (slave.devotion > 50 || slave.career === "a slave since birth") {
 			r += `Since it's ${his} first time, you gently ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. Before long ${he}'s moaning loudly as you continue working away at ${his} butthole. `;
 			if (slave.tankBaby === 2) {
-				r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
+				r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a <span class="hotpink">necessity.</span> ${He} expects ${his} asshole to be seeing a lot more attention now.`;
 			} else {
-				r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. `;
+				r += `${He} thinks of losing ${his} anal virginity to you as a <span class="hotpink">connection</span> with ${his} beloved ${WrittenMaster(slave)}. `;
 				if ((slave.fetishKnown && slave.fetish === "buttslut") || (slave.energy > 95) || (slave.attrXX >= 85 && V.PC.dick === 0)) {
 					r += `${He} can't wait to be fucked in the ass by you again.`;
 				} else {
@@ -33,10 +33,10 @@ window.AnalVCheck = function AnalVCheck(times = 1) {
 		} else if (slave.devotion > 20) {
 			r += `Since it's ${his} first time, you gently ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${His} moans become louder and louder as you continue working away at ${his} butthole. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
 		} else if (slave.devotion >= -20) {
-			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
+			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="gold">fears</span> ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
 			slave.trust -= 5;
 		} else {
-			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
+			r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
 			slave.trust -= 5;
 			slave.devotion -= 5;
 		}
@@ -59,6 +59,7 @@ window.AnalVCheck = function AnalVCheck(times = 1) {
 window.VaginalVCheck = function VaginalVCheck(times = 1) {
 	const V = State.variables;
 	const slave = V.activeSlave;
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -68,15 +69,16 @@ window.VaginalVCheck = function VaginalVCheck(times = 1) {
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 	let r = ``;
 	if (canDoVaginal(slave) && slave.vagina === 0) {
-		r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `;
+		r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin pussy.</span> `;
 		if (slave.devotion > 50 || slave.career === "a slave since birth") {
 			r += `You ease yourself into ${his} pussy, since it's ${his} first time, then gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
 			if (slave.tankBaby === 2) {
-				r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
+				r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a <span class="hotpink">necessity to be happy.</span> ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
 			} else {
-				r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ `;
+				r += `<span class="hotpink">${He} enjoys losing ${his} cherry to you.</span> `;
 				if ((slave.fetishKnown && slave.fetish === "pregnancy") || (slave.energy > 95) || (slave.attrXY >= 85 && V.PC.dick === 1)) {
 					r += `${He} can't wait to have ${his} pussy fucked by you again.`;
 				} else {
@@ -87,11 +89,11 @@ window.VaginalVCheck = function VaginalVCheck(times = 1) {
 		} else if (slave.devotion > 20) {
 			r += `You ease yourself into ${his} pussy, since it's ${his} first time, then gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} accepts losing ${his} virginity to ${his} owner and ${he} looks forward to having ${his} pussy fucked by you again.`;
 		} else if (slave.devotion >= -20) {
-			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue thrusting into ${his} fuck hole. ${He} @@.mediumorchid;hates@@ losing ${his} virginity this way and @@.gold;fears@@ the next time you'll conquer ${him}. ${He} dreads getting violated by you again.`;
+			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue thrusting into ${his} fuck hole. ${He} <span class="mediumorchid">hates</span> losing ${his} virginity this way and <span class="gold">fears</span> the next time you'll conquer ${him}. ${He} dreads getting violated by you again.`;
 			slave.trust -= 5;
 			slave.devotion -= 5;
 		} else {
-			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} tries to struggle, but you only pound harder. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for robbing ${his} of ${his} virginity. ${He} dreads getting fucked by you again.`;
+			r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} tries to struggle, but you only pound harder. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for robbing ${his} of ${his} virginity. ${He} dreads getting fucked by you again.`;
 			slave.trust -= 10;
 			slave.devotion -= 15;
 		}
@@ -115,6 +117,7 @@ window.VaginalVCheck = function VaginalVCheck(times = 1) {
 window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) {
 	const V = State.variables;
 	const slave = V.activeSlave;
+	/* eslint-disable */
 	const pronouns = getPronouns(slave);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -124,21 +127,22 @@ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) {
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 	let r = ``;
 	if (canDoVaginal(slave)) {
 		if (slave.vagina === 0) {
 			if (canDoAnal(slave) && slave.anus === 0) {
-				r += `@@.lime;This breaks in ${slave.slaveName}'s virgin holes.@@ `;
+				r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin holes.</span> `;
 				if (slave.devotion > 50 || slave.career === "a slave since birth") {
 					r += `As it's ${his} first time, you ease yourself into ${his} pussy before gradually working your way into ${his} ass and alternate between the two holes while ${he} moans. `;
 					if (slave.tankBaby === 2) {
-						r += `${He} believes you taking ${his} virgin holes @@.hotpink;will keep ${him} from suffering.@@ ${He} expects you to require ${his} holes as tribute again soon.`;
+						r += `${He} believes you taking ${his} virgin holes <span class="hotpink">will keep ${him} from suffering.</span> ${He} expects you to require ${his} holes as tribute again soon.`;
 					} else {
-						r += `@@.hotpink;${He}'s so devoted ${he} enjoys being fucked in both holes for the first time.@@ ${He} looks forward to having ${his} holes fucked by you again.`;
+						r += `<span class="hotpink">${He}'s so devoted ${he} enjoys being fucked in both holes for the first time.</span> ${He} looks forward to having ${his} holes fucked by you again.`;
 					}
 					slave.devotion += 4;
 				} else if (slave.devotion <= 20) {
-					r += `You force yourself into ${his} pussy before working your way into ${his} ass. ${He} sobs and cries with disgust while you alternate between the two holes. ${He} @@.mediumorchid;hates@@ losing ${his} virginity and anal virginity in one @@.gold;brutal@@ incident. ${He} dreads having ${his} holes violated by you again.`;
+					r += `You force yourself into ${his} pussy before working your way into ${his} ass. ${He} sobs and cries with disgust while you alternate between the two holes. ${He} <span class="mediumorchid">hates</span> losing ${his} virginity and anal virginity in one <span class="gold">brutal</span> incident. ${He} dreads having ${his} holes violated by you again.`;
 					slave.trust -= 5;
 					slave.devotion -= 5;
 				} else {
@@ -146,17 +150,17 @@ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) {
 				}
 				slave.anus = 1;
 			} else {
-				r += `@@.lime;This breaks in ${slave.slaveName}'s virgin pussy.@@ `;
+				r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin pussy.</span> `;
 				if (slave.devotion > 50 || slave.career === "a slave since birth") {
 					r += `As it's ${his} first time, you ease yourself into ${his} pussy and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
 					if (slave.tankBaby === 2) {
-						r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity to be happy.@@ ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
+						r += `${He} thinks of losing ${his} virginity to ${his} ${WrittenMaster(slave)} a <span class="hotpink">necessity to be happy.</span> ${He} expects ${his} pussy to be seeing a lot more attention in the future.`;
 					} else {
-						r += `@@.hotpink;${He} enjoys losing ${his} cherry to you.@@ ${He} looks forward to having ${his} pussy fucked by you again.`;
+						r += `<span class="hotpink">${He} enjoys losing ${his} cherry to you.</span> ${He} looks forward to having ${his} pussy fucked by you again.`;
 					}
 					slave.devotion += 4;
 				} else if (slave.devotion <= 20) {
-					r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for taking ${his} virginity. ${He} dreads having ${his} pussy violated by you again.`;
+					r += `You force yourself into ${his} pussy. ${He} sobs and cries with disgust while you continue working ${his} fuck hole. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for taking ${his} virginity. ${He} dreads having ${his} pussy violated by you again.`;
 					slave.trust -= 5;
 					slave.devotion -= 5;
 				} else {
@@ -165,22 +169,22 @@ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) {
 			}
 			slave.vagina = 1;
 		} else if (canDoAnal(slave) && slave.anus === 0) {
-			r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
+			r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin ass.</span> `;
 			if (slave.devotion > 50 || slave.career === "a slave since birth") {
 				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
 				if (slave.tankBaby === 2) {
-					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
+					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a <span class="hotpink">necessity.</span> ${He} expects ${his} asshole to be seeing a lot more attention now.`;
 				} else {
-					r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`;
+					r += `${He} thinks of losing ${his} anal virginity to you as a <span class="hotpink">connection</span> with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`;
 				}
 				slave.devotion += 4;
 			} else if (slave.devotion > 20) {
 				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
 			} else if (slave.devotion >= -20) {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
+				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="gold">fears</span> ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
 				slave.trust -= 5;
 			} else {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
+				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
 				slave.trust -= 5;
 				slave.devotion -= 5;
 			}
@@ -203,22 +207,22 @@ window.BothVCheck = function BothVCheck(analTimes = 1, bothTimes = 1) {
 		}
 	} else if (canDoAnal(slave)) {
 		if (slave.anus === 0) {
-			r += `@@.lime;This breaks in ${slave.slaveName}'s virgin ass.@@ `;
+			r += `<span class="lime">This breaks in ${slave.slaveName}'s virgin ass.</span> `;
 			if (slave.devotion > 50 || slave.career === "a slave since birth") {
 				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually speed up your thrusts while ${he} slowly learns to move ${his} hips along with you. ${He} moans loudly. `;
 				if (slave.tankBaby === 2) {
-					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a @@.hotpink;necessity.@@ ${He} expects ${his} asshole to be seeing a lot more attention now.`;
+					r += `${He} thinks of losing ${his} anal virginity to ${his} ${WrittenMaster(slave)} a <span class="hotpink">necessity.</span> ${He} expects ${his} asshole to be seeing a lot more attention now.`;
 				} else {
-					r += `${He} thinks of losing ${his} anal virginity to you as a @@.hotpink;connection@@ with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`;
+					r += `${He} thinks of losing ${his} anal virginity to you as a <span class="hotpink">connection</span> with ${his} beloved ${WrittenMaster(slave)}. ${He} looks forward to having ${his} asshole fucked by you again.`;
 				}
 				slave.devotion += 4;
 			} else if (slave.devotion > 20) {
 				r += `As it's ${his} first time, you ease yourself into ${his} butthole and gradually increase the intensity of your thrusts. ${He} accepts the pain and humiliation of anal sex as part of ${his} sexual servitude, though ${he} hopes that ${his} next time will be less painful.`;
 			} else if (slave.devotion >= -20) {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.gold;fears@@ ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
+				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="gold">fears</span> ${his} next anal sex, remembering the pain of losing ${his} anal virginity. ${He} dreads having ${his} ass violated by you again.`;
 				slave.trust -= 5;
 			} else {
-				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} @@.mediumorchid;hates@@ and @@.gold;fears@@ you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
+				r += `You force yourself into ${his} butthole. ${He} sobs and cries with disgust while you continue thrusting into ${his} ass. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for violating ${his} virgin butt. ${He} dreads having ${his} ass fucked by you again.`;
 				slave.trust -= 5;
 				slave.devotion -= 5;
 			}
@@ -258,6 +262,7 @@ window.SimpleVCheck = function SimpleVCheck(times) {
 window.PartnerVCheck = function PartnerVCheck(analTimes = 1, bothTimes = 1) {
 	const V = State.variables;
 	const partner = V.slaves[V.partner];
+	/* eslint-disable */
 	const pronouns = getPronouns(partner);
 	const he = pronouns.pronoun;
 	const him = pronouns.object;
@@ -267,22 +272,23 @@ window.PartnerVCheck = function PartnerVCheck(analTimes = 1, bothTimes = 1) {
 	const boy = pronouns.noun;
 	const He = capFirstChar(he);
 	const His = capFirstChar(his);
+	/* eslint-enable */
 	let r = ``;
 
 	if (V.partner < 0 || V.partner >= V.slaves.length) {
-		r += `@@.red;PartnerVCheck called with invalid partner '$partner' from passage ${passage()}.@@`;
+		r += `<span class="red">PartnerVCheck called with invalid partner '$partner' from passage ${passage()}.</span>`;
 	} else if (canDoVaginal(partner)) {
 		if (partner.vagina === 0) {
 			if (canDoAnal(partner) && partner.anus === 0) {
-				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually working your way into ${his} butthole, alternating between ${his} holes. @@.lime;This breaks in ${partner.slaveName}'s virgin holes.@@ `;
+				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually working your way into ${his} butthole, alternating between ${his} holes. <span class="lime">This breaks in ${partner.slaveName}'s virgin holes.</span> `;
 				partner.vagina = 1;
 				partner.anus = 1;
 			} else {
-				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually increasing the intensity of your thrusts. @@.lime;This breaks in ${partner.slaveName}'s virgin pussy.@@ `;
+				r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} pussy before gradually increasing the intensity of your thrusts. <span class="lime">This breaks in ${partner.slaveName}'s virgin pussy.</span> `;
 				partner.vagina = 1;
 			}
 		} else if (canDoAnal(partner) && partner.anus === 0) {
-			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. @@.lime;This breaks in ${partner.slaveName}'s virgin ass.@@ `;
+			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. <span class="lime">This breaks in ${partner.slaveName}'s virgin ass.</span> `;
 			partner.anus = 1;
 		}
 
@@ -303,7 +309,7 @@ window.PartnerVCheck = function PartnerVCheck(analTimes = 1, bothTimes = 1) {
 		}
 	} else if (canDoAnal(partner)) {
 		if (partner.anus === 0) {
-			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. @@.lime;This breaks in ${partner.slaveName}'s virgin ass.@@ `;
+			r += `Since it's ${partner.slaveName}'s first time, you take your time and gently ease yourself into ${his} butthole before gradually increasing the intensity of your thrusts into ${his} ass. <span class="lime">This breaks in ${partner.slaveName}'s virgin ass.</span> `;
 			partner.anus = 1;
 		}
 		V.analTotal += analTimes;
@@ -319,7 +325,10 @@ window.PartnerVCheck = function PartnerVCheck(analTimes = 1, bothTimes = 1) {
  count is how many times to increment either the Vaginal, Anal, or Oral counts, depending on availability of slave.
  If count is left undefined it will assume it to be 1.
  Intended to be a simple "I want to fuck x and not have to code a bunch of logic for it".
- @param {App.Entity.SlaveState} slave */
+ * @param {App.Entity.SlaveState} slave 
+ * @param {number} fuckCount
+ * @returns {string}
+ */
 window.SimpleSexAct = function SimpleSexAct(slave, fuckCount = 1) {
 	const V = State.variables;
 	let fuckTarget = 0;
@@ -356,6 +365,7 @@ window.SimpleSexAct = function SimpleSexAct(slave, fuckCount = 1) {
  Intended to be a simple "x got fucked y times and I don't want to keep coding it".
  Pregnancy chance is handled in saLongTermEffects.tw.
  @param {App.Entity.SlaveState} slave
+ @param {number} fuckCount
 */
 window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, fuckCount = 1) {
 	const V = State.variables;
@@ -386,6 +396,8 @@ window.SimpleSlaveFucking = function SimpleSlaveFucking(slave, fuckCount = 1) {
  Intended to be a simple "x got fucked y times by z and I don't want to keep coding it".
  @param {App.Entity.SlaveState} subslave
  @param {App.Entity.SlaveState} domslave
+ @param {number} fuckCount
+ @returns {string}
 */
 window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, domslave, fuckCount = 1) {
 	const V = State.variables;
@@ -393,7 +405,7 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms
 	let r = "";
 
 	for (let j = 0; j < fuckCount; j++) {
-		//there is a reason randomization happens inside cycle - to spread fuck around, otherwise cycle isn't even needed
+		// there is a reason randomization happens inside cycle - to spread fuck around, otherwise cycle isn't even needed
 		fuckTarget = jsRandom(1, 100);
 		if (subslave.nipples === "fuckable" && canPenetrate(domslave) && fuckTarget > 80) {
 			if (passage() === "SA serve your other slaves") {
@@ -437,7 +449,7 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms
 				r += knockMeUp(subslave, 3, 0, domslave.ID, 1);
 			}
 		} else if (canDoAnal(subslave) && subslave.anus > 0 && canPenetrate(domslave) && fuckTarget > 10) {
-			//i think would impregnate from anal here even without .mpreg? same in original widget too
+			// i think would impregnate from anal here even without .mpreg? same in original widget too
 			if (canImpreg(subslave, domslave) && subslave.mpreg === 1) {
 				r += knockMeUp(subslave, 3, 1, domslave.ID, 1);
 			}
@@ -467,13 +479,19 @@ window.SimpleSlaveSlaveFucking = function SimpleSlaveSlaveFucking(subslave, doms
 	return r;
 };
 
-/** @param {App.Entity.SlaveState} slave */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {number} count
+ */
 window.SimpleVaginaFuck = function SimpleVaginaFuck(slave, count = 1) {
 	State.variables.vaginalTotal += count;
 	slave.counter.vaginal += count;
 };
 
-/** @param {App.Entity.SlaveState} slave */
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {number} count
+ */
 window.SimpleAssFuck = function SimpleAssFuck(slave, count = 1) {
 	State.variables.analTotal += count;
 	slave.counter.anal += count;
diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js
index fab2f5565cb5e40e66f094377ab9af6f2f1b61f3..b23a773c607ae3734bd9bb1e444a4bf976a55c86 100644
--- a/src/js/slaveCostJS.js
+++ b/src/js/slaveCostJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 window.Beauty = (function() {
 	"use strict";
 	let V;
@@ -69,64 +68,69 @@ window.Beauty = (function() {
 		}
 
 		calcMultipliersBeauty(slave);
-		beauty = Math.max(1, Math.trunc(0.5*beauty));
+		beauty = Math.max(1, Math.trunc(0.5 * beauty));
 
 		return beauty;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcInitBeauty(slave) {
-		beauty -= slave.waist/20;
-		beauty -= slave.muscles/30;
-		beauty += slave.lips/10;
+		beauty -= slave.waist / 20;
+		beauty -= slave.muscles / 30;
+		beauty += slave.lips / 10;
 		beauty += slave.clit;
-		beauty += (slave.height-160)/10;
-		beauty += 2*slave.hips;
+		beauty += (slave.height - 160) / 10;
+		beauty += 2 * slave.hips;
 		if (slave.anus > 3) {
-			beauty -= 10 + (slave.anus*2); /* -20 */
+			beauty -= 10 + (slave.anus * 2); /* -20 */
 		}
 		if (slave.vagina > 3) {
-			beauty -= 10 + (slave.vagina*2); /* -20 */
+			beauty -= 10 + (slave.vagina * 2); /* -20 */
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFaceBeauty(slave) {
-		beauty += slave.face/5;
+		beauty += slave.face / 5;
 		switch (slave.faceShape) {
 			case "masculine":
 				if (arcology.FSGenderRadicalist !== "unset") {
-					beauty -= (2 - (arcology.FSGenderRadicalist/25))*(slave.face/30);
+					beauty -= (2 - (arcology.FSGenderRadicalist / 25)) * (slave.face / 30);
 				} else if (arcology.FSGenderFundamentalist !== "unset") {
-					beauty -= (2 + (arcology.FSGenderFundamentalist/25))*(slave.face/30);
+					beauty -= (2 + (arcology.FSGenderFundamentalist / 25)) * (slave.face / 30);
 				} else {
-					beauty -= 2*(slave.face/30);
+					beauty -= 2 * (slave.face / 30);
 				}
 				break;
 			case "androgynous":
 				if (arcology.FSGenderRadicalist !== "unset") {
-					beauty += 2 - ((1 - (arcology.FSGenderRadicalist/25))*(slave.face/30));
+					beauty += 2 - ((1 - (arcology.FSGenderRadicalist / 25)) * (slave.face / 30));
 				} else if (arcology.FSGenderFundamentalist !== "unset") {
-					beauty += 2 - ((1 + (arcology.FSGenderFundamentalist/25))*(slave.face/30));
+					beauty += 2 - ((1 + (arcology.FSGenderFundamentalist / 25)) * (slave.face / 30));
 				} else {
-					beauty += 2 - (slave.face/30);
+					beauty += 2 - (slave.face / 30);
 				}
 				break;
 			case "exotic":
-				beauty += 2*(slave.face/30);
+				beauty += 2 * (slave.face / 30);
 				break;
 			case "sensual":
-				beauty += 2 + (slave.face/30);
+				beauty += 2 + (slave.face / 30);
 				break;
 			case "cute":
-				beauty += 8/3;
-				break;
-			default:
+				beauty += 8 / 3;
 				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcTeethBeauty(slave) {
 		switch (slave.teeth) {
 			case "crooked":
@@ -151,15 +155,17 @@ window.Beauty = (function() {
 			case "mixed":
 				beauty -= 1;
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	function calcModBeauty(/* slave */) {
+	function calcModBeauty(
+		/* slave
+		 */
+	) {
 		if (arcology.FSTransformationFetishist > 20 || arcology.FSDegradationist > 20) {
 			if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
-				beauty += 8 + (V.modScore*0.25);
+				beauty += 8 + (V.modScore * 0.25);
 			} else if (V.modScore > 7) {
 				beauty += V.modScore - 7;
 			}
@@ -175,12 +181,14 @@ window.Beauty = (function() {
 			} else if (V.modScore > 15 || (V.piercingScore > 8 && V.tatScore > 5)) {
 				beauty += 11;
 			} else {
-				beauty += 7 + (0.5*(V.modScore - 7));
+				beauty += 7 + (0.5 * (V.modScore - 7));
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcCosmeticsBeauty(slave) {
 		if (slave.brand !== 0) {
 			if (V.rep > 10000) {
@@ -225,89 +233,93 @@ window.Beauty = (function() {
 					}
 				}
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFSNotFuckdollBeauty(slave) {
 		if (arcology.FSSupremacist !== "unset") {
 			if (slave.race === arcology.FSSupremacistRace) {
-				beauty += (arcology.FSSupremacist/3) + (arcology.FSSupremacistLawME*10);
+				beauty += (arcology.FSSupremacist / 3) + (arcology.FSSupremacistLawME * 10);
 			}
 		}
 		if (arcology.FSSubjugationist !== "unset") {
 			if (slave.race === arcology.FSSubjugationistRace) {
-				beauty -= (arcology.FSSubjugationist/2) - (arcology.FSSubjugationistLawME*10);
+				beauty -= (arcology.FSSubjugationist / 2) - (arcology.FSSubjugationistLawME * 10);
 			}
 		}
 		if (arcology.FSDegradationist !== "unset") {
-			beauty -= (arcology.FSDegradationist/10)*((slave.intelligence + slave.intelligenceImplant)/20);
+			beauty -= (arcology.FSDegradationist / 10) * ((slave.intelligence + slave.intelligenceImplant) / 20);
 		}
 		if (arcology.FSGenderFundamentalistLawBimbo === 1) {
-			beauty -= (slave.intelligence + slave.intelligenceImplant)/2;
+			beauty -= (slave.intelligence + slave.intelligenceImplant) / 2;
 		}
 		if (arcology.FSYouthPreferentialist !== "unset") {
-			beauty += (30 - slave.visualAge)/(30 - V.minimumSlaveAge)*((arcology.FSYouthPreferentialist/2) + (arcology.FSYouthPreferentialistLaw*10)); /* max 60 */
+			beauty += (30 - slave.visualAge) / (30 - V.minimumSlaveAge) * ((arcology.FSYouthPreferentialist / 2) + (arcology.FSYouthPreferentialistLaw * 10)); /* max 60 */
 		} else if (arcology.FSMaturityPreferentialist !== "unset") {
 			if (V.retirementAge > 30) {
-				beauty += (30 - slave.visualAge)/(30 - V.retirementAge)*((arcology.FSMaturityPreferentialist/2) + (arcology.FSMaturityPreferentialistLaw*10)); /* max 60, problems if retirementAge is 30 or under */
+				beauty += (30 - slave.visualAge) / (30 - V.retirementAge) * ((arcology.FSMaturityPreferentialist / 2) + (arcology.FSMaturityPreferentialistLaw * 10)); /* max 60, problems if retirementAge is 30 or under */
 			}
 		}
-		if (arcology.FSBodyPurist > 20) { /* bonus for virgin slaves */
+		if (arcology.FSBodyPurist > 20) {
+			/* bonus for virgin slaves */
 			if (slave.vagina === 0 && slave.counter.vaginal === 0) {
-				beauty += 30*(arcology.FSBodyPurist/100);
+				beauty += 30 * (arcology.FSBodyPurist / 100);
 			}
 			if (slave.anus === 0 && slave.counter.anal === 0) {
-				beauty += 30*(arcology.FSBodyPurist/100);
+				beauty += 30 * (arcology.FSBodyPurist / 100);
 			}
 		}
 		if (arcology.FSEdoRevivalist !== "unset") {
 			if (slave.nationality === "Japanese" || slave.nationality === "Edo Revivalist") {
-				beauty += arcology.FSEdoRevivalist/2;
+				beauty += arcology.FSEdoRevivalist / 2;
 			} else if (slave.race === "asian") {
-				beauty += arcology.FSEdoRevivalist/5;
+				beauty += arcology.FSEdoRevivalist / 5;
 			} else {
-				beauty -= arcology.FSEdoRevivalist/4;
+				beauty -= arcology.FSEdoRevivalist / 4;
 			}
 			if (V.language === "Japanese" && canTalk(slave)) {
 				if (slave.accent > 1) {
-					beauty -= arcology.FSEdoRevivalist/2;
+					beauty -= arcology.FSEdoRevivalist / 2;
 				} else if (slave.accent > 0) {
-					beauty -= arcology.FSEdoRevivalist/5;
+					beauty -= arcology.FSEdoRevivalist / 5;
 				} else {
-					beauty += arcology.FSEdoRevivalist/10;
+					beauty += arcology.FSEdoRevivalist / 10;
 				}
 			}
 		} else if (arcology.FSChineseRevivalist !== "unset") {
 			if (slave.nationality === "Chinese" || slave.nationality === "Ancient Chinese Revivalist") {
-				beauty += arcology.FSChineseRevivalist/2;
+				beauty += arcology.FSChineseRevivalist / 2;
 			} else if (slave.race === "asian") {
-				beauty += arcology.FSChineseRevivalist/5;
+				beauty += arcology.FSChineseRevivalist / 5;
 			} else {
-				beauty -= arcology.FSChineseRevivalist/4;
+				beauty -= arcology.FSChineseRevivalist / 4;
 			}
 			if (V.language === "Chinese" && canTalk(slave)) {
 				if (slave.accent > 1) {
-					beauty -= arcology.FSChineseRevivalist/2;
+					beauty -= arcology.FSChineseRevivalist / 2;
 				} else if (slave.accent > 0) {
-					beauty -= arcology.FSChineseRevivalist/5;
+					beauty -= arcology.FSChineseRevivalist / 5;
 				} else {
-					beauty += arcology.FSChineseRevivalist/10;
+					beauty += arcology.FSChineseRevivalist / 10;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcMiscNotFuckdollBeauty(slave) {
-		beauty += Math.min(slave.health, 100)/5;
+		beauty += Math.min(slave.health, 100) / 5;
 		beauty += slave.voice;
-		beauty += (slave.intelligence + slave.intelligenceImplant)/10;
-		beauty += slave.skill.entertainment/10;
-		beauty += slave.skill.whoring/10;
-		beauty -= 3*slave.visualAge;
+		beauty += (slave.intelligence + slave.intelligenceImplant) / 10;
+		beauty += slave.skill.entertainment / 10;
+		beauty += slave.skill.whoring / 10;
+		beauty -= 3 * slave.visualAge;
 		if (setup.entertainmentCareers.includes(slave.career)) {
 			beauty += 20;
 		} else if (V.week - slave.weekAcquired >= 20 && slave.skill.entertainment >= 100) {
@@ -320,15 +332,17 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcDickBeauty(slave) {
 		if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") {
 			if (slave.dick >= 20) {
-				beauty += 17 + (slave.dick*(arcology.FSAssetExpansionist/500)); /* 23 */
+				beauty += 17 + (slave.dick * (arcology.FSAssetExpansionist / 500)); /* 23 */
 			} else if (slave.dick >= 10) {
-				beauty += 10 + (slave.dick*(arcology.FSAssetExpansionist/300)); /* 16.3 */
+				beauty += 10 + (slave.dick * (arcology.FSAssetExpansionist / 300)); /* 16.3 */
 			} else if (slave.dick > 6) {
-				beauty += slave.dick*(1 + (arcology.FSAssetExpansionist/100)); /* 10 */
+				beauty += slave.dick * (1 + (arcology.FSAssetExpansionist / 100)); /* 10 */
 			}
 		} else if (arcology.FSGenderFundamentalist !== "unset") {
 			if (slave.dick > 0) {
@@ -336,43 +350,45 @@ window.Beauty = (function() {
 			}
 		} else if (arcology.FSGenderRadicalist !== "unset") {
 			if (slave.dick > 20) {
-				beauty += 20 + (slave.dick*(arcology.FSGenderRadicalist/400)); /* 27.5 */
+				beauty += 20 + (slave.dick * (arcology.FSGenderRadicalist / 400)); /* 27.5 */
 			} else if (slave.dick >= 10) {
-				beauty += 10 + (slave.dick*(arcology.FSGenderRadicalist/200)); /* 20 */
+				beauty += 10 + (slave.dick * (arcology.FSGenderRadicalist / 200)); /* 20 */
 			} else if (slave.dick > 0) {
-				beauty += slave.dick*(1 + (arcology.FSGenderRadicalist/100)); /* 10 */
+				beauty += slave.dick * (1 + (arcology.FSGenderRadicalist / 100)); /* 10 */
 			}
 		} else {
-			beauty -= 2*slave.dick;
+			beauty -= 2 * slave.dick;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcBallsBeauty(slave) {
 		if (arcology.FSAssetExpansionist > 20 && arcology.FSGenderFundamentalist === "unset") {
 			if (slave.balls > 100) {
-				beauty += 41 + (slave.balls*(arcology.FSAssetExpansionist/500)); /* 66 */
+				beauty += 41 + (slave.balls * (arcology.FSAssetExpansionist / 500)); /* 66 */
 			} else if (slave.balls > 80) {
-				beauty += 16 + (slave.balls*(arcology.FSAssetExpansionist/400)); /* 41 */
+				beauty += 16 + (slave.balls * (arcology.FSAssetExpansionist / 400)); /* 41 */
 			} else if (slave.balls > 60) {
-				beauty += 6 + (slave.balls*(arcology.FSAssetExpansionist/800)); /* 16 */
+				beauty += 6 + (slave.balls * (arcology.FSAssetExpansionist / 800)); /* 16 */
 			} else if (slave.balls > 10) {
-				beauty += slave.balls*((arcology.FSAssetExpansionist/1000)); /* 6 */
+				beauty += slave.balls * ((arcology.FSAssetExpansionist / 1000)); /* 6 */
 			}
 		} else if (arcology.FSGenderFundamentalist !== "unset") {
 			if (slave.scrotum > 0) {
-				beauty -= slave.balls*(1 + (arcology.FSGenderFundamentalist/200));
+				beauty -= slave.balls * (1 + (arcology.FSGenderFundamentalist / 200));
 			}
 		} else if (arcology.FSGenderRadicalist !== "unset") {
 			if (slave.scrotum > 0) {
 				if (slave.balls > 100) {
-					beauty += 40 + (slave.balls*(arcology.FSGenderRadicalist/2000)); /* 46.25 */
+					beauty += 40 + (slave.balls * (arcology.FSGenderRadicalist / 2000)); /* 46.25 */
 				} else if (slave.balls > 60) {
-					beauty += 30 + (slave.balls*(arcology.FSGenderRadicalist/1000)); /* 40 */
+					beauty += 30 + (slave.balls * (arcology.FSGenderRadicalist / 1000)); /* 40 */
 				} else if (slave.balls > 10) {
-					beauty += 15 + (slave.balls*(arcology.FSGenderRadicalist/400)); /* 30 */
+					beauty += 15 + (slave.balls * (arcology.FSGenderRadicalist / 400)); /* 30 */
 				} else {
-					beauty += slave.balls*(1 + (arcology.FSGenderRadicalist/200)); /* 15 */
+					beauty += slave.balls * (1 + (arcology.FSGenderRadicalist / 200)); /* 15 */
 				}
 			}
 		} else {
@@ -380,68 +396,75 @@ window.Beauty = (function() {
 				beauty -= slave.balls;
 			}
 		}
-		if (arcology.FSRestart !== "unset") { /* Eugenics does not like slaves having working balls */
+		if (arcology.FSRestart !== "unset") {
+			/* Eugenics does not like slaves having working balls */
 			if (slave.ballType === "human") {
-				beauty -= slave.balls*(1 + (arcology.FSRestart/100));
+				beauty -= slave.balls * (1 + (arcology.FSRestart / 100));
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcButtBeauty(slave) {
 		if (slave.butt <= 10) {
-			beauty += 1.5*slave.butt; /* max 15 */
+			beauty += 1.5 * slave.butt; /* max 15 */
 		} else {
-			beauty += 15 + (slave.butt/4); /* max 20 */
+			beauty += 15 + (slave.butt / 4); /* max 20 */
 		}
 		if ((arcology.FSTransformationFetishist > 20 && arcology.FSSlimnessEnthusiast === "unset") || arcology.FSAssetExpansionist > 20) {
 			if (slave.butt <= 2) {
-				beauty += 2*(slave.butt - 1); /* 2 */
+				beauty += 2 * (slave.butt - 1); /* 2 */
 			} else if (slave.butt <= 4) {
-				beauty += 2 + 1.5*(slave.butt - 2); /* 5 */
+				beauty += 2 + 1.5 * (slave.butt - 2); /* 5 */
 			} else if (slave.butt <= 10) {
-				beauty += 5 + 1*(slave.butt - 4); /* 11 */
+				beauty += 5 + 1 * (slave.butt - 4); /* 11 */
 			} else {
-				beauty += 7 + 0.5*(slave.butt - 5); /* 14.5 */
+				beauty += 7 + 0.5 * (slave.butt - 5); /* 14.5 */
 			} /* maybe buff butts? */
 		} else if (arcology.FSSlimnessEnthusiast > 20) {
 			if (slave.butt <= 3) {
-				beauty += 12 + 3*(slave.butt - 1); /* 18 buff if asses get buffed */
+				beauty += 12 + 3 * (slave.butt - 1); /* 18 buff if asses get buffed */
 			} else if (slave.butt <= 5) {
 				beauty += 9;
 			} else {
-				beauty -= 10 + 3*slave.butt; /* -70 */
+				beauty -= 10 + 3 * slave.butt; /* -70 */
 			}
 		} else {
 			if (slave.butt <= 2) {
-				beauty += 2*(slave.butt-1); /* 2 */
+				beauty += 2 * (slave.butt - 1); /* 2 */
 			} else if (slave.butt <= 4) {
-				beauty += 2 + (1.5*(slave.butt - 2)); /* 5 */
+				beauty += 2 + (1.5 * (slave.butt - 2)); /* 5 */
 			} else if (slave.butt <= 8) {
-				beauty += 2 + (1.5*(slave.butt - 2)); /* 11 */
+				beauty += 2 + (1.5 * (slave.butt - 2)); /* 11 */
 			} else {
 				beauty += 9;
 			}
 		}
-		if (arcology.FSTransformationFetishist > 20) { /* the cost of using AE's values */
+		if (arcology.FSTransformationFetishist > 20) {
+			/* the cost of using AE's values */
 			if (arcology.FSSlimnessEnthusiast !== "unset") {
 				if (slave.butt >= 3) {
-					if (slave.buttImplant/slave.butt < 0.25) {
-						beauty -= 2*(slave.butt - 1) + 10;
+					if (slave.buttImplant / slave.butt < 0.25) {
+						beauty -= 2 * (slave.butt - 1) + 10;
 					}
 				}
 			} else {
 				if (slave.butt >= 6) {
-					if (slave.buttImplant/slave.butt < 0.50) {
-						beauty -= (1.5*slave.butt) + 6; /* will get nasty at huge sizes */
+					if (slave.buttImplant / slave.butt < 0.50) {
+						beauty -= (1.5 * slave.butt) + 6; /* will get nasty at huge sizes */
 					}
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
-	function calcHipsBeauty(slave) { /* butts in general may need buffs */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
+	function calcHipsBeauty(slave) {
+		/* butts in general may need buffs */
 		switch (slave.hips) {
 			case -2:
 				if (slave.butt > 2) {
@@ -505,42 +528,43 @@ window.Beauty = (function() {
 					beauty += 1;
 				}
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcBoobsBeauty(slave) {
 		if ((arcology.FSTransformationFetishist > 20 && arcology.FSSlimnessEnthusiast === "unset") || arcology.FSAssetExpansionist > 20) {
 			if (slave.boobs <= 750) {
-				beauty += -4 + 0.01*(slave.boobs); /* 3.5 */
+				beauty += -4 + 0.01 * (slave.boobs); /* 3.5 */
 			} else if (slave.boobs <= 2050) {
-				beauty += 3.5 + 0.0175*(slave.boobs - 750); /* 26.25 */
+				beauty += 3.5 + 0.0175 * (slave.boobs - 750); /* 26.25 */
 			} else if (slave.boobs <= 3000) {
-				beauty += 26.25 + 0.025*(slave.boobs - 2050); /* 50 */
+				beauty += 26.25 + 0.025 * (slave.boobs - 2050); /* 50 */
 			} else if (slave.boobs <= 25000) {
-				beauty += 50 + 0.005*(slave.boobs - 3000); /* 160 - this might need to be lowered. Maybe drop the 50? Otherwise break it down more. */
+				beauty += 50 + 0.005 * (slave.boobs - 3000); /* 160 - this might need to be lowered. Maybe drop the 50? Otherwise break it down more. */
 			} else {
-				beauty += 160 + 0.001*(slave.boobs - 25000); /* 185 */
+				beauty += 160 + 0.001 * (slave.boobs - 25000); /* 185 */
 			}
 		} else if (arcology.FSSlimnessEnthusiast > 20) {
 			if (slave.boobs <= 500) {
-				beauty += 0.08*(slave.boobs); /* 40 - buff me to be in line with higher end asset exp */
+				beauty += 0.08 * (slave.boobs); /* 40 - buff me to be in line with higher end asset exp */
 			} else if (slave.boobs <= 1000) {
 				beauty += 10;
 			} else if (slave.boobs <= 3000) {
 				beauty += 5;
 			} else {
-				beauty -= 5 + 0.005*(slave.boobs - 3000); /* -110 */
+				beauty -= 5 + 0.005 * (slave.boobs - 3000); /* -110 */
 			}
 		} else {
 			if (slave.boobs <= 1200) {
-				beauty += 0.02*(slave.boobs - 200); /* 20 */
+				beauty += 0.02 * (slave.boobs - 200); /* 20 */
 			} else if (slave.boobs <= 2400) {
-				beauty += 20 + (0.01*(slave.boobs - 1200)); /* 32 */
+				beauty += 20 + (0.01 * (slave.boobs - 1200)); /* 32 */
 			} else if (slave.boobs <= 3600) {
-				beauty += 32 + (0.005*(slave.boobs - 2400)); /* 38 */
+				beauty += 32 + (0.005 * (slave.boobs - 2400)); /* 38 */
 			} else if (slave.boobs <= 10000) {
 				beauty += 38;
 			} else if (slave.boobs <= 25000) {
@@ -549,44 +573,45 @@ window.Beauty = (function() {
 				beauty += 20;
 			}
 		}
-		if (arcology.FSTransformationFetishist > 20) { /* the cost of using AE's values */
+		if (arcology.FSTransformationFetishist > 20) {
+			/* the cost of using AE's values */
 			if (arcology.FSSlimnessEnthusiast !== "unset") {
 				if (slave.boobs >= 400) {
 					if (slave.boobs >= 10000) {
-						if (slave.boobsImplant/slave.boobs < 0.75) {
-							beauty -= (0.05*slave.boobs) + 10;
+						if (slave.boobsImplant / slave.boobs < 0.75) {
+							beauty -= (0.05 * slave.boobs) + 10;
 						}
 					} else if (slave.boobs >= 2000) {
-						if (slave.boobsImplant/slave.boobs < 0.50) {
-							beauty -= (0.05*slave.boobs) + 10;
+						if (slave.boobsImplant / slave.boobs < 0.50) {
+							beauty -= (0.05 * slave.boobs) + 10;
 						}
 					} else if (slave.boobs >= 1000) {
-						if (slave.boobsImplant/slave.boobs < 0.25) {
-							beauty -= (0.05*slave.boobs) + 10;
+						if (slave.boobsImplant / slave.boobs < 0.25) {
+							beauty -= (0.05 * slave.boobs) + 10;
 						}
 					} else {
-						if (slave.boobsImplant/slave.boobs < 0.10) {
-							beauty -= (0.05*slave.boobs) + 10;
+						if (slave.boobsImplant / slave.boobs < 0.10) {
+							beauty -= (0.05 * slave.boobs) + 10;
 						}
 					}
 				}
 			} else {
 				if (slave.boobs >= 600) {
 					if (slave.boobs >= 10000) {
-						if (slave.boobsImplant/slave.boobs < 0.75) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
+						if (slave.boobsImplant / slave.boobs < 0.75) {
+							beauty -= 30 + (0.005 * slave.boobs); /* will get nasty at huge sizes */
 						}
 					} else if (slave.boobs >= 2000) {
-						if (slave.boobsImplant/slave.boobs < 0.50) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
+						if (slave.boobsImplant / slave.boobs < 0.50) {
+							beauty -= 30 + (0.005 * slave.boobs); /* will get nasty at huge sizes */
 						}
 					} else if (slave.boobs >= 1000) {
-						if (slave.boobsImplant/slave.boobs < 0.25) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
+						if (slave.boobsImplant / slave.boobs < 0.25) {
+							beauty -= 30 + (0.005 * slave.boobs); /* will get nasty at huge sizes */
 						}
 					} else {
-						if (slave.boobsImplant/slave.boobs < 0.10) {
-							beauty -= 30 + (0.005*slave.boobs); /* will get nasty at huge sizes */
+						if (slave.boobsImplant / slave.boobs < 0.10) {
+							beauty -= 30 + (0.005 * slave.boobs); /* will get nasty at huge sizes */
 						}
 					}
 				}
@@ -613,97 +638,103 @@ window.Beauty = (function() {
 			beauty -= 2;
 		} else if (slave.nipples === "fuckable") {
 			if (arcology.FSTransformationFetishist !== "unset") {
-				beauty += arcology.FSTransformationFetishist/10;
+				beauty += arcology.FSTransformationFetishist / 10;
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcWeightBeauty(slave) {
 		if (arcology.FSHedonisticDecadence > 20) {
 			if (slave.weight < -95) {
-				beauty += -70 + (slave.weight/10); /* -80 */
+				beauty += -70 + (slave.weight / 10); /* -80 */
 			} else if (slave.weight < -30) {
-				beauty += -30 + (slave.weight/3); /* -61 */
+				beauty += -30 + (slave.weight / 3); /* -61 */
 			} else if (slave.weight < -10) {
 				beauty += (slave.weight); /* -30 */
 			} else if (slave.weight <= 10) {
 				/* no effect */
 			} else if (slave.weight <= 30) {
-				beauty += (slave.weight/2); /* 15 */
+				beauty += (slave.weight / 2); /* 15 */
 			} else if (slave.weight <= 95) {
-				beauty += 15 + (slave.weight/7); /* 28.5 */
+				beauty += 15 + (slave.weight / 7); /* 28.5 */
 			} else if (slave.weight <= 130) {
-				beauty += 28 + (slave.weight/10); /* 41 */
+				beauty += 28 + (slave.weight / 10); /* 41 */
 			} else if (slave.weight <= 160) {
-				beauty += 42 + (slave.weight/20); /* 50 */
+				beauty += 42 + (slave.weight / 20); /* 50 */
 			} else if (slave.weight <= 190) {
-				beauty += 50 - (slave.weight/25); /* 42.5 */
+				beauty += 50 - (slave.weight / 25); /* 42.5 */
 			} else {
-				beauty += 40 - (slave.weight/20); /* 30 */
+				beauty += 40 - (slave.weight / 20); /* 30 */
 			}
 		} else {
 			if (slave.weight > 130) {
-				beauty -= Math.abs(slave.weight)/5;
+				beauty -= Math.abs(slave.weight) / 5;
 			} else if (slave.hips === 3) {
 				if (slave.weight < -10) {
-					beauty -= Math.abs(slave.weight)/10;
+					beauty -= Math.abs(slave.weight) / 10;
 				}
 			} else if (slave.hips === 2) {
 				if (slave.weight > 95) {
-					beauty -= Math.abs(slave.weight)/15;
+					beauty -= Math.abs(slave.weight) / 15;
 				} else if (slave.weight < -30) {
-					beauty -= Math.abs(slave.weight)/10;
+					beauty -= Math.abs(slave.weight) / 10;
 				}
 			} else if (slave.hips === -2) {
 				if (slave.weight < -95 || slave.weight > 30) {
-					beauty -= Math.abs(slave.weight)/10;
+					beauty -= Math.abs(slave.weight) / 10;
 				}
 			} else {
 				if (Math.abs(slave.weight) > 30) {
-					beauty -= Math.abs(slave.weight)/10;
+					beauty -= Math.abs(slave.weight) / 10;
 				}
 			}
 		}
 		if (arcology.FSPhysicalIdealist !== "unset") {
 			if (arcology.FSPhysicalIdealistStrongFat === 1) {
 				if (slave.weight > 10 && slave.weight <= 130) {
-					beauty += slave.weight*(arcology.FSPhysicalIdealist/200); /* 65 */
+					beauty += slave.weight * (arcology.FSPhysicalIdealist / 200); /* 65 */
 				} else {
-					beauty -= Math.abs(slave.weight)/2;
+					beauty -= Math.abs(slave.weight) / 2;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcMusclesBeauty(slave) {
 		if (arcology.FSPhysicalIdealist !== "unset") {
 			if (arcology.FSPhysicalIdealistLaw === 1) {
 				if (Math.abs(slave.weight) <= 30 && slave.health >= 20 && slave.muscles >= 20 && slave.muscles <= 50) {
-					beauty += (slave.muscles + (Math.min(slave.health, 300)/5))*(arcology.FSPhysicalIdealist/100);
+					beauty += (slave.muscles + (Math.min(slave.health, 300) / 5)) * (arcology.FSPhysicalIdealist / 100);
 				} else {
 					beauty -= 30;
 				}
 			} else {
 				if (slave.muscles > 30 || slave.muscles <= -5) {
-					beauty += slave.muscles*(arcology.FSPhysicalIdealist/120); /* +-83 */
+					beauty += slave.muscles * (arcology.FSPhysicalIdealist / 120); /* +-83 */
 				}
 			}
 		} else if (arcology.FSHedonisticDecadence !== "unset") {
 			if (slave.muscles < -10) {
-				beauty += Math.abs(slave.muscles)*(arcology.FSHedonisticDecadence/160); /* 62.5 */
+				beauty += Math.abs(slave.muscles) * (arcology.FSHedonisticDecadence / 160); /* 62.5 */
 			} else if (slave.muscles > 5) {
 				if (arcology.FSHedonisticDecadenceStrongFat === 1) {
-					beauty += slave.muscles*(arcology.FSHedonisticDecadence/200); /* 50 */
+					beauty += slave.muscles * (arcology.FSHedonisticDecadence / 200); /* 50 */
 				} else {
-					beauty -= slave.muscles*(arcology.FSHedonisticDecadence/200); /* -50 */
+					beauty -= slave.muscles * (arcology.FSHedonisticDecadence / 200); /* -50 */
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcBodyHairBeauty(slave) {
 		if (slave.physicalAge < 11) {
 			beauty += 4;
@@ -722,8 +753,7 @@ window.Beauty = (function() {
 						beauty -= 2;
 					}
 					break;
-				default:
-					break;
+
 			}
 			switch (slave.pubicHStyle) {
 				case "hairless":
@@ -752,159 +782,174 @@ window.Beauty = (function() {
 						beauty -= 6;
 					}
 					break;
-				default:
-					break;
+
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcImplantBeauty(slave) {
 		if (arcology.FSTransformationFetishist !== "unset") {
 			if (Math.abs(slave.shouldersImplant) > 1) {
-				beauty += (arcology.FSTransformationFetishist/20) + Math.abs(slave.shouldersImplant);
+				beauty += (arcology.FSTransformationFetishist / 20) + Math.abs(slave.shouldersImplant);
 			}
 			if (Math.abs(slave.hipsImplant) > 1) {
-				beauty += (arcology.FSTransformationFetishist/20) + Math.abs(slave.hipsImplant);
+				beauty += (arcology.FSTransformationFetishist / 20) + Math.abs(slave.hipsImplant);
 			}
 			if (slave.race !== slave.origRace) {
-				beauty += arcology.FSTransformationFetishist/20;
+				beauty += arcology.FSTransformationFetishist / 20;
 			}
 			if (slave.faceImplant > 95 && slave.face > 40) {
-				beauty += arcology.FSTransformationFetishist/4;
+				beauty += arcology.FSTransformationFetishist / 4;
 			}
 		} else if (arcology.FSBodyPurist !== "unset") {
 			if (slave.faceImplant > 5) {
-				beauty -= (arcology.FSBodyPurist/100)*(slave.faceImplant/10);
+				beauty -= (arcology.FSBodyPurist / 100) * (slave.faceImplant / 10);
 			}
 			if (slave.race !== slave.origRace) {
-				beauty -= arcology.FSBodyPurist/5;
+				beauty -= arcology.FSBodyPurist / 5;
 			}
 		} else {
 			if (slave.faceImplant > 30) {
-				beauty -= (slave.faceImplant - 30)/10;
+				beauty -= (slave.faceImplant - 30) / 10;
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcRepopulationPregBeauty(slave) {
-		if (slave.preg > slave.pregData.normalBirth/1.33) { /* limited huge boost for full term */
+		if (slave.preg > slave.pregData.normalBirth / 1.33) {
+			/* limited huge boost for full term */
 			if (slave.broodmother > 0) {
-				beauty += 0.4*(slave.broodmother*arcology.FSRepopulationFocus); /* 40-80 limited due to constant presence. Also good breeders, but subpar mothers */
+				beauty += 0.4 * (slave.broodmother * arcology.FSRepopulationFocus); /* 40-80 limited due to constant presence. Also good breeders, but subpar mothers */
 			} else if (slave.bellyPreg >= 600000) {
-				beauty += 1.5*arcology.FSRepopulationFocus; /* 150 */
+				beauty += 1.5 * arcology.FSRepopulationFocus; /* 150 */
 			} else if (slave.bellyPreg >= 300000) {
 				beauty += arcology.FSRepopulationFocus; /* 100 */
 			} else if (slave.bellyPreg >= 120000) {
-				beauty += 0.9*arcology.FSRepopulationFocus; /* 90 */
+				beauty += 0.9 * arcology.FSRepopulationFocus; /* 90 */
 			} else {
-				beauty += 0.8*arcology.FSRepopulationFocus; /* 80 */
+				beauty += 0.8 * arcology.FSRepopulationFocus; /* 80 */
 			}
-		} else if (slave.preg > slave.pregData.normalBirth/2) {
+		} else if (slave.preg > slave.pregData.normalBirth / 2) {
 			if (slave.pregType >= 20) {
-				beauty += 10*(arcology.FSRepopulationFocus/40); /* 25 */
+				beauty += 10 * (arcology.FSRepopulationFocus / 40); /* 25 */
 			} else if (slave.pregType >= 10) {
-				beauty += 9*(arcology.FSRepopulationFocus/40); /* 22.5 */
+				beauty += 9 * (arcology.FSRepopulationFocus / 40); /* 22.5 */
 			} else {
-				beauty += 8*(arcology.FSRepopulationFocus/40); /* 20 */
+				beauty += 8 * (arcology.FSRepopulationFocus / 40); /* 20 */
 			}
-		} else if (slave.preg > slave.pregData.normalBirth/4) {
+		} else if (slave.preg > slave.pregData.normalBirth / 4) {
 			if (slave.pregType >= 20) {
-				beauty += arcology.FSRepopulationFocus/5; /* 20 */
+				beauty += arcology.FSRepopulationFocus / 5; /* 20 */
 			} else if (slave.pregType >= 10) {
-				beauty += arcology.FSRepopulationFocus/6.25; /* 16 */
+				beauty += arcology.FSRepopulationFocus / 6.25; /* 16 */
 			} else {
-				beauty += arcology.FSRepopulationFocus/10; /* 10 */
+				beauty += arcology.FSRepopulationFocus / 10; /* 10 */
 			}
 		} else if (slave.pregWeek < 0) {
-			beauty += arcology.FSRepopulationFocus/10; /* 10 */
+			beauty += arcology.FSRepopulationFocus / 10; /* 10 */
 		} else if (slave.preg > 0 && slave.collar === "preg biometrics") {
-			beauty += arcology.FSRepopulationFocus/12; /* 8.33 */
+			beauty += arcology.FSRepopulationFocus / 12; /* 8.33 */
 		} else {
-			beauty -= arcology.FSRepopulationFocus/2.5; /* -40 */
+			beauty -= arcology.FSRepopulationFocus / 2.5; /* -40 */
 		}
 		if (slave.counter.births > 50) {
-			beauty += arcology.FSRepopulationFocus/1.5; /* 66.6 */
+			beauty += arcology.FSRepopulationFocus / 1.5; /* 66.6 */
 		} else {
-			beauty += slave.counter.births*(arcology.FSRepopulationFocus/75);
+			beauty += slave.counter.births * (arcology.FSRepopulationFocus / 75);
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcTrendyPregBeauty(slave) {
-		if (slave.preg > slave.pregData.normalBirth/1.33) { /* limited huge boost for full term */
+		if (slave.preg > slave.pregData.normalBirth / 1.33) {
+			/* limited huge boost for full term */
 			beauty += 20;
 		} else if (slave.bellyPreg >= 1500) {
 			beauty += 10;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcRestartPregBeauty(slave) {
 		if (slave.breedingMark === 1 && V.propOutcome === 1) {
-			if (slave.preg > slave.pregData.normalBirth/8 && slave.pregSource === -1) {
+			if (slave.preg > slave.pregData.normalBirth / 8 && slave.pregSource === -1) {
 				beauty += arcology.FSRestart; /* 100 */
 			}
 		} else {
-			if (slave.preg > slave.pregData.normalBirth/1.33) {
+			if (slave.preg > slave.pregData.normalBirth / 1.33) {
 				if (slave.bellyPreg >= 600000) {
-					beauty -= 2.5*arcology.FSRestart; /* -250 */
+					beauty -= 2.5 * arcology.FSRestart; /* -250 */
 				} else if (slave.bellyPreg >= 300000) {
-					beauty -= 1.25*arcology.FSRestart; /* -125 */
+					beauty -= 1.25 * arcology.FSRestart; /* -125 */
 				} else if (slave.bellyPreg >= 120000) {
 					beauty -= arcology.FSRestart; /* -100 */
 				} else {
-					beauty -= 0.75*arcology.FSRestart; /* -75 */
+					beauty -= 0.75 * arcology.FSRestart; /* -75 */
 				}
-			} else if (slave.preg > slave.pregData.normalBirth/2) {
+			} else if (slave.preg > slave.pregData.normalBirth / 2) {
 				if (slave.pregType >= 20) {
-					beauty -= arcology.FSRestart/1.5; /* -66.6 */
+					beauty -= arcology.FSRestart / 1.5; /* -66.6 */
 				} else if (slave.pregType >= 10) {
-					beauty -= arcology.FSRestart/2; /* -50 */
+					beauty -= arcology.FSRestart / 2; /* -50 */
 				} else {
-					beauty -= arcology.FSRestart/3; /* -33.3 */
+					beauty -= arcology.FSRestart / 3; /* -33.3 */
 				}
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
+			} else if (slave.preg > slave.pregData.normalBirth / 4) {
 				if (slave.pregType >= 20) {
-					beauty -= 3*(arcology.FSRestart/8); /* -37.5 */
+					beauty -= 3 * (arcology.FSRestart / 8); /* -37.5 */
 				} else if (slave.pregType >= 10) {
-					beauty -= arcology.FSRestart/4; /* -25 */
+					beauty -= arcology.FSRestart / 4; /* -25 */
 				} else {
-					beauty -= arcology.FSRestart/8; /* -12.5 */
+					beauty -= arcology.FSRestart / 8; /* -12.5 */
 				}
 			} else if (slave.preg === -2) {
-				beauty += arcology.FSRestart/7; /* 14.2 */
+				beauty += arcology.FSRestart / 7; /* 14.2 */
 			} else if (slave.preg < 1) {
-				beauty += arcology.FSRestart/5; /* 20 */
+				beauty += arcology.FSRestart / 5; /* 20 */
 			}
 			if (slave.counter.births > 50) {
 				beauty -= arcology.FSRestart; /* -100 */
 			} else {
-				beauty -= slave.counter.births*(arcology.FSRestart/50);
+				beauty -= slave.counter.births * (arcology.FSRestart / 50);
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcTrendyMilfBeauty(slave) {
 		if (slave.counter.births > 50) {
 			beauty += 6;
 		} else {
-			beauty += Math.ceil(slave.counter.births/10);
+			beauty += Math.ceil(slave.counter.births / 10);
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFutaLawBeauty(slave) {
 		switch (arcology.FSGenderRadicalistLawFuta) {
 			case 1:
-				if (slave.dick > 0 && slave.vagina > -1) { /* herms */
+				if (slave.dick > 0 && slave.vagina > -1) {
+					/* herms */
 					calcFutaLawTrueFutaBeauty(slave);
 				}
 				break;
 			case 2:
-				if (canAchieveErection(slave) && slave.balls > 0 && slave.scrotum > 0) { /* erection! */
+				if (canAchieveErection(slave) && slave.balls > 0 && slave.scrotum > 0) {
+					/* erection! */
 					calcFutaLawBigDickBeauty(slave);
 				}
 				break;
@@ -918,12 +963,13 @@ window.Beauty = (function() {
 					}
 				}
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFutaLawTrueFutaBeauty(slave) {
 		if (slave.dick <= 10) {
 			beauty += slave.dick;
@@ -934,7 +980,9 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFutaLawBigDickBeauty(slave) {
 		beauty += slave.dick;
 		if (slave.balls > 120) {
@@ -956,18 +1004,20 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFutaLawBigBootyBeauty(slave) {
 		if (slave.hips >= 1) {
-			beauty += 4*(slave.hips - 1); /* 8 */
+			beauty += 4 * (slave.hips - 1); /* 8 */
 			if (arcology.FSSlimnessEnthusiast !== "unset") {
-				beauty += 4*(slave.hips - 1); /* 8 */ /* offsets the malus for big butts */
+				beauty += 4 * (slave.hips - 1); /* 8 */ /* offsets the malus for big butts */
 			}
 		}
 		if (slave.skill.anal > 60 && slave.anus >= 2) {
-			beauty += 2*(slave.anus-2); /* 6 */
+			beauty += 2 * (slave.anus - 2); /* 6 */
 			if (arcology.FSSlimnessEnthusiast !== "unset") {
-				beauty += 2*(slave.anus-2); /* 6 */ /* offsets the malus for big butts */
+				beauty += 2 * (slave.anus - 2); /* 6 */ /* offsets the malus for big butts */
 			}
 		}
 		if (slave.butt >= 5) {
@@ -975,9 +1025,12 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFutaLawFemboyBeauty(slave) {
-		if (arcology.FSSlimnessEnthusiast === "unset") { /* balance with slimness */
+		if (arcology.FSSlimnessEnthusiast === "unset") {
+			/* balance with slimness */
 			beauty += 20;
 			if (slave.boobs < 300) {
 				beauty += 12;
@@ -993,8 +1046,9 @@ window.Beauty = (function() {
 		if (slave.balls <= 2) {
 			beauty += 8;
 		}
-		if (slave.faceShape === "cute" && slave.face > 0) { /* uggos need not apply, maybe a small boost for other faceShapes */
-			beauty += ((arcology.FSGenderRadicalist/25)*(slave.face/30)) - 2; /* gives a slightly better boost than androgynous does with gendrad boost, 15.3 */
+		if (slave.faceShape === "cute" && slave.face > 0) {
+			/* uggos need not apply, maybe a small boost for other faceShapes */
+			beauty += ((arcology.FSGenderRadicalist / 25) * (slave.face / 30)) - 2; /* gives a slightly better boost than androgynous does with gendrad boost, 15.3 */
 		}
 		if (slave.nipples === "tiny") {
 			beauty += 5;
@@ -1005,24 +1059,28 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcBodyProportionBeauty(slave) {
 		if (arcology.FSGenderFundamentalist !== "unset") {
 			if (slave.shoulders > slave.hips) {
-				if (slave.boobs <= 2000*(slave.shoulders - slave.hips)) {
-					beauty -= (slave.shoulders - slave.hips)*(1 + (arcology.FSGenderFundamentalist/200));
+				if (slave.boobs <= 2000 * (slave.shoulders - slave.hips)) {
+					beauty -= (slave.shoulders - slave.hips) * (1 + (arcology.FSGenderFundamentalist / 200));
 				}
 			}
 		} else if (arcology.FSGenderRadicalist === "unset") {
 			if (slave.shoulders > slave.hips) {
-				if (slave.boobs <= 2000*(slave.shoulders - slave.hips)) {
+				if (slave.boobs <= 2000 * (slave.shoulders - slave.hips)) {
 					beauty -= slave.shoulders - slave.hips;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcVoiceBeauty(slave) {
 		if (canTalk(slave)) {
 			if (slave.accent >= 3) {
@@ -1035,7 +1093,9 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcLimbsBeauty(slave) {
 		switch (slave.amp) {
 			case 1:
@@ -1046,12 +1106,13 @@ window.Beauty = (function() {
 			case -4:
 				beauty -= 2;
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPubertyBeauty(slave) {
 		if (slave.pubertyXX === 1) {
 			beauty += 5;
@@ -1064,12 +1125,14 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFSMiscBeauty(slave) {
 		if (arcology.FSTransformationFetishist > 20) {
 			if (slave.lips > 70) {
-				if (slave.lipsImplant/slave.lips < 0.5) {
-					beauty -= ((slave.lips/10) + (arcology.FSTransformationFetishist/20));
+				if (slave.lipsImplant / slave.lips < 0.5) {
+					beauty -= ((slave.lips / 10) + (arcology.FSTransformationFetishist / 20));
 				}
 			}
 			if (slave.hips === 3) {
@@ -1091,14 +1154,14 @@ window.Beauty = (function() {
 		}
 		if (arcology.FSHedonisticDecadenceLaw2 === 1) {
 			if (slave.boobs >= 2000 && slave.butt >= 5 && slave.weight > 95) {
-				beauty += 5 + (arcology.FSHedonisticDecadence/20); /* 10 */
+				beauty += 5 + (arcology.FSHedonisticDecadence / 20); /* 10 */
 			} else {
-				beauty -= 15 + (arcology.FSHedonisticDecadence/20); /* -20 */
+				beauty -= 15 + (arcology.FSHedonisticDecadence / 20); /* -20 */
 			}
 		}
 		if (arcology.FSChattelReligionistCreed === 1) {
 			if (V.nicaeaAssignment === slave.assignment) {
-				beauty += 2*V.nicaeaPower;
+				beauty += 2 * V.nicaeaPower;
 			}
 		}
 		if (arcology.FSChattelReligionist > 40 && arcology.FSBodyPurist === "unset") {
@@ -1115,36 +1178,44 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPurityBeauty(slave) {
 		if (isPure(slave)) {
 			V.pure = V.pure++ || 1;
 			if (arcology.FSBodyPurist !== "unset") {
-				beauty += arcology.FSBodyPurist/5;
+				beauty += arcology.FSBodyPurist / 5;
 			}
 			if (arcology.FSTransformationFetishist === "unset") {
 				beauty += 2;
 			}
 		} else if (arcology.FSTransformationFetishist !== "unset") {
-			beauty += arcology.FSTransformationFetishist/40;
+			beauty += arcology.FSTransformationFetishist / 40;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPhysiqueBeauty(slave) {
 		let physiquePass = 0;
 
 		if (slave.boobs < 500 && slave.butt < 3) {
 			if (slave.muscles <= 30 && arcology.FSPhysicalIdealist === "unset" && slave.weight <= 10 && arcology.FSHedonisticDecadence === "unset") {
 				physiquePass = 1;
-			} else if (arcology.FSPhysicalIdealist !== "unset") { /* no muscle malus for muscle loving societies */
-				if (arcology.FSPhysicalIdealistStrongFat === 1 && slave.weight <= 30) { /* reduced weight malus for fat loving societies */
+			} else if (arcology.FSPhysicalIdealist !== "unset") {
+				/* no muscle malus for muscle loving societies */
+				if (arcology.FSPhysicalIdealistStrongFat === 1 && slave.weight <= 30) {
+					/* reduced weight malus for fat loving societies */
 					physiquePass = 1;
 				} else if (slave.weight <= 10) {
 					physiquePass = 1;
 				}
-			} else if (arcology.FSHedonisticDecadence !== "unset" && slave.weight <= 30) { /* reduced weight malus for fat loving societies */
-				if (arcology.FSHedonisticDecadenceStrongFat === 1) { /* no muscle malus for muscle loving societies */
+			} else if (arcology.FSHedonisticDecadence !== "unset" && slave.weight <= 30) {
+				/* reduced weight malus for fat loving societies */
+				if (arcology.FSHedonisticDecadenceStrongFat === 1) {
+					/* no muscle malus for muscle loving societies */
 					physiquePass = 1;
 				} else if (slave.muscles <= 30) {
 					physiquePass = 1;
@@ -1154,9 +1225,9 @@ window.Beauty = (function() {
 		if (physiquePass === 1) {
 			beauty += 40;
 			if (arcology.FSSlimnessEnthusiast > 20) {
-				beauty += arcology.FSSlimnessEnthusiast/20;
+				beauty += arcology.FSSlimnessEnthusiast / 20;
 				if (canTalk(slave) && slave.voice === 3) {
-					beauty += arcology.FSSlimnessEnthusiast/40;
+					beauty += arcology.FSSlimnessEnthusiast / 40;
 				}
 			}
 		} else if (isStacked(slave)) {
@@ -1164,31 +1235,37 @@ window.Beauty = (function() {
 				beauty += 1;
 			}
 			if (arcology.FSAssetExpansionist > 20) {
-				beauty += arcology.FSAssetExpansionist/20;
+				beauty += arcology.FSAssetExpansionist / 20;
 				if (canTalk(slave) && slave.voice === 3) {
-					beauty += arcology.FSAssetExpansionist/40;
+					beauty += arcology.FSAssetExpansionist / 40;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcSlimBeauty(slave) {
 		if (slimPass(slave) === 1) {
-			beauty += 40 + (arcology.FSSlimnessEnthusiast/20); /* 45 */
+			beauty += 40 + (arcology.FSSlimnessEnthusiast / 20); /* 45 */
 		} else {
-			beauty -= arcology.FSSlimnessEnthusiast/20;
+			beauty -= arcology.FSSlimnessEnthusiast / 20;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcGenderLawBeauty(slave) {
 		V.genderLawPass = 1;
 
-		if (arcology.FSPhysicalIdealist === "unset" && arcology.FSHedonisticDecadenceStrongFat === 0 && slave.muscles > 30) { /* muscle check */
+		if (arcology.FSPhysicalIdealist === "unset" && arcology.FSHedonisticDecadenceStrongFat === 0 && slave.muscles > 30) {
+			/* muscle check */
 			V.genderLawPass = 0;
 		}
-		if (arcology.FSHedonisticDecadence !== "unset" || arcology.FSPhysicalIdealistStrongFat === 1) { /* weight check */
+		if (arcology.FSHedonisticDecadence !== "unset" || arcology.FSPhysicalIdealistStrongFat === 1) {
+			/* weight check */
 			if (slave.weight > 130 || slave.weight <= -30) {
 				V.genderLawPass = 0;
 			}
@@ -1209,15 +1286,17 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcMultipliersBeauty(slave) {
 		calcBellyBeauty(slave);
 		if (slave.geneticQuirks.albinism === 2) {
-			beauty += 0.1*beauty;
+			beauty += 0.1 * beauty;
 		}
 		if (slave.breedingMark === 1) {
 			if (V.propOutcome === 1) {
-				beauty = 2*beauty;
+				beauty = 2 * beauty;
 			} else {
 				beauty += 2;
 			}
@@ -1230,7 +1309,9 @@ window.Beauty = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcBellyBeauty(slave) {
 		if (slave.bellySag > 0) {
 			if (slave.belly < 100) {
@@ -1241,86 +1322,92 @@ window.Beauty = (function() {
 		}
 		if (slave.bellyPreg >= 500 && arcology.FSRepopulationFocus === "unset" && arcology.FSRestart === "unset") {
 			if (arcology.FSRepopulationFocusPregPolicy === 1) {
-				beauty = 0.9*beauty;
+				beauty = 0.9 * beauty;
 			} else if (arcology.FSGenderRadicalist !== "unset") {
 				if (slave.mpreg === 1) {
-					beauty = 0.9*beauty;
+					beauty = 0.9 * beauty;
 				} else {
-					beauty = 0.7*beauty;
+					beauty = 0.7 * beauty;
 				}
 			} else if (arcology.FSGenderFundamentalist === "unset") {
-				beauty = 0.8*beauty;
+				beauty = 0.8 * beauty;
 			} else {
-				beauty = 0.7*beauty;
+				beauty = 0.7 * beauty;
 			}
 		}
 		if (slave.bellyImplant >= 1500) {
 			if (arcology.FSTransformationFetishist > 20) {
-				beauty += Math.min(Math.trunc(slave.bellyImplant/1000), 50); /* 50 */
+				beauty += Math.min(Math.trunc(slave.bellyImplant / 1000), 50); /* 50 */
 			} else if (arcology.FSRepopulationFocus > 60) {
 				if ((slave.ovaries === 0 && slave.mpreg === 0) || slave.preg < -1) {
 					beauty += 20;
 				}
 			} else {
-				if (slave.bellyImplant >= 750000) { /* multipliers */
-					beauty = 0.2*beauty;
+				if (slave.bellyImplant >= 750000) {
+					/* multipliers */
+					beauty = 0.2 * beauty;
 				} else if (slave.bellyImplant >= 450000) {
-					beauty = 0.5*beauty;
+					beauty = 0.5 * beauty;
 				} else if (slave.bellyImplant >= 300000) {
-					beauty = 0.7*beauty;
+					beauty = 0.7 * beauty;
 				} else if (slave.bellyImplant >= 100000) {
-					beauty = 0.8*beauty;
+					beauty = 0.8 * beauty;
 				} else if (slave.bellyImplant >= 50000) {
-					beauty = 0.85*beauty;
+					beauty = 0.85 * beauty;
 				} else {
-					beauty = 0.9*beauty;
+					beauty = 0.9 * beauty;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcAgeBeauty(slave) {
 		if (slave.physicalAge === V.minimumSlaveAge) {
 			beauty += 1;
 			if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
 				if (slave.birthWeek === 0) {
-					beauty += 1.6*beauty;
+					beauty += 1.6 * beauty;
 				} else if (slave.birthWeek < 4) {
-					beauty += 0.2*beauty;
+					beauty += 0.2 * beauty;
 				}
 			} else {
 				if (slave.birthWeek === 0) {
-					beauty += 0.8*beauty;
+					beauty += 0.8 * beauty;
 				} else if (slave.birthWeek < 4) {
-					beauty += 0.1*beauty;
+					beauty += 0.1 * beauty;
 				}
 			}
 		} else if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset") && arcology.FSRestart === "unset") {
 			beauty += 1;
 			if (slave.birthWeek === 0) {
-				beauty += 0.8*beauty;
+				beauty += 0.8 * beauty;
 			} else if (slave.birthWeek < 4) {
-				beauty += 0.1*beauty;
+				beauty += 0.1 * beauty;
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
-	function calcPrestigeBeauty(slave) { /* multipliers */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
+	function calcPrestigeBeauty(slave) {
+		/* multipliers */
 		if (slave.prestige >= 3) {
-			beauty += 2*beauty;
+			beauty += 2 * beauty;
 		} else if (slave.prestige === 2) {
-			beauty += 0.5*beauty;
+			beauty += 0.5 * beauty;
 		} else if (slave.prestige === 1) {
-			beauty += 0.25*beauty;
+			beauty += 0.25 * beauty;
 		}
 		if (slave.pornPrestige === 3) {
 			beauty += beauty;
 		} else if (slave.pornPrestige === 2) {
-			beauty += 0.5*beauty;
+			beauty += 0.5 * beauty;
 		} else if (slave.pornPrestige === 1) {
-			beauty += 0.1*beauty;
+			beauty += 0.1 * beauty;
 		}
 	}
 
@@ -1352,13 +1439,13 @@ window.FResult = (function() {
 		if (!slave.fuckdoll) {
 			calcNotFuckdoll(slave);
 		} else {
-			result += slave.fuckdoll/10;
+			result += slave.fuckdoll / 10;
 		}
 
 		result += Math.max(0, slave.aphrodisiacs) * 2;
 
 		if (slave.inflationType === "aphrodisiac") {
-			result += slave.inflation*4;
+			result += slave.inflation * 4;
 		}
 
 		if (slave.lactation > 0) {
@@ -1373,13 +1460,13 @@ window.FResult = (function() {
 			calcAge(slave);
 		}
 		if (slave.fetish === "mindbroken") {
-			result = Math.trunc(result*0.4);
+			result = Math.trunc(result * 0.4);
 		} else {
-			result = Math.trunc(result*0.7);
+			result = Math.trunc(result * 0.7);
 		}
 
 		if (slave.pregWeek < 0) {
-			result -= Math.trunc(result*slave.pregWeek/10);
+			result -= Math.trunc(result * slave.pregWeek / 10);
 		} // reduced the most just after birth
 
 		calcAmputation(slave);
@@ -1397,9 +1484,11 @@ window.FResult = (function() {
 		return result;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcUseWeights(slave) {
-		result = (3 - slave.anus)+(slave.muscles/30);
+		result = (3 - slave.anus) + (slave.muscles / 30);
 		if (slave.muscles < -95) {
 			result -= 5;
 		} else if (slave.muscles < -30) {
@@ -1409,35 +1498,39 @@ window.FResult = (function() {
 		const uses = V.oralUseWeight + V.vaginalUseWeight + V.analUseWeight;
 		if (uses <= 0) return;
 
-		result += (6+slave.tonguePiercing) * (V.oralUseWeight/uses) * (slave.skill.oral/30);
+		result += (6 + slave.tonguePiercing) * (V.oralUseWeight / uses) * (slave.skill.oral / 30);
 		if (slave.sexualFlaw === "cum addict") {
-			result += (V.oralUseWeight/uses) * (slave.skill.oral/30);
+			result += (V.oralUseWeight / uses) * (slave.skill.oral / 30);
 		}
 		if (canDoVaginal(slave)) {
-			result += 6 * (V.vaginalUseWeight/uses) * (slave.skill.vaginal/30);
+			result += 6 * (V.vaginalUseWeight / uses) * (slave.skill.vaginal / 30);
 			result += (3 - slave.vagina);
 			result += slave.vaginaLube;
 		}
 		if (canDoAnal(slave)) {
-			result += 6 * (V.analUseWeight/uses) * (slave.skill.anal/30);
+			result += 6 * (V.analUseWeight / uses) * (slave.skill.anal / 30);
 			if (slave.sexualFlaw === "anal addict") {
-				result += (V.analUseWeight/uses) * (slave.skill.anal/30);
+				result += (V.analUseWeight / uses) * (slave.skill.anal / 30);
 			}
 			if (slave.inflationType === "aphrodisiac") {
-				result += (V.analUseWeight/uses) * (slave.inflation * 3);
+				result += (V.analUseWeight / uses) * (slave.inflation * 3);
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFuckableTits(slave) {
 		result += 2;
 		if (slave.fetish === "boobs") {
-			result += Math.trunc(slave.fetishStrength/20);
+			result += Math.trunc(slave.fetishStrength / 20);
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcWorksWithRelatives(slave) {
 		V.slaves.forEach(islave => {
 			if (isParentP(slave, islave) && sameAssignmentP(slave, islave)) {
@@ -1451,7 +1544,9 @@ window.FResult = (function() {
 		});
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcWorksWithRelativesVanilla(slave) {
 		const fre = getSlave(slave.relationTarget);
 		if (fre !== undefined && sameAssignmentP(slave, fre)) {
@@ -1460,7 +1555,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcWorksWithRelationship(slave) {
 		const fre = V.slaves.findIndex(s => {
 			return haveRelationshipP(slave, s) && sameAssignmentP(slave, s);
@@ -1468,13 +1565,17 @@ window.FResult = (function() {
 		if (fre !== -1) result += 1;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcWorksWithRival(slave) {
 		const en = getSlave(slave.rivalryTarget);
 		if (en !== undefined && sameAssignmentP(slave, en)) result -= 1;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcHInjectionsDiet(slave) {
 		if (slave.drugs === "male hormone injections" || slave.drugs === "female hormone injections") {
 			result -= 10;
@@ -1490,7 +1591,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPreg(slave) {
 		if (V.arcologies[0].FSRepopulationFocus > 20) {
 			if (slave.belly >= 1500) result += 2;
@@ -1513,27 +1616,31 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcRace(slave) {
 		if (V.arcologies[0].FSSupremacist !== "unset" && supremeRaceP(slave)) {
-			result -= (V.arcologies[0].FSSupremacist/5) + (V.arcologies[0].FSSupremacistLawME*10);
+			result -= (V.arcologies[0].FSSupremacist / 5) + (V.arcologies[0].FSSupremacistLawME * 10);
 		}
 		if (V.arcologies[0].FSSubjugationist !== "unset" && inferiorRaceP(slave)) {
-			result += (V.arcologies[0].FSSubjugationist/10) + (V.arcologies[0].FSSubjugationistLawME);
+			result += (V.arcologies[0].FSSubjugationist / 10) + (V.arcologies[0].FSSubjugationistLawME);
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcSexAttributes(slave) {
 		if (slave.clitPiercing > 2) result += 1;
 		if (slave.tail === "sex") result += 1;
 		if (slave.fetishKnown === 1 && slave.fetishStrength > 60 && slave.fetish !== "none") {
-			result += slave.fetishStrength/5;
+			result += slave.fetishStrength / 5;
 		}
 
 		if (slave.attrKnown === 1) {
-			result += Math.trunc(slave.attrXX/20);
-			result += Math.trunc(slave.attrXY/20);
+			result += Math.trunc(slave.attrXX / 20);
+			result += Math.trunc(slave.attrXY / 20);
 			if (slave.energy > 95) result += 3;
 			else if (slave.energy > 80) result += 2;
 			else if (slave.energy > 60) result += 1;
@@ -1546,7 +1653,9 @@ window.FResult = (function() {
 		if (slave.behavioralQuirk !== "none") result += 2;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcCareer(slave) {
 		if (setup.whoreCareers.includes(slave.career)) {
 			result += 1;
@@ -1555,7 +1664,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcSight(slave) {
 		if (!canSee(slave)) result -= 3;
 		else if (slave.eyes <= -1) {
@@ -1569,7 +1680,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcHearing(slave) {
 		if (!canHear(slave)) result -= 2;
 		else if (slave.hears <= -1) {
@@ -1581,7 +1694,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcEgyptianBonus(slave) {
 		if (V.racialVarieties === undefined) V.racialVarieties = [];
 		if (!V.racialVarieties.includes(slave.race)) {
@@ -1589,30 +1704,36 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcYouthBonus(slave) {
 		if (slave.visualAge < 30) {
 			if (slave.actualAge > 30) {
 				result += 5;
 			} // experienced for her apparent age
 			if (slave.physicalAge > 30) {
-				result -= slave.physicalAge/2;
+				result -= slave.physicalAge / 2;
 			} // too old :(
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcMatureBonus(slave) {
 		if (slave.visualAge >= 30 && slave.actualAge >= 30 && slave.physicalAge < slave.visualAge) {
 			result += Math.min((slave.physicalAge - slave.visualAge) * 2, 20);
 		} // looks and acts mature, but has a body that just won't quit
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcNotFuckdoll(slave) {
 		if (V.familyTesting === 1 && totalRelatives(slave) > 0) {
 			calcWorksWithRelatives(slave);
-		} else if (!V.familyTesting && slave.relation !==0) {
+		} else if (!V.familyTesting && slave.relation !== 0) {
 			calcWorksWithRelativesVanilla(slave);
 		}
 		if (slave.relationship > 0) calcWorksWithRelationship(slave);
@@ -1634,27 +1755,31 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcAge(slave) {
 		if ((V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSGenderFundamentalist !== "unset") && slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave)) {
 			result += 1;
 			if (slave.birthWeek === 0) result += result;
-			else if (slave.birthWeek < 4) result += 0.2*result;
+			else if (slave.birthWeek < 4) result += 0.2 * result;
 		} else if (slave.physicalAge === V.minimumSlaveAge) {
 			result += 1;
-			if (slave.birthWeek === 0 ) result += 0.5*result;
-			else if (slave.birthWeek < 4) result += 0.1*result;
+			if (slave.birthWeek === 0) result += 0.5 * result;
+			else if (slave.birthWeek < 4) result += 0.1 * result;
 		} else if (slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (V.arcologies[0].FSRepopulationFocus !== "unset" || V.arcologies[0].FSGenderFundamentalist !== "unset")) {
 			result += 1;
 			if (slave.birthWeek === 0) {
-				result += 0.5*result;
+				result += 0.5 * result;
 			} else if (slave.birthWeek < 4) {
-				result += 0.1*result;
+				result += 0.1 * result;
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcAmputation(slave) {
 		switch (slave.amp) {
 			case 0:
@@ -1669,7 +1794,9 @@ window.FResult = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcHedonismWeight(slave) {
 		if (slave.weight < 10) {
 			result -= 2;
@@ -1682,7 +1809,10 @@ window.FResult = (function() {
 
 window.slaveCost = (function() {
 	"use strict";
-	let V; let arcology; let multiplier; let cost;
+	let V;
+	let arcology;
+	let multiplier;
+	let cost;
 
 	/**
 	 * @param {App.Entity.SlaveState} slave
@@ -1694,7 +1824,7 @@ window.slaveCost = (function() {
 		V = State.variables;
 		arcology = V.arcologies[0];
 		multiplier = V.slaveCostFactor;
-		cost = Beauty(slave)*FResult(slave);
+		cost = Beauty(slave) * FResult(slave);
 
 		calcGenitalsCost(slave);
 		calcDevotionTrustCost(slave);
@@ -1718,7 +1848,9 @@ window.slaveCost = (function() {
 		return cost;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcGenitalsCost(slave) {
 		if (slave.vagina === 0) {
 			multiplier += 0.1;
@@ -1750,30 +1882,34 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcDevotionTrustCost(slave) {
 		if (V.specialSlavesPriceOverride === 1) {
 			if (slave.devotion > 50) {
-				multiplier += slave.devotion/200;
+				multiplier += slave.devotion / 200;
 			}
 			if (slave.trust > 50) {
-				multiplier += slave.trust/200;
+				multiplier += slave.trust / 200;
 			}
 		} else {
-			multiplier += slave.devotion/200;
+			multiplier += slave.devotion / 200;
 			if (slave.devotion < -20) {
 				if (slave.trust > 0) {
-					multiplier -= slave.trust/200;
+					multiplier -= slave.trust / 200;
 				}
 			} else {
 				if (slave.trust > 0) {
-					multiplier += slave.trust/200;
+					multiplier += slave.trust / 200;
 				}
 			}
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPreferencesCost(slave) {
 		if (slave.behavioralFlaw !== "none") {
 			multiplier -= 0.1;
@@ -1793,7 +1929,7 @@ window.slaveCost = (function() {
 			if (slave.fetish === "mindbroken") {
 				multiplier -= 0.3;
 			} else if (slave.fetish !== "none") {
-				multiplier += slave.fetishStrength/1000;
+				multiplier += slave.fetishStrength / 1000;
 			}
 		} else {
 			multiplier -= 0.1;
@@ -1805,7 +1941,9 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPregCost(slave) {
 		if (slave.mpreg === 1) {
 			multiplier += 0.2;
@@ -1817,7 +1955,7 @@ window.slaveCost = (function() {
 				multiplier += 1;
 			} else if (slave.bellyPreg >= 120000) {
 				multiplier += 0.5;
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
+			} else if (slave.preg > slave.pregData.normalBirth / 4) {
 				multiplier += 0.1;
 			}
 		} else if (arcology.FSRestartSMR === 1) {
@@ -1827,7 +1965,7 @@ window.slaveCost = (function() {
 				multiplier -= 2.5;
 			} else if (slave.bellyPreg >= 30000) {
 				multiplier -= 1.5;
-			} else if (slave.preg > slave.pregData.normalBirth/4) {
+			} else if (slave.preg > slave.pregData.normalBirth / 4) {
 				multiplier -= 1.0;
 			}
 		} else {
@@ -1843,10 +1981,12 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcPrestigeCost(slave) {
 		if (slave.prestige > 0) {
-			multiplier += 0.7*slave.prestige;
+			multiplier += 0.7 * slave.prestige;
 		}
 		if (slave.pornPrestige === 3) {
 			multiplier += 1.5;
@@ -1857,7 +1997,9 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcFSCost(slave) {
 		if (arcology.FSSupremacistLawME !== 0) {
 			if (slave.race !== arcology.FSSupremacistRace) {
@@ -1912,7 +2054,9 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcAgeCost(slave) {
 		if (slave.physicalAge === V.minimumSlaveAge && slave.physicalAge === V.fertilityAge && canGetPregnant(slave) && (arcology.FSRepopulationFocus !== "unset" || arcology.FSGenderFundamentalist !== "unset")) {
 			if (slave.birthWeek === 0) {
@@ -1935,7 +2079,9 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcCareersCost(slave) {
 		if (slave.career !== 0) {
 			if (slave.career === "a slave") {
@@ -1976,7 +2122,7 @@ window.slaveCost = (function() {
 				multiplier += 0.05;
 			}
 		}
-		if (V.week-slave.weekAcquired >= 20 && slave.skill.entertainment >= 100) {
+		if (V.week - slave.weekAcquired >= 20 && slave.skill.entertainment >= 100) {
 			if (!setup.entertainmentCareers.includes(slave.career)) {
 				multiplier += 0.05;
 			}
@@ -2033,10 +2179,14 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcMiscCost(slave) {
-		const totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant, -130, 130); /* make absolutely certain we do not use +-131 in the next line */
-		multiplier += Math.floor((Math.asin(totalInt/131))*50)/50;
+		const totalInt = Math.clamp(slave.intelligence + slave.intelligenceImplant, -130, 130);
+		/* make absolutely certain we do not use +-131 in the next line
+		 */
+		multiplier += Math.floor((Math.asin(totalInt / 131)) * 50) / 50;
 		if (slave.pubertyXY === 0 && slave.physicalAge >= V.potencyAge && slave.genes === "XY" && arcology.FSGenderRadicalist === "unset") {
 			multiplier += 0.5;
 		}
@@ -2058,66 +2208,70 @@ window.slaveCost = (function() {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcIndentureCost(slave) {
 		if (slave.indenture > -1) {
-			multiplier -= 0.1*slave.indentureRestrictions;
-			multiplier -= (260-slave.indenture)/260;
+			multiplier -= 0.1 * slave.indentureRestrictions;
+			multiplier -= (260 - slave.indenture) / 260;
 		} else if (V.seeAge === 1) {
-			if (slave.actualAge >= (V.retirementAge-5) && V.PhysicalRetirementAgePolicy !== 1) {
-				multiplier *= (V.retirementAge-slave.actualAge)/5;
+			if (slave.actualAge >= (V.retirementAge - 5) && V.PhysicalRetirementAgePolicy !== 1) {
+				multiplier *= (V.retirementAge - slave.actualAge) / 5;
 			}
-			if (slave.physicalAge >= (V.retirementAge-5) && V.PhysicalRetirementAgePolicy === 1) {
-				multiplier *= (V.retirementAge-slave.actualAge)/5;
+			if (slave.physicalAge >= (V.retirementAge - 5) && V.PhysicalRetirementAgePolicy === 1) {
+				multiplier *= (V.retirementAge - slave.actualAge) / 5;
 			}
 		}
 	}
 
 	function calcCost(/* slave */) {
-		cost *= multiplier*50;
+		cost *= multiplier * 50;
 		cost = Number(cost) || 0;
 		if (cost < V.minimumSlaveCost) {
 			cost = V.minimumSlaveCost;
 		} else if (cost <= 100000) {
 			/* do nothing */
 		} else if (cost <= 200000) {
-			cost -= (cost-100000)*0.1;
+			cost -= (cost - 100000) * 0.1;
 		} else if (cost <= 300000) {
-			cost -= 10000 + ((cost-200000)*0.2);
+			cost -= 10000 + ((cost - 200000) * 0.2);
 		} else if (cost <= 400000) {
-			cost -= 30000 + ((cost-300000)*0.3);
+			cost -= 30000 + ((cost - 300000) * 0.3);
 		} else if (cost <= 500000) {
-			cost -= 60000 + ((cost-400000)*0.4);
+			cost -= 60000 + ((cost - 400000) * 0.4);
 		} else {
-			cost -= 100000 + ((cost-500000)*0.5);
+			cost -= 100000 + ((cost - 500000) * 0.5);
 		}
 		if (cost < 1000) {
 			cost = 1000;
 		}
-		cost = 500*Math.trunc(cost/500);
+		cost = 500 * Math.trunc(cost / 500);
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function calcStartingSlaveCost(slave) {
 		let startingSlaveMultiplier = 0;
 
 		if (slave.devotion > 20) {
-			startingSlaveMultiplier += (0.000117*(slave.devotion-20)*(slave.devotion-20))+(0.003167*(slave.devotion-20));
+			startingSlaveMultiplier += (0.000117 * (slave.devotion - 20) * (slave.devotion - 20)) + (0.003167 * (slave.devotion - 20));
 		}
 		if (slave.skill.whoring) {
-			startingSlaveMultiplier += 0.00001*slave.skill.whore*slave.skill.whore;
+			startingSlaveMultiplier += 0.00001 * slave.skill.whore * slave.skill.whore;
 		}
 		if (slave.skill.entertainment) {
-			startingSlaveMultiplier += 0.00001*slave.skill.entertainment*slave.skill.entertainment;
+			startingSlaveMultiplier += 0.00001 * slave.skill.entertainment * slave.skill.entertainment;
 		}
 		if (slave.skill.vaginal) {
-			startingSlaveMultiplier += 0.00001*slave.skill.vaginal*slave.skill.vaginal;
+			startingSlaveMultiplier += 0.00001 * slave.skill.vaginal * slave.skill.vaginal;
 		}
 		if (slave.skill.anal) {
-			startingSlaveMultiplier += 0.00001*slave.skill.anal*slave.skill.anal;
+			startingSlaveMultiplier += 0.00001 * slave.skill.anal * slave.skill.anal;
 		}
 		if (slave.skill.oral) {
-			startingSlaveMultiplier += 0.00001*slave.skill.oral*slave.skill.oral;
+			startingSlaveMultiplier += 0.00001 * slave.skill.oral * slave.skill.oral;
 		}
 		if (slave.skill.combat) {
 			startingSlaveMultiplier += 0.1;
@@ -2127,25 +2281,24 @@ window.slaveCost = (function() {
 		}
 		if (startingSlaveMultiplier) {
 			if (slave.actualAge > 25) {
-				startingSlaveMultiplier -= startingSlaveMultiplier*(slave.actualAge-25)*0.05;
+				startingSlaveMultiplier -= startingSlaveMultiplier * (slave.actualAge - 25) * 0.05;
 			}
 		}
 		startingSlaveMultiplier = Math.clamp(startingSlaveMultiplier, 0, 10);
-		cost += cost*startingSlaveMultiplier;
-		cost = 500*Math.trunc(cost/500);
+		cost += cost * startingSlaveMultiplier;
+		cost = 500 * Math.trunc(cost / 500);
 		if (V.PC.career === "slaver") {
-			cost = cost/2;
+			cost = cost / 2;
 		}
 	}
 
 	return slaveCost;
 })();
 
-window.startingSlaveCost =
 /**
  * @param {App.Entity.SlaveState} slave
  * @returns {number}
  */
-function startingSlaveCost(slave) {
+window.startingSlaveCost = function startingSlaveCost(slave) {
 	return slaveCost(slave, true);
 };
diff --git a/src/js/slaveGenerationJS.js b/src/js/slaveGenerationJS.js
index f9359ebaf05f3f8120460158166ca28249fe4271..4bed7f0d77090ad0574725420b3a2a95abb3240c 100644
--- a/src/js/slaveGenerationJS.js
+++ b/src/js/slaveGenerationJS.js
@@ -1,8 +1,14 @@
-window.nationalityToRace = /** @param {App.Entity.SlaveState} slave */ function nationalityToRace(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.nationalityToRace = function nationalityToRace(slave) {
 	slave.race = hashChoice(setup.raceSelector[slave.nationality] || setup.raceSelector[""]);
 };
 
-window.raceToNationality = /** @param {App.Entity.SlaveState} slave */ function raceToNationality(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.raceToNationality = function raceToNationality(slave) {
 	/* consider this placeholder until raceNationalities gets fixed up */
 	const V = State.variables;
 	slave.nationality = hashChoice(V.nationalities);
@@ -22,7 +28,7 @@ window.generateName = function generateName(nationality, race, male, filter) {
 	const lookup = (male ? setup.malenamePoolSelector : setup.namePoolSelector);
 	const result = jsEither(
 		(lookup[`${nationality }.${ race}`] || lookup[nationality] ||
-		(male ? setup.whiteAmericanMaleNames : setup.whiteAmericanSlaveNames)).filter(filter));
+			(male ? setup.whiteAmericanMaleNames : setup.whiteAmericanSlaveNames)).filter(filter));
 	/* fallback for males without specific male name sets: return female name */
 	if (male && !result) {
 		return generateName(nationality, race, false);
@@ -34,8 +40,8 @@ window.generateSurname = function generateSurname(nationality, race, male, filte
 	filter = filter || _.stubTrue; /* default: allow all */
 	const result = jsEither(
 		(setup.surnamePoolSelector[`${nationality }.${ race}`] ||
-		setup.surnamePoolSelector[nationality] ||
-		setup.whiteAmericanSlaveSurnames).filter(filter));
+			setup.surnamePoolSelector[nationality] ||
+			setup.whiteAmericanSlaveSurnames).filter(filter));
 	if (male) {
 		/* see if we have male equivalent of that surname, and return that if so */
 		const maleLookup = setup.maleSurnamePoolSelector[`${nationality }.${ race}`] || setup.maleSurnamePoolSelector[nationality];
@@ -53,7 +59,10 @@ window.isMaleName = function isMaleName(name, nationality, race) {
 	return names && names.includes(name);
 };
 
-window.nationalityToName = /** @param {App.Entity.SlaveState} slave */ function nationalityToName(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.nationalityToName = function nationalityToName(slave) {
 	const V = State.variables;
 	const male = (slave.genes === "XY");
 
@@ -67,22 +76,30 @@ window.nationalityToName = /** @param {App.Entity.SlaveState} slave */ function
 	slave.slaveSurname = slave.birthSurname;
 	if (V.useFSNames === 1) {
 		if (V.arcologies[0].FSChattelReligionist > 20) {
-			slave.slaveName = jsEither(setup.chattelReligionistSlaveNames); slave.slaveSurname = 0;
+			slave.slaveName = jsEither(setup.chattelReligionistSlaveNames);
+			slave.slaveSurname = 0;
 		} else if (V.arcologies[0].FSRomanRevivalist > 20) {
-			slave.slaveName = jsEither(setup.romanSlaveNames); slave.slaveSurname = jsEither(setup.romanSlaveSurnames);
+			slave.slaveName = jsEither(setup.romanSlaveNames);
+			slave.slaveSurname = jsEither(setup.romanSlaveSurnames);
 		} else if (V.arcologies[0].FSAztecRevivalist > 20) {
-			slave.slaveName = jsEither(setup.aztecSlaveNames); slave.slaveSurname = 0;
+			slave.slaveName = jsEither(setup.aztecSlaveNames);
+			slave.slaveSurname = 0;
 		} else if (V.arcologies[0].FSEgyptianRevivalist > 20) {
-			slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames); slave.slaveSurname = 0;
+			slave.slaveName = jsEither(setup.ancientEgyptianSlaveNames);
+			slave.slaveSurname = 0;
 		} else if (V.arcologies[0].FSEdoRevivalist > 20) {
-			slave.slaveName = jsEither(setup.edoSlaveNames); slave.slaveSurname = jsEither(setup.edoSlaveSurnames);
+			slave.slaveName = jsEither(setup.edoSlaveNames);
+			slave.slaveSurname = jsEither(setup.edoSlaveSurnames);
 		} else if (V.arcologies[0].FSDegradationist !== "unset") {
 			DegradingName(slave);
 		}
 	}
 };
 
-window.nationalityToAccent = /** @param {App.Entity.SlaveState} slave */ function nationalityToAccent(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ */
+window.nationalityToAccent = function nationalityToAccent(slave) {
 	const V = State.variables;
 	const naturalAccent = jsEither([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]);
 
@@ -1294,7 +1311,10 @@ window.checkForGingering = function checkForGingering() {
 	const His = capFirstChar(his);
 
 	/* reset in case gingered slaves were viewed but not purchased (no newSlaveIntro) */
-	V.gingering = 0; V.gingeringDetected = 0; V.gingeringDetection = 0; V.toSearch = V.activeSlave.origin;
+	V.gingering = 0;
+	V.gingeringDetected = 0;
+	V.gingeringDetection = 0;
+	V.toSearch = V.activeSlave.origin;
 	if (V.applyLaw === 1 && V.HonestySMR === 1) {
 		/* SMR prohibits gingering and is enforced for this slave - do nothing */
 	} else if (V.activeSlave.indenture > 0) {
@@ -1334,7 +1354,8 @@ window.checkForGingering = function checkForGingering() {
 	}
 	if (V.gingering !== 0) {
 		if (V.PC.slaving >= 100) {
-			V.gingeringDetected = 1; V.gingeringDetection = "slaver";
+			V.gingeringDetected = 1;
+			V.gingeringDetection = "slaver";
 			switch (V.gingering) {
 				case "antidepressant":
 					r += `${He} is acting dazed and unfocused. ${He}'s obviously been given antidepressants to make ${him} appear less fearful, and will be considerably less trusting than ${he} seems.`;
@@ -1361,9 +1382,11 @@ window.checkForGingering = function checkForGingering() {
 		} else {
 			/* not slaver */
 			if (V.PC.warfare >= 100 && jsRandom(1, 2) === 1) {
-				V.gingeringDetected = 1; V.gingeringDetection = "mercenary";
+				V.gingeringDetected = 1;
+				V.gingeringDetection = "mercenary";
 			} else if (V.PC.rumor === "force" && jsRandom(1, 2) === 1) {
-				V.gingeringDetected = 1; V.gingeringDetection = "force";
+				V.gingeringDetected = 1;
+				V.gingeringDetection = "force";
 			} else if (jsRandom(1, 3) === 1) {
 				V.gingeringDetected = 1;
 			}
@@ -1410,14 +1433,19 @@ window.removeGingering = function removeGingering() {
 	const V = State.variables;
 	if (V.gingering !== 0 && V.beforeGingering !== 0 && V.activeSlave !== 0 && V.beforeGingering.ID === V.activeSlave.ID) {
 		/* extra checks to ensure gingering state is not left over from a different slave that was inspected but not purchased */
-		V.activeSlave = V.beforeGingering; V.beforeGingering = 0;
+		V.activeSlave = V.beforeGingering;
+		V.beforeGingering = 0;
 	} else {
-		/* clear left over state from a different slave without modifying activeSlave */
-		V.gingering = 0; V.beforeGingering = 0;
+		/* clear left over state from a different slave without modifying activeSlave
+		 */
+		V.gingering = 0;
+		V.beforeGingering = 0;
 	}
 };
 
-window.randomizeAttraction = /** @param {App.Entity.SlaveState} slave*/ function randomizeAttraction(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave*/
+window.randomizeAttraction = function randomizeAttraction(slave) {
 	const sexuality = jsRandom(0, 100);
 	let attraction = Math.clamp(slave.energy * 2, 60, 180);
 
@@ -1456,7 +1484,9 @@ window.BaseSlave = function BaseSlave() {
 	return new App.Entity.SlaveState();
 };
 
-window.generatePronouns = /** @param {App.Entity.SlaveState} slave*/ function generatePronouns(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave*/
+window.generatePronouns = function generatePronouns(slave) {
 	if (slave.fuckdoll > 0) {
 		slave.pronoun = "it";
 		slave.possessivePronoun = "its";
diff --git a/src/js/slaveStatsChecker.js b/src/js/slaveStatsChecker.js
index 2ecea065d7933c6a59f0dfd1d121cc4280ace806..fc9e637560ebaaf65a625f3892d35dd9e04b4307 100644
--- a/src/js/slaveStatsChecker.js
+++ b/src/js/slaveStatsChecker.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 window.SlaveStatsChecker = (function() {
 	return {
 		checkForLisp: hasLisp,
@@ -16,7 +15,10 @@ window.SlaveStatsChecker = (function() {
 	}
 
 	/* call as SlaveStatsChecker.modScore() */
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {number} // I think
+	 */
 	function modScore(slave) {
 		const V = State.variables;
 		V.piercingScore = piercingScore(slave);
@@ -25,58 +27,64 @@ window.SlaveStatsChecker = (function() {
 	}
 
 	/* helper function, not callable */
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {number}
+	 */
 	function piercingScore(slave) {
 		let score = 0;
 
 		if (slave.earPiercing > 0) {
-			score += slave.earPiercing*0.75 - 0.5;
+			score += slave.earPiercing * 0.75 - 0.5;
 		}
 		if (slave.nosePiercing > 0) {
-			score += slave.nosePiercing*0.75 - 0.5;
+			score += slave.nosePiercing * 0.75 - 0.5;
 		}
 		if (slave.eyebrowPiercing > 0) {
-			score += slave.eyebrowPiercing*0.75 - 0.5;
+			score += slave.eyebrowPiercing * 0.75 - 0.5;
 		}
 		if (slave.navelPiercing > 0) {
-			score += slave.navelPiercing*0.75 - 0.5;
+			score += slave.navelPiercing * 0.75 - 0.5;
 		}
 		if (slave.corsetPiercing > 0) {
-			score += slave.corsetPiercing*0.75 + 0.5;
+			score += slave.corsetPiercing * 0.75 + 0.5;
 		}
 		if (slave.nipplesPiercing > 0) {
-			score += slave.nipplesPiercing*0.75 - 0.25;
+			score += slave.nipplesPiercing * 0.75 - 0.25;
 		}
 		if (slave.areolaePiercing > 0) {
-			score += slave.areolaePiercing*0.75 + 0.5;
+			score += slave.areolaePiercing * 0.75 + 0.5;
 		}
 		if (slave.lipsPiercing > 0) {
-			score += slave.lipsPiercing*0.75 - 0.25;
+			score += slave.lipsPiercing * 0.75 - 0.25;
 		}
-		if (slave.tonguePiercing > 0 ) {
-			score += slave.tonguePiercing*0.75 - 0.25;
+		if (slave.tonguePiercing > 0) {
+			score += slave.tonguePiercing * 0.75 - 0.25;
 		}
 		if (slave.clitPiercing === 3) /* smart piercing */ {
 			score += 1.25;
 		} else if (slave.clitPiercing > 0) {
-			score += slave.clitPiercing*0.75 - 0.25;
+			score += slave.clitPiercing * 0.75 - 0.25;
 		}
 
 		if (slave.vaginaPiercing > 0) {
-			score += slave.vaginaPiercing*0.75 - 0.25;
+			score += slave.vaginaPiercing * 0.75 - 0.25;
 		}
 		if (slave.dickPiercing > 0) {
-			score += slave.dickPiercing*0.75 - 0.25;
+			score += slave.dickPiercing * 0.75 - 0.25;
 		}
 		if (slave.anusPiercing > 0) {
-			score += slave.anusPiercing*0.75 - 0.25;
+			score += slave.anusPiercing * 0.75 - 0.25;
 		}
 
 		return score;
 	}
 
 	/* helper function, not callable */
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {number}
+	 */
 	function tatScore(slave) {
 		let score = 0;
 
@@ -111,13 +119,13 @@ window.SlaveStatsChecker = (function() {
 			score += 1;
 		}
 		if (slave.bellyTat !== 0) {
-			if ((slave.preg > slave.pregData.normalBirth/1.33 && slave.pregType >= 20) || slave.belly >= 300000) {
+			if ((slave.preg > slave.pregData.normalBirth / 1.33 && slave.pregType >= 20) || slave.belly >= 300000) {
 				score += 0.75;
-			} else if ((slave.preg > slave.pregData.normalBirth/2 && slave.pregType >= 20) || (slave.preg > slave.pregData.normalBirth/1.33 && slave.pregType >= 10) || slave.belly >= 150000) {
+			} else if ((slave.preg > slave.pregData.normalBirth / 2 && slave.pregType >= 20) || (slave.preg > slave.pregData.normalBirth / 1.33 && slave.pregType >= 10) || slave.belly >= 150000) {
 				score += 1;
 			} else if (slave.belly >= 10000 || slave.bellyImplant >= 8000) {
 				score += 1;
-			} else if ((slave.preg >= slave.pregData.normalBirth/4 && slave.pregType >= 20) || (slave.preg > slave.pregData.normalBirth/4 && slave.pregType >= 10) || slave.belly >= 5000) {
+			} else if ((slave.preg >= slave.pregData.normalBirth / 4 && slave.pregType >= 20) || (slave.preg > slave.pregData.normalBirth / 4 && slave.pregType >= 10) || slave.belly >= 5000) {
 				score += 0.5;
 			} else if (slave.belly >= 1500) {
 				score += 0.25;
@@ -137,7 +145,10 @@ window.SlaveStatsChecker = (function() {
 	}
 
 	/* call as SlaveStatsChecker.isModded() */
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {boolean}
+	 */
 	function isModded(slave) {
 		const tattoos = tatScore(slave);
 		const piercings = piercingScore(slave);
@@ -147,7 +158,10 @@ window.SlaveStatsChecker = (function() {
 	}
 
 	/* call as SlaveStatsChecker.isUnmodded() */
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @returns {boolean}
+	 */
 	function isUnmodded(slave) {
 		const tattoos = tatScore(slave);
 		const piercings = piercingScore(slave);
@@ -156,7 +170,11 @@ window.SlaveStatsChecker = (function() {
 	}
 }());
 
-window.isSlim = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isSlim = function(slave) {
 	let slim = false;
 	const ArcologyZero = State.variables.arcologies[0];
 
@@ -184,7 +202,11 @@ window.isSlim = /** @param {App.Entity.SlaveState} slave */ function (slave) {
 	return slim;
 };
 
-window.slimPass = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.slimPass = function(slave) {
 	let slimPass = 0;
 	const ArcologyZero = State.variables.arcologies[0];
 
@@ -209,35 +231,67 @@ window.slimPass = /** @param {App.Entity.SlaveState} slave */ function (slave) {
 	return slimPass;
 };
 
-window.isStacked = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isStacked = function(slave) {
 	return (slave.butt > 4) && (slave.boobs > 800);
 };
 
-window.isXY = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isXY = function(slave) {
 	return (slave.dick > 0);
 };
 
-window.isYoung = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isYoung = function(slave) {
 	return (slave.visualAge < 30);
 };
 
-window.isPreg = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isPreg = function(slave) {
 	return ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000));
 };
 
-window.isNotPreg = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isNotPreg = function(slave) {
 	return (!isPreg(slave) && (slave.belly < 100) && (slave.weight < 30) && !setup.fakeBellies.includes(slave.bellyAccessory));
 };
 
-window.isPure = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isPure = function(slave) {
 	return ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant < 30) && (slave.bellyImplant === -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2));
 };
 
-window.isSurgicallyImproved = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isSurgicallyImproved = function(slave) {
 	return ((slave.boobsImplant > 0) && (slave.buttImplant > 0) && (slave.waist < -10) && (slave.lipsImplant > 0));
 };
 
-window.isFullyPotent = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isFullyPotent = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.dick > 0 && slave.balls > 0 && slave.ballType !== "sterile" && slave.hormoneBalance < 100 && slave.drugs !== "hormone blockers") {
@@ -246,7 +300,11 @@ window.isFullyPotent = /** @param {App.Entity.SlaveState} slave */ function(slav
 	return false;
 };
 
-window.canGetPregnant = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canGetPregnant = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.preg === -1) { /* contraceptives check */
@@ -255,28 +313,36 @@ window.canGetPregnant = /** @param {App.Entity.SlaveState} slave */ function(sla
 		return false;
 	} else if ((slave.ovaries === 1) && (canDoVaginal(slave))) {
 		return true;
-	} else if ((slave.mpreg === 1) && (canDoAnal(slave))) { /* pregmod */
+	} else if ((slave.mpreg === 1) && (canDoAnal(slave))) {
+		/* pregmod */
 		return true;
 	}
 	return false;
 };
 
 /** contraceptives (.preg === -1) do not negate this function
- * @param {App.Entity.SlaveState} slave */
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
 window.isFertile = function(slave) {
 	if (!slave) {
 		return null;
 	}
 
-	if (slave.womb.length > 0 && slave.geneticQuirks.superfetation < 2) { /* currently pregnant without superfetation */
+	if (slave.womb.length > 0 && slave.geneticQuirks.superfetation < 2) {
+		/* currently pregnant without superfetation */
 		return false;
-	} else if (slave.broodmother > 0) { /* currently broodmother */
+	} else if (slave.broodmother > 0) {
+		/* currently broodmother */
 		return false;
-	} else if (slave.preg < -1) { /* sterile */
+	} else if (slave.preg < -1) {
+		/* sterile */
 		return false;
-	} else if (slave.pregWeek < 0) { /* postpartum */
+	} else if (slave.pregWeek < 0) {
+		/* postpartum */
 		return false;
-	} else if (slave.pubertyXX === 0) { /* pregmod start */
+	} else if (slave.pubertyXX === 0) {
+		/* pregmod start */
 		return false;
 	} else if (slave.ovaryAge >= 47) {
 		return false;
@@ -302,7 +368,11 @@ window.isFertile = function(slave) {
 	return false;
 };
 
-window.canAchieveErection = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canAchieveErection = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.dick < 7 && slave.dick > 0 && slave.drugs !== "hormone blockers" && (slave.balls > 0 ? slave.hormoneBalance < 100 : slave.hormoneBalance <= -100) && slave.ballType !== "sterile") {
@@ -311,7 +381,11 @@ window.canAchieveErection = /** @param {App.Entity.SlaveState} slave */ function
 	return false;
 };
 
-window.canPenetrate = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canPenetrate = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (!canAchieveErection(slave)) {
@@ -324,35 +398,55 @@ window.canPenetrate = /** @param {App.Entity.SlaveState} slave */ function(slave
 	return true;
 };
 
-window.canSee = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canSee = function(slave) {
 	if (!slave) {
 		return null;
 	}
 	return (slave.eyes > -2);
 };
 
-window.canHear = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canHear = function(slave) {
 	if (!slave) {
 		return null;
 	}
 	return ((slave.hears > -2) && (slave.earwear !== "deafening ear plugs"));
 };
 
-window.canSmell = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canSmell = function(slave) {
 	if (!slave) {
 		return null;
 	}
 	return (slave.smells > -1);
 };
 
-window.canTaste = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canTaste = function(slave) {
 	if (!slave) {
 		return null;
 	}
 	return (slave.tastes > -1);
 };
 
-window.canWalk = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canWalk = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.amp === 1) {
@@ -381,7 +475,11 @@ window.canWalk = /** @param {App.Entity.SlaveState} slave */ function(slave) {
 	return false;
 };
 
-window.canTalk = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canTalk = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.accent > 2) {
@@ -402,7 +500,11 @@ window.canTalk = /** @param {App.Entity.SlaveState} slave */ function(slave) {
 	return true;
 };
 
-window.canDoAnal = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canDoAnal = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.chastityAnus === 1) {
@@ -411,7 +513,11 @@ window.canDoAnal = /** @param {App.Entity.SlaveState} slave */ function(slave) {
 	return true;
 };
 
-window.canDoVaginal = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.canDoVaginal = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.vagina < 0) {
@@ -422,78 +528,102 @@ window.canDoVaginal = /** @param {App.Entity.SlaveState} slave */ function(slave
 	return true;
 };
 
-window.tooFatSlave = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooFatSlave = function(slave) {
 	if (!slave) {
 		return null;
-	} else if (slave.weight > 190+(slave.muscles/5) && slave.physicalAge >= 18) {
+	} else if (slave.weight > 190 + (slave.muscles / 5) && slave.physicalAge >= 18) {
 		return true;
-	} else if (slave.weight > 130+(slave.muscles/20) && slave.physicalAge <= 3) {
+	} else if (slave.weight > 130 + (slave.muscles / 20) && slave.physicalAge <= 3) {
 		return true;
-	} else if (slave.weight > 160+(slave.muscles/15) && slave.physicalAge <= 12) {
+	} else if (slave.weight > 160 + (slave.muscles / 15) && slave.physicalAge <= 12) {
 		return true;
-	} else if (slave.weight > 185+(slave.muscles/10) && slave.physicalAge < 18) {
+	} else if (slave.weight > 185 + (slave.muscles / 10) && slave.physicalAge < 18) {
 		return true;
 	}
 	return false;
 };
 
-window.tooBigBreasts = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooBigBreasts = function(slave) {
 	if (!slave) {
 		return null;
-	} else if (slave.boobs > 30000+(slave.muscles*100) && slave.physicalAge >= 18) {
+	} else if (slave.boobs > 30000 + (slave.muscles * 100) && slave.physicalAge >= 18) {
 		return true;
-	} else if (slave.boobs > 5000+(slave.muscles*10) && slave.physicalAge <= 3) {
+	} else if (slave.boobs > 5000 + (slave.muscles * 10) && slave.physicalAge <= 3) {
 		return true;
-	} else if (slave.boobs > 10000+(slave.muscles*20) && slave.physicalAge <= 12) {
+	} else if (slave.boobs > 10000 + (slave.muscles * 20) && slave.physicalAge <= 12) {
 		return true;
-	} else if (slave.boobs > 20000+(slave.muscles*50) && slave.physicalAge < 18) {
+	} else if (slave.boobs > 20000 + (slave.muscles * 50) && slave.physicalAge < 18) {
 		return true;
 	}
 	return false;
 };
 
-window.tooBigBelly = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooBigBelly = function(slave) {
 	if (!slave) {
 		return null;
-	} else if (slave.belly >= 450000+(slave.muscles*2000) && slave.physicalAge >= 18) {
+	} else if (slave.belly >= 450000 + (slave.muscles * 2000) && slave.physicalAge >= 18) {
 		return true;
-	} else if (slave.belly >= 350000+(slave.muscles*1000) && slave.physicalAge >= 13) {
+	} else if (slave.belly >= 350000 + (slave.muscles * 1000) && slave.physicalAge >= 13) {
 		return true;
-	} else if (slave.belly >= 30000+(slave.muscles*500) && slave.physicalAge <= 3) {
+	} else if (slave.belly >= 30000 + (slave.muscles * 500) && slave.physicalAge <= 3) {
 		return true;
-	} else if (slave.belly >= 150000+(slave.muscles*800) && slave.physicalAge <= 12) {
+	} else if (slave.belly >= 150000 + (slave.muscles * 800) && slave.physicalAge <= 12) {
 		return true;
 	}
 	return false;
 };
 
-window.tooBigBalls = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooBigBalls = function(slave) {
 	if (!slave) {
 		return null;
-	} else if (slave.balls >= 30+(slave.muscles*.3) && slave.physicalAge <= 3) {
+	} else if (slave.balls >= 30 + (slave.muscles * .3) && slave.physicalAge <= 3) {
 		return true;
-	} else if (slave.balls >= 60+(slave.muscles*.5) && slave.physicalAge <= 12) {
+	} else if (slave.balls >= 60 + (slave.muscles * .5) && slave.physicalAge <= 12) {
 		return true;
-	} else if (slave.balls >= 90+(slave.muscles*.7)) {
+	} else if (slave.balls >= 90 + (slave.muscles * .7)) {
 		return true;
 	}
 	return false;
 };
 
-window.tooBigDick = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooBigDick = function(slave) {
 	if (!slave) {
 		return null;
-	} else if (slave.dick >= 20+(slave.muscles*.1) && slave.physicalAge <= 3 && slave.dick !== 0) {
+	} else if (slave.dick >= 20 + (slave.muscles * .1) && slave.physicalAge <= 3 && slave.dick !== 0) {
 		return true;
-	} else if (slave.dick >= 45+(slave.muscles*.3) && slave.physicalAge <= 12) {
+	} else if (slave.dick >= 45 + (slave.muscles * .3) && slave.physicalAge <= 12) {
 		return true;
-	} else if (slave.dick >= 68+(slave.muscles*.4)) {
+	} else if (slave.dick >= 68 + (slave.muscles * .4)) {
 		return true;
 	}
 	return false;
 };
 
-window.tooBigButt = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.tooBigButt = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.butt > 10 && slave.physicalAge <= 3) {
@@ -504,8 +634,14 @@ window.tooBigButt = /** @param {App.Entity.SlaveState} slave */ function(slave)
 	return false;
 };
 
-window.isVegetable = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.isVegetable = function(slave) {
 	slave = slave || State.variables.activeSlave;
-	if (!slave) { return false; }
+	if (!slave) {
+		return false;
+	}
 	return (slave.fetish === "mindbroken");
 };
diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js
index b7b14df26beee0491ee5bbee6dc61573bec1df6f..fb4151ed2509c2d60d939e042862210d804b9fb8 100644
--- a/src/js/slaveSummaryWidgets.js
+++ b/src/js/slaveSummaryWidgets.js
@@ -1,6 +1,8 @@
-/* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
-window.clearSummaryCache = /** @param {App.Entity.SlaveState | number} slave */ function clearSummaryCache(slave) {
+/* eslint-disable camelcase */
+/**
+ * @param {App.Entity.SlaveState | number} slave
+ */
+window.clearSummaryCache = function clearSummaryCache(slave) {
 	if (!slave) {
 		setup.summaryCache = {};
 	} else if (slave instanceof Object && slave.ID !== Infinity && slave.ID !== -Infinity) {
@@ -10,18 +12,23 @@ window.clearSummaryCache = /** @param {App.Entity.SlaveState | number} slave */
 	}
 };
 
-window.SlaveSummary = /** @param {App.Entity.SlaveState} slave */ function SlaveSummary(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {object}
+ */
+window.SlaveSummary = function SlaveSummary(slave) {
 	const V = State.variables;
 	if (V.useSummaryCache) {
 		if (setup.summaryCache[slave.ID] === undefined) {
 			setup.summaryCache[slave.ID] = SlaveSummaryUncached(slave);
 		}
-		//this.output.appendChild(setup.summaryCache[State.temporary.Slave.ID].cloneNode(true))
+		// this.output.appendChild(setup.summaryCache[State.temporary.Slave.ID].cloneNode(true))
 		return setup.summaryCache[slave.ID];
-	} else return SlaveSummaryUncached(slave);
+	}
+	return SlaveSummaryUncached(slave);
 };
 
-window.SlaveSummaryUncached = (function () {
+window.SlaveSummaryUncached = (function() {
 	"use strict";
 	let V;
 	let r;
@@ -178,13 +185,13 @@ window.SlaveSummaryUncached = (function () {
 			}
 			r += `</span>`;
 		} else if (V.abbreviateHormoneBalance === 2) {
-			r += `<span class="`;
+			r += `<span class=`;
 			if (slave.hormoneBalance <= -21) {
 				r += `deepskyblue`;
 			} else {
 				r += `pink`;
 			}
-			r += `"> `;
+			r += `> `;
 			if (slave.hormoneBalance < -400) {
 				r += `Overwhelmingly masculine`;
 			} else if (slave.hormoneBalance <= -300) {
@@ -325,7 +332,9 @@ window.SlaveSummaryUncached = (function () {
 		return r;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_devotion(slave) {
 		if (slave.fetish === "mindbroken") {
 			r += `<span class="red">MB</span>`;
@@ -377,7 +386,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_devotion(slave) {
 		if (slave.fetish === "mindbroken") {
 			r += `<span class="red">Mindbroken.</span>`;
@@ -429,7 +440,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_rules(slave) {
 		switch (slave.livingRules) {
 			case "luxurious":
@@ -522,7 +535,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_rules(slave) {
 		r += `Living standard: ${slave.livingRules}. `;
 		if (canTalk(slave)) {
@@ -534,7 +549,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `Release rules: ${slave.releaseRules}. `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_weight(slave) {
 		if (slave.weight < -95) {
 			r += `<strong><span class="red">W---${V.summaryStats? `[${slave.weight}]` : ''}</span></strong>`;
@@ -584,7 +601,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_weight(slave) {
 		if (slave.weight < -95) {
 			r += `<span class="red">Emaciated${V.summaryStats ? `[${slave.weight}]`: ''}.</span>`;
@@ -634,7 +653,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_diet(slave) {
 		r += `<span class="teal">`;
 		switch (slave.diet) {
@@ -668,8 +689,7 @@ window.SlaveSummaryUncached = (function () {
 			case "fertility":
 				r += `<strong>Di:F+</strong>`;
 				break;
-			default:
-				break;
+
 		}
 		r += `</span> `;
 		r += `<span class="cyan">`;
@@ -687,7 +707,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_diet(slave) {
 		r += `<span class="teal">`;
 		switch (slave.diet) {
@@ -721,8 +743,7 @@ window.SlaveSummaryUncached = (function () {
 			case "fertility":
 				r += `Fertility.`;
 				break;
-			default:
-				break;
+
 		}
 		r += `</span> `;
 		if (slave.dietCum === 2) {
@@ -739,7 +760,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_health(slave) {
 		if (slave.health < -20) {
 			r += `<strong><span class="red">H${V.summaryStats? `[${slave.health}]` : ''}</span></strong>`;
@@ -751,7 +774,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_health(slave) {
 		if (slave.health < -90) {
 			r += `<span class="red">On the edge of death${V.summaryStats? `[${slave.health}]` : ''}.</span>`;
@@ -771,7 +796,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_drugs(slave) {
 		r += `<span class="tan">`;
 		switch (slave.drugs) {
@@ -874,8 +901,7 @@ window.SlaveSummaryUncached = (function () {
 			case "growth stimulants":
 				r += `<strong>Dr:groStim</strong>`;
 				break;
-			default:
-				break;
+
 		}
 		r += `</span> `;
 		r += `<span class="lightgreen">`;
@@ -955,7 +981,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_drugs(slave) {
 		if ((slave.drugs !== "no drugs") && (slave.drugs !== "none")) {
 			r += `<span class="tan">On ${slave.drugs}.</span> `;
@@ -1063,7 +1091,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_race(slave) {
 		switch (slave.race) {
 			case "white":
@@ -1109,7 +1139,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_race(slave) {
 		switch (slave.race) {
 			case "white":
@@ -1155,7 +1187,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_nationality(slave) {
 		r += `<span class="tan">`;
 		switch (slave.nationality) {
@@ -1830,7 +1864,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_nationality(slave) {
 		r += `<span class="tan">`;
 		switch (slave.nationality) {
@@ -1866,7 +1902,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_skin(slave) {
 		r += `<span class="pink">`;
 		switch (slave.skin) {
@@ -1927,7 +1965,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_genitals(slave) {
 		if (slave.dick > 0) {
 			r += `<span class="pink">`;
@@ -1986,7 +2026,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_genitals(slave) {
 		if (slave.dick > 0) {
 			r += `<span class="pink">`;
@@ -2045,7 +2087,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_age(slave) {
 		r += `<span class="pink">`;
 		if (V.showAgeDetail === 1) {
@@ -2072,7 +2116,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_face(slave) {
 		if (slave.face < -95) {
 			r += `<span class="red">Face---${V.summaryStats? `[${slave.face}]` : ''}</span>`;
@@ -2092,7 +2138,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_eyes(slave) {
 		if (slave.eyes === -2) {
 			r += `<span class="red">Blind</span>`;
@@ -2102,7 +2150,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_ears(slave) {
 		if (slave.hears === -2) {
 			r += `<span class="red">Deaf</span>`;
@@ -2112,7 +2162,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_lips(slave) {
 		if (slave.lips > 95) {
 			r += `Facepussy`;
@@ -2130,7 +2182,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_teeth(slave) {
 		if (slave.teeth === "crooked") {
 			r += `<span class="yellow">Cr Teeth</span>`;
@@ -2152,7 +2206,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_muscles(slave) {
 		if (slave.muscles > 95) {
 			r += `Musc++${V.summaryStats? `[${slave.muscles}]`: ''}`;
@@ -2180,7 +2236,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_limbs(slave) {
 		if (slave.amp !== 0) {
 			if (slave.amp === -1) {
@@ -2207,7 +2265,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_voice(slave) {
 		if (slave.voice === 0) {
 			r += `<span class="red">Mute</span>`;
@@ -2225,7 +2285,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_tits_ass(slave) {
 		r += `<span class="pink">`;
 		if ((slave.boobs >= 12000) && (slave.butt > 9)) {
@@ -2258,7 +2320,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_hips(slave) {
 		r += `<span class="red">`;
 		if (slave.hips < -1) {
@@ -2297,7 +2361,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_waist(slave) {
 		if (slave.waist > 95) {
 			r += `<span class="red">Wst---${V.summaryStats? `[${slave.waist}]` : ''}</span>`;
@@ -2317,7 +2383,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_implants(slave) {
 		r += `<span class="pink">`;
 		if ((slave.boobsImplant === 0) && (slave.buttImplant === 0) && (slave.waist >= -95) && (slave.lipsImplant === 0) && (slave.faceImplant <= 5) && (slave.bellyImplant === -1)) {
@@ -2328,7 +2396,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_lactation(slave) {
 		if (slave.lactation === 1) {
 			r += `Lact`;
@@ -2338,7 +2408,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_mods(slave) {
 		V.modScore = SlaveStatsChecker.modScore(slave);
 		if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
@@ -2356,7 +2428,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_age(slave) {
 		r += `<span class="pink">`;
 		if (V.showAgeDetail === 1) {
@@ -2407,7 +2481,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_face(slave) {
 		if (slave.face < -95) {
 			r += `<span class="red">Very ugly${V.summaryStats? `[${slave.face}]`: ''}</span>`;
@@ -2427,7 +2503,9 @@ window.SlaveSummaryUncached = (function () {
 		r += ` ${slave.faceShape} face. `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_eyes(slave) {
 		if (slave.eyes <= -2) {
 			r += `<span class="red">Blind.</span>`;
@@ -2437,7 +2515,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_ears(slave) {
 		if (slave.hears <= -2) {
 			r += `<span class="red">Deaf.</span>`;
@@ -2447,7 +2527,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_lips(slave) {
 		if (slave.lips > 95) {
 			r += `Facepussy${V.summaryStats? `[${slave.lips}]`: ''}.`;
@@ -2465,7 +2547,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_teeth(slave) {
 		if (slave.teeth === "crooked") {
 			r += `<span class="yellow">Crooked teeth.</span>`;
@@ -2487,7 +2571,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_muscles(slave) {
 		if (slave.muscles > 95) {
 			r += `Hugely muscular${V.summaryStats? `[${slave.muscles}]` : ''}.`;
@@ -2515,7 +2601,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_limbs(slave) {
 		if (slave.amp !== 0) {
 			if (slave.amp === -1) {
@@ -2542,7 +2630,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_voice(slave) {
 		if (slave.voice === 0) {
 			r += `<span class="red">Mute.</span>`;
@@ -2560,7 +2650,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_tits_ass(slave) {
 		r += `<span class="pink">`;
 		if ((slave.boobs >= 12000) && (slave.butt > 9)) {
@@ -2593,7 +2685,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_hips(slave) {
 		r += `<span class="red">`;
 		if (slave.hips < -1) {
@@ -2632,7 +2726,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_waist(slave) {
 		if (slave.waist > 95) {
 			r += `<span class="red">Masculine waist${V.summaryStats? `[${slave.waist}]`: ''}.</span>`;
@@ -2652,7 +2748,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_implants(slave) {
 		r += `<span class="pink">`;
 		if ((slave.boobsImplant !== 0) || (slave.buttImplant !== 0) || (slave.lipsImplant !== 0) || (slave.bellyImplant !== -1)) {
@@ -2665,7 +2763,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_lactation(slave) {
 		if (slave.lactation === 1) {
 			r += `Lactating naturally.`;
@@ -2675,7 +2775,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_mods(slave) {
 		V.modScore = SlaveStatsChecker.modScore(slave);
 		if (slave.corsetPiercing === 0 && V.piercingScore < 3 && V.tatScore < 2) {
@@ -2690,7 +2792,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_intelligence(slave) {
 		const intelligence = slave.intelligence + slave.intelligenceImplant;
 		if (slave.fetish === "mindbroken") {
@@ -2749,7 +2853,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_sex_skills(slave) {
 		let _SSkills = slave.skill.anal + slave.skill.oral;
 		r += `<span class="aquamarine">`;
@@ -2806,7 +2912,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_prestige(slave) {
 		if (slave.prestige > 0) {
 			r += `<span class="green">`;
@@ -2821,7 +2929,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_porn_prestige(slave) {
 		if (slave.pornPrestige > 0) {
 			r += `<span class="green">`;
@@ -2836,7 +2946,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_intelligence(slave) {
 		const intelligence = slave.intelligence + slave.intelligenceImplant;
 		if (slave.fetish === "mindbroken") {
@@ -2895,7 +3007,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_sex_skills(slave) {
 		let _SSkills = (slave.skill.anal + slave.skill.oral);
 		r += `<span class="aquamarine">`;
@@ -2938,7 +3052,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_prestige(slave) {
 		if (slave.prestige > 0) {
 			r += `<span class="green">`;
@@ -2953,7 +3069,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_porn_prestige(slave) {
 		if (slave.pornPrestige > 0) {
 			r += `<span class="green">`;
@@ -2968,7 +3086,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_fetish(slave) {
 		r += `<span class="lightcoral">`;
 		switch (slave.fetish) {
@@ -3063,7 +3183,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_attraction(slave) {
 		if (slave.attrXY <= 5) {
 			r += `<span class="red">XY---${V.summaryStats? `[${slave.attrXY}]`: ''}</span>`;
@@ -3121,7 +3243,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_smart_fetish(slave) {
 		if (slave.fetishKnown === 1) {
 			if (slave.clitSetting === "off") {
@@ -3197,14 +3321,15 @@ window.SlaveSummaryUncached = (function () {
 				case "none":
 					r += `SP:none`;
 					break;
-				default:
-					break;
+
 			}
 		}
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_smart_attraction(slave) {
 		if (slave.attrKnown === 1) {
 			if (slave.clitSetting === "women") {
@@ -3246,7 +3371,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_behavior_flaw(slave) {
 		r += `<span class="red">`;
 		switch (slave.behavioralFlaw) {
@@ -3284,7 +3411,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_sex_flaw(slave) {
 		switch (slave.sexualFlaw) {
 			case "hates oral":
@@ -3348,7 +3477,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_behavior_quirk(slave) {
 		r += `<span class="green">`;
 		switch (slave.behavioralQuirk) {
@@ -3386,7 +3517,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_sex_quirk(slave) {
 		switch (slave.sexualQuirk) {
 			case "gagfuck queen":
@@ -3423,7 +3556,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_fetish(slave) {
 		r += `<span class="lightcoral">`;
 		switch (slave.fetish) {
@@ -3515,7 +3650,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_attraction(slave) {
 		if (slave.attrXY <= 5) {
 			r += `<span class="red">Disgusted by men${V.summaryStats? `[${slave.attrXY}]` : ''},</span> `;
@@ -3571,7 +3708,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_smart_fetish(slave) {
 		if (slave.fetishKnown === 1) {
 			if (slave.clitSetting === "off") {
@@ -3644,14 +3783,15 @@ window.SlaveSummaryUncached = (function () {
 				case "none":
 					r += `SP: none.`;
 					break;
-				default:
-					break;
+
 			}
 		}
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_smart_attraction(slave) {
 		if (slave.attrKnown === 1) {
 			if ((slave.attrXX < 100) && (slave.clitSetting === "women")) {
@@ -3669,7 +3809,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_behavior_flaw(slave) {
 		r += `<span class="red">`;
 		switch (slave.behavioralFlaw) {
@@ -3707,7 +3849,9 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_sex_flaw(slave) {
 		switch (slave.sexualFlaw) {
 			case "hates oral":
@@ -3771,7 +3915,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_behavior_quirk(slave) {
 		r += `<span class="green">`;
 		switch (slave.behavioralQuirk) {
@@ -3809,7 +3955,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_sex_quirk(slave) {
 		switch (slave.sexualQuirk) {
 			case "gagfuck queen":
@@ -3846,11 +3994,13 @@ window.SlaveSummaryUncached = (function () {
 		r += `</span> `;
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_extended_family(slave) {
 		let handled = 0;
 		if (slave.mother > 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.mother;
 			});
 			if (_ssj !== -1) {
@@ -3876,7 +4026,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `${V.missingTable[slave.mother].fullName}'s daughter `;
 		}
 		if (slave.father > 0 && slave.father !== slave.mother) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.father;
 			});
 			if (_ssj !== -1) {
@@ -3902,7 +4052,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `${V.missingTable[slave.father].fullName}'s daughter`;
 		}
 		if (slave.daughters === 1) {
-			let _ssj = V.slaves.findIndex(function (s) {
+			let _ssj = V.slaves.findIndex(function(s) {
 				return s.mother === slave.ID;
 			});
 			if (_ssj !== -1) {
@@ -3914,7 +4064,7 @@ window.SlaveSummaryUncached = (function () {
 				}
 			}
 			r += " ";
-			_ssj = V.slaves.findIndex(function (s) {
+			_ssj = V.slaves.findIndex(function(s) {
 				return s.father === slave.ID;
 			});
 			if (_ssj !== -1) {
@@ -3930,7 +4080,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `multiple daughters `;
 		}
 		if (slave.sisters === 1) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return areSisters(s, slave) > 0;
 			});
 			if (_ssj !== -1) {
@@ -3946,7 +4096,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `multiple sisters `;
 		}
 		if (slave.relationship > 0 && handled !== 1) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationshipTarget;
 			});
 			if (_ssj !== -1) {
@@ -3964,10 +4114,12 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_legacy_family(slave) {
 		if (slave.relation !== 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationTarget;
 			});
 			if (_ssj !== -1) {
@@ -3975,7 +4127,7 @@ window.SlaveSummaryUncached = (function () {
 			}
 		}
 		if (slave.relationship > 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationshipTarget;
 			});
 			if (_ssj !== -1) {
@@ -3996,18 +4148,22 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_clone(slave) {
 		if (slave.clone !== 0) {
 			r += ` Clone`;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function short_rival(slave) {
 		if (slave.rivalry !== 0) {
 			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.rivalryTarget;
 			});
 			if (_ssj !== -1) {
@@ -4024,11 +4180,13 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_extended_family(slave) {
 		let handled = 0;
 		if (slave.mother > 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.mother;
 			});
 			if (_ssj !== -1) {
@@ -4055,7 +4213,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `${V.missingTable[slave.mother].fullName}'s <span class="lightgreen">daughter.</span> `;
 		}
 		if (slave.father > 0 && slave.father !== slave.mother) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.father;
 			});
 			if (_ssj !== -1) {
@@ -4082,7 +4240,7 @@ window.SlaveSummaryUncached = (function () {
 			r += `${V.missingTable[slave.father].fullName}'s <span class="lightgreen">daughter.</span> `;
 		}
 		if (slave.daughters === 1) {
-			let _ssj = V.slaves.findIndex(function (s) {
+			let _ssj = V.slaves.findIndex(function(s) {
 				return s.mother === slave.ID;
 			});
 			if (_ssj !== -1) {
@@ -4094,7 +4252,7 @@ window.SlaveSummaryUncached = (function () {
 				}
 				r += `.</span> `;
 			}
-			_ssj = V.slaves.findIndex(function (s) {
+			_ssj = V.slaves.findIndex(function(s) {
 				return s.father === slave.ID;
 			});
 			if (_ssj !== -1) {
@@ -4116,7 +4274,7 @@ window.SlaveSummaryUncached = (function () {
 			}
 		}
 		if (slave.sisters === 1) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return areSisters(s, slave) > 0;
 			});
 			if (_ssj !== -1) {
@@ -4138,7 +4296,7 @@ window.SlaveSummaryUncached = (function () {
 			}
 		}
 		if (slave.relationship > 0 && handled !== 1) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationshipTarget;
 			});
 			if (_ssj !== -1) {
@@ -4155,10 +4313,12 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_legacy_family(slave) {
 		if (slave.relation !== 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationTarget;
 			});
 			if (_ssj !== -1) {
@@ -4174,7 +4334,7 @@ window.SlaveSummaryUncached = (function () {
 			}
 		}
 		if (slave.relationship > 0) {
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.relationshipTarget;
 			});
 			if (_ssj !== -1) {
@@ -4195,18 +4355,22 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_clone(slave) {
 		if (slave.clone !== 0) {
 			r += ` <span class="skyblue">Clone of ${slave.clone}.</span>`;
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_rival(slave) {
 		if (slave.rivalry !== 0) {
 			r += `&nbsp;&nbsp;&nbsp;&nbsp;`;
-			const _ssj = V.slaves.findIndex(function (s) {
+			const _ssj = V.slaves.findIndex(function(s) {
 				return s.ID === slave.rivalryTarget;
 			});
 			if (_ssj !== -1) {
@@ -4222,7 +4386,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_clothes(slave) {
 		switch (slave.clothes) {
 			case "attractive lingerie":
@@ -4550,7 +4716,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_collar(slave) {
 		switch (slave.collar) {
 			case "uncomfortable leather":
@@ -4616,13 +4784,14 @@ window.SlaveSummaryUncached = (function () {
 			case "porcelain mask":
 				r += `Porcelain mask.`;
 				break
-			default:
-				break;
+
 		}
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_belly(slave) {
 		switch (slave.bellyAccessory) {
 			case "shapewear":
@@ -4646,13 +4815,14 @@ window.SlaveSummaryUncached = (function () {
 			case "an extreme corset":
 				r += `Extreme corsetage.`;
 				break;
-			default:
-				break;
+
 		}
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_legs(slave) {
 		if (slave.legAccessory === "short stockings") {
 			r += `Short stockings.`;
@@ -4662,7 +4832,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_shoes(slave) {
 		if (slave.shoes === "heels") {
 			r += `Heels.`;
@@ -4680,7 +4852,9 @@ window.SlaveSummaryUncached = (function () {
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_chastity(slave) {
 		if (slave.chastityAnus === 1 && slave.chastityPenis === 1 && slave.chastityVagina === 1) {
 			r += `Full chastity.`;
@@ -4697,7 +4871,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_vaginal_acc(slave) {
 		if (slave.vaginalAttachment !== "vibrator") {
 			switch (slave.vaginalAccessory) {
@@ -4725,8 +4901,7 @@ window.SlaveSummaryUncached = (function () {
 				case "long, huge dildo":
 					r += `Long and wide vaginal dildo.`;
 					break;
-				default:
-					break;
+
 			}
 		}
 		r += " ";
@@ -4735,14 +4910,15 @@ window.SlaveSummaryUncached = (function () {
 				case "vibrator":
 					r += `Vibrating dildo.`;
 					break;
-				default:
-					break;
+
 			}
 			r += " ";
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_dick_acc(slave) {
 		switch (slave.dickAccessory) {
 			case "sock":
@@ -4754,13 +4930,14 @@ window.SlaveSummaryUncached = (function () {
 			case "smart bullet vibrator":
 				r += `Smart frenulum bullet vibrator.`;
 				break;
-			default:
-				break;
+
 		}
 		r += " ";
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function long_buttplug(slave) {
 		switch (slave.buttplug) {
 			case "plug":
@@ -4781,8 +4958,7 @@ window.SlaveSummaryUncached = (function () {
 			case "long, huge plug":
 				r += `Enormous buttplug.`;
 				break;
-			default:
-				break;
+
 		}
 		r += " ";
 		switch (slave.buttplugAttachment) {
@@ -4795,12 +4971,13 @@ window.SlaveSummaryUncached = (function () {
 			case "fox tail":
 				r += `Attached fox tail. `;
 				break;
-			default:
-				break;
+
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function rules_assistant(slave) {
 		if (slave.useRulesAssistant === 0) {
 			r += `<span class="lightgreen">RA-Exempt</span> `;
@@ -4809,7 +4986,9 @@ window.SlaveSummaryUncached = (function () {
 		}
 	}
 
-	/** @param {App.Entity.SlaveState} slave */
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 */
 	function origins(slave) {
 		r += `<br>`;
 		if (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) {
@@ -4824,81 +5003,117 @@ window.SlaveSummaryUncached = (function () {
 App.UI.PassageSlaveFilers = {
 	"Main": s => (s.assignmentVisible === 1),
 	"Personal Attention Select": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0),
-	"Agent Select": s => (s.fuckdoll === 0 && s.devotion > 20 && s.intelligence + s.intelligenceImplant > 15 && s.intelligenceImplant >= 15 && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) && s.broodmother < 2 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)),
-	"BG Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "guard you" && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)),
-	"Recruiter Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "recruit girls" && canWalk(s) && canSee(s) && canTalk(s)),
-	"HG Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "be your Head Girl" && canWalk(s) && canHear(s) && canSee(s) && canTalk(s)),
+	"Agent Select": s => ((s.fuckdoll === 0 && s.devotion > 20 && s.intelligence + s.intelligenceImplant > 15 && s.intelligenceImplant >= 15 && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) && s.broodmother < 2 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.arcologyAgent.manager.slaveHasExperience(s)))),
+	"BG Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "guard you" && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.armory.manager.slaveHasExperience(s)))),
+	"Recruiter Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "recruit girls" && canWalk(s) && canSee(s) && canTalk(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.penthouse.manager.slaveHasExperience(s)))),
+	"HG Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "be your Head Girl" && canWalk(s) && canHear(s) && canSee(s) && canTalk(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.headGirlSuite.manager.slaveHasExperience(s)))),
 	"Head Girl Suite": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "be your Head Girl" && s.indentureRestrictions <= 0 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) ||
-		(State.variables.Flag !== 0 && s.assignment === "live with your Head Girl"))),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "be your Head Girl" && s.indentureRestrictions <= 0 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) ||
+		(State.variables.SlaveSummaryFiler !== "assignable" && s.assignment === "live with your Head Girl"))),
 	"Subordinate Targeting": s => (s.devotion >= -20 && s.fuckdoll === 0 && State.variables.activeSlave.ID !== s.ID && (State.variables.activeSlave.amp !== 1 || s.amp !== 1)),
-	"Spa": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "rest in the spa") ||
-		(State.variables.Flag === 1 && s.assignment === "rest in the spa") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Attendant.ID))),
-	"Attendant Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)),
+	"Spa": s => ((s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "rest in the spa") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "rest in the spa") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Attendant.ID))) ||
+		(s.assignmentVisible === 0 && s.fuckdoll <= 0 && (
+			(State.variables.SlaveSummaryFiler === "transferable" && s.assignment !== "rest in the spa")))),
+	"Attendant Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.spa.manager.slaveHasExperience(s)))),
 	"Nursery": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (s.devotion > 20 || s.trust > 20) && (
-		(State.variables.Flag === 0 && s.assignment !== "work as a nanny") ||
-		(State.variables.Flag === 1 && s.assignment === "work as a nanny") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Matron.ID))),
-	"Matron Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "work as a nanny") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "work as a nanny") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Matron.ID))),
+	"Matron Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.nursery.manager.slaveHasExperience(s)))),
 	"Brothel": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "work in the brothel") ||
-		(State.variables.Flag === 1 && s.assignment === "work in the brothel") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Madam.ID))),
-	"Madam Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "work in the brothel") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "work in the brothel") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Madam.ID))),
+	"Madam Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.brothel.manager.slaveHasExperience(s)))),
 	"Club": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "serve in the club") ||
-		(State.variables.Flag === 1 && s.assignment === "serve in the club") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.DJ.ID))),
-	"DJ Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canTalk(s) && canHear(s) && canWalk(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)),
-	"Clinic": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "get treatment in the clinic") ||
-		(State.variables.Flag === 1 && s.assignment === "get treatment in the clinic") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Nurse.ID))),
-	"Nurse Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s)),
-	"Schoolroom": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.fetish !== "mindbroken" && s.assignment !== "learn in the schoolroom") ||
-		(State.variables.Flag === 1 && s.assignment === "learn in the schoolroom") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Schoolteacher.ID))),
-	"Schoolteacher Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canTalk(s) && canHear(s) && canSee(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "serve in the club") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "serve in the club") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.DJ.ID))),
+	"DJ Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canTalk(s) && canHear(s) && canWalk(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.club.manager.slaveHasExperience(s)))),
+	"Clinic": s => ((s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "get treatment in the clinic") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "get treatment in the clinic") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Nurse.ID))) ||
+		(s.assignmentVisible === 0 && s.fuckdoll <= 0 && (
+			(State.variables.SlaveSummaryFiler === "transferable" && s.assignment !== "get treatment in the clinic")))),
+	"Nurse Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.clinic.manager.slaveHasExperience(s)))),
+	"Schoolroom": s => ((s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
+		(State.variables.SlaveSummaryFiler === "assignable" && s.fetish !== "mindbroken" && s.assignment !== "learn in the schoolroom") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "learn in the schoolroom") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Schoolteacher.ID))) ||
+		(s.assignmentVisible === 0 && s.fuckdoll <= 0 && (
+			(State.variables.SlaveSummaryFiler === "transferable" && s.assignment !== "learn in the schoolroom")))),
+	"Schoolteacher Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canTalk(s) && canHear(s) && canSee(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.schoolroom.manager.slaveHasExperience(s)))),
 	"Dairy": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "work in the dairy") ||
-		(State.variables.Flag === 1 && s.assignment === "work in the dairy") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Milkmaid.ID))),
-	"Milkmaid Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 20 && canWalk(s) && canSee(s) && canHear(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "work in the dairy") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "work in the dairy") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Milkmaid.ID))),
+	"Milkmaid Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 20 && canWalk(s) && canSee(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.dairy.manager.slaveHasExperience(s)))),
 	"Farmyard": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "work as a farmhand") ||
-		(State.variables.Flag === 1 && s.assignment === "work as a farmhand") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Farmer.ID))),
-	"Farmer Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "work as a farmhand") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "work as a farmhand") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Farmer.ID))),
+	"Farmer Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.farm.manager.slaveHasExperience(s)))),
 	"Servants' Quarters": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "work as a servant") ||
-		(State.variables.Flag === 1 && s.assignment === "work as a servant") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Stewardess.ID))),
-	"Stewardess Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "work as a servant") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "work as a servant") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Stewardess.ID))),
+	"Stewardess Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.servantsQuarters.manager.slaveHasExperience(s)))),
 	"Master Suite": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (
-		(State.variables.Flag === 0 && s.assignment !== "serve in the master suite") ||
-		(State.variables.Flag === 1 && s.assignment === "serve in the master suite") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Concubine.ID))),
-	"Concubine Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.amp !== 1),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "serve in the master suite") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "serve in the master suite") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Concubine.ID))),
+	"Concubine Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.amp !== 1) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.masterSuite.manager.slaveHasExperience(s)))),
 	"Cellblock": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && s.fetish !== "mindbroken" && (
-		(State.variables.Flag === 0 && s.assignment !== "be confined in the cellblock") ||
-		(State.variables.Flag === 1 && s.assignment === "be confined in the cellblock") ||
-		(State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Wardeness.ID))),
-	"Wardeness Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "be confined in the cellblock") ||
+		(State.variables.SlaveSummaryFiler === "occupying" && s.assignment === "be confined in the cellblock") ||
+		(State.variables.SlaveSummaryFiler === "leading" && s.ID === State.variables.Wardeness.ID))),
+	"Wardeness Select": s => ((s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)) &&
+		((State.variables.SlaveSummaryFiler !== "experienced") ||
+		(State.variables.SlaveSummaryFiler === "experienced" && App.Entity.facilities.cellblock.manager.slaveHasExperience(s)))),
 	"Arcade": s => (s.assignmentVisible === 1 && (State.variables.arcade >= State.variables.arcadeSlaves || State.variables.arcadeUpgradeFuckdolls === 1) && (
-		(State.variables.Flag === 0 && s.assignment !== "be confined in the arcade") ||
-		(State.variables.Flag !== 0 && s.assignment === "be confined in the arcade"))),
+		(State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "be confined in the arcade") ||
+		(State.variables.SlaveSummaryFiler !== "assignable" && s.assignment === "be confined in the arcade"))),
 	"Pit": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && (
-		(State.variables.Flag === 0 && !State.variables.fighterIDs.includes(s.ID) && canWalk(s) && (s.assignment !== "guard you") && (s.assignment !== "work in the dairy" || State.variables.dairyRestraintsSetting < 2)) ||
-		(State.variables.Flag !== 0 && State.variables.fighterIDs.includes(s.ID)))),
+		(State.variables.SlaveSummaryFiler === "assignable" && !State.variables.fighterIDs.includes(s.ID) && canWalk(s) && (s.assignment !== "guard you") && (s.assignment !== "work in the dairy" || State.variables.dairyRestraintsSetting < 2)) ||
+		(State.variables.SlaveSummaryFiler !== "assignable" && State.variables.fighterIDs.includes(s.ID)))),
 	"Coursing Association": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && (
-		(State.variables.Flag === 0 && canWalk(s) && State.variables.Lurcher.ID !== s.ID) ||
-		(State.variables.Flag !== 0 && State.variables.Lurcher.ID === s.ID))),
-	"New Game Plus": s => ((State.variables.Flag === 0 && s.assignment !== "be imported") || (State.variables.Flag !== 0 && s.assignment === "be imported")),
-	"Rules Slave Select": s => ((State.variables.Flag === 0 && !ruleSlaveSelected(s, State.variables.currentRule)) || (State.variables.Flag !== 0 && ruleSlaveSelected(s, State.variables.currentRule))),
-	"Rules Slave Exclude": s => ((State.variables.Flag === 0 && !ruleSlaveExcluded(s, State.variables.currentRule)) || (State.variables.Flag !== 0 && ruleSlaveExcluded(s, State.variables.currentRule))),
+		(State.variables.SlaveSummaryFiler === "assignable" && canWalk(s) && State.variables.Lurcher.ID !== s.ID) ||
+		(State.variables.SlaveSummaryFiler !== "assignable" && State.variables.Lurcher.ID === s.ID))),
+	"New Game Plus": s => ((State.variables.SlaveSummaryFiler === "assignable" && s.assignment !== "be imported") || (State.variables.SlaveSummaryFiler !== "assignable" && s.assignment === "be imported")),
+	"Rules Slave Select": s => ((State.variables.SlaveSummaryFiler === "assignable" && !ruleSlaveSelected(s, State.variables.currentRule)) || (State.variables.SlaveSummaryFiler !== "assignable" && ruleSlaveSelected(s, State.variables.currentRule))),
+	"Rules Slave Exclude": s => ((State.variables.SlaveSummaryFiler === "assignable" && !ruleSlaveExcluded(s, State.variables.currentRule)) || (State.variables.SlaveSummaryFiler !== "assignable" && ruleSlaveExcluded(s, State.variables.currentRule))),
 	"Matchmaking": s => (s.devotion >= 100 && s.relationship === State.variables.activeSlave.relationship && s.ID !== State.variables.activeSlave.ID),
 	"Dinner Party Preparations": s => (s.assignmentVisible === 1 && s.fuckdoll === 0),
 };
@@ -4914,12 +5129,14 @@ App.UI.PassageSlaveFilers = {
  * @param {string} passageName
  * @returns {string}
  */
-App.UI.slaveSummaryList = function (passageName) {
+App.UI.slaveSummaryList = function(passageName) {
 	'use strict';
 	const V = State.variables;
 
 	const _indexed = 0;
-	/** @type {App.Entity.SlaveState[]} */
+	/**
+	 * @type {App.Entity.SlaveState[]}
+	 */
 	const slaves = V.slaves;
 
 	V.assignTo = passageName; // would be passed to the "Assign" passage
@@ -4945,6 +5162,10 @@ App.UI.slaveSummaryList = function (passageName) {
 	 * Usage: << htag id tag >> ... << /htag>>
 	 * Usage: << htag attributes >> ... << /htag>>
 	 * Usage: << htag attributes tag >> ... << /htag>>
+	 * @param {string} text
+	 * @param {object} attributes
+	 * @param {string} tag
+	 * @returns {string}
 	 */
 	function htag(text, attributes, tag) {
 		const payload = text.replace(/(^\n+|\n+$)/, "");
@@ -4976,15 +5197,15 @@ App.UI.slaveSummaryList = function (passageName) {
 		return r.join("");
 	}
 
-	const _filteredSlaveIdxs = slaves.map(function (slave, idx) {
+	const _filteredSlaveIdxs = slaves.map(function(slave, idx) {
 		return _passagePreFilter(slave) ? idx : null;
-	}).filter(function (idx) {
+	}).filter(function(idx) {
 		return idx !== null;
 	});
 
-	const _indexSlavesIdxs = slaves.map(function (slave, idx) {
+	const _indexSlavesIdxs = slaves.map(function(slave, idx) {
 		return _passagePreFilter(slave) ? idx : null;
-	}).filter(function (idx) {
+	}).filter(function(idx) {
 		return idx !== null;
 	});
 
@@ -4995,10 +5216,10 @@ App.UI.slaveSummaryList = function (passageName) {
 	if (V.useSlaveListInPageJSNavigation === 1) {
 		const _Count = _indexSlavesIdxs.length;
 		/* Useful for finding weird combinations — usages of this passage that don't yet generate the quick index.
-		 *	<<print 'pass/count/indexed/flag::[' + passageName + '/' + _Count + '/' + _indexed + '/' + $Flag + ']'>>
+		 *	<<print 'pass/count/indexed/flag::[' + passageName + '/' + _Count + '/' + _indexed + '/' + $SlaveSummaryFiler + ']'>>
 		 */
 
-		if (((_Count > 1) && (_indexed === 0) && (((passageName === "Main") && (V.Flag === undefined) && ((V.useSlaveSummaryTabs === 0) || (V.slaveAssignmentTab === "all"))) || (V.Flag === 1)))) {
+		if (((_Count > 1) && (_indexed === 0) && (((passageName === "Main") && (V.SlaveSummaryFiler === undefined) && ((V.useSlaveSummaryTabs === 0) || (V.slaveAssignmentTab === "all"))) || (V.SlaveSummaryFiler === "occupying")))) {
 			const _buttons = [];
 			let _offset = -50;
 			if (/Select/i.test(passageName)) {
@@ -5088,10 +5309,10 @@ App.UI.slaveSummaryList = function (passageName) {
 		"HG Select": makeSelectionPassageInfo(App.Entity.facilities.headGirlSuite, "HG Workaround"),
 		"BG Select": makeSelectionPassageInfo(App.Entity.facilities.armory, "Bodyguard Workaround"),
 		"Attendant Select": makeSelectionPassageInfo(App.Entity.facilities.spa, "Attendant Workaround"),
-		"Concubine Select":  makeSelectionPassageInfo(App.Entity.facilities.masterSuite, "Concubine Workaround"),
+		"Concubine Select": makeSelectionPassageInfo(App.Entity.facilities.masterSuite, "Concubine Workaround"),
 		"Matron Select": makeSelectionPassageInfo(App.Entity.facilities.nursery, "Matron Workaround"),
 		"Madam Select": makeSelectionPassageInfo(App.Entity.facilities.brothel, "Madam Workaround"),
-		"Milkmaid Select": makeSelectionPassageInfo(App.Entity.facilities.dairy,  "Milkmaid Workaround"),
+		"Milkmaid Select": makeSelectionPassageInfo(App.Entity.facilities.dairy, "Milkmaid Workaround"),
 		"Nurse Select": makeSelectionPassageInfo(App.Entity.facilities.clinic, "Nurse Workaround"),
 		"DJ Select": makeSelectionPassageInfo(App.Entity.facilities.club, "DJ Workaround"),
 		"Farmer Select": makeSelectionPassageInfo(App.Entity.facilities.farmyard, "Farmer Workaround"),
@@ -5113,7 +5334,7 @@ App.UI.slaveSummaryList = function (passageName) {
 		if (passageName === "Main" && V.useSlaveSummaryTabs === 1) {
 			if (tabName === "overview") {
 				if (V.showOneSlave === "Head Girl" && _Slave.assignment !== App.Data.Facilities.headGirlSuite.manager.assignment) continue;
-				if (V.showOneSlave === "recruit girls" && _Slave.assignment !== App.Entity.facilities.penthouse.manager.assignment) continue;
+				if (V.showOneSlave === "recruit girls" && _Slave.assignment !== App.Data.Facilities.penthouse.manager.assignment) continue;
 				if (V.showOneSlave === "guard you" && _Slave.assignment !== App.Data.Facilities.armory.manager.assignment) continue;
 			} else {
 				if (tabName === "resting") {
@@ -5126,13 +5347,13 @@ App.UI.slaveSummaryList = function (passageName) {
 
 		const _slaveName = SlaveFullName(_Slave);
 
-		const _tableCount = 0;
+		// const _tableCount = 0;
 		let slaveImagePrinted = (V.seeImages === 1) && (V.seeSummaryImages === 1);
 
 		res.push(`<div id="slave_${ _Slave.ID }" style="clear:both">`);
 
 		if (passageFacility !== undefined) {
-			if (V.Flag === 0) {
+			if (V.SlaveSummaryFiler === "assignable" || V.SlaveSummaryFiler === "transferable") {
 				if (!passageFacility.hasFreeSpace) {
 					res.pop();
 					continue;
@@ -5142,13 +5363,13 @@ App.UI.slaveSummaryList = function (passageName) {
 					let rejectString = rejects.length === 1 ?
 						rejects[0]:
 						`${_slaveName}: <ul>${rejects.map(e => `<li>${e}</li>`).join('')}</ul>`;
-					res.push(rejectString + '</div>');
+					res.push(`${rejectString}</div>`);
 					continue;
 				} else {
 					res.push(dividerAndImage(_Slave));
 					res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`);
 				}
-			} else if (V.Flag === 1) {
+			} else if (V.SlaveSummaryFiler === "occupying") {
 				res.push(dividerAndImage(_Slave));
 				res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`);
 			} else {
@@ -5163,17 +5384,17 @@ App.UI.slaveSummaryList = function (passageName) {
 			case "Main":
 				if ((_Slave.choosesOwnClothes === 1) && (_Slave.clothes === "choosing her own clothes")) {
 					const _oldDevotion = _Slave.devotion;
-					const _chosenClothes = saChoosesOwnClothes(_Slave);
+					// const _chosenClothes = saChoosesOwnClothes(_Slave);
 					slaves[_ssi].devotion = _oldDevotion;
 					_Slave = slaves[_ssi]; /* restore devotion value so repeatedly changing clothes isn't an exploit */
 				}
 				res.push(dividerAndImage(_Slave));
-				if (App.Data.Facilities.headGirlSuite.manager.assignment === _Slave.assignment) res.push('<strong>@@.lightcoral;HG@@</strong> ');
-				else if (App.Data.Facilities.penthouse.manager.assignment === _Slave.assignment) res.push('<strong>@@.lightcoral;RC@@</strong> ');
-				else if (App.Data.Facilities.armory.manager.assignment === _Slave.assignment) res.push('<strong>@@.lightcoral;BG@@</strong> ');
+				if (App.Data.Facilities.headGirlSuite.manager.assignment === _Slave.assignment) res.push('<strong><span class="lightcoral">HG</span></strong> ');
+				else if (App.Data.Facilities.penthouse.manager.assignment === _Slave.assignment) res.push('<strong><span class="lightcoral">RC</span></strong> ');
+				else if (App.Data.Facilities.armory.manager.assignment === _Slave.assignment) res.push('<strong><span class="lightcoral">BG</span></strong> ');
 
 				if (Array.isArray(V.personalAttention) && V.personalAttention.findIndex(s => s.ID === _Slave.ID) !== -1) {
-					res.push('<strong>@@.lightcoral; PA@@</strong> ');
+					res.push('<strong><span class="lightcoral"> PA</span></strong> ');
 				}
 				res.push(this.passageLink(_slaveName, 'Slave Interact', `$activeSlave = $slaves[${_ssi}]`)); /* lists their names */
 				break;
@@ -5187,7 +5408,7 @@ App.UI.slaveSummaryList = function (passageName) {
 				res.push(`[[${_slaveName}|Subordinate Targeting][$activeSlave.subTarget = $slaves[${_ssi}].ID]]`);
 				break;
 			case "Coursing Association":
-				if (V.Flag === 0) {
+				if (V.SlaveSummaryFiler === "assignable") {
 					res.push(dividerAndImage(_Slave));
 					res.push(`[[${_slaveName}|Assign][$i = ${_ssi}]]`);
 				} else {
@@ -5197,15 +5418,15 @@ App.UI.slaveSummaryList = function (passageName) {
 				break;
 			case "New Game Plus":
 				res.push(dividerAndImage(_Slave));
-				if (V.Flag === 0) {
-					res.push(`__''@@.pink;${_Slave.slaveName}@@''__`);
+				if (V.SlaveSummaryFiler === "assignable") {
+					res.push(`__''<span class="pink">${_Slave.slaveName}</span>''__`);
 				} else {
-					res.push(`__''@@.pink;${_Slave.slaveName}@@''__`);
+					res.push(`__''<span class="pink">${_Slave.slaveName}</span>''__`);
 				}
 				break;
 			case "Rules Slave Select":
 				slaveImagePrinted = false;
-				if (V.Flag === 0) {
+				if (V.SlaveSummaryFiler === "assignable") {
 					res.push(`__''[[${_slaveName}|Rules Slave Select Workaround][$activeSlave = $slaves[${_ssi}]]]''__`);
 				} else {
 					res.push(`__''[[${_slaveName}|Rules Slave Deselect Workaround][$activeSlave = $slaves[${_ssi}]]]''__`);
@@ -5213,7 +5434,7 @@ App.UI.slaveSummaryList = function (passageName) {
 				break;
 			case "Rules Slave Exclude":
 				slaveImagePrinted = false;
-				if (V.Flag === 0) {
+				if (V.SlaveSummaryFiler === "assignable") {
 					res.push(`__''[[${_slaveName}|Rules Slave Exclude Workaround][$activeSlave = $slaves[${_ssi}]]]''__`);
 				} else {
 					res.push(`__''[[${_slaveName}|Rules Slave NoExclude Workaround][$activeSlave = $slaves[${_ssi}]]]''__`);
@@ -5227,8 +5448,7 @@ App.UI.slaveSummaryList = function (passageName) {
 				res.push(dividerAndImage(_Slave));
 				res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`);
 				break;
-			default:
-				break;
+
 		}
 
 		SlaveStatClamp(_Slave);
@@ -5239,9 +5459,9 @@ App.UI.slaveSummaryList = function (passageName) {
 
 		res.push(' will ');
 		if ((_Slave.assignment === "rest") && (_Slave.health >= -20)) {
-			res.push("<strong><u><span class=lawngreen>rest</span></u></strong>");
+			res.push(`<strong><u><span class="lawngreen">rest</span></u></strong>`);
 		} else if ((_Slave.assignment === "stay confined") && ((_Slave.devotion > 20) || ((_Slave.trust < -20) && (_Slave.devotion >= -20)) || ((_Slave.trust < -50) && (_Slave.devotion >= -50)))) {
-			res.push("<strong><u><span class=lawngreen>stay confined.</span></u></strong>");
+			res.push(`<strong><u><span class="lawngreen">stay confined.</span></u></strong>`);
 			if (_Slave.sentence > 0) {
 				res.push(` (${_Slave.sentence} weeks)`);
 			}
@@ -5268,7 +5488,7 @@ App.UI.slaveSummaryList = function (passageName) {
 			}
 		} /* closes _numFacilities */
 
-		if ((passageName !== 'Main') || (V.Flag !== undefined) || (V.useSlaveSummaryTabs === 0) || (tabName === "all")) {
+		if ((passageName !== 'Main') || (V.SlaveSummaryFiler !== undefined) || (V.useSlaveSummaryTabs === 0) || (tabName === "all")) {
 			res.push(`<span id="slave-${slaves[_ssi].ID}">&nbsp;</span>`);
 		}
 		res.push('<br/>');
@@ -5285,18 +5505,20 @@ App.UI.slaveSummaryList = function (passageName) {
 
 		if (passageFacility !== undefined) {
 			res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '');
-			if (V.Flag === 0) {
+			if (V.SlaveSummaryFiler === "assignable") {
+				res.push(`<<link "Send ${_Slave.object} to ${passageFacility.name}" "Assign">><<set $i = ${_ssi}>><</link>>`);
+			} else if (V.SlaveSummaryFiler === "transferable") {
 				res.push(`<<link "Send ${_Slave.object} to ${passageFacility.name}" "Assign">><<set $i = ${_ssi}>><</link>>`);
-			} else if (V.Flag === 1) {
+			} else if (V.SlaveSummaryFiler === "occupying") {
 				res.push(`<<link "Remove ${_Slave.object} from ${passageFacility.name}" "Retrieve">><<set $i = ${_ssi}>><</link>>`);
-			} else if (passageFacility.desc.manager !== null){
+			} else if (passageFacility.desc.manager !== null) {
 				const managerCapName = capFirstChar(passageFacility.desc.manager.position);
 				res.push(`[[Change or remove ${managerCapName}|${managerCapName} Select]]`);
 			}
 		} else if (slaveSelect !== undefined) {
 			if (slaveSelect.facility.manager.slaveHasExperience(_Slave)) {
 				res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '');
-				res.push('@@.lime;Has applicable career experience.@@');
+				res.push('<span class="lime">Has applicable career experience.</span>');
 			}
 		}
 		switch (passageName) {
@@ -5305,19 +5527,19 @@ App.UI.slaveSummaryList = function (passageName) {
 			case "Recruiter Select":
 				if (setup.recruiterCareers.includes(_Slave.career) || (_Slave.skill.recruiter >= V.masteredXP)) {
 					res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '');
-					res.push('@@.lime;Has applicable career experience.@@');
+					res.push('<span class="lime">Has applicable career experience.</span>');
 				}
 				break;
 			case "New Game Plus":
 				res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '');
-				if (V.Flag === 0) {
+				if (V.SlaveSummaryFiler === "assignable") {
 					res.push(`<<link "Add to import list" "New Game Plus">>
-							<<set $slavesToImport += 1,$Flag = 1>>
+							<<set $slavesToImport += 1,$SlaveSummaryFiler = "occupying">>
 							<<= assignJob($slaves[${_ssi}], "be imported")>>
 						<</link>>`);
 				} else {
 					res.push(`<<link "Remove from import list" "New Game Plus">>
-							<<set $slavesToImport -= 1,$Flag = 0>>
+							<<set $slavesToImport -= 1,$SlaveSummaryFiler = "assignable">>
 							<<= removeJob($slaves[${_ssi}], $slaves[${_ssi}].assignment)>>
 						<</link>>`);
 				}
@@ -5330,8 +5552,7 @@ App.UI.slaveSummaryList = function (passageName) {
 				res.push(`<br>${ V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1}` ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '');
 				res.push(`[[Make her the main course|Dinner Party Execution][$activeSlave = $slaves[${_ssi}]]]`);
 				break;
-			default:
-				break;
+
 		}
 	}
 	return res.join("");
@@ -5341,7 +5562,7 @@ App.UI.slaveSummaryList = function (passageName) {
  * Adds/removes a slave with the given id to/from the personal attention array
  * @param {number} id slave id
  */
-App.UI.selectSlaveForPersonalAttention = function (id) {
+App.UI.selectSlaveForPersonalAttention = function(id) {
 	const V = State.variables;
 
 	if (!Array.isArray(V.personalAttention)) {
@@ -5351,7 +5572,7 @@ App.UI.selectSlaveForPersonalAttention = function (id) {
 			trainingRegimen: "undecided"
 		}];
 	} else {
-		const _pai = V.personalAttention.findIndex(function (s) {
+		const _pai = V.personalAttention.findIndex(function(s) {
 			return s.ID === id;
 		});
 		if (_pai === -1) {
diff --git a/src/js/spanMacroJS.js b/src/js/spanMacroJS.js
index 19eb0a5bef19ee032a69f1dae269961c8c182db6..43bf342a50f17dc2a59d0fe327c1c02de533a6c6 100644
--- a/src/js/spanMacroJS.js
+++ b/src/js/spanMacroJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /*
  * <<span>> macro
  * A minimal macro which allows to create <span> elements with dynamic IDs.
@@ -6,15 +5,15 @@
  * Usage: <<span $variable>>...<</span>>
  */
 Macro.add('span', {
-	skipArgs : true,
-	tags : null,
+	skipArgs: true,
+	tags: null,
 
 	handler() {
 		const payload = this.payload[0].contents.replace(/(^\n+|\n+$)/, '');
 		let statement = this.args.raw.trim();
 		let result;
 
-		if(statement.length === 0) {
+		if (statement.length === 0) {
 			return this.error('invalid syntax, format: <<span id>>');
 		}
 
diff --git a/src/js/storyJS.js b/src/js/storyJS.js
index 8ece004e7cc16fd8ffee8c90c85b13c94448ba4c..9d0e5a88cdc3ba26238ffc83123083d006e92c4e 100644
--- a/src/js/storyJS.js
+++ b/src/js/storyJS.js
@@ -3,19 +3,23 @@
 
 window.variableAsNumber = function(x, defaultValue, minValue, maxValue) {
 	x = Number(x);
-	if (x !== x) {// NaN
-		return defaultValue || 0;// In case the default value was not supplied.
+	if (x !== x) { // NaN
+		return defaultValue || 0; // In case the default value was not supplied.
 	}
-	if (x < minValue) {// Works even if minValue is undefined.
+	if (x < minValue) { // Works even if minValue is undefined.
 		return minValue;
 	}
-	if (x > maxValue) {// Works even if maxValue is undefined.
+	if (x > maxValue) { // Works even if maxValue is undefined.
 		return maxValue;
 	}
 	return x;
 };
 
-window.isSexuallyPure = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @return {boolean}
+ */
+window.isSexuallyPure = function(slave) {
 	if (!slave) {
 		return null;
 	}
@@ -60,6 +64,7 @@ window.filterInPlace = function(arr, callback, thisArg) {
 /** pregmod: are slave2's sperm compatible with slave1's eggs?
  * @param {App.Entity.SlaveState} slave1
  * @param {App.Entity.SlaveState} slave2
+ * @returns {boolean}
  */
 window.canBreed = function(slave1, slave2) {
 	if (!slave1 || !slave2) {
@@ -73,6 +78,7 @@ window.canBreed = function(slave1, slave2) {
  * both slaves must not be in chastity; slave2 need not achieve erection
  * @param {App.Entity.SlaveState} slave1
  * @param {App.Entity.SlaveState} slave2
+ * @returns {boolean}
  */
 window.canImpreg = function(slave1, slave2) {
 	if (!slave1 || !slave2) {
@@ -82,7 +88,8 @@ window.canImpreg = function(slave1, slave2) {
 	} else if (slave2.ID === -1) {
 		if (slave1.eggType !== "human") {
 			return false;
-		} else if (!canGetPregnant(slave1)) { /* includes chastity checks */
+		} else if (!canGetPregnant(slave1)) {
+			/* includes chastity checks */
 			return false;
 		} else {
 			return true;
@@ -91,7 +98,8 @@ window.canImpreg = function(slave1, slave2) {
 		return false;
 	} else if (slave2.chastityPenis === 1) {
 		return false;
-	} else if (slave2.pubertyXY === 0) { /* pregmod start */
+	} else if (slave2.pubertyXY === 0) {
+		/* pregmod start */
 		return false;
 	} else if (slave2.vasectomy === 1) {
 		return false;
@@ -105,7 +113,8 @@ window.canImpreg = function(slave1, slave2) {
 		}
 	} else if (!canBreed(slave1, slave2)) {
 		return false; /* pregmod end */
-	} else if (!canGetPregnant(slave1)) { /* includes chastity checks */
+	} else if (!canGetPregnant(slave1)) {
+		/* includes chastity checks */
 		return false;
 	} else {
 		return true;
@@ -115,9 +124,11 @@ window.canImpreg = function(slave1, slave2) {
 window.isPlayerFertile = function(PC) {
 	if (!PC) {
 		return null;
-	} else if (PC.preg !== 0) { /* currently pregnant, sterile, menopausal or on contraceptives */
+	} else if (PC.preg !== 0) {
+		/* currently pregnant, sterile, menopausal or on contraceptives */
 		return false;
-	} else if (PC.pregWeek < 0) { /* postpartum */
+	} else if (PC.pregWeek < 0) {
+		/* postpartum */
 		return false;
 	} else if (PC.vagina === 1) {
 		return true;
@@ -126,7 +137,11 @@ window.isPlayerFertile = function(PC) {
 	}
 };
 
-window.relationTargetWord = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {null | string}
+ */
+window.relationTargetWord = function(slave) {
 	if (!slave) {
 		return null;
 	} else if (slave.relation === "daughter") {
@@ -137,7 +152,11 @@ window.relationTargetWord = /** @param {App.Entity.SlaveState} slave */ function
 	return slave.relation;
 };
 
-window.milkAmount = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.milkAmount = function(slave) {
 	let milk;
 	let calcs;
 	if (!slave) {
@@ -183,7 +202,11 @@ window.milkAmount = /** @param {App.Entity.SlaveState} slave */ function (slave)
 	return milk;
 };
 
-window.cumAmount = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {number}
+ */
+window.cumAmount = function(slave) {
 	let cum = 0;
 	let calcs = 0;
 	if (!slave) {
@@ -229,7 +252,7 @@ window.cumAmount = /** @param {App.Entity.SlaveState} slave */ function (slave)
 	return cum;
 };
 
-window.lispReplace = function (text) {
+window.lispReplace = function(text) {
 	text = text.replace(/Sh/g, "Th");
 	text = text.replace(/SS/g, "Th");
 	text = text.replace(/Ss/g, "Th");
@@ -312,28 +335,44 @@ window.lispReplace = function (text) {
 	return text;
 };
 
-window.repGainSacrifice = /** @param {App.Entity.SlaveState} slave */ function (slave, arcology) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {object} arcology		// I think
+ * @returns {number}
+ */
+window.repGainSacrifice = function(slave, arcology) {
 	slave = slave || State.variables.activeSlave;
 	arcology = arcology || State.variables.arcologies[0];
 	if (!slave || !arcology || arcology.FSAztecRevivalist === "unset" || arcology.FSAztecRevivalist <= 0) {
 		return 0;
 	}
 	return Math.ceil(
-		(Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30)
-			* arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1));
+		(Math.min(100, Math.pow(1.0926, State.variables.week - slave.weekAcquired)) + slave.prestige * 30) * arcology.FSAztecRevivalist / 100 / ((State.variables.slavesSacrificedThisWeek || 0) + 1));
 };
 
-window.bodyguardSuccessorEligible = /** @param {App.Entity.SlaveState} slave */ function (slave) {
-	if (!slave) { return false; }
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {boolean}
+ */
+window.bodyguardSuccessorEligible = function(slave) {
+	if (!slave) {
+		return false;
+	}
 	return (slave.devotion > 50 && slave.muscles >= 0 && slave.weight < 100 && slave.boobs < 8000 && slave.butt < 10 && slave.belly < 5000 && slave.balls < 10 && slave.dick < 10 && slave.preg < 20 && slave.fuckdoll === 0 && slave.fetish !== "mindbroken" && canWalk(slave));
 };
 
 window.ngUpdateGenePool = function(genePool) {
 	const transferredSlaveIds = (State.variables.slaves || [])
-		.filter(function(s) { return s.ID >= 1200000; })
-		.map(function(s) { return s.ID - 1200000; });
+		.filter(function(s) {
+			return s.ID >= 1200000;
+		})
+		.map(function(s) {
+			return s.ID - 1200000;
+		});
 	return (genePool || [])
-		.filter(function(s) { return transferredSlaveIds.indexOf(s.ID) >= 0; })
+		.filter(function(s) {
+			return transferredSlaveIds.indexOf(s.ID) >= 0;
+		})
 		.map(function(s) {
 			const result = jQuery.extend(true, {}, s);
 			result.ID += 1200000;
@@ -345,11 +384,11 @@ window.ngUpdateMissingTable = function(missingTable) {
 	const newTable = {};
 
 	(State.variables.slaves || [])
-		.forEach(s => ([s.pregSource+1200000, s.mother+1200000, s.father+1200000]
+		.forEach(s => ([s.pregSource + 1200000, s.mother + 1200000, s.father + 1200000]
 			.filter(i => (i in missingTable))
 			.forEach(i => {
-				newTable[i-1200000] = missingTable[i];
-				newTable[i-1200000].ID -= 1200000;
+				newTable[i - 1200000] = missingTable[i];
+				newTable[i - 1200000].ID -= 1200000;
 			})));
 
 	return newTable;
@@ -362,28 +401,32 @@ window.toJson = function(obj) {
 	return jsontext;
 };
 
-window.nippleColor = /** @param {App.Entity.SlaveState} slave */ function (slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.nippleColor = function(slave) {
 	slave = slave || State.variables.activeSlave;
 	if (skinToneLevel(slave.skin) < 8) {
-		if (slave.preg > slave.pregData.normalBirth/4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
+		if (slave.preg > slave.pregData.normalBirth / 4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
 			return "brown";
 		} else {
 			return "pink";
 		}
 	} else if (skinToneLevel(slave.skin) < 14) {
-		if (slave.preg > slave.pregData.normalBirth/4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
+		if (slave.preg > slave.pregData.normalBirth / 4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
 			return "dark brown";
 		} else {
 			return "pink";
 		}
 	} else if (skinToneLevel(slave.skin) > 20) {
-		if (slave.preg > slave.pregData.normalBirth/4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
+		if (slave.preg > slave.pregData.normalBirth / 4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
 			return "black";
 		} else {
 			return "dark brown";
 		}
 	} else {
-		if (slave.preg > slave.pregData.normalBirth/4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
+		if (slave.preg > slave.pregData.normalBirth / 4 || (slave.counter.birthsTotal > 0 && slave.lactation > 0)) {
 			return "dark brown";
 		} else {
 			return "brown";
@@ -391,7 +434,12 @@ window.nippleColor = /** @param {App.Entity.SlaveState} slave */ function (slave
 	}
 };
 
-window.overpowerCheck = /** @param {App.Entity.SlaveState} slave */ function (slave, PC) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @param {object} PC
+ * @returns {number}
+ */
+window.overpowerCheck = function(slave, PC) {
 	let strength;
 
 	if (State.variables.arcologies[0].FSPhysicalIdealist !== "unset") {
@@ -407,6 +455,8 @@ window.overpowerCheck = /** @param {App.Entity.SlaveState} slave */ function (sl
 	}
 	strength += (185-slave.height);
 	strength -= (PC.belly/1000);
+	strength += (PC.warfare/3);
+	strength -= (State.variables.PCWoundCooldown * 15);
 
 	return strength;
 };
@@ -431,6 +481,7 @@ window.impregnatedBy = function(slave) {
  * returns true if mother was impregnated by father
  * @param {App.Entity.SlaveState} mother
  * @param {App.Entity.SlaveState} father
+ * @returns {boolean}
  */
 window.isImpregnatedBy = function(mother, father) {
 	return impregnatedBy(mother).includes(father.ID);
@@ -441,10 +492,15 @@ window.jsAlert = function(obj) {
 };
 
 window.jsConsoleInfo = function(obj) {
+	// eslint-disable-next-line no-console
 	console.info(obj);
 };
 
-window.SoftenBehavioralFlaw = /** @param {App.Entity.SlaveState} slave */ function SoftenBehavioralFlaw(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * 
+ */
+window.SoftenBehavioralFlaw = function SoftenBehavioralFlaw(slave) {
 	switch (slave.behavioralFlaw) {
 		case "arrogant":
 			slave.behavioralQuirk = "confident";
@@ -473,13 +529,16 @@ window.SoftenBehavioralFlaw = /** @param {App.Entity.SlaveState} slave */ functi
 		case "liberated":
 			slave.behavioralQuirk = "advocate";
 			break;
-		default:
-			break;
+
 	}
 	slave.behavioralFlaw = "none";
 };
 
-window.SoftenSexualFlaw = /** @param {App.Entity.SlaveState} slave */ function SoftenSexualFlaw(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * 
+ */
+window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) {
 	switch (slave.sexualFlaw) {
 		case "hates oral":
 			slave.sexualQuirk = "gagfuck queen";
@@ -508,8 +567,7 @@ window.SoftenSexualFlaw = /** @param {App.Entity.SlaveState} slave */ function S
 		case "judgemental":
 			slave.sexualQuirk = "size queen";
 			break;
-		default:
-			break;
+
 	}
 	slave.sexualFlaw = "none";
 };
@@ -608,10 +666,10 @@ window.printTrinkets = function printTrinkets() {
 			case "a Daughters of Liberty brassard":
 			case "a shot-torn flag of the failed nation whose militants attacked the Free City":
 				return desc;
-			// manual replacement
+				// manual replacement
 			case "a thank-you note from a MILF tourist whom you made feel welcome in the arcology":
 				return "several thank-you notes from MILF tourists whom you made feel welcome in the arcology";
-			// replacement by groups
+				// replacement by groups
 			default:
 				r = desc;
 				if (desc.endsWith("citizen")) { // will not reduce spam from different future societies
diff --git a/src/js/summaryWidgets.js b/src/js/summaryWidgets.js
index 0f67a230aad70e21456b6b89a8b416e3db3e2380..c0dc4cf8e091aaeee22ffdeee7c00d9cbec7c34e 100644
--- a/src/js/summaryWidgets.js
+++ b/src/js/summaryWidgets.js
@@ -1,11 +1,8 @@
-/* eslint-disable no-undef */
-/* eslint-disable no-unused-vars */
 /**
  * @param {App.Entity.SlaveState} slave
  */
 window.SlaveStatClamp = function SlaveStatClamp(slave) {
 	slave.energy = Math.clamp(slave.energy, 0, 100);
-	const V = State.variables;
 
 	if (slave.devotion > 100) {
 		if (slave.trust < -95) {
diff --git a/src/js/textInput.js b/src/js/textInput.js
index a7371b2983e0f4841ab2b31245e1b8ffb04b6ac8..ba89308e4e948ac2988088f88b358830d6795b08 100644
--- a/src/js/textInput.js
+++ b/src/js/textInput.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 Macro.add("textinput", {
 	// Signifies that the macro is a container macro.
 	tags: null,
diff --git a/src/js/textbox2.js b/src/js/textbox2.js
index a372a788e562f4eb1b58ea6b8d58bfa9a29d5fe4..50022b705650e3dbfcbe180a82ba59c33fcb2618 100644
--- a/src/js/textbox2.js
+++ b/src/js/textbox2.js
@@ -72,6 +72,7 @@ Macro.add("textbox2", {
 				State.setVar(t, valueToNumberIfSame(this.value));
 			}).on("blur", function() {
 				State.setVar(t, valueToNumberIfSame(this.value));
+				// eslint-disable-next-line eqeqeq
 				if (this.value != a) { // If the value has actually changed, reload the page.  Note != and not !== because types might be different
 					gotoPassage();
 				}
diff --git a/src/js/textboxJS.js b/src/js/textboxJS.js
index cb5213593f77e0f4021a7174b771459b7c0be3c0..52adb138876e93d22bae1b08bc7cba80e03c86c2 100644
--- a/src/js/textboxJS.js
+++ b/src/js/textboxJS.js
@@ -1,6 +1,5 @@
-/* eslint-disable no-undef */
 /* Nicked off greyelf, works for replace textboxes */
-window.setReplaceTextboxMaxLength = function (storyVarName, maxLength) {
+window.setReplaceTextboxMaxLength = function(storyVarName, maxLength) {
 	const textboxId = `#textbox-${ Util.slugify(storyVarName)}`;
 	$(textboxId)
 		.attr("maxlength", maxLength)
@@ -12,9 +11,9 @@ window.setReplaceTextboxMaxLength = function (storyVarName, maxLength) {
 };
 
 /* Nicked off TheMadExile, works for non-replace textboxes */
-window.setTextboxMaxLength = function (storyVarName, maxLength) {
+window.setTextboxMaxLength = function(storyVarName, maxLength) {
 	const textboxId = `#textbox-${ Util.slugify(storyVarName)}`;
-	postdisplay[`${textboxId }-maxlength`] = function (taskName) {
+	postdisplay[`${textboxId }-maxlength`] = function(taskName) {
 		delete postdisplay[taskName];
 		$(textboxId)
 			.attr("maxlength", maxLength)
diff --git a/src/js/utilJS.js b/src/js/utilJS.js
index 00aacf74b2cc644e01778e05bd80ed70c53e6591..d3b1c2915198930e44d95ac7a96ae257e1011cc0 100644
--- a/src/js/utilJS.js
+++ b/src/js/utilJS.js
@@ -1,6 +1,4 @@
 /* eslint-disable no-unused-vars */
-/* eslint-disable no-console */
-/* eslint-disable no-undef */
 /*
  * Height.mean(nationality, race, genes, age) - returns the mean height for the given combination and age in years (>=2)
  * Height.mean(nationality, race, genes) - returns the mean adult height for the given combination
@@ -68,7 +66,12 @@ window.Height = (function() {
 	// Configuration method for the above values
 	const _config = function(conf) {
 		if (_.isUndefined(conf)) {
-			return {limitMult: [minMult, maxMult], limitHeight: [minHeight, maxHeight], skew: skew, spread: spread};
+			return {
+				limitMult: [minMult, maxMult],
+				limitHeight: [minHeight, maxHeight],
+				skew: skew,
+				spread: spread
+			};
 		}
 		if (_.isFinite(conf.skew)) {
 			skew = Math.clamp(conf.skew, -1000, 1000);
@@ -86,61 +89,451 @@ window.Height = (function() {
 			minHeight = Math.min(conf.limitHeight[0], conf.limitHeight[1]);
 			maxHeight = Math.max(conf.limitHeight[0], conf.limitHeight[1]);
 		}
-		return {limitMult: [minMult, maxMult], limitHeight: [minHeight, maxHeight], skew: skew, spread: spread};
+		return {
+			limitMult: [minMult, maxMult],
+			limitHeight: [minHeight, maxHeight],
+			skew: skew,
+			spread: spread
+		};
 	};
 
 	/* if you can find an average for an undefined, add it in! */
 	const xxMeanHeight = {
-		"Afghan": 155.08, "Albanian": 161.77, "Algerian": 159.09, "American.asian": 158.4, "American.black": 163.6, "American.latina": 158.9, "American.white": 165, "American": 163.54,
-		"Andorran": 162.90, "Angolan": 157.31, "Antiguan": 160.65, "Argentinian": 159.18, "Armenian": 158.09, "Aruban": 158, "Australian": 165.86, "Austrian": 164.62, "Azerbaijani": 158.25,
-		"Bahamian": 160.68, "Bahraini": 156.69, "Bangladeshi": 150.79, "Barbadian": 165.28, "Belarusian": 166.35, "Belgian": 165.49, "Belizean": 156.88, "Beninese": 156.16, "Bermudian": 160.69,
-		"Bhutanese": 153.63, "Bissau-Guinean": 158.24, "Bolivian": 153.89, "Bosnian": 165.85, "Brazilian": 160.86, "British": 164.40, "Bruneian": 153.98, "Bulgarian": 164.80,
-		"Burkinabé": 160.19, "Burmese": 154.37, "Burundian": 154.02, "Cambodian": 152.91, "Cameroonian": 158.82, "Canadian": 163.91, "Cape Verdean": 161.65, "Catalan": 163.4,
-		"Central African": 158.04, "Chadian": 160.17, "Chilean": 159.36, "Chinese": 159.71, "Colombian": 156.85, "Comorian": 155.58, "Congolese": 157.57, "a Cook Islander": 163.19, "Costa Rican": 156.37,
-		"Croatian": 165.63, "Cuban": 157.98, "Curaçaoan": 158, "Cypriot": 162.27, "Czech": 168.46, "Danish": 167.21, "Djiboutian": 156.11, "Dominican": 159.03, "Dominiquais": 164.34, "Dutch": 168.72, "East Timorese": 151.15,
-		"Ecuadorian": 154.23, "Egyptian": 157.33, "Emirati": 158.68, "Equatoguinean": 157.33, "Eritrean": 156.39, "Estonian": 168.67, "Ethiopian": 155.71, "Fijian": 161.69, "Filipina": 149.60,
-		"Finnish": 165.90, "French Guianan": 157, "French Polynesian": 164.52, "French": 164.88, "Gabonese": 158.84, "Gambian": 160.93, "Georgian": 162.98, "German": 165.86, "Ghanan": 157.91,
-		"Greek": 164.87, "Greenlandic": 161.55, "Grenadian": 164.51, "Guamanian": 153.7, "Guatemalan": 149.39, "Guinean": 157.80, "Guyanese": 157.92, "Haitian": 158.72, "Honduran": 153.84, "Hungarian": 163.66,
-		"I-Kiribati": 157.00, "Icelandic": 165.95, "Indian": 152.59, "Indonesian": 152.80, "Iranian": 159.67, "Iraqi": 158.67, "Irish": 165.11, "Israeli": 161.80, "Italian": 164.61, "Ivorian": 158.07,
-		"Jamaican": 163.12, "Japanese": 158.31, "Jordanian": 158.83, "Kazakh": 158.58, "Kenyan": 158.16, "Kittitian": 159.20, "Korean": 160.65, "Kosovan": 165.7, "Kurdish": 165, "Kuwaiti": 159.43,
-		"Kyrgyz": 159.35, "Laotian": 151.28, "Latvian": 169.80, "Lebanese": 162.43, "Liberian": 157.3, "Libyan": 162.08, "a Liechtensteiner": 164.3, "Lithuanian": 166.61, "Luxembourgian": 164.43,
-		"Macedonian": 159.75, "Malagasy": 151.18, "Malawian": 154.40, "Malaysian": 156.30, "Maldivian": 155.02, "Malian": 160.47, "Maltese": 160.85, "Marshallese": 151.31, "Mauritanian": 157.72,
-		"Mauritian": 157.24, "Mexican": 156.85, "Micronesian": 156.09, "Moldovan": 163.24, "Monégasque": 164.61, "Mongolian": 158.22, "Montenegrin": 164.86, "Moroccan": 157.82, "Mosotho": 155.71,
-		"Motswana": 161.38, "Mozambican": 153.96, "Namibian": 158.78, "Nauruan": 153.98, "Nepalese": 150.86, "New Caledonian": 158.0, "a New Zealander": 164.94, "Ni-Vanuatu": 158.17, "Nicaraguan": 154.39, "Nigerian": 156.32,
-		"Nigerien": 158.25, "Niuean": 164.80, "Norwegian": 165.56, "Omani": 157.19, "Pakistani": 153.84, "Palauan": 156.22, "Palestinian": 158.75, "Panamanian": 155.47, "Papua New Guinean": 154.87,
-		"Paraguayan": 159.86, "Peruvian": 152.93, "Polish": 164.59, "Portuguese": 163.04, "Puerto Rican": 159.20, "Qatari": 159.38, "Romanian": 162.73, "Russian": 165.27, "Rwandan": 154.79, "Sahrawi": 157.82,
-		"Saint Lucian": 162.31, "Salvadoran": 154.55, "Sammarinese": 164.61, "Samoan": 161.97, "São Toméan": 158.91, "Saudi": 155.88, "Scottish": 163, "Senegalese": 162.52, "Serbian": 167.69,
-		"Seychellois": 162.08, "Sierra Leonean": 156.60, "Singaporean": 160.32, "Slovak": 167.47, "Slovene": 166.05, "a Solomon Islander": 154.42, "Somali": 156.06, "South African": 158.03,
-		"South Sudanese": 169.0, "Spanish": 163.40, "Sri Lankan": 154.56, "Sudanese": 156.04, "Surinamese": 160.66, "Swazi": 158.64, "Swedish": 165.70, "Swiss": 163.45, "Syrian": 158.65, "Taiwanese": 161.45,
-		"Tajik": 157.33, "Tanzanian": 156.6, "Thai": 157.87, "Tibetan": 158.75, "Togolese": 158.30, "Tongan": 165.52, "Trinidadian": 160.64, "Tunisian": 160.35, "Turkish": 160.50, "Turkmen": 161.73,
-		"Tuvaluan": 158.10, "Ugandan": 156.72, "Ukrainian": 166.34, "Uruguayan": 162.13, "Uzbek": 157.82, "Vatican": 162.5, "Venezuelan": 157.44, "Vietnamese": 153.59, "Vincentian": 160.70, "Yemeni": 153.97,
-		"Zairian": 155.25, "Zambian": 155.82, "Zimbabwean": 158.22,
+		"Afghan": 155.08,
+		"Albanian": 161.77,
+		"Algerian": 159.09,
+		"American.asian": 158.4,
+		"American.black": 163.6,
+		"American.latina": 158.9,
+		"American.white": 165,
+		"American": 163.54,
+		"Andorran": 162.90,
+		"Angolan": 157.31,
+		"Antiguan": 160.65,
+		"Argentinian": 159.18,
+		"Armenian": 158.09,
+		"Aruban": 158,
+		"Australian": 165.86,
+		"Austrian": 164.62,
+		"Azerbaijani": 158.25,
+		"Bahamian": 160.68,
+		"Bahraini": 156.69,
+		"Bangladeshi": 150.79,
+		"Barbadian": 165.28,
+		"Belarusian": 166.35,
+		"Belgian": 165.49,
+		"Belizean": 156.88,
+		"Beninese": 156.16,
+		"Bermudian": 160.69,
+		"Bhutanese": 153.63,
+		"Bissau-Guinean": 158.24,
+		"Bolivian": 153.89,
+		"Bosnian": 165.85,
+		"Brazilian": 160.86,
+		"British": 164.40,
+		"Bruneian": 153.98,
+		"Bulgarian": 164.80,
+		"Burkinabé": 160.19,
+		"Burmese": 154.37,
+		"Burundian": 154.02,
+		"Cambodian": 152.91,
+		"Cameroonian": 158.82,
+		"Canadian": 163.91,
+		"Cape Verdean": 161.65,
+		"Catalan": 163.4,
+		"Central African": 158.04,
+		"Chadian": 160.17,
+		"Chilean": 159.36,
+		"Chinese": 159.71,
+		"Colombian": 156.85,
+		"Comorian": 155.58,
+		"Congolese": 157.57,
+		"a Cook Islander": 163.19,
+		"Costa Rican": 156.37,
+		"Croatian": 165.63,
+		"Cuban": 157.98,
+		"Curaçaoan": 158,
+		"Cypriot": 162.27,
+		"Czech": 168.46,
+		"Danish": 167.21,
+		"Djiboutian": 156.11,
+		"Dominican": 159.03,
+		"Dominiquais": 164.34,
+		"Dutch": 168.72,
+		"East Timorese": 151.15,
+		"Ecuadorian": 154.23,
+		"Egyptian": 157.33,
+		"Emirati": 158.68,
+		"Equatoguinean": 157.33,
+		"Eritrean": 156.39,
+		"Estonian": 168.67,
+		"Ethiopian": 155.71,
+		"Fijian": 161.69,
+		"Filipina": 149.60,
+		"Finnish": 165.90,
+		"French Guianan": 157,
+		"French Polynesian": 164.52,
+		"French": 164.88,
+		"Gabonese": 158.84,
+		"Gambian": 160.93,
+		"Georgian": 162.98,
+		"German": 165.86,
+		"Ghanan": 157.91,
+		"Greek": 164.87,
+		"Greenlandic": 161.55,
+		"Grenadian": 164.51,
+		"Guamanian": 153.7,
+		"Guatemalan": 149.39,
+		"Guinean": 157.80,
+		"Guyanese": 157.92,
+		"Haitian": 158.72,
+		"Honduran": 153.84,
+		"Hungarian": 163.66,
+		"I-Kiribati": 157.00,
+		"Icelandic": 165.95,
+		"Indian": 152.59,
+		"Indonesian": 152.80,
+		"Iranian": 159.67,
+		"Iraqi": 158.67,
+		"Irish": 165.11,
+		"Israeli": 161.80,
+		"Italian": 164.61,
+		"Ivorian": 158.07,
+		"Jamaican": 163.12,
+		"Japanese": 158.31,
+		"Jordanian": 158.83,
+		"Kazakh": 158.58,
+		"Kenyan": 158.16,
+		"Kittitian": 159.20,
+		"Korean": 160.65,
+		"Kosovan": 165.7,
+		"Kurdish": 165,
+		"Kuwaiti": 159.43,
+		"Kyrgyz": 159.35,
+		"Laotian": 151.28,
+		"Latvian": 169.80,
+		"Lebanese": 162.43,
+		"Liberian": 157.3,
+		"Libyan": 162.08,
+		"a Liechtensteiner": 164.3,
+		"Lithuanian": 166.61,
+		"Luxembourgian": 164.43,
+		"Macedonian": 159.75,
+		"Malagasy": 151.18,
+		"Malawian": 154.40,
+		"Malaysian": 156.30,
+		"Maldivian": 155.02,
+		"Malian": 160.47,
+		"Maltese": 160.85,
+		"Marshallese": 151.31,
+		"Mauritanian": 157.72,
+		"Mauritian": 157.24,
+		"Mexican": 156.85,
+		"Micronesian": 156.09,
+		"Moldovan": 163.24,
+		"Monégasque": 164.61,
+		"Mongolian": 158.22,
+		"Montenegrin": 164.86,
+		"Moroccan": 157.82,
+		"Mosotho": 155.71,
+		"Motswana": 161.38,
+		"Mozambican": 153.96,
+		"Namibian": 158.78,
+		"Nauruan": 153.98,
+		"Nepalese": 150.86,
+		"New Caledonian": 158.0,
+		"a New Zealander": 164.94,
+		"Ni-Vanuatu": 158.17,
+		"Nicaraguan": 154.39,
+		"Nigerian": 156.32,
+		"Nigerien": 158.25,
+		"Niuean": 164.80,
+		"Norwegian": 165.56,
+		"Omani": 157.19,
+		"Pakistani": 153.84,
+		"Palauan": 156.22,
+		"Palestinian": 158.75,
+		"Panamanian": 155.47,
+		"Papua New Guinean": 154.87,
+		"Paraguayan": 159.86,
+		"Peruvian": 152.93,
+		"Polish": 164.59,
+		"Portuguese": 163.04,
+		"Puerto Rican": 159.20,
+		"Qatari": 159.38,
+		"Romanian": 162.73,
+		"Russian": 165.27,
+		"Rwandan": 154.79,
+		"Sahrawi": 157.82,
+		"Saint Lucian": 162.31,
+		"Salvadoran": 154.55,
+		"Sammarinese": 164.61,
+		"Samoan": 161.97,
+		"São Toméan": 158.91,
+		"Saudi": 155.88,
+		"Scottish": 163,
+		"Senegalese": 162.52,
+		"Serbian": 167.69,
+		"Seychellois": 162.08,
+		"Sierra Leonean": 156.60,
+		"Singaporean": 160.32,
+		"Slovak": 167.47,
+		"Slovene": 166.05,
+		"a Solomon Islander": 154.42,
+		"Somali": 156.06,
+		"South African": 158.03,
+		"South Sudanese": 169.0,
+		"Spanish": 163.40,
+		"Sri Lankan": 154.56,
+		"Sudanese": 156.04,
+		"Surinamese": 160.66,
+		"Swazi": 158.64,
+		"Swedish": 165.70,
+		"Swiss": 163.45,
+		"Syrian": 158.65,
+		"Taiwanese": 161.45,
+		"Tajik": 157.33,
+		"Tanzanian": 156.6,
+		"Thai": 157.87,
+		"Tibetan": 158.75,
+		"Togolese": 158.30,
+		"Tongan": 165.52,
+		"Trinidadian": 160.64,
+		"Tunisian": 160.35,
+		"Turkish": 160.50,
+		"Turkmen": 161.73,
+		"Tuvaluan": 158.10,
+		"Ugandan": 156.72,
+		"Ukrainian": 166.34,
+		"Uruguayan": 162.13,
+		"Uzbek": 157.82,
+		"Vatican": 162.5,
+		"Venezuelan": 157.44,
+		"Vietnamese": 153.59,
+		"Vincentian": 160.70,
+		"Yemeni": 153.97,
+		"Zairian": 155.25,
+		"Zambian": 155.82,
+		"Zimbabwean": 158.22,
 		"": 159.65, // default
 	};
 	const xyMeanHeight = {
-		"Afghan": 165.26, "Albanian": 173.39, "Algerian": 170.07, "American.asian": 172.5, "American.black": 177.4, "American.latina": 172.5, "American.white": 178.2, "American": 177.13,
-		"Andorran": 176.06, "Angolan": 167.31, "Antiguan": 164.8, "Argentinian": 174.62, "Armenian": 172.00, "Aruban": 165.1, "Australian": 179.20, "Austrian": 177.41, "Azerbaijani": 169.75,
-		"Bahamian": 172.75, "Bahraini": 167.74, "Bangladeshi": 163.81, "Barbadian": 175.92, "Belarusian": 178.44, "Belgian": 181.70, "Belizean": 168.73, "Beninese": 167.06, "Bermudian": 172.69,
-		"Bhutanese": 165.31, "Bissau-Guinean": 167.90, "Bolivian": 166.85, "Bosnian": 180.87, "Brazilian": 173.55, "British": 177.49, "Bruneian": 165.01, "Bulgarian": 178.24, "Burkinabé": 169.33,
-		"Burmese": 164.67, "Burundian": 166.64, "Cambodian": 163.33, "Cameroonian": 167.82, "Canadian": 178.09, "Cape Verdean": 173.22, "Catalan": 175.8, "Central African": 166.67,
-		"Chadian": 170.44, "Chilean": 171.81, "Chinese": 171.83, "Colombian": 169.50, "Comorian": 166.19, "Congolese": 167.45, "a Cook Islander": 174.77, "Costa Rican": 168.93, "Croatian": 180.78,
-		"Cuban": 172.00, "Curaçaoan": 165.1, "Cypriot": 174.99, "Czech": 180.10, "Danish": 181.39, "Djiboutian": 166.57, "Dominican": 172.75, "Dominiquais": 176.31, "Dutch": 182.54, "East Timorese": 159.79, "Ecuadorian": 167.08,
-		"Egyptian": 166.68, "Emirati": 170.46, "Equatoguinean": 167.36, "Eritrean": 168.36, "Estonian": 181.59, "Ethiopian": 166.23, "Fijian": 173.90, "Filipina": 163.23, "Finnish": 179.59,
-		"French Guianan": 168, "French Polynesian": 177.41, "French": 179.74, "Gabonese": 167.94, "Gambian": 165.40, "Georgian": 174.34, "German": 179.88, "Ghanan": 168.85, "Greek": 177.32, "Greenlandic": 174.87,
-		"Grenadian": 176.97, "Guamanian": 169.8, "Guatemalan": 163.41, "Guinean": 167.54, "Guyanese": 170.21, "Haitian": 172.64, "Honduran": 166.39, "Hungarian": 177.26, "I-Kiribati": 169.20, "Icelandic": 180.49,
-		"Indian": 164.95, "Indonesian": 163.55, "Iranian": 170.3, "Iraqi": 170.43, "Irish": 178.93, "Israeli": 176.86, "Italian": 177.77, "Ivorian": 166.53, "Jamaican": 174.53, "Japanese": 170.82, "Jordanian": 171.03,
-		"Kazakh": 171.14, "Kenyan": 169.64, "Kittitian": 169.62, "Korean": 173.46, "Kosovan": 179.5, "Kurdish": 175, "Kuwaiti": 172.07, "Kyrgyz": 171.24, "Laotian": 160.52, "Latvian": 181.42, "Lebanese": 174.39,
-		"Liberian": 163.66, "Libyan": 173.53, "a Liechtensteiner": 175.4, "Lithuanian": 179.03, "Luxembourgian": 177.86, "Macedonian": 178.33, "Malagasy": 161.55, "Malawian": 166, "Malaysian": 167.89,
-		"Maldivian": 167.68, "Malian": 171.3, "Maltese": 173.32, "Marshallese": 162.81, "Mauritanian": 163.28, "Mauritian": 170.50, "Mexican": 169.01, "Micronesian": 168.51, "Moldovan": 175.49,
-		"Monégasque": 177.77, "Mongolian": 169.07, "Montenegrin": 178.28, "Moroccan": 170.40, "Mosotho": 165.59, "Motswana": 171.63, "Mozambican": 164.80, "Namibian": 166.96, "Nauruan": 167.83,
-		"Nepalese": 162.32, "New Caledonian": 171.0, "a New Zealander": 177.74, "Ni-Vanuatu": 168.09, "Nicaraguan": 166.71, "Nigerian": 165.91, "Nigerien": 167.68, "Niuean": 175.83, "Norwegian": 179.75, "Omani": 169.16, "Pakistani": 166.95,
-		"Palauan": 167.69, "Palestinian": 172.09, "Panamanian": 168.49, "Papua New Guinean": 163.57, "Paraguayan": 172.83, "Peruvian": 165.23, "Polish": 177.33, "Portuguese": 172.93, "Puerto Rican": 172.08, "Qatari": 170.48,
-		"Romanian": 174.74, "Russian": 176.46, "Rwandan": 162.68, "Sahrawi": 170.40, "Saint Lucian": 171.95, "Salvadoran": 169.77, "Sammarinese": 177.77, "Samoan": 174.38, "São Toméan": 167.38,
-		"Saudi": 167.67, "Scottish": 177.6, "Senegalese": 173.14, "Serbian": 180.57, "Seychellois": 174.21, "Sierra Leonean": 164.41, "Singaporean": 172.57, "Slovak": 179.50, "Slovene": 179.80,
-		"a Solomon Islander": 164.14, "Somali": 166.60, "South African": 166.68, "South Sudanese": 175.9, "Spanish": 176.59, "Sri Lankan": 165.69, "Sudanese": 166.63, "Surinamese": 172.72, "Swazi": 168.13,
-		"Swedish": 179.74, "Swiss": 178.42, "Syrian": 170.43, "Taiwanese": 174.52, "Tajik": 171.26, "Tanzanian": 164.80, "Thai": 169.16, "Tibetan": 168.91, "Togolese": 168.33, "Tongan": 176.76,
-		"Trinidadian": 173.74, "Tunisian": 173.95, "Turkish": 174.21, "Turkmen": 171.97, "Tuvaluan": 169.64, "Ugandan": 165.62, "Ukrainian": 178.46, "Uruguayan": 173.43, "Uzbek": 169.38, "Vatican": 176.5,
-		"Venezuelan": 171.59, "Vietnamese": 164.45, "Vincentian": 172.78, "Yemeni": 159.89, "Zairian": 166.80, "Zambian": 166.52, "Zimbabwean": 168.59,
+		"Afghan": 165.26,
+		"Albanian": 173.39,
+		"Algerian": 170.07,
+		"American.asian": 172.5,
+		"American.black": 177.4,
+		"American.latina": 172.5,
+		"American.white": 178.2,
+		"American": 177.13,
+		"Andorran": 176.06,
+		"Angolan": 167.31,
+		"Antiguan": 164.8,
+		"Argentinian": 174.62,
+		"Armenian": 172.00,
+		"Aruban": 165.1,
+		"Australian": 179.20,
+		"Austrian": 177.41,
+		"Azerbaijani": 169.75,
+		"Bahamian": 172.75,
+		"Bahraini": 167.74,
+		"Bangladeshi": 163.81,
+		"Barbadian": 175.92,
+		"Belarusian": 178.44,
+		"Belgian": 181.70,
+		"Belizean": 168.73,
+		"Beninese": 167.06,
+		"Bermudian": 172.69,
+		"Bhutanese": 165.31,
+		"Bissau-Guinean": 167.90,
+		"Bolivian": 166.85,
+		"Bosnian": 180.87,
+		"Brazilian": 173.55,
+		"British": 177.49,
+		"Bruneian": 165.01,
+		"Bulgarian": 178.24,
+		"Burkinabé": 169.33,
+		"Burmese": 164.67,
+		"Burundian": 166.64,
+		"Cambodian": 163.33,
+		"Cameroonian": 167.82,
+		"Canadian": 178.09,
+		"Cape Verdean": 173.22,
+		"Catalan": 175.8,
+		"Central African": 166.67,
+		"Chadian": 170.44,
+		"Chilean": 171.81,
+		"Chinese": 171.83,
+		"Colombian": 169.50,
+		"Comorian": 166.19,
+		"Congolese": 167.45,
+		"a Cook Islander": 174.77,
+		"Costa Rican": 168.93,
+		"Croatian": 180.78,
+		"Cuban": 172.00,
+		"Curaçaoan": 165.1,
+		"Cypriot": 174.99,
+		"Czech": 180.10,
+		"Danish": 181.39,
+		"Djiboutian": 166.57,
+		"Dominican": 172.75,
+		"Dominiquais": 176.31,
+		"Dutch": 182.54,
+		"East Timorese": 159.79,
+		"Ecuadorian": 167.08,
+		"Egyptian": 166.68,
+		"Emirati": 170.46,
+		"Equatoguinean": 167.36,
+		"Eritrean": 168.36,
+		"Estonian": 181.59,
+		"Ethiopian": 166.23,
+		"Fijian": 173.90,
+		"Filipina": 163.23,
+		"Finnish": 179.59,
+		"French Guianan": 168,
+		"French Polynesian": 177.41,
+		"French": 179.74,
+		"Gabonese": 167.94,
+		"Gambian": 165.40,
+		"Georgian": 174.34,
+		"German": 179.88,
+		"Ghanan": 168.85,
+		"Greek": 177.32,
+		"Greenlandic": 174.87,
+		"Grenadian": 176.97,
+		"Guamanian": 169.8,
+		"Guatemalan": 163.41,
+		"Guinean": 167.54,
+		"Guyanese": 170.21,
+		"Haitian": 172.64,
+		"Honduran": 166.39,
+		"Hungarian": 177.26,
+		"I-Kiribati": 169.20,
+		"Icelandic": 180.49,
+		"Indian": 164.95,
+		"Indonesian": 163.55,
+		"Iranian": 170.3,
+		"Iraqi": 170.43,
+		"Irish": 178.93,
+		"Israeli": 176.86,
+		"Italian": 177.77,
+		"Ivorian": 166.53,
+		"Jamaican": 174.53,
+		"Japanese": 170.82,
+		"Jordanian": 171.03,
+		"Kazakh": 171.14,
+		"Kenyan": 169.64,
+		"Kittitian": 169.62,
+		"Korean": 173.46,
+		"Kosovan": 179.5,
+		"Kurdish": 175,
+		"Kuwaiti": 172.07,
+		"Kyrgyz": 171.24,
+		"Laotian": 160.52,
+		"Latvian": 181.42,
+		"Lebanese": 174.39,
+		"Liberian": 163.66,
+		"Libyan": 173.53,
+		"a Liechtensteiner": 175.4,
+		"Lithuanian": 179.03,
+		"Luxembourgian": 177.86,
+		"Macedonian": 178.33,
+		"Malagasy": 161.55,
+		"Malawian": 166,
+		"Malaysian": 167.89,
+		"Maldivian": 167.68,
+		"Malian": 171.3,
+		"Maltese": 173.32,
+		"Marshallese": 162.81,
+		"Mauritanian": 163.28,
+		"Mauritian": 170.50,
+		"Mexican": 169.01,
+		"Micronesian": 168.51,
+		"Moldovan": 175.49,
+		"Monégasque": 177.77,
+		"Mongolian": 169.07,
+		"Montenegrin": 178.28,
+		"Moroccan": 170.40,
+		"Mosotho": 165.59,
+		"Motswana": 171.63,
+		"Mozambican": 164.80,
+		"Namibian": 166.96,
+		"Nauruan": 167.83,
+		"Nepalese": 162.32,
+		"New Caledonian": 171.0,
+		"a New Zealander": 177.74,
+		"Ni-Vanuatu": 168.09,
+		"Nicaraguan": 166.71,
+		"Nigerian": 165.91,
+		"Nigerien": 167.68,
+		"Niuean": 175.83,
+		"Norwegian": 179.75,
+		"Omani": 169.16,
+		"Pakistani": 166.95,
+		"Palauan": 167.69,
+		"Palestinian": 172.09,
+		"Panamanian": 168.49,
+		"Papua New Guinean": 163.57,
+		"Paraguayan": 172.83,
+		"Peruvian": 165.23,
+		"Polish": 177.33,
+		"Portuguese": 172.93,
+		"Puerto Rican": 172.08,
+		"Qatari": 170.48,
+		"Romanian": 174.74,
+		"Russian": 176.46,
+		"Rwandan": 162.68,
+		"Sahrawi": 170.40,
+		"Saint Lucian": 171.95,
+		"Salvadoran": 169.77,
+		"Sammarinese": 177.77,
+		"Samoan": 174.38,
+		"São Toméan": 167.38,
+		"Saudi": 167.67,
+		"Scottish": 177.6,
+		"Senegalese": 173.14,
+		"Serbian": 180.57,
+		"Seychellois": 174.21,
+		"Sierra Leonean": 164.41,
+		"Singaporean": 172.57,
+		"Slovak": 179.50,
+		"Slovene": 179.80,
+		"a Solomon Islander": 164.14,
+		"Somali": 166.60,
+		"South African": 166.68,
+		"South Sudanese": 175.9,
+		"Spanish": 176.59,
+		"Sri Lankan": 165.69,
+		"Sudanese": 166.63,
+		"Surinamese": 172.72,
+		"Swazi": 168.13,
+		"Swedish": 179.74,
+		"Swiss": 178.42,
+		"Syrian": 170.43,
+		"Taiwanese": 174.52,
+		"Tajik": 171.26,
+		"Tanzanian": 164.80,
+		"Thai": 169.16,
+		"Tibetan": 168.91,
+		"Togolese": 168.33,
+		"Tongan": 176.76,
+		"Trinidadian": 173.74,
+		"Tunisian": 173.95,
+		"Turkish": 174.21,
+		"Turkmen": 171.97,
+		"Tuvaluan": 169.64,
+		"Ugandan": 165.62,
+		"Ukrainian": 178.46,
+		"Uruguayan": 173.43,
+		"Uzbek": 169.38,
+		"Vatican": 176.5,
+		"Venezuelan": 171.59,
+		"Vietnamese": 164.45,
+		"Vincentian": 172.78,
+		"Yemeni": 159.89,
+		"Zairian": 166.80,
+		"Zambian": 166.52,
+		"Zimbabwean": 168.59,
 		"": 171.42, // defaults
 	};
 
@@ -185,7 +578,9 @@ window.Height = (function() {
 		if (!_.isFinite(age) || age < 2 || age >= 20) {
 			return height;
 		}
-		let minHeight = 0; let midHeight = 0; let midAge = 15;
+		let minHeight = 0;
+		let midHeight = 0;
+		let midAge = 15;
 		switch (genes) {
 			case "XX": // female
 			case "XXX": // Triple X syndrome female
@@ -200,7 +595,8 @@ window.Height = (function() {
 				midHeight = height * 170 / 178;
 				midAge = 15;
 				break;
-			case "X0": case "X": // Turner syndrome female
+			case "X0":
+			case "X": // Turner syndrome female
 				minHeight = 85 * 0.93;
 				midHeight = height * 157 / 164;
 				midAge = 13;
@@ -233,8 +629,9 @@ window.Height = (function() {
 			case "XY": // male
 				result = nationalityMeanHeight(xyMeanHeight, nationality, race);
 				break;
-			// special cases. Extra SHOX genes on X and Y chromosomes make for larger people
-			case "X0": case "X": // Turner syndrome female
+				// special cases. Extra SHOX genes on X and Y chromosomes make for larger people
+			case "X0":
+			case "X": // Turner syndrome female
 				result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 0.93;
 				break;
 			case "XXX": // Triple X syndrome female
@@ -246,10 +643,15 @@ window.Height = (function() {
 			case "XYY": // XYY syndrome male
 				result = nationalityMeanHeight(xyMeanHeight, nationality, race) * 1.04;
 				break;
-			case "Y": case "Y0": case "YY": case "YYY":
+			case "Y":
+			case "Y0":
+			case "YY":
+			case "YYY":
+				// eslint-disable-next-line no-console
 				console.log(`Height.mean(): non-viable genes ${ genes}`);
 				break;
 			default:
+				// eslint-disable-next-line no-console
 				console.log(`Height.mean(): unknown genes ${ genes }, returning mean between XX and XY`);
 				result = nationalityMeanHeight(xxMeanHeight, nationality, race) * 0.5 + nationalityMeanHeight(xyMeanHeight, nationality, race) * 0.5;
 				break;
@@ -334,7 +736,13 @@ window.Intelligence = (function() {
 	// Configuration method for the above values
 	const _config = function(conf) {
 		if (_.isUndefined(conf)) {
-			return {mean: mean, limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread};
+			return {
+				mean: mean,
+				limitMult: [minMult, maxMult],
+				limitIntelligence: [minIntelligence, maxIntelligence],
+				skew: skew,
+				spread: spread
+			};
 		}
 		if (_.isFinite(conf.mean)) {
 			mean = Math.clamp(conf.mean, -100, 100);
@@ -355,7 +763,12 @@ window.Intelligence = (function() {
 			minIntelligence = Math.clamp(Math.min(conf.limitIntelligence[0], conf.limitIntelligence[1]), -101, 100);
 			maxIntelligence = Math.clamp(Math.max(conf.limitIntelligence[0], conf.limitIntelligence[1]), -101, 100);
 		}
-		return {limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread};
+		return {
+			limitMult: [minMult, maxMult],
+			limitIntelligence: [minIntelligence, maxIntelligence],
+			skew: skew,
+			spread: spread
+		};
 	};
 
 	// Helper method: Generate a skewed normal random variable with the skew s
@@ -430,18 +843,18 @@ Original SugarCube code
 	Toned
 <<elseif _Slave.muscles > -6>>
 <<elseif _Slave.muscles > -31>>
-	@@.red;weak@@
+	<span class="red">weak</span>
 <<elseif _Slave.muscles > -96>>
-	@@.red;weak+@@
+	<span class="red">weak+</span>
 <<else>>
-	@@.red;weak++@@
+	<span class="red">weak++</span>
 <</if>>
 
 As a categorizer
 <<if ndef $cats>><<set $cats = {}>><</if>>
 <<if ndef $cats.muscleCat>>
 	<!-- This only gets set once, skipping much of the code evaluation, and can be set outside of the code in an "init" passage for further optimization -->
-	<<set $cats.muscleCat = new Categorizer([96, 'Musc++'], [31, 'Musc+'], [6, 'Toned'], [-5, ''], [-30, '@@.red;weak@@'], [-95, '@@.red;weak+@@'], [-Infinity, '@@.red;weak++@@'])>>
+	<<set $cats.muscleCat = new Categorizer([96, 'Musc++'], [31, 'Musc+'], [6, 'Toned'], [-5, ''], [-30, '<span class="red">weak</span>'], [-95, '<span class="red">weak+</span>'], [-Infinity, '<span class="red">weak++</span>'])>>
 <</if>>
 <<print $cats.muscleCat.cat(_Slave.muscles)>>
 */
@@ -614,43 +1027,43 @@ window.repFormat = function(s) {
 	/* if (!s) { s = 0; }*/
 	if (V.cheatMode === 1 || V.debugMode === 1) {
 		if (s > 0) {
-			return `@@.green;${ num(Math.round(s * 100) / 100) } rep@@`;
+			return `<span class="green">${ num(Math.round(s * 100) / 100) } rep</span>`;
 		} else if (s < 0) {
-			return `@@.red;${ num(Math.round(s * 100) / 100) } rep@@`;
+			return `<span class="red">${ num(Math.round(s * 100) / 100) } rep</span>`;
 		} else {
 			return `${num(Math.round(s * 100) / 100) } rep`;
 		}
 	} else {
 		/* In order to calculate just how much any one category matters so we can show a "fuzzy" symbolic value to the player, we need to know how "busy" reputation was this week. To calculate this, I ADD income to expenses. Why? 100 - 100 and 10000 - 10000 BOTH are 0, but a +50 event matters a lot more in the first case than the second. I exclude overflow from the calculation because it's not a "real" expense for our purposes, and divide by half just to make percentages a bit easier. */
-		let weight = s/(((V.lastWeeksRepIncome.Total - V.lastWeeksRepExpenses.Total) + V.lastWeeksRepExpenses.overflow)/2);
+		let weight = s / (((V.lastWeeksRepIncome.Total - V.lastWeeksRepExpenses.Total) + V.lastWeeksRepExpenses.overflow) / 2);
 		if (weight > 0.60) {
-			return "@@.green;+++++ rep@@";
+			return `<span class="green">+++++ rep</span>`;
 		} else if (weight > 0.45) {
-			return "@@.green;++++ rep@@";
+			return `<span class="green">++++ rep</span>`;
 		} else if (weight > 0.30) {
-			return "@@.green;+++ rep@@";
+			return `<span class="green">+++ rep</span>`;
 		} else if (weight > 0.15) {
-			return "@@.green;++ rep@@";
+			return `<span class="green">++ rep</span>`;
 		} else if (weight > 0.0) {
-			return "@@.green;+ rep@@";
+			return `<span class="green">+ rep</span>`;
 		} else if (weight === 0) {
 			return "0 rep";
 		} else if (weight < -0.60) {
-			return "@@.red;----- rep@@";
+			return `<span class="red">----- rep</span>`;
 		} else if (weight < -0.45) {
-			return "@@.red;---- rep@@";
+			return `<span class="red">---- rep</span>`;
 		} else if (weight < -0.30) {
-			return "@@.red;--- rep@@";
+			return `<span class="red">--- rep</span>`;
 		} else if (weight < -0.15) {
-			return "@@.red;-- rep@@";
+			return `<span class="red">-- rep</span>`;
 		} else if (weight < 0) {
-			return "@@.red;- rep@@";
+			return `<span class="red">- rep</span>`;
 		}
 		/* return weight;*/
 	}
 };
 
-window.massFormat = function (s) {
+window.massFormat = function(s) {
 	if (!s) {
 		s = 0;
 	}
@@ -691,14 +1104,14 @@ window.budgetLine = function(category, title) {
 		<td>${title}</td>\
 		<td>\
 			<<if (${income}.${category}) > 0>>\
-				@@.yellowgreen;<<print cashFormat(${income}.${category})>>@@ /*please don't put a plus sign in front of income, it's not done on a budget sheet. Safe to assume money is money unless it's in parenthesis or with a - sign.*/
+				<span class="yellowgreen"><<print cashFormat(${income}.${category})>></span> /*please don't put a plus sign in front of income, it's not done on a budget sheet. Safe to assume money is money unless it's in parenthesis or with a - sign.*/
 			<<else>>\
 				<<print cashFormat(${income}.${category})>>\
 			<</if>>\
 		</td>\
 		<td>\
 			<<if (${expenses}.${category}) < 0>>\
-				@@.red;-<<print cashFormat(Math.abs(${expenses}.${category}))>>\
+				<span class="red">-<<print cashFormat(Math.abs(${expenses}.${category}))>></span>\
 			<<else>>\
 				<<print cashFormat(${expenses}.${category})>>\
 			<</if>>\
@@ -706,9 +1119,9 @@ window.budgetLine = function(category, title) {
 		<<set ${profits}.${category} = (${income}.${category} + ${expenses}.${category})>>\
 		<td>\
 			<<if (${profits}.${category}) > 0>>\
-				@@.yellowgreen;<<print cashFormat(${profits}.${category})>>.@@
+				<span class="yellowgreen"><<print cashFormat(${profits}.${category})>>.</span>
 			<<elseif (${profits}.${category}) < 0>>\
-				@@.red;-<<print cashFormat(Math.abs(${profits}.${category}))>>.@@
+				<span class="red">-<<print cashFormat(Math.abs(${profits}.${category}))>>.</span>
 			<<else>>\
 				<<print cashFormat(${profits}.${category})>>\
 			<</if>>\
@@ -722,7 +1135,7 @@ window.isFloat = function(n) {
 };
 
 window.jsRandom = function(min, max) {
-	return Math.floor(Math.random()*(max-min+1)+min);
+	return Math.floor(Math.random() * (max - min + 1) + min);
 };
 
 window.jsRandomMany = function(arr, count) {
@@ -756,7 +1169,7 @@ if(typeof Categorizer === 'function') {
 jQuery(document).trigger("categorizer.ready");
 
 window.hashChoice = function hashChoice(obj) {
-	let randint = Math.floor(Math.random()*hashSum(obj));
+	let randint = Math.floor(Math.random() * hashSum(obj));
 	let ret;
 	Object.keys(obj).some((key) => {
 		if (randint < obj[key]) {
@@ -813,9 +1226,9 @@ window.between = function between(a, low, high) {
 window.generateNewID = function generateNewID() {
 	let date = Date.now(); // high-precision timer
 	let uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
-		let r = (date + Math.random()*16)%16 | 0;
-		date = Math.floor(date/16);
-		return (c==="x" ? r : (r & 0x3 | 0x8)).toString(16);
+		let r = (date + Math.random() * 16) % 16 | 0;
+		date = Math.floor(date / 16);
+		return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16);
 	});
 	return uuid;
 };
@@ -850,7 +1263,19 @@ window.capFirstChar = function capFirstChar(string) {
 	return string.charAt(0).toUpperCase() + string.substr(1);
 };
 
-window.getSlaveDevotionClass = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+window.addA = function(word) {
+	let vocal = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'];
+	if (vocal.includes(word.charAt(0))) {
+		return "an " + word;
+	}
+	return "a " + word;
+};
+
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.getSlaveDevotionClass = function(slave) {
 	if ((!slave) || (!State)) {
 		return undefined;
 	}
@@ -874,7 +1299,11 @@ window.getSlaveDevotionClass = /** @param {App.Entity.SlaveState} slave */ funct
 	}
 };
 
-window.getSlaveTrustClass = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.getSlaveTrustClass = function(slave) {
 	if ((!slave) || (!State)) {
 		return undefined;
 	}
@@ -905,7 +1334,7 @@ window.getSlaveTrustClass = /** @param {App.Entity.SlaveState} slave */ function
 
 // takes an integer e.g. $activeSlave.hLength, returns a string in the format 10 inches
 window.cmToInchString = function(s) {
-	let inches = Math.round(s/2.54);
+	let inches = Math.round(s / 2.54);
 	if (inches === 0) {
 		if (s === 0) {
 			inches += " inches";
@@ -922,7 +1351,7 @@ window.cmToInchString = function(s) {
 
 // takes an integer e.g. $activeSlave.height, returns a string in the format 6'5"
 window.cmToFootInchString = function(s) {
-	if (Math.round(s/2.54) < 12) {
+	if (Math.round(s / 2.54) < 12) {
 		return cmToInchString(s);
 	}
 	return `${Math.trunc(Math.round(s/2.54)/12) }'${ Math.round(s/2.54)%12 }"`;
@@ -936,11 +1365,11 @@ window.dickToInchString = function(s) {
 // takes a dick value e.g. $activeSlave.dick, returns an int of the dick length in cm
 window.dickToCM = function(s) {
 	if (s < 9) {
-		return s*5;
+		return s * 5;
 	} else if (s === 9) {
 		return 50;
 	}
-	return s*6;
+	return s * 6;
 };
 
 // takes a ball value e.g. $activeSlave.balls, returns a string in the format 3 inches
@@ -953,7 +1382,7 @@ window.ballsToCM = function(s) {
 	if (s < 2) {
 		return 0;
 	}
-	return (s<10?(s-1)*2:s*2);
+	return (s < 10 ? (s - 1) * 2 : s * 2);
 };
 
 // takes a dick value e.g. $activeSlave.dick, returns a string in the format of either `20cm (8 inches)`, `8 inches`, or `20cm`
@@ -1019,13 +1448,17 @@ window.removeDuplicates = function removeDuplicates(array) {
 	return [...new Set(array)];
 };
 
-window.induceLactation = /** @param {App.Entity.SlaveState} slave */ function induceLactation(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.induceLactation = function induceLactation(slave) {
 	let pronouns = getPronouns(slave);
 	let His = capFirstChar(pronouns.possessive);
 	let r = "";
 	if (slave.induceLactation >= 10) {
 		if (jsRandom(1, 100) < slave.induceLactation) {
-			r += `${His} breasts have been stimulated often enough to @@.lime;induce lactation.@@`;
+			r += `${His} breasts have been stimulated often enough to <span class="lime">induce lactation.</span>`;
 			slave.induceLactation = 0;
 			slave.lactationDuration = 2;
 			slave.lactation = 1;
@@ -1036,24 +1469,33 @@ window.induceLactation = /** @param {App.Entity.SlaveState} slave */ function in
 
 window.ResearchLabStockPile = function() {
 	const V = State.variables;
-	return `__Stockpile__
-	Prosthetics interfaces: ${num(V.stockpile.basicPLimbInterface + V.stockpile.advPLimbInterface)}
-	&nbsp;Basic : $stockpile.basicPLimbInterface
-	&nbsp;Advanced: $stockpile.advPLimbInterface
-	Limbs: ${num(V.stockpile.basicPLimb + V.stockpile.advSexPLimb + V.stockpile.advGracePLimb + V.stockpile.advCombatPLimb + V.stockpile.cyberneticPLimb)}
-	&nbsp;Basic: $stockpile.basicPLimb
-	&nbsp;Sex: $stockpile.advSexPLimb
-	&nbsp;Beauty: $stockpile.advGracePLimb
-	&nbsp;Combat: $stockpile.advCombatPLimb
-	&nbsp;Cybernetic: $stockpile.cyberneticPLimb
-	Implants: ${num(V.stockpile.ocularImplant + V.stockpile.cochlearImplant + V.stockpile.erectileImplant)}
-	&nbsp;Ocular: $stockpile.ocularImplant
-	&nbsp;Cochlear: $stockpile.cochlearImplant
-	//&nbsp;Erectile: $stockpile.erectileImplant//
-	Electrolarynx: $stockpile.electrolarynx`;
+	return `__Prosthetics__
+	Prosthetics interfaces: ${num(V.prosthetics.interfaceP1.amount + V.prosthetics.interfaceP2.amount)}
+	&nbsp;Basic: $prosthetics.interfaceP1.amount
+	&nbsp;Advanced: $prosthetics.interfaceP2.amount
+	Limbs: ${num(V.prosthetics.basicL.amount + V.prosthetics.sexL.amount + V.prosthetics.beautyL.amount + V.prosthetics.combatL.amount + V.prosthetics.cyberneticL.amount)}
+	&nbsp;Basic: $prosthetics.basicL.amount
+	&nbsp;Sex: $prosthetics.sexL.amount
+	&nbsp;Beauty: $prosthetics.beautyL.amount
+	&nbsp;Combat: $prosthetics.combatL.amount
+	&nbsp;Cybernetic: $prosthetics.cyberneticL.amount
+	Implants: ${num(V.prosthetics.ocular.amount + V.prosthetics.cochlear.amount + V.prosthetics.electrolarynx.amount)}
+	&nbsp;Ocular: $prosthetics.ocular.amount
+	&nbsp;Cochlear: $prosthetics.cochlear.amount
+	//&nbsp;Erectile: $prosthetics.erectile.amount//
+	&nbsp;Electrolarynx: $prosthetics.electrolarynx.amount
+	Tail interface: $prosthetics.interfaceTail.amount
+	Tails: ${num(V.prosthetics.modT.amount + V.prosthetics.sexT.amount + V.prosthetics.combatT.amount)}
+	&nbsp;Modular: $prosthetics.modT.amount
+	&nbsp;Pleasure: $prosthetics.sexT.amount
+	&nbsp;Combat: $prosthetics.combatT.amount`;
 };
 
-window.originPronounReplace = /** @param {App.Entity.SlaveState} slave */ function(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.originPronounReplace = function(slave) {
 	let r = slave.origin;
 	switch (r) {
 		case "She was the result of unprotected sex with a client. Her mother tracked you down years after her birth to force her upon you.":
@@ -1212,28 +1654,31 @@ window.SkillIncrease = (function() {
 	};
 
 	/* call as SkillIncrease.Oral() */
-	/** @param {App.Entity.SlaveState} slave */
-	function OralSkillIncrease(slave, skillIncrease) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {number} skillIncrease	// I think
+	 * @returns {string}
+	 */
+	function OralSkillIncrease(slave, skillIncrease = 1) {
 		const He = capFirstChar(slave.pronoun);
 		const his = slave.possessivePronoun;
 		let r = "";
-		skillIncrease = skillIncrease || State.variables.skillIncrease || 1;
 
 		if (slave.skill.oral <= 10) {
 			if (slave.skill.oral + skillIncrease > 10) {
-				r = ` <span class="green">${He} now has basic knowledge about oral sex,</span> and can at least suck a dick without constant gagging.`;
+				r = `<span class="green">${He} now has basic knowledge about oral sex,</span> and can at least suck a dick without constant gagging.`;
 			}
 		} else if (slave.skill.oral <= 30) {
 			if (slave.skill.oral + skillIncrease > 30) {
-				r = ` <span class="green">${He} now has some oral skills,</span> and can reliably bring dicks and pussies to climax with ${his} mouth.`;
+				r = `<span class="green">${He} now has some oral skills,</span> and can reliably bring dicks and pussies to climax with ${his} mouth.`;
 			}
 		} else if (slave.skill.oral <= 60) {
 			if (slave.skill.oral + skillIncrease > 60) {
-				r = ` <span class="green">${He} is now an oral expert,</span> and has a delightfully experienced tongue.`;
+				r = `<span class="green">${He} is now an oral expert,</span> and has a delightfully experienced tongue.`;
 			}
 		} else if (slave.skill.oral < 100) {
 			if (slave.skill.oral + skillIncrease >= 100) {
-				r = ` <span class="green">${He} has mastered oral sex,</span> and can learn nothing more about sucking dick or eating pussy.`;
+				r = `<span class="green">${He} has mastered oral sex,</span> and can learn nothing more about sucking dick or eating pussy.`;
 			}
 		}
 		slave.skill.oral += skillIncrease;
@@ -1241,11 +1686,14 @@ window.SkillIncrease = (function() {
 	}
 
 	/* call as SkillIncrease.Vaginal() */
-	/** @param {App.Entity.SlaveState} slave */
-	function VaginalSkillIncrease(slave, skillIncrease) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {number} skillIncrease	// I think
+	 * @returns {number}
+	 */
+	function VaginalSkillIncrease(slave, skillIncrease = 1) {
 		const He = capFirstChar(slave.pronoun);
 		let r = "";
-		skillIncrease = skillIncrease || State.variables.skillIncrease || 1;
 
 		if (slave.skill.vaginal <= 10) {
 			if (slave.skill.vaginal + skillIncrease > 10) {
@@ -1269,12 +1717,15 @@ window.SkillIncrease = (function() {
 	}
 
 	/* call as SkillIncrease.Anal() */
-	/** @param {App.Entity.SlaveState} slave */
-	function AnalSkillIncrease(slave, skillIncrease) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {number} skillIncrease	// I think
+	 * @returns {string}
+	 */
+	function AnalSkillIncrease(slave, skillIncrease = 1) {
 		const He = capFirstChar(slave.pronoun);
 		const his = slave.possessivePronoun;
-		let r ="";
-		skillIncrease = skillIncrease || State.variables.skillIncrease || 1;
+		let r = "";
 
 		if (slave.skill.anal <= 10) {
 			if (slave.skill.anal + skillIncrease > 10) {
@@ -1298,12 +1749,15 @@ window.SkillIncrease = (function() {
 	}
 
 	/* call as SkillIncrease.Whore() */
-	/** @param {App.Entity.SlaveState} slave */
-	function WhoreSkillIncrease(slave, skillIncrease) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {number} skillIncrease	// I think
+	 * @returns {string}
+	 */
+	function WhoreSkillIncrease(slave, skillIncrease = 1) {
 		const He = capFirstChar(slave.pronoun);
 		const his = slave.possessivePronoun;
-		let r ="";
-		skillIncrease = skillIncrease || State.variables.skillIncrease || 1;
+		let r = "";
 
 		if (slave.skill.whoring <= 10) {
 			if (slave.skill.whoring + skillIncrease > 10) {
@@ -1327,11 +1781,14 @@ window.SkillIncrease = (function() {
 	}
 
 	/* call as SkillIncrease.Entertain() */
-	/** @param {App.Entity.SlaveState} slave */
-	function EntertainSkillIncrease(slave, skillIncrease) {
+	/**
+	 * @param {App.Entity.SlaveState} slave
+	 * @param {number} skillIncrease	// I think
+	 * @returns {string}
+	 */
+	function EntertainSkillIncrease(slave, skillIncrease = 1) {
 		const He = capFirstChar(slave.pronoun);
-		let r ="";
-		skillIncrease = skillIncrease || State.variables.skillIncrease || 1;
+		let r = "";
 
 		if (slave.skill.entertainment <= 10) {
 			if (slave.skill.entertainment + skillIncrease > 10) {
@@ -1447,11 +1904,19 @@ window.upgradeMultiplierTrade = function() {
 };
 
 window.jsNdef = function(input) {
-	if (typeof input === "undefined") return true; else return false;
+	if (typeof input === "undefined") {
+		return true;
+	} else {
+		return false;
+	}
 };
 
 window.jsDef = function(input) {
-	if (typeof input !== "undefined") return true; else return false;
+	if (typeof input !== "undefined") {
+		return true;
+	} else {
+		return false;
+	}
 };
 
 /* Return a career at random that would be suitable for the given slave.
@@ -1512,23 +1977,24 @@ window.resyncSlaveToAge = function(slave) {
 };
 
 window.IncreasePCSkills = function(input, increase = 1) {
-	const player = State.variables.PC, oldSkill = player[input];
+	const player = State.variables.PC;
+	const oldSkill = player[input];
 	player[input] += increase;
 	if (oldSkill <= 10) {
 		if (player[input] >= 10) {
-			return ` <span class='green'> <br>You have gained basic knowlege in ${input}.</span>`;
+			return `<span class="green"> <br>You have gained basic knowlege in ${input}.</span>`;
 		}
 	} else if (oldSkill <= 30) {
 		if (player[input] >= 30) {
-			return ` <span class='green'> <br>You have gained some knowlege in ${input}.</span>`;
+			return `<span class="green"> <br>You have gained some knowlege in ${input}.</span>`;
 		}
 	} else if (oldSkill <= 60) {
 		if (player[input] >= 60) {
-			return ` <span class='green'> <br>You have become an expert in ${input}.</span>`;
+			return `<span class="green"> <br>You have become an expert in ${input}.</span>`;
 		}
 	} else if (oldSkill < 100) {
 		if (player[input] >= 100) {
-			return ` <span class='green'> <br>You have mastered ${input}.</span>`;
+			return `<span class="green"> <br>You have mastered ${input}.</span>`;
 		}
 	}
 };
@@ -1716,7 +2182,7 @@ App.UI.disabledLink = function(link, reasons) {
 };
 
 /**
- * Expresion for SugarCube for referencing a slave by index
+ * Expression for SugarCube for referencing a slave by index
  * @param {number} i slave array index or -1 for activeSlave
  * @returns {string}
  */
diff --git a/src/js/vignettes.js b/src/js/vignettes.js
index f7742f35dc340e27c8c0244c7bd8a7a1425bff3a..602652eb7052e4dbaf908cf168ab2efd2e6fe336 100644
--- a/src/js/vignettes.js
+++ b/src/js/vignettes.js
@@ -1,5 +1,8 @@
-/* eslint-disable no-undef */
-window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVignette(slave) {
+/**
+ * @param {App.Entity.SlaveState} slave
+ * @returns {string}
+ */
+window.GetVignette = function GetVignette(slave) {
 	const V = State.variables;
 	let vignettes = [];
 
@@ -309,6 +312,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 						type: "rep",
 						effect: -1,
 					});
+					break;
+
 			}
 		}
 		switch (slave.behavioralFlaw) {
@@ -379,6 +384,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: -1,
 				});
+				break;
+
 		}
 		switch (slave.sexualFlaw) {
 			case "hates oral":
@@ -502,6 +509,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: 3,
 				});
+				break;
+
 		}
 		switch (slave.behavioralQuirk) {
 			case "confident":
@@ -586,6 +595,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: 1,
 				});
+				break;
+
 		}
 		switch (slave.sexualQuirk) {
 			case "gagfuck queen":
@@ -651,6 +662,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: 1,
 				});
+				break;
+
 		}
 
 		if (slave.counter.pitKills > 0) {
@@ -943,7 +956,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "rep",
 					effect: -1,
 				});
-				if (slave.behavioralQuirk === "cutting" && slave.intelligence+slave.intelligenceImplant > 50) {
+				if (slave.behavioralQuirk === "cutting" && slave.intelligence + slave.intelligenceImplant > 50) {
 					vignettes.push({
 						text: `${he} helped a customer discover a new fetish by making cutting remarks when their cock was too small for ${his} big cunt,`,
 						type: "rep",
@@ -1201,7 +1214,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: 1,
 			});
 		}
-		if (slave.intelligence+slave.intelligenceImplant < -50) {
+		if (slave.intelligence + slave.intelligenceImplant < -50) {
 			vignettes.push({
 				text: `a customer managed to trick ${him} into fucking him without payment,`,
 				type: "cash",
@@ -1281,7 +1294,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: -1,
 			});
 		}
-		if (slave.relationship <= -2 && slave.intelligence+slave.intelligenceImplant <= 15) {
+		if (slave.relationship <= -2 && slave.intelligence + slave.intelligenceImplant <= 15) {
 			vignettes.push({
 				text: `${he} accidentally mentions how much ${he} loves you during intercourse with a customer who doesn't like to share,`,
 				type: "rep",
@@ -1375,7 +1388,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					effect: 1,
 				});
 			}
-			if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
+			if (slave.preg > slave.pregData.normalBirth / 4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
 				vignettes.push({
 					text: `a customer loved ${his} pregnant belly so much that he came back for repeat business,`,
 					type: "cash",
@@ -1392,7 +1405,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			}
 		}
 		if (V.arcologies[0].FSPaternalist !== "unset") {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} got repeat business from a customer who likes to chat with intelligent prostitutes while fucking,`,
 					type: "cash",
@@ -1603,7 +1616,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			}
 		}
 		if (V.arcologies[0].FSAztecRevivalist !== "unset") {
-			if (slave.devotion > 75 && slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.devotion > 75 && slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} indulged a citizen by following a fertility ritual completely,`,
 					type: "rep",
@@ -1619,7 +1632,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			});
 		}
 		if (V.arcologies[0].FSEdoRevivalist !== "unset") {
-			if (slave.face > 40 && slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.face > 40 && slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} got repeat business from a customer who wished to do nothing more than converse with a beautiful and intelligent ${boy},`,
 					type: "cash",
@@ -1995,6 +2008,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 						type: "rep",
 						effect: -1,
 					});
+					break;
+
 			}
 		}
 		switch (slave.behavioralFlaw) {
@@ -2065,6 +2080,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "rep",
 					effect: -1,
 				});
+				break;
+
 		}
 		switch (slave.sexualFlaw) {
 			case "hates oral":
@@ -2188,6 +2205,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "rep",
 					effect: 3,
 				});
+				break;
+
 		}
 		switch (slave.behavioralQuirk) {
 			case "confident":
@@ -2272,6 +2291,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: 1,
 				});
+				break;
+
 		}
 		switch (slave.sexualQuirk) {
 			case "gagfuck queen":
@@ -2337,6 +2358,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "cash",
 					effect: 1,
 				});
+				break;
+
 		}
 
 		if (slave.counter.pitKills > 0) {
@@ -2629,7 +2652,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "rep",
 					effect: -1,
 				});
-				if (slave.behavioralQuirk === "cutting" && slave.intelligence+slave.intelligenceImplant > 50) {
+				if (slave.behavioralQuirk === "cutting" && slave.intelligence + slave.intelligenceImplant > 50) {
 					vignettes.push({
 						text: `${he} helped a citizen discover a new fetish by making cutting remarks when their cock was too small for ${his} big cunt,`,
 						type: "rep",
@@ -2880,7 +2903,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: 1,
 			});
 		}
-		if (slave.intelligence+slave.intelligenceImplant < -50) {
+		if (slave.intelligence + slave.intelligenceImplant < -50) {
 			vignettes.push({
 				text: `a low-class citizen who had no business fucking ${him} managed to trick ${him} into fucking him anyway,`,
 				type: "rep",
@@ -2960,7 +2983,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: -1,
 			});
 		}
-		if (slave.relationship <= -2 && slave.intelligence+slave.intelligenceImplant <= 15) {
+		if (slave.relationship <= -2 && slave.intelligence + slave.intelligenceImplant <= 15) {
 			vignettes.push({
 				text: `${he} accidentally mentions how much ${he} loves you during intercourse with a citizen who doesn't like to share,`,
 				type: "rep",
@@ -3054,7 +3077,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					effect: 1,
 				});
 			}
-			if (slave.preg > slave.pregData.normalBirth/4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
+			if (slave.preg > slave.pregData.normalBirth / 4 && slave.pregKnown > 1 && slave.bellyPreg >= 5000) {
 				vignettes.push({
 					text: `a citizen loved ${his} pregnant belly so much that he came back for repeat service,`,
 					type: "rep",
@@ -3071,7 +3094,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			}
 		}
 		if (V.arcologies[0].FSPaternalist !== "unset") {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} gratified a citizen who likes to chat with intelligent prostitutes as they fuck ${him},`,
 					type: "rep",
@@ -3282,7 +3305,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			}
 		}
 		if (V.arcologies[0].FSAztecRevivalist !== "unset") {
-			if (slave.devotion > 75 && slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.devotion > 75 && slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} indulged a citizen by following a fertility ritual completely,`,
 					type: "rep",
@@ -3298,7 +3321,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			});
 		}
 		if (V.arcologies[0].FSEdoRevivalist !== "unset") {
-			if (slave.face > 40 && slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.face > 40 && slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} gratified a citizen who wished to do nothing more than converse with a beautiful and intelligent ${boy},`,
 					type: "rep",
@@ -3404,6 +3427,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 						type: "devotion",
 						effect: 1,
 					});
+					break;
+
 			}
 		}
 		switch (slave.behavioralFlaw) {
@@ -3420,6 +3445,8 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					type: "devotion",
 					effect: 1,
 				});
+				break;
+
 		}
 		if (slave.fetish === "mindbroken") {
 			vignettes.push({
@@ -3440,13 +3467,13 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: 1,
 			});
 		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
+		if (slave.intelligence + slave.intelligenceImplant > 50) {
 			vignettes.push({
 				text: `${he} devised a highly efficient way to get ${his} entire week's worth of work done in only three days. As a reward, ${he} was given — you guessed it — more work,`,
 				type: "cash",
 				effect: 1,
 			});
-		} else if (slave.intelligence+slave.intelligenceImplant < -50) {
+		} else if (slave.intelligence + slave.intelligenceImplant < -50) {
 			vignettes.push({
 				text: `after being told all ${he} needed was some 'elbow grease', ${he} wasted an obscene amount of time searching for it,`,
 				type: "cash",
@@ -3558,7 +3585,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: -1,
 			});
 		}
-		//TODO: add more vignettes
+		// TODO: add more vignettes
 		if ((V.farmyardBreeding) && (V.seeBestiality === 1)) {
 			vignettes.push({
 				text: `a citizen didn't realize how disgusting he found bestiality until he attended one of ${V.farmyardName}'s shows,`,
@@ -3629,6 +3656,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 					effect: 0,
 				});
 				break;
+
 		}
 		switch (slave.behavioralQuirk) {
 			case "fitness":
@@ -3666,7 +3694,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			});
 		}
 		if (slave.devotion > 50) {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} spent some of ${his} downtime figuring out a new way for you to make money,`,
 					type: "cash",
@@ -3684,7 +3712,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 			}
 		}
 		if (slave.devotion < -50) {
-			if (slave.intelligence+slave.intelligenceImplant > 50) {
+			if (slave.intelligence + slave.intelligenceImplant > 50) {
 				vignettes.push({
 					text: `${he} spent some of ${his} downtime figuring out a way to sabotage your profits,`,
 					type: "cash",
@@ -3763,7 +3791,7 @@ window.GetVignette = /** @param {App.Entity.SlaveState} slave */ function GetVig
 				effect: 0,
 			});
 		}
-		if (slave.intelligence+slave.intelligenceImplant > 50) {
+		if (slave.intelligence + slave.intelligenceImplant > 50) {
 			vignettes.push({
 				text: `${he} immersed ${himself} in classics of literature at an arcology library, giving ${him} uncomfortable ideas about society,`,
 				type: "devotion",
diff --git a/src/js/walkPastJS.js b/src/js/walkPastJS.js
index 595a01280116bf813791fc425e5c800e78053f6f..c46ff5da7655b6a956209da3a5c740121258bd1e 100644
--- a/src/js/walkPastJS.js
+++ b/src/js/walkPastJS.js
@@ -1,5 +1,4 @@
 /* eslint-disable no-unused-vars */
-/* eslint-disable no-undef */
 /* temporary container until the entire thing is complete. No point in not deploying the working functions, you know? */
 
 window.primeSlave = function(activeSlave, seed) {
@@ -46,7 +45,7 @@ window.rivalSlave = function(activeSlave, seed) {
 		t += walkPasts(_partnerSlave, 100-seed);
 
 		_partnerSlave = null;
-		V.target = "FRival"; /*potentially removed later*/
+		V.target = "FRival"; /* potentially removed later */
 	}
 
 	return t;
@@ -55,30 +54,30 @@ window.rivalSlave = function(activeSlave, seed) {
 window.loverSlave = function(activeSlave) {
 
 		/* will be moved up once this becomes a single, contained function. */
-		var _target = "";
-		var t = "";
-		var V = State.variables;
-		var race;
+		let _target = "";
+		let t = "";
+		let V = State.variables;
+		let race;
 		if (V.seeRace === 1) { race = activeSlave.race; } else { race = ""; }
-		var name = activeSlave.slaveName;
+		let name = activeSlave.slaveName;
 		const pronouns = getPronouns(activeSlave);
 		const he = pronouns.pronoun, him = pronouns.object, his = pronouns.possessive, hers = pronouns.possessivePronoun, himself = pronouns.objectReflexive, boy = pronouns.noun;
 		const He = capFirstChar(he), His = capFirstChar(his);
 
-		var _partnerSlave = getSlave(activeSlave.relationshipTarget);
-		var _fuckSeed = jsRandom(1,100);
-		var _seed = jsRandom(1,100);
-		var _fuckSpot;
+		let _partnerSlave = getSlave(activeSlave.relationshipTarget);
+		let _fuckSeed = jsRandom(1, 100);
+		let _seed = jsRandom(1, 100);
+		let _fuckSpot;
 
 		if (_partnerSlave !== undefined) {
 
-			var pronouns2 = getPronouns(_partnerSlave);
-			var he2 = pronouns2.pronoun, him2 = pronouns2.object, his2 = pronouns2.possessive, hers2 = pronouns2.possessivePronoun, himself2 = pronouns2.objectReflexive, boy2 = pronouns2.noun;
-			var He2 = capFirstChar(he2), His2 = capFirstChar(his2);
-			var race2;
+			let pronouns2 = getPronouns(_partnerSlave);
+			let he2 = pronouns2.pronoun, him2 = pronouns2.object, his2 = pronouns2.possessive, hers2 = pronouns2.possessivePronoun, himself2 = pronouns2.objectReflexive, boy2 = pronouns2.noun;
+			let He2 = capFirstChar(he2), His2 = capFirstChar(his2);
+			let race2;
 			if (V.seeRace === 1) { race2 = _partnerSlave.race; } else { race2 = ""; }
-			var partnerName = _partnerSlave.slaveName;
-			var activeSlaveRel;
+			let partnerName = _partnerSlave.slaveName;
+			let activeSlaveRel;
 			if (activeSlave.relationship <= 3) {
 				activeSlaveRel = "friend with benefits";
 			} else if (activeSlave.relationship <= 4) {
@@ -638,7 +637,7 @@ window.loverSlave = function(activeSlave) {
 								}
 							}
 						} else if (canDoVaginal(activeSlave) && _fuckSeed > 30) {
-							if (canPenetrate(_partnerSlave) && activeSlave.vagina > 0 && activeSlave.preg === 0 && activeSlave.ovaries === 1) { //impreg
+							if (canPenetrate(_partnerSlave) && activeSlave.vagina > 0 && activeSlave.preg === 0 && activeSlave.ovaries === 1) { // impreg
 								if (_partnerSlave.belly >= 5000) {
 									t += `${partnerName} is `;
 									if (_partnerSlave.bellyPreg >= 1500) {
@@ -651,7 +650,7 @@ window.loverSlave = function(activeSlave) {
 									t += `${partnerName} has ${name} pinned on ${his} back in a mating press as ${he2} fervently tries to sate ${his} lust by putting a baby in ${him}.`;
 								}
 							} else {
-								if (_fuckSeed > 50) { //vanilla
+								if (_fuckSeed > 50) { // vanilla
 									if (canPenetrate(_partnerSlave) && activeSlave.vagina !== 0) {
 										if (_partnerSlave.belly >= 5000) {
 											t += `${partnerName} is `;
@@ -693,7 +692,7 @@ window.loverSlave = function(activeSlave) {
 											t += `${name} and ${partnerName} are both pretending to be hugely pregnant and cuddling each other.`;
 										}
 									}
-								} else if (canDoVaginal(_partnerSlave) && _fuckSeed > 40) { //scissor
+								} else if (canDoVaginal(_partnerSlave) && _fuckSeed > 40) { // scissor
 									if (_partnerSlave.belly >= 5000) {
 										t += `${partnerName} is `;
 										if (_partnerSlave.bellyPreg >= 1500) {
@@ -715,7 +714,7 @@ window.loverSlave = function(activeSlave) {
 											t += `are enthusiastically tribbing.`;
 										}
 									}
-								} else { //oral
+								} else { // oral
 									if (_partnerSlave.belly >= 5000) {
 										t += `${partnerName} is `;
 										if (_partnerSlave.bellyPreg >= 1500) {
@@ -753,7 +752,7 @@ window.loverSlave = function(activeSlave) {
 								}
 							}
 						} else if (canDoAnal(activeSlave) && canPenetrate(_partnerSlave) && _fuckSeed > 10) {
-							if (activeSlave.anus > 0 && activeSlave.preg === 0 && activeSlave.mpreg === 1) { //impreg
+							if (activeSlave.anus > 0 && activeSlave.preg === 0 && activeSlave.mpreg === 1) { // impreg
 								if (_partnerSlave.belly >= 5000) {
 									t += `${partnerName} is `;
 									if (_partnerSlave.bellyPreg >= 1500) {
@@ -804,7 +803,7 @@ window.loverSlave = function(activeSlave) {
 									t += `${partnerName} has ${name} pinned on ${his} front as ${he2} dutifully plows ${his} needy anus in an attempt to sate ${his} bottomless lust.`;
 								}
 							}
-						} else { //oral
+						} else { // oral
 							if (_partnerSlave.belly >= 5000) {
 								t += `${partnerName} is `;
 								if (_partnerSlave.bellyPreg >= 1500) {
@@ -1244,7 +1243,7 @@ window.relatedSlave = function(activeSlave) {
 	let t = "";
 	let partnerSlave;
 
-	let fuckseed = jsRandom(1,100);
+	let fuckseed = jsRandom(1, 100);
 
 	if (V.partner === "relation") {
 		if (V.familyTesting === 1) {
@@ -1253,7 +1252,7 @@ window.relatedSlave = function(activeSlave) {
 			partnerSlave = getSlave(activeSlave.relationTarget);
 		}
 	} else {
-		var activeSlaveRel = relationshipTerm(activeSlave);
+		let activeSlaveRel = relationshipTerm(activeSlave);
 		partnerSlave = getSlave(activeSlave.relationshipTarget);
 	}
 
@@ -1272,7 +1271,7 @@ window.relatedSlave = function(activeSlave) {
 		t += `${partnerSlave.slaveName} `;
 		t += walkPasts(partnerSlave, fuckseed);
 
-		V.target = "FRelation"; /*potentially removed later*/
+		V.target = "FRelation"; /* potentially removed later */
 	} else {
 		t += ` Expected partner not found!`;
 	}
@@ -1301,14 +1300,14 @@ window.walkPasts = function(slave, _seed) {
 	case "work in the dairy":
 		if (V.dairyRestraintsSetting > 1) {
 			t += `is strapped to a milking machine in ${V.dairyName}, `;
-			if (slave.ovaries === 1 && V.dairyPregSetting > 0 && jsRandom(1,2) === 2) {
+			if (slave.ovaries === 1 && V.dairyPregSetting > 0 && jsRandom(1, 2) === 2) {
 				if (isFertile(slave)) {
 					t += `and is wincing in pain as the machine forces another load of cum into ${his} womb. As you watch, ${his} ${race} stomach steadily swells with baby batter.`;
 				} else {
 					t += `giving you a good view of ${his} ${race} body and heavy belly on the feeds.`;
 				}
 			} else if (slave.lactation > 0) {
-				if (slave.balls > 0 && jsRandom(1,2) === 1) {
+				if (slave.balls > 0 && jsRandom(1, 2) === 1) {
 					if (slave.dick > 0) {
 						if (_seed > 50) {
 							t += `and is having ${his} cock sucked dry. As you watch, `;
@@ -1393,7 +1392,7 @@ window.walkPasts = function(slave, _seed) {
 		} else {
 			t += `is working in ${V.dairyName}, `;
 			if (slave.lactation > 0) {
-				if (slave.balls > 0 && jsRandom(1,2) === 1) {
+				if (slave.balls > 0 && jsRandom(1, 2) === 1) {
 					if (slave.dick > 0) {
 						if (_seed > 50) {
 							t += `and is having ${his} cock milked. As you watch, `;
@@ -1479,7 +1478,7 @@ window.walkPasts = function(slave, _seed) {
 		break;
 	case "work in the brothel":
 		t += `is working in ${V.brothelName}, and is `;
-		if (Beauty(slave) > 100 && jsRandom(1,2) === 1) {
+		if (Beauty(slave) > 100 && jsRandom(1, 2) === 1) {
 			if (_seed > 80) {
 				if (canDoAnal(slave) || canDoVaginal(slave)) {
 					t += `riding one customer's dick while ${he} gives another a blowjob.`;
@@ -1685,7 +1684,7 @@ window.walkPasts = function(slave, _seed) {
 		t += `is managing ${V.brothelName}: ${he} is making sure all the customers are satisfied and all the whores are working hard.`;
 		break;
 	case "be your Concubine":
-		if (jsRandom(1,2) === 1) {
+		if (jsRandom(1, 2) === 1) {
 			t += `is looking after ${himself}; ${he} spends many hours every day on ${his} beauty regimen.`;
 		} else {
 			t += `is checking over the appearance of your harem, making sure everyone looks perfect.`;
@@ -1748,7 +1747,7 @@ window.walkPasts = function(slave, _seed) {
 		} else {
 			t += `walks past your desk on ${his} way to `;
 		}
-		if (slave.inflation > 0 && jsRandom(1,100) > 70) {
+		if (slave.inflation > 0 && jsRandom(1, 100) > 70) {
 			if (slave.inflationMethod === 1) {
 				t += `gorge ${himself} with ${slave.inflationType}; `;
 			} else if (slave.inflationMethod === 2) {
@@ -2019,7 +2018,7 @@ window.boobWatch = function(slave) {
 			break;
 		case "a slutty outfit":
 			t += `For today's slutty outfit ${he}'s chosen a `;
-			if (jsRandom(1,100) > 50) {
+			if (jsRandom(1, 100) > 50) {
 				t += `handkerchief top that occasionally comes untied and `;
 				if (slave.boobs < 300) {
 					t += `reveals ${his} flat chest.`;
@@ -2172,7 +2171,7 @@ window.boobWatch = function(slave) {
 			}
 			break;
 
-		//needs improvement
+		// needs improvement
 		case "a klan robe":
 			t += `${His} robe covers ${his} ${breasts} totally.`;
 			break;
@@ -2406,7 +2405,7 @@ window.buttWatch = function(slave) {
 			break;
 		case "a slutty outfit":
 			t += `For today's slutty outfit ${he}'s chosen `;
-			if (jsRandom(1,100) > 50 && slave.amp !== 1) {
+			if (jsRandom(1, 100) > 50 && slave.amp !== 1) {
 				t += `yoga pants so sheer that everything ${he}'s got is clearly visible.`;
 			} else {
 				t += `a miniskirt so brief that ${his} ass is hanging out the back, and a glimpse of ${his} goods is occasionally visible from the front.`;
@@ -2605,7 +2604,7 @@ window.buttWatch = function(slave) {
 			t += `${His} oversized t-shirt is covering ${his} rear, but it can be lifted easily enough.`;
 			break;
 		default:
-			//"a bra" "a button-up shirt" "a sweater" "a tank-top" "a tube top" "a striped bra" "a sports bra" "a t-shirt"
+			// "a bra" "a button-up shirt" "a sweater" "a tank-top" "a tube top" "a striped bra" "a sports bra" "a t-shirt"
 			if (slave.chastityAnus && slave.chastityVagina) {
 				t += `${His} chastity protects ${his} holes from penetration.`;
 				V.target = "FondleButt";
@@ -2632,7 +2631,7 @@ window.anusWatch = function(slave) {
 	V.target = "FAnus";
 
 	t += `<<AnusDescription>>`;
-	if (slave.chastityAnus == 0) {
+	if (slave.chastityAnus === 0) {
 		t += ` `;
 		switch (slave.clothes) {
 			case "a Fuckdoll suit":
@@ -3005,17 +3004,17 @@ window.lipWatch = function(slave) {
 			break;
 		default:
 			t += `${His} unadorned `;
-			if (V.PC.dick == 1) {
+			if (V.PC.dick === 1) {
 				t += `throat is just waiting to be wrapped around a thick shaft.`;
 			} else {
 				t += `lips are just begging for a cunt to lavish attention on.`;
 			}
 	}
-	if (jsRandom(1,3) === 1) {
+	if (jsRandom(1, 3) === 1) {
 		V.target = "FKiss";
 	} else {
 		V.target = "FLips";
 	}
 
 	return t;
-};
\ No newline at end of file
+};
diff --git a/src/js/wombJS.js b/src/js/wombJS.js
index ac32ad21ba568c9da152e466ffacf357c0882ab2..8c59bc22dab2981dea568dfdb56713045327ee45 100644
--- a/src/js/wombJS.js
+++ b/src/js/wombJS.js
@@ -1,4 +1,3 @@
-/* eslint-disable no-undef */
 /*
 This is a womb processor/simulator script. It takes care of calculation of belly sizes based on individual fetus sizes, with full support of broodmothers implant random turning on and off possibility. Also this can be expanded to store more parents data in each individual fetus in future.
 Design limitations:
@@ -24,16 +23,16 @@ $slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volu
 
 */
 
-//Init womb system.
-window.WombInit = function (actor) {
+// Init womb system.
+window.WombInit = function(actor) {
 	let i;
 
 	if (!Array.isArray(actor.womb)) {
-		//alert("creating new womb"); //debugging
+		// alert("creating new womb"); //debugging
 		actor.womb = [];
 	}
 
-	//console.log("broodmother:" + typeof actor.broodmother);
+	// console.log("broodmother:" + typeof actor.broodmother);
 
 	if (typeof actor.broodmother !== "number") {
 		actor.broodmother = 0;
@@ -46,24 +45,24 @@ window.WombInit = function (actor) {
 
 	if (actor.pregData === undefined) {
 		actor.pregData = clone(setup.pregData.human);
-		//Setup should be through deep copy, so in future, if we like, these values can be changed individually. Gameplay expansion possibilities. But for dev time to simplify debugging:
-		//actor.pregData = setup.pregData.human;  // any changes in setup pregData template will be applied immediately to all. But can't be made separate changes.
+		// Setup should be through deep copy, so in future, if we like, these values can be changed individually. Gameplay expansion possibilities. But for dev time to simplify debugging:
+		// actor.pregData = setup.pregData.human;  // any changes in setup pregData template will be applied immediately to all. But can't be made separate changes.
 	}
 
-	//backward compatibility setup. Fully accurate for normal pregnancy only.
+	// backward compatibility setup. Fully accurate for normal pregnancy only.
 	if (actor.womb.length > 0 && actor.womb[0].genetics === undefined && actor.eggType === "human") {
 		i = 0;
-		actor.womb.forEach(function (ft) {
+		actor.womb.forEach(function(ft) {
 			ft.genetics = generateGenetics(actor, actor.pregSource, i);
 			i++;
 		});
 	} else if (actor.womb.length === 0 && actor.pregType > 0 && actor.broodmother === 0) {
 		WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg);
 	} else if (actor.womb.length === 0 && actor.pregType > 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) {
-		//sorry but for already present broodmothers it's impossible to calculate fully, approximation used.
-		var pw = actor.preg,
+		// sorry but for already present broodmothers it's impossible to calculate fully, approximation used.
+		let pw = actor.preg,
 			bCount, bLeft;
-		if (pw > actor.pregData.normalBirth) pw = actor.pregData.normalBirth; //to avoid disaster.
+		if (pw > actor.pregData.normalBirth) pw = actor.pregData.normalBirth; // to avoid disaster.
 		bCount = Math.floor(actor.pregType / pw);
 		bLeft = actor.pregType - (bCount * pw);
 		if (pw > actor.pregType) {
@@ -80,27 +79,27 @@ window.WombInit = function (actor) {
 	}
 };
 
-window.WombImpregnate = function (actor, fCount, fatherID, age, surrogate) {
-	var i;
-	var tf;
+window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) {
+	let i;
+	let tf;
 	for (i = 0; i < fCount; i++) {
-		tf = {}; //new Object
-		tf.age = age; //initial age
-		tf.realAge = 1; //initial real age (first week in mother)
-		tf.fatherID = fatherID; //We can store who is father too.
-		tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call.
-		tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept.
-		tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call.
-		tf.splitted = 0; //marker for already splitted fetus.
+		tf = {}; // new Object
+		tf.age = age; // initial age
+		tf.realAge = 1; // initial real age (first week in mother)
+		tf.fatherID = fatherID; // We can store who is father too.
+		tf.volume = 1; // Initial, to create property. Updated with actual data after WombGetVolume call.
+		tf.reserve = ""; // Initial, to create property. Used later to mark if this child is to be kept.
+		tf.identical = 0; // Initial, to create property. Updated with actual data during fetalSplit call.
+		tf.splitted = 0; // marker for already splitted fetus.
 		if (surrogate) {
-			tf.motherID = surrogate.ID; //Initial biological mother ID setup.
+			tf.motherID = surrogate.ID; // Initial biological mother ID setup.
 			if (actor.eggType === "human") {
-				tf.genetics = generateGenetics(surrogate, fatherID, i + 1); //Stored genetic information.
+				tf.genetics = generateGenetics(surrogate, fatherID, i + 1); // Stored genetic information.
 			}
 		} else {
-			tf.motherID = actor.ID; //Initial biological mother ID setup.
+			tf.motherID = actor.ID; // Initial biological mother ID setup.
 			if (actor.eggType === "human") {
-				tf.genetics = generateGenetics(actor, fatherID, i + 1); //Stored genetic information.
+				tf.genetics = generateGenetics(actor, fatherID, i + 1); // Stored genetic information.
 			}
 		}
 		tf.ID = generateNewID();
@@ -121,27 +120,27 @@ window.WombImpregnate = function (actor, fCount, fatherID, age, surrogate) {
 	MissingParentIDCorrection(actor);
 };
 
-window.WombSurrogate = function (actor, fCount, mother, fatherID, age) {
+window.WombSurrogate = function(actor, fCount, mother, fatherID, age) {
 	WombImpregnate(actor, fCount, fatherID, age, mother);
 };
 
-window.WombImpregnateClone = function (actor, fCount, mother, motherOriginal, age) {
-	var i;
-	var tf;
+window.WombImpregnateClone = function(actor, fCount, mother, motherOriginal, age) {
+	let i;
+	let tf;
 	for (i = 0; i < fCount; i++) {
-		tf = {}; //new Object
-		tf.age = age; //initial age
-		tf.realAge = 1; //initial real age (first week in mother)
-		tf.fatherID = mother.ID; //We can store who is father too.
-		tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call.
-		tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept.
-		tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call.
-		tf.splitted = 0; //marker for already splitted fetus.
-		tf.motherID = mother.ID; //Initial biological mother ID setup.
-		tf.genetics = generateGenetics(mother, mother.ID, i + 1); //Stored genetic information.
+		tf = {}; // new Object
+		tf.age = age; // initial age
+		tf.realAge = 1; // initial real age (first week in mother)
+		tf.fatherID = mother.ID; // We can store who is father too.
+		tf.volume = 1; // Initial, to create property. Updated with actual data after WombGetVolume call.
+		tf.reserve = ""; // Initial, to create property. Used later to mark if this child is to be kept.
+		tf.identical = 0; // Initial, to create property. Updated with actual data during fetalSplit call.
+		tf.splitted = 0; // marker for already splitted fetus.
+		tf.motherID = mother.ID; // Initial biological mother ID setup.
+		tf.genetics = generateGenetics(mother, mother.ID, i + 1); // Stored genetic information.
 		tf.ID = generateNewID();
 
-		//Welcome to having to set up common relatives for the slave and her clone
+		// Welcome to having to set up common relatives for the slave and her clone
 		if (mother.father === 0 || (mother.father < -1 && mother.father >= -20 && mother.father !== -3)) {
 			mother.father = State.variables.missingParentID;
 			State.variables.missingParentID--;
@@ -151,7 +150,7 @@ window.WombImpregnateClone = function (actor, fCount, mother, motherOriginal, ag
 			State.variables.missingParentID--;
 		}
 
-		//gene corrections
+		// gene corrections
 		tf.fatherID = -7;
 		tf.genetics.gender = mother.genes;
 		tf.genetics.mother = mother.mother;
@@ -190,7 +189,7 @@ window.WombImpregnateClone = function (actor, fCount, mother, motherOriginal, ag
 };
 
 // Should be used to set biological age for fetus (ageToAdd), AND chronological (realAgeToAdd). Speed up or slow down gestation drugs should affect ONLY biological.
-window.WombProgress = function (actor, ageToAdd, realAgeToAdd = ageToAdd) {
+window.WombProgress = function(actor, ageToAdd, realAgeToAdd = ageToAdd) {
 	ageToAdd = Math.ceil(ageToAdd * 10) / 10;
 	realAgeToAdd = Math.ceil(realAgeToAdd * 10) / 10;
 	try {
@@ -204,31 +203,31 @@ window.WombProgress = function (actor, ageToAdd, realAgeToAdd = ageToAdd) {
 	}
 };
 
-window.WombBirth = function (actor, readyAge) {
+window.WombBirth = function(actor, readyAge) {
 	try {
-		WombSort(actor); //For normal processing fetuses that more old should be first. Now - they are.
+		WombSort(actor); // For normal processing fetuses that more old should be first. Now - they are.
 	} catch (err) {
 		WombInit(actor);
 		alert("WombBirth warning - " + actor.slaveName + " " + err);
 	}
 
-	var birthed = [];
-	var ready = WombBirthReady(actor, readyAge);
-	var i;
+	let birthed = [];
+	let ready = WombBirthReady(actor, readyAge);
+	let i;
 
-	for (i = 0; i < ready; i++) { //here can't be used "for .. in .." syntax.
+	for (i = 0; i < ready; i++) { // here can't be used "for .. in .." syntax.
 		birthed.push(actor.womb.shift());
 	}
 
 	return birthed;
 };
 
-window.WombFlush = function (actor) {
+window.WombFlush = function(actor) {
 	actor.womb = [];
 };
 
-window.WombBirthReady = function (actor, readyAge) {
-	var readyCnt = 0;
+window.WombBirthReady = function(actor, readyAge) {
+	let readyCnt = 0;
 	try {
 		readyCnt += actor.womb.filter(ft => ft.age >= readyAge).length;
 	} catch (err) {
@@ -240,7 +239,7 @@ window.WombBirthReady = function (actor, readyAge) {
 	return readyCnt;
 };
 
-window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with minor adaptation.
+window.WombGetVolume = function(actor) { // most legacy code from pregJS.tw with minor adaptation.
 
 
 	if (actor.pregData.sizeType === 0)
@@ -275,13 +274,13 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 		rate = rateMin + (rateOne * cage);
 
 		csize = (min + (one * cage));
-		//console.log("min:"+min+"  max:"+max+"  ageMin:"+ageMin+"  ageMax:"+ageMax+"  one:"+one+"  rateOne:"+rateOne+"  cage:"+cage+"  rate:"+rate+"  csize:"+csize+"  final size:"+csize*rate);
+		// console.log("min:"+min+"  max:"+max+"  ageMin:"+ageMin+"  ageMax:"+ageMax+"  one:"+one+"  rateOne:"+rateOne+"  cage:"+cage+"  rate:"+rate+"  csize:"+csize+"  final size:"+csize*rate);
 
 		data.size = csize;
 		data.rate = rate;
 
-		return data; //csize * rate;
-		//maybe not very effective code, but simple and easy to debug. May be optimized more in future.
+		return data; // csize * rate;
+		// maybe not very effective code, but simple and easy to debug. May be optimized more in future.
 	}
 
 	function getVolByLen(actor) {
@@ -322,9 +321,9 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 				ft.volume = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((targetLen / 2), 3)));
 				wombSize += ft.volume;
 
-				//oldVol = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((oldLen / 2), 3))); //for debug
+				// oldVol = ((4 / 3) * (Math.PI) * (phi / 2) * (Math.pow((oldLen / 2), 3))); //for debug
 
-				//console.log("fetus.age:" + ft.age + "  oldLen:"+oldLen+"  targetLen:"+targetLen+"  ft.volume:"+ft.volume+ "  old volume:"+oldVol );
+				// console.log("fetus.age:" + ft.age + "  oldLen:"+oldLen+"  targetLen:"+targetLen+"  ft.volume:"+ft.volume+ "  old volume:"+oldVol );
 				/*
 					I found, that previous targetLen calculation not exactly accurate if compared to the actual medical data chart for fetal length. It's been rough approximation based only on pregnancy week (giving smaller fetus size then it should in most cases). So I need all this debug code to compare data and verify calculations. After final tweaking I will remove or comment out legacy code. Please not touch this before it.
 					Pregmodfan.
@@ -334,7 +333,7 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 			WombInit(actor);
 			alert("WombGetVolume warning - " + actor.slaveName + " " + err);
 		}
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
+		if (wombSize < 0) // catch for strange cases, to avoid messing with outside code.
 			wombSize = 0;
 
 		return wombSize;
@@ -343,8 +342,8 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 
 
 	function getVolByWeight(actor) {
-		var targetData;
-		var wombSize = 0;
+		let targetData;
+		let wombSize = 0;
 
 		actor.womb.forEach(ft => {
 
@@ -354,7 +353,7 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 
 		});
 
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
+		if (wombSize < 0) // catch for strange cases, to avoid messing with outside code.
 			wombSize = 0;
 
 		return wombSize;
@@ -362,8 +361,8 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 
 
 	function getVolByRaw(actor) {
-		var targetData;
-		var wombSize = 0;
+		let targetData;
+		let wombSize = 0;
 
 		actor.womb.forEach(ft => {
 
@@ -373,7 +372,7 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 
 		});
 
-		if (wombSize < 0) //catch for strange cases, to avoid messing with outside code.
+		if (wombSize < 0) // catch for strange cases, to avoid messing with outside code.
 			wombSize = 0;
 
 		return wombSize;
@@ -381,7 +380,7 @@ window.WombGetVolume = function (actor) { //most legacy code from pregJS.tw with
 
 };
 
-window.WombUpdatePregVars = function (actor) {
+window.WombUpdatePregVars = function(actor) {
 	WombSort(actor);
 	if (actor.womb.length > 0) {
 		if (actor.preg > 0 && actor.womb[0].age > 0) {
@@ -392,7 +391,7 @@ window.WombUpdatePregVars = function (actor) {
 	}
 };
 
-window.WombMinPreg = function (actor) {
+window.WombMinPreg = function(actor) {
 	WombSort(actor);
 	if (actor.womb.length > 0)
 		return actor.womb[actor.womb.length - 1].age;
@@ -400,7 +399,7 @@ window.WombMinPreg = function (actor) {
 		return 0;
 };
 
-window.WombMaxPreg = function (actor) {
+window.WombMaxPreg = function(actor) {
 	WombSort(actor);
 	if (actor.womb.length > 0)
 		return actor.womb[0].age;
@@ -408,7 +407,7 @@ window.WombMaxPreg = function (actor) {
 		return 0;
 };
 
-window.WombNormalizePreg = function (actor) {
+window.WombNormalizePreg = function(actor) {
 	// console.log("New actor: " + actor.slaveName + " ===============" + actor.name);
 	WombInit(actor);
 
@@ -433,7 +432,7 @@ window.WombNormalizePreg = function (actor) {
 	}
 
 	if (actor.womb.length > 0) {
-		var max = WombMaxPreg(actor);
+		let max = WombMaxPreg(actor);
 		// console.log("max: " + max);
 		// console.log(".preg: "+ actor.preg);
 		if (actor.pregWeek < 1)
@@ -450,7 +449,7 @@ window.WombNormalizePreg = function (actor) {
 		actor.pregType = actor.womb.length;
 		actor.pregSource = actor.womb[0].fatherID;
 	} else if (actor.womb.length === 0 && actor.broodmother < 1) {
-		//not broodmother
+		// not broodmother
 		// console.log("preg fixing");
 		actor.pregType = 0;
 		actor.pregKnown = 0;
@@ -469,7 +468,7 @@ window.WombNormalizePreg = function (actor) {
 	actor.bellyPreg = WombGetVolume(actor);
 };
 
-window.WombZeroID = function (actor, id) {
+window.WombZeroID = function(actor, id) {
 	WombInit(actor);
 	actor.womb
 		.filter(ft => ft.fatherID === id)
@@ -477,7 +476,7 @@ window.WombZeroID = function (actor, id) {
 	WombNormalizePreg(actor);
 };
 
-window.WombChangeID = function (actor, fromID, toID) {
+window.WombChangeID = function(actor, fromID, toID) {
 	WombInit(actor);
 	actor.womb
 		.filter(ft => ft.fatherID === fromID)
@@ -485,7 +484,7 @@ window.WombChangeID = function (actor, fromID, toID) {
 	WombNormalizePreg(actor);
 };
 
-window.WombChangeGeneID = function (actor, fromID, toID) {
+window.WombChangeGeneID = function(actor, fromID, toID) {
 	WombInit(actor);
 	actor.womb
 		.filter(ft => ft.genetics.father === fromID)
@@ -497,17 +496,17 @@ window.WombChangeGeneID = function (actor, fromID, toID) {
 };
 
 /* Sorts the womb object by age with oldest and thus soonest to be born, first. This will be needed in the future once individual fertilization is a possibility.*/
-window.WombSort = function (actor) {
+window.WombSort = function(actor) {
 	actor.womb.sort((a, b) => {
 		return b.age - a.age;
 	});
 };
 
-//now function work with chance. Literary we give it "one from X" as chance.
-window.fetalSplit = function (actor, chance) {
-	var nft;
+// now function work with chance. Literary we give it "one from X" as chance.
+window.fetalSplit = function(actor, chance) {
+	let nft;
 
-	actor.womb.forEach(function (s) {
+	actor.womb.forEach(function(s) {
 		if ((jsRandom(1, chance) >= chance) && s.splitted !== 1) {
 			nft = {};
 			nft.age = s.age;
@@ -515,11 +514,11 @@ window.fetalSplit = function (actor, chance) {
 			nft.fatherID = s.fatherID;
 			nft.motherID = s.motherID;
 			nft.volume = s.volume;
-			nft.reserve = ""; //splitted fetus is new separate, reserve - it's not genetic to split.
+			nft.reserve = ""; // splitted fetus is new separate, reserve - it's not genetic to split.
 			nft.genetics = clone(s.genetics);
-			s.splitted = 1; //this is marker that this is already splitted fetus (to not split second time in loop), only source fetus needed it.
-			nft.identical = 1; //this is marker that this fetus has at least one twin.
-			s.identical = 1; //this is marker that this fetus has at least one twin.
+			s.splitted = 1; // this is marker that this is already splitted fetus (to not split second time in loop), only source fetus needed it.
+			nft.identical = 1; // this is marker that this fetus has at least one twin.
+			s.identical = 1; // this is marker that this fetus has at least one twin.
 
 			if (s.twinID === "" || s.twinID === undefined)
 				s.twinID = generateNewID();
@@ -533,14 +532,14 @@ window.fetalSplit = function (actor, chance) {
 	WombNormalizePreg(actor);
 };
 
-//safe alternative to .womb.length.
-window.WombFetusCount = function (actor) {
+// safe alternative to .womb.length.
+window.WombFetusCount = function(actor) {
 	WombInit(actor);
 	return actor.womb.length;
 };
 
-//give reference to fetus object, but not remove fetus, use for manipulation in the womb.
-window.WombGetFetus = function (actor, fetusNum) {
+// give reference to fetus object, but not remove fetus, use for manipulation in the womb.
+window.WombGetFetus = function(actor, fetusNum) {
 	WombInit(actor);
 	if (actor.womb.length >= fetusNum)
 		return actor.womb[fetusNum];
@@ -548,8 +547,8 @@ window.WombGetFetus = function (actor, fetusNum) {
 		return null;
 };
 
-//give reference to fetus object, and remove it form the womb.
-window.WombRemoveFetus = function (actor, fetusNum) {
+// give reference to fetus object, and remove it form the womb.
+window.WombRemoveFetus = function(actor, fetusNum) {
 	WombInit(actor);
 	if (actor.womb.length >= fetusNum) {
 		let ft = actor.womb[fetusNum];
@@ -561,27 +560,27 @@ window.WombRemoveFetus = function (actor, fetusNum) {
 		return null;
 };
 
-/*to add fetus object in the womb. Be warned - you can add one single fetus to many wombs, or even add it many times to one womb. It will not show error, but behavior becomes strange, as fetus object will be the same - it's reference, not full copies. If this is not desired - use clone() on fetus before adding.*/
-window.WombAddFetus = function (actor, fetus) {
+/* to add fetus object in the womb. Be warned - you can add one single fetus to many wombs, or even add it many times to one womb. It will not show error, but behavior becomes strange, as fetus object will be the same - it's reference, not full copies. If this is not desired - use clone() on fetus before adding.*/
+window.WombAddFetus = function(actor, fetus) {
 	WombInit(actor);
 	actor.womb.push(fetus);
 	WombSort(actor);
 };
 
 // change property for all fetuses. Like fetus.age = X.
-window.WombChangeFetus = function (actor, propName, newValue) {
+window.WombChangeFetus = function(actor, propName, newValue) {
 	WombInit(actor);
 	actor.womb.forEach(ft => ft[propName] = newValue);
 };
 
 // change genetic property of all fetuses. Like fetus.genetic.intelligence = X
-window.WombChangeGene = function (actor, geneName, newValue) {
+window.WombChangeGene = function(actor, geneName, newValue) {
 	WombInit(actor);
 	actor.womb.forEach(ft => ft.genetics[geneName] = newValue);
 };
 
 // change genetic property of all fetuses based on race
-window.WombFatherRace = function (actor, raceName) {
+window.WombFatherRace = function(actor, raceName) {
 	let skinColor = randomRaceSkin(raceName);
 	let eyeColor = randomRaceEye(raceName);
 	let hairColor = randomRaceHair(raceName);
@@ -592,7 +591,7 @@ window.WombFatherRace = function (actor, raceName) {
 };
 
 // replaces untraceable fatherIDs with missingParentID. Required for concurrent pregnancy to differentiate between siblings.
-window.MissingParentIDCorrection = function (actor) {
+window.MissingParentIDCorrection = function(actor) {
 	WombInit(actor);
 	actor.womb
 		.filter(ft => (ft.genetics.father === 0 || (ft.genetics.father < -1 && ft.genetics.father >= -20 && ft.genetics.father !== -3)))
@@ -600,11 +599,11 @@ window.MissingParentIDCorrection = function (actor) {
 	State.variables.missingParentID--;
 };
 
-window.WombCleanYYFetuses = function (actor) {
-	var reserved = [];
+window.WombCleanYYFetuses = function(actor) {
+	let reserved = [];
 
-	var i = actor.womb.length - 1;
-	var ft;
+	let i = actor.womb.length - 1;
+	let ft;
 
 	while (i >= 0) {
 		ft = actor.womb[i];
@@ -621,21 +620,21 @@ window.WombCleanYYFetuses = function (actor) {
 	return reserved;
 };
 
-window.FetusGlobalReserveCount = function (reserveType) {
-	var cnt = 0;
-	var SV = State.variables;
+window.FetusGlobalReserveCount = function(reserveType) {
+	let cnt = 0;
+	let SV = State.variables;
 
 	if (typeof reserveType !== 'string')
 		return 0;
 
-	SV.slaves.forEach(function (slave) {
-		slave.womb.forEach(function (ft) {
+	SV.slaves.forEach(function(slave) {
+		slave.womb.forEach(function(ft) {
 			if (ft.reserve === reserveType)
 				cnt++;
 		});
 	});
 
-	SV.PC.womb.forEach(function (ft) {
+	SV.PC.womb.forEach(function(ft) {
 		if (ft.reserve === reserveType)
 			cnt++;
 	});
@@ -643,12 +642,12 @@ window.FetusGlobalReserveCount = function (reserveType) {
 	return cnt;
 };
 
-window.WombSetGenericReserve = function (actor, type, count) {
-	//console.log ("actor: " + actor + "  type: " + type + "  typeof: " + typeof type + "  count: " + count);
-	actor.womb.forEach(function (ft) {
-		//console.log ("  type: " + ft.reserve + "  typeof: " + typeof ft.reserve);
+window.WombSetGenericReserve = function(actor, type, count) {
+	// console.log ("actor: " + actor + "  type: " + type + "  typeof: " + typeof type + "  count: " + count);
+	actor.womb.forEach(function(ft) {
+		// console.log ("  type: " + ft.reserve + "  typeof: " + typeof ft.reserve);
 		if ((ft.reserve === "" || ft.reserve === type) && count > 0) {
-			//console.log ("!trigger");
+			// console.log ("!trigger");
 			ft.reserve = type;
 			count--;
 		}
@@ -656,15 +655,15 @@ window.WombSetGenericReserve = function (actor, type, count) {
 	});
 };
 
-window.WombAddToGenericReserve = function (actor, type, count) {
+window.WombAddToGenericReserve = function(actor, type, count) {
 	WombSetGenericReserve(actor, type, (WombReserveCount(actor, type) + count));
 
 };
 
-window.WombChangeReserveType = function (actor, oldType, newType) {
-	var count = 0;
+window.WombChangeReserveType = function(actor, oldType, newType) {
+	let count = 0;
 
-	actor.womb.forEach(function (ft) {
+	actor.womb.forEach(function(ft) {
 		if (ft.reserve === oldType) {
 			ft.reserve = newType;
 			count++;
@@ -674,8 +673,8 @@ window.WombChangeReserveType = function (actor, oldType, newType) {
 	return count;
 };
 
-window.WombCleanGenericReserve = function (actor, type, count) {
-	actor.womb.forEach(function (ft) {
+window.WombCleanGenericReserve = function(actor, type, count) {
+	actor.womb.forEach(function(ft) {
 
 		if (ft.reserve === type && count > 0) {
 			ft.reserve = "";
@@ -685,11 +684,11 @@ window.WombCleanGenericReserve = function (actor, type, count) {
 	});
 };
 
-window.WombReserveCount = function (actor, type) {
+window.WombReserveCount = function(actor, type) {
 
-	var cnt = 0;
+	let cnt = 0;
 
-	actor.womb.forEach(function (ft) {
+	actor.womb.forEach(function(ft) {
 
 		if (ft.reserve === type) /* the lazy equality will catch "" case */ {
 			cnt++;
@@ -700,10 +699,10 @@ window.WombReserveCount = function (actor, type) {
 	return cnt;
 };
 
-window.WombGetReservedFetuses = function (actor, type) {
-	var reserved = [];
+window.WombGetReservedFetuses = function(actor, type) {
+	let reserved = [];
 
-	actor.womb.forEach(function (ft) {
+	actor.womb.forEach(function(ft) {
 
 		if (ft.reserve === type) {
 			reserved.push(ft);
@@ -714,11 +713,11 @@ window.WombGetReservedFetuses = function (actor, type) {
 	return reserved;
 };
 
-window.WombRemoveReservedFetuses = function (actor, type) {
-	var reserved = [];
+window.WombRemoveReservedFetuses = function(actor, type) {
+	let reserved = [];
 
-	var i = actor.womb.length - 1;
-	var ft;
+	let i = actor.womb.length - 1;
+	let ft;
 
 	while (i >= 0) {
 		ft = actor.womb[i];
@@ -734,9 +733,9 @@ window.WombRemoveReservedFetuses = function (actor, type) {
 	return reserved;
 };
 
-window.WombCleanAllReserve = function (actor) {
+window.WombCleanAllReserve = function(actor) {
 
-	actor.womb.forEach(function (ft) {
+	actor.womb.forEach(function(ft) {
 		ft.reserve = "";
 	});
 
@@ -749,7 +748,7 @@ data.litters.length = summary count of separate litters in the womb.
 data.litters[x] = age (.realAge) of litter "x".
 data.countLitter[x] = count of fetuses in "x" litter.
 
-data.litterData[x] = contain array with actual fetuses that belong to a litter "x". Can be used to check anyithing related to fetus. (This is not copy, but reference to actual fetuses, so be careful with changes of this array).
+data.litterData[x] = contain array with actual fetuses that belong to a litter "x". Can be used to check anything related to fetus. (This is not copy, but reference to actual fetuses, so be careful with changes of this array).
 
 Sample of usage in SugarScript:
 ---
@@ -758,23 +757,23 @@ She is _wd.litters[0] weeks pregnant with her first set of _wd.countLitter[0] ch
 In summary she carry _wd.litters.length separate sets of children. Her most progressed fetus of second pregnancy is already reached _wd.litterData[1][0].age biological week of gestation.
 ---
 */
-window.WombGetLittersData = function (actor) {
-	var data = {};
-	var unicLiters = []; //array with realAges of separate litters.
-	var countLitter = [];
-	var litterData = [];
-	var tmp;
-
-	//in first place we need to know how many litters here (Assuming that unique litter is have similar .realAge). Also we will know their ages.
-	actor.womb.forEach(function (ft) {
+window.WombGetLittersData = function(actor) {
+	let data = {};
+	let unicLiters = []; // array with realAges of separate litters.
+	let countLitter = [];
+	let litterData = [];
+	let tmp;
+
+	// in first place we need to know how many litters here (Assuming that unique litter is have similar .realAge). Also we will know their ages.
+	actor.womb.forEach(function(ft) {
 		if (!unicLiters.includes(Math.ceil(ft.realAge)))
 			unicLiters.push(Math.ceil(ft.realAge));
 
 	});
 
-	//now we should find and store separate litters data (count of fetuses):
-	unicLiters.forEach(function (litter, i) {
-		tmp = actor.womb.filter(ft => Math.ceil(ft.realAge) == litter);
+	// now we should find and store separate litters data (count of fetuses):
+	unicLiters.forEach(function(litter) {
+		tmp = actor.womb.filter(ft => Math.ceil(ft.realAge) === litter);
 		countLitter.push(tmp.length);
 		litterData.push(tmp);
 	});
@@ -786,28 +785,28 @@ window.WombGetLittersData = function (actor) {
 	return data;
 };
 
-window.BCReserveInit = function () {
-	var SV = State.variables;
+window.BCReserveInit = function() {
+	let SV = State.variables;
 
-	SV.slaves.forEach(function (slave) {
-		slave.womb.forEach(function (ft) {
+	SV.slaves.forEach(function(slave) {
+		slave.womb.forEach(function(ft) {
 			if (typeof ft.reserve !== 'string')
 				ft.reserve = "";
-			if (typeof ft.motherID !== 'number') //setting missing biological mother ID for fetus.
+			if (typeof ft.motherID !== 'number') // setting missing biological mother ID for fetus.
 				ft.motherID = slave.ID;
 			if (ft.ID === undefined)
 				ft.ID = generateNewID();
-			if (typeof ft.realAge !== 'number') //setting missing chronological age
+			if (typeof ft.realAge !== 'number') // setting missing chronological age
 				ft.realAge = ft.age;
 		});
 	});
 
-	SV.PC.womb.forEach(function (ft) {
+	SV.PC.womb.forEach(function(ft) {
 		if (typeof ft.reserve !== 'string')
 			ft.reserve = "";
 		if (typeof ft.motherID !== 'number')
 			ft.motherID = SV.PC.ID;
-		if (typeof ft.realAge !== 'number') //setting missing chronological age
+		if (typeof ft.realAge !== 'number') // setting missing chronological age
 			ft.realAge = ft.age;
 	});
 
@@ -816,7 +815,7 @@ window.BCReserveInit = function () {
 /* alt
 window.fetalSplit = function(actor, chance)
 {
-	var i, ft, nft;
+	let i, ft, nft;
 
 	actor.womb.forEach(function(s){
 		if ((jsRandom(1,chance) >= chance) && s.identical !== 1)
diff --git a/src/npc/acquisition.tw b/src/npc/acquisition.tw
index df4bae5c0a8c9a98553ce6cfd5da8dfc838dbabf..5f7a1bddbaa089ea6c30f98e19f5b7ace05dc9c0 100644
--- a/src/npc/acquisition.tw
+++ b/src/npc/acquisition.tw
@@ -287,7 +287,7 @@ The previous owner seems to have left in something of a hurry.
 	<<case "GenderRadicalist">>
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.devotion = random(25,45), $activeSlave.trust = random(15,-15), $activeSlave.health = 100>>
 		<<set $activeSlave.face = random(0,55)>>
 		<<set $activeSlave.boobs += 100*random(2,4)>>
@@ -301,7 +301,7 @@ The previous owner seems to have left in something of a hurry.
 		<<set $activeSlaveOneTimeMinAge = $fertilityAge>>
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.devotion = random(25,45), $activeSlave.trust = random(-25,-45), $activeSlave.health = random(55,65)>>
 		<<set $activeSlave.face = random(15,100)>>
 		<<set $activeSlave.preg = random(1,40), $activeSlave.lactation = 1, $activeSlave.lactationDuration = 2>>
@@ -572,7 +572,7 @@ The previous owner seems to have left in something of a hurry.
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.devotion = random(25,45), $activeSlave.trust = random(-25,-45), $activeSlave.health = random(55,65)>>
 		<<set $activeSlave.face = random(15,100)>>
 		<<set $activeSlave.preg = random(10,40), $activeSlave.pregType = random(3,8), $activeSlave.lactation = 1, $activeSlave.lactationDuration = 2>>
@@ -588,7 +588,7 @@ The previous owner seems to have left in something of a hurry.
 	<<case "HedonisticDecadence">>
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.devotion = random(25,45), $activeSlave.trust = random(-25,-45), $activeSlave.health = random(-20,20)>>
 		<<set $activeSlave.face = random(15,40)>>
 		<<set $activeSlave.boobs += 100*random(3,6)>>
diff --git a/src/npc/agent/agentFramework.js b/src/npc/agent/agentFramework.js
index f3160b904b1b8277303a95bad01a0d710a36251d..7e540ac9ea32c966acca249ad8ce6360d80d6ac1 100644
--- a/src/npc/agent/agentFramework.js
+++ b/src/npc/agent/agentFramework.js
@@ -1,5 +1,5 @@
 App.Data.Facilities.arcologyAgent = {
-	baseName: "arcololgy",
+	baseName: "arcology",
 	genericName: null,
 	jobs: {
 		agentsSlave: {
diff --git a/src/npc/fBeg.tw b/src/npc/fBeg.tw
new file mode 100644
index 0000000000000000000000000000000000000000..664d4b8371a1d715a94283f3556a0b4a324b70f4
--- /dev/null
+++ b/src/npc/fBeg.tw
@@ -0,0 +1,360 @@
+:: FBeg [nobr]
+
+<<set $desc = SlaveTitle($activeSlave)>>
+<<run clearSummaryCache($activeSlave)>>
+<<setLocalPronouns $activeSlave>>
+
+You call $him over to you for inspection. <<BoobsDescription>> You look at $him lustfully and instruct $him to strip. 
+<<if ($activeSlave.sexualFlaw == "shamefast")>> Tears well up in $his eyes at the idea of showing $his naked body. 
+<<elseif ($activeSlave.sexualQuirk == "tease")>> $He blushes with arousal. $He has kept $his innate embarrassment at the thought of being naked, but you have infused this with overwhelming arousal. $His cheeks are red as $he removes $his clothes, giving quite a strip tease as $he does. 
+<<elseif ($activeSlave.sexualFlaw == "repressed")>>subconsciously uses $his hands to try to cover $his body. $He is still repressing $his own sexuality. That type of behavior may have been allowed in the old world, but it has no place in a Free City.
+<<elseif ($activeSlave.sexualFlaw == "idealistic")>>shakes $his head pleadingly, "But I don't consent" $he responds. You laugh in such a way that tells $him that $his consent is irrelevant. $He is still idealistic, believing that sex should be a consensual expression of love and intimacy. Such ideas were common in the Old World, but they have no place in a Free City. You decide to grab $him and forcefully rip $his clothes from $his body, since obedience could simply be seen as consent. $He screams and plead as you pin her arms, ripping and tearing at the cloth that keeps her beauty from sight. 
+<<elseif ($activeSlave.sexualFlaw == "neglectful")>> replied "Yes 
+	<<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>>
+	<<else>><<Master>>
+	<</if>>" 
+	$he replies contritely. $He has no sense of self beyond your usefulness of $him, and selflessly sacrifices $his own comfort for your pleasure. 
+<<elseif ($activeSlave.sexualFlaw == "attention whore")>>eagerly begins to shirk $his wear, drawing as much attention to the process as possible.
+<<else>> 
+	<<if ($activeSlave.devotion < -20)>>
+	$He resists, forcing you to undress $him yourself.
+	<<elseif ($activeSlave.devotion > -20)>> $He obeys, and moves to the center of your office to undress $himself for you.
+	<</if>>
+<</if>>
+<<if ($activeSlave.devotion > -20)>>
+$He begins to undress with
+	<<if ($activeSlave.entertainmentSkill >= 100)>> masterful skill, teasing and taunting all the way down. $He rolls $his hips and most sexual parts as $he removes $his clothing.
+	<<elseif ($activeSlave.entertainmentSkill >= 80)>> arousing skill. Even though the goal is just to get 	$him naked, your slave knows that $his job is to entertain you with $his every move. 
+	<<elseif ($activeSlave.entertainmentSkill >= 60)>> notable skill. $He takes the opportunity to give you a light strip tease as $he undresses. 
+	<<elseif ($activeSlave.entertainmentSkill >= 40)>> a decent effort. $He isn't your most entertaining slave, but $he still makes an effort to arouse you with $his undressing.
+	<<elseif ($activeSlave.entertainmentSkill >= 20)>> some effort to be sexy. $His moves are less than skillful and the undressing is more pragmatic than arousing. 
+	<<else>> no effort to be sexy. $He has no entertainment skill, and the only goal of $his actions is to go from clothed to naked. 
+	<</if>>
+<</if>>
+
+<<if ($activeSlave.fetishStrength > 60)>>
+		<<switch $activeSlave.fetish>>
+		<<case "submissive">> As $he begins to strip you grab $him without warning and begin to tear off $his clothes. Your slave expected you to allow $him to obey your command, and so $he is initially taken aback by the sudden force but $his submissive nature keeps $him from resisting. $He is such a submissive slut that you feel obligation to push $his status even further. You bind $his arms tightly behind $his back in a leather monoglove, lacing it tighter until $his elbows are touching. $He gives a soft whimper, but you both know that this is for your benefit and not a protest.  
+			<<if ($activeSlave.nipplePiercing > 1)>> You then retrieve heavy bells and attach them to her nipple rings. 
+			<<else>> You reach into your pocket and retrieve two weighted and belled nipple clamps, attaching them tightly to your slave's delicate nipples. 
+			<</if>> You tell her to bounce so that they jingle, reminding her of her status.
+		<<case "masochist">>  Once $he is fully exposed you give $him a firm slap across the tits. $He's a massochist and relishes the pain with sexual arousal. You ask your painslut if $he deserves to be punished. "Oh yes, 
+			<<if $activeSlave.rudeTitle == 1>><<= PoliteRudeTitle($activeSlave)>>
+			<<else>><<Master>>
+			<</if>>. 
+			Please punish your little slut. Sensing that your slave is getting too much enjoyment from $his beating you cease.  
+		<</switch>>
+<</if>>
+
+You stare at the naked form of your slave standing before you.  
+
+<<if ($activeSlave.boobsTat == "rude words")>> The words on $his chest stand out at you. You ask $him what $his tits say. "Fuckslave." $he replies. You ask if that's what $he is. 
+	<<if ($activeSlave.behavioralFlaw == "liberated")>> "I'm nobody's property. I'm a free woman!" $He shoots back. "We shall see" you reply. 
+	<<elseif ($activeSlave.devotion < -20)>> $He does $his best to shake $his head. 
+	<<else>> "Yes <<Master>>, that's what I am. 
+	<</if>>  
+<<elseif ($activeSlave.boobsTat == "possessive")>> The words on $his chest stand out at you. You ask $him what $his tits say. "It's Your personal symbol" $he replies. You ask if that's what $he is. 
+	<<if ($activeSlave.behavioralFlaw == "liberated")>> "I'm nobody's property. I'm a free woman!" $He shoots back. "We shall see" you reply. 
+	<<elseif ($activeSlave.devotion < -20)>> $He does $his best to shake $his head. 
+	<<else>> "Yes <<Master>>, that's what I am. 
+	<</if>>
+<<elseif ($activeSlave.boobsTat == "degradation")>> The words on $his chest stand out at you. You ask $him what $his tits say. "<<Master>>'s Bitch" $he replies. You ask if that's what $he is. 
+	<<if ($activeSlave.behavioralFlaw == "liberated")>> "I'm nobody's property. I'm a free woman!" $He shoots back. "We shall see" you reply. 
+	<<elseif ($activeSlave.devotion < -20)>> $He does $his best to shake $his head. 
+	<<else>> "Yes <<Master>>, that's what I am. 
+	<</if>> 
+<<else>> $His body belongs to you, and your slave needs to remember that. 
+<</if>>
+
+You then tell your slave to kneel at your feet. 
+<<if ($activeSlave.behavioralFlaw == "bitchy")>> $He rolls $his eyes sasses you a bit, "Whatever," she scoffs and 
+<<elseif ($activeSlave.behaviorFlaw == "arrogant")>> $He stands up even straighter than before, crossing $his arms and widening $his stance. $His arrogance makes obeying commands like this difficult, but that is not your concern. You give $him a look that tells $him that pain will await if $he does not obey. $He
+<<elseif ($activeSlave.behavioralQuirk == "confident")>> $He confidently moves to obey. $He
+<<elseif ($activeSlave.behavioralFlaw == "liberated")>> $He stands up even straighter than before, crossing $his arms and widening $his stance. "I am not some animal," $he protests "I am a free woman." You laugh at $his continued delusions. Liberated women have no place in a Free City. You remind her that pain awaits $him should $he defy you further and $he
+<<elseif ($activeSlave.behavioralQuirk == "advocate")>> $He smiles at the demonstration of $his rightful place as a lowly slave. $He
+<<elseif ($activeSlave.behavioralFlaw == "odd")>> $He sticks her tongue out at you, blowing raspberries in an act of futile defiance. $He really is an odd one. $He
+<<elseif ($activeSlave.behavioralQuirk == "funny")>> $He smiles and turns $his butt to you, swaying it cutely as $his silly way of acknowledging your command. $He
+<<else>>
+$He
+<</if>>
+
+<<if ($activeSlave.devotion < -20)>>
+	<<if ($activeSlave.fear < -50)>>
+	drops terrified to the ground. 
+	<<else>>
+		<<if !canTalk($activeSlave)>>gestures
+		<<elseif (_lisping == 1)>>lisps
+		<<else>>declares
+		<</if>> 
+	angrily that slavery is wrong and $he will not bow. You look at your Assistant who silently summons two other, more obedient slaves from their duties. 
+		<<if ($activeSlave.nipplePiercing > 1)>> You reach out and grab $him by her nipple chain, pulling her in harshly. She yelps in pain, but knows better than to pull away.
+		<<elseif ($activeSlave.nosePiercing > 1)>> You reach out and grab $him by her nose ring, pulling her in harshly. She yelps in pain, but knows better than to pull away.
+		<<else>> You reach out and grab $him firmly by the collar. 
+		<</if>>
+	"One more chance, slut" by now, the other slaves have arrived and are standing loyally by your side. Your loyal slaves force $him to $his knees.  
+	<</if>>
+	"Head at crotch level," you clarify. "Remember your purpose"
+<<elseif ($activeSlave.devotion < 20)>> is not enthusiastic, but is obedient enough to go down without much threat of discipline. 
+<<elseif ($activeSlave.devotion > 20)>>
+	<<if ($activeSlave.fetishKnown == 1)>>
+		<<switch $activeSlave.fetish>>
+		<<case "submissive">>
+			bows $his head and humbly assumes $his rightful position at $his <<Master>>'s feet.
+		<<case "dom">>
+			would rather be standing by your side making your other sluts bow, but $he still knows that you are $his <<Master>>.
+		<<case "sadist">>
+			would rather be pushing one of your other whores painfully to her knees, but $he still obeys. 
+		<<case "masochist">>
+			waits just long enough to recieve a disciplinary slap, making $him blush with arousal as $he kneels before you. 
+		<<case "cumslut">>
+			is excited to be closer to your delicious crotch, and hurries to match $his eyes to your package.
+		<<case "humiliation">>
+			makes a big show of it as $he lowers $himself dramatically before you. 
+		<<case "buttslut">>
+			leans heavily forward so that $his ass sticks out ridiculously far as $he bends $his knees and goes to the floor. 
+		<<case "pregnancy">>
+			obeys your command and goes to $his knees.
+		<<case "boobs">>
+			pulls $his shoulders back strongly while leaning far enough forward to drag $his 
+			<<if ($activeSlave.boobs >= 10000)>> weighty mammaries 
+			<<elseif ($activeSlave.boobs >= 2000)>> cumbersome udders 
+			<<elseif ($activeSlave.boobs >= 1000)>> massive slave tits 
+			<<elseif ($activeSlave.boobs >= 800)>> forward-thrust breasts 
+			<<elseif ($activeSlave.boobs >= 500)>> meager chest 
+			<<elseif ($activeSlave.boobs <= 400)>> pathetic slave boobs 
+			<<else>> tits 
+			<</if>> 
+			across your body as $he goes down.
+		<<default>>
+			obeys your command and goes to $his knees.
+		<</switch>>
+
+	<<else>>
+	obeys your command and goes to $his knees.	
+	<</if>>
+<</if>>
+<<if ($activeSlave.devotion < -20)>> The other slaves guide $him to adjust $his posture so $his eyes ar directly in line with your package. 
+<<else>> $He kneels so that $his eyes are directly level with your package.
+<</if>>
+
+<<if ($activeSlave.energy > 50)>>
+$He cant help but stare in lust at your 
+
+	<<if $PC.balls > 2 && $PC.ballsImplant > 3>>
+	monstrous, massive pair of watermelon sized balls.
+	<<elseif $PC.balls == 2 && $PC.ballsImplant == 3>>
+	enormous, heavy pair of balls.
+	<<elseif $PC.balls == 1 && $PC.ballsImplant == 2>>
+	huge pair of balls, bulging like softballs from behind your suit.
+	<<elseif $PC.balls > 2 && $PC.ballsImplant > 2>>
+	enormous, heavy pair of balls.
+	<<elseif $PC.balls == 2 && $PC.ballsImplant == 2>>
+	huge pair of balls, bulging like softballs from behind your suit.
+	<<elseif $PC.balls == 1 && $PC.ballsImplant == 1>>
+	large pair of balls, swinging heavily as you move. 
+	<<elseif $PC.ballsImplant > 2>>
+		enormous, heavy pair of balls.
+	<<elseif $PC.ballsImplant == 2>>
+		huge pair of balls, bulging like heavy softballs from behind your suit.
+	<<elseif $PC.ballsImplant == 1>>
+		large pair of balls, swinging heavily as you move.
+	<<else>>
+		manly package.
+	<</if>>
+
+<<else>>
+	Your balls loom directly in front of $his face.
+<</if>>
+
+Now kneeling at your feet naked before you, your slave waits for $his Master's command. You take some time to survey the slut's properly displayed body. 
+<<if $activeSlave.butt > 6>> $His massive ass is so huge that $he it squishes around her heels, almost reaching the floor. 
+<<elseif $activeSlave.butt > 4>> $His <<print either("ass", "rear end")>> is so round and large it rolls out from her back in two perfect mounds. The cheeks are so thick it forms a perfect crevice between them, more than a couple inches deep.
+<<elseif $activeSlave.butt > 2>> $His nice <<print either("thick", "plump")>> <<print either("butt", "ass")>> curves out noticably, even while $he sits on $his knees. 
+<<else>> $His cute and tight ass rests gently on $his ankles. 
+<</if>>
+
+
+<<if ($activeSlave.energy > 95)>>
+		Her eyes fill with lust at the helplessness of kneeling at your crotch. 
+<</if>>
+<<if ($activeSlave.fetishStrength > 60)>>
+		<<switch $activeSlave.fetish>>
+		<<case "submissive">>
+			$He keeps her eyes down and poises her body to be fully available to $his master, trying to model for you the image of the perfect submissive. 
+		<<case "dom">>
+			Despite $his kneeling stature, $his back is straight and shoulders back.
+		<<case "masochist">>
+			$He positions $himself uncomfortably, bringing visual pleasure to you and pain to $himself. $He accentuates $his most sensitive parts, inviting you to slap or spank them.
+		<<case "cumslut">>
+			$he goes to $his knees, all the while staring at your <<if $PC.dick != 0>>manly bulge.<<if $PC.vagina == 1>> <</if>>.<<else>> feminine mound.<</if>>
+		<<case "humiliation">>
+			$He eagerly takes to this humiliating position, hoping to demonstrate $his willingness to be degraded by $his <<Master>>. 
+		<<case "buttslut">>
+			$He positions $himself, sticking $his butt out as far as $he can manage, hoping to draw your attention to $his favorite area. 
+		<<case "boobs">>
+			$he kneels with $his back strongly arching far back and diligently works to touch $his elbows behind $his back to best display $his 
+	<<if ($activeSlave.boobs >= 10000)>> colossal mammaries 
+	<<elseif ($activeSlave.boobs >= 2000)>> gigantic udders 
+	<<elseif ($activeSlave.boobs >= 1000)>> massive slave tits 
+	<<elseif ($activeSlave.boobs >= 800)>> prominent breasts 
+	<<elseif ($activeSlave.boobs >= 400)>> modest chest 
+	<<elseif ($activeSlave.boobs <= 400)>> pathetic slave boobs 
+	<</if>> for $his master. 
+	<<if ($activeSlave.lactation > 0)>> milk dribbles down the soft curves of $his chest as a further sign of $his arousal. 
+	<</if>>
+	This is, of course, how all slaves are supposed to kneel, but $he takes the pose with added dedication. 
+		<<default>>
+			$He positions $himself with $his knees spread wide, hoping that you will turn your attention to $his wet pussy.
+		<</switch>>
+<</if>>
+You give $him permission to speak, and tell $him that $he may beg $his Master. 
+
+<<if ($activeSlave.devotion < -20)>>
+	<<if ($activeSlave.fear < -50)>>
+	
+	<<switch $activeSlave.standardPunishment>>
+
+	<<case "confinement">> Your slave simply presses $his hands together and begs you not to lock $him up in the bad girl box.
+	<<case "whipping">> Your slave simply presses $his hands together and begs you not to whip $him.
+	<<case "chastity">>
+		<<if ($activeSlave.energy > 60)>>
+		Your slave simply presses $his hands together and begs you not to take away $his next orgasm
+		<<else>> Your slave simply asks that you not change $his punishment. $He fears you, but using chastity as a punishment is not an efficient way to command $his obedience, since $he has no sexual energy. 
+		<</if>>
+	<</switch>>
+	<<else>>
+		<<if ($activeSlave.behavioralFlaw == "bitchy")>> $He turns $his nose up in utter disgust. "Why, to feed your misogynistic ego? Thanks, but no." $He looks at your other slaves holding $him down, "Why don't you get one of these mindless cunts to do it? Or are they not hot enough?" $He is disobedient and bitchy, a bad combo.
+		<<elseif ($activeSlave.behaviorFlaw == "arrogant")>> $He tries to cock $his shoulders back, giving a death glare to the slaves holding $him in place, "I don't need anything from you" $he hisses. $He is disobedient and arrogant, a bad combo. 
+		<<elseif ($activeSlave.behavioralFlaw == "liberated")>> $He does $his best to spit in your face, but the height difference means $he only stains your shirt. "I demand you release me!" $he scowls, "Or I'm going to call the police!" You smile at $his pathetically outdated worldview. You tell $him that's a good idea, since you know how rebellious slaves fair in jail.
+		<<elseif ($activeSlave.behavioralFlaw == "odd")>> $He purses $his lips and bounces on $his heels in futile rebellion. "Nuh-uh." $he puffs, shaking $his head wildly. 
+		<<else>>
+		$He simply sits there, struggling against the hands holding $him down.  
+		<</if>>
+	<</if>>
+This is clearly the best you are going to get out of $him until $he is better trained. You
+	<<if ($activeSlave.fear > -50)>>
+	 signal your loyal slaves to lift $him to $his feet, and 
+	<</if>>
+	send $him away for now.
+<<elseif ($activeSlave.devotion < 20)>> 
+		<<if ($activeSlave.behavioralFlaw == "bitchy")>> $He turns $his nose up in utter disgust. "Why, to feed your misogynistic ego? Thanks, but no." $He looks at your other slaves holding $him down, "Why don't you get one of these mindless cunts to do it? Or are they not hot enough?" $He is disobedient and bitchy, a bad combo.
+		<<elseif ($activeSlave.behaviorFlaw == "arrogant")>> $He tries to cock $his shoulders back, giving a death glare to the slaves holding $him in place, "I don't need anything from you" $he hisses. $He is disobedient and arrogant, a bad combo. 
+		<<elseif ($activeSlave.behavioralFlaw == "liberated")>> $He does $his best to spit in your face, but the height difference means $he only stains your shirt. "I demand you release me!" $he scowls, "Or I'm going to call the police!" You smile at $his pathetically outdated worldview. You tell $him that's a good idea, since you know how rebellious slaves fair in jail.
+		<<elseif ($activeSlave.behavioralFlaw == "odd")>> $He purses $his lips and bounces on $his heels in futile rebellion. "Nuh-uh." $he puffs, shaking $his head wildly. 
+		<<elseif ($activeSlave.sexualFlaw == "shamefast")>> $He tries to cover $his naked body from your gaze "Plea<<s>>e, can I ju<<s>>t put <<s>>ome clothe<<s>> on?"
+		<<else>>
+		$He looks up at you with a sudden glimpse of hope, and begins to plead, "Plea<<s>>e, <<s>>ir, plea<<s>>e <<s>>et me free. I don't want to be here.
+			<<if ($activeSlave.energy < 50)>>
+			I have no desire for sex. I don't want to be your toy! Please let me go."
+			<<else>> 
+			I might even come back to share consensual love with you. I ju<<s>>t don't want to be property. Plea<<s>>e, let me go."   
+			<</if>>
+		<</if>>
+You tell your slave to rise to rise to $his feet. Even though $he desired the impossible, it wasn't a total waste. You feel as though you have a pretty good understanding of where your slave stands. You send $him away with $his request denied, and you resolve to break $him more in the coming weeks. 
+<<elseif ($activeSlave.devotion < 60)>>
+	Your slave looks at $his Master with obedient eyes. 
+<<elseif ($activeSlave.devotion <= 100)>>
+Your devoted slave takes the begging position, 
+	<<if ($activeSlave.fetish != "submissive")>>
+	$he even brings $his hands up like a dog's paws. 
+	<<else>>
+	 and $he bows $his head in total submission.
+		<<if ($activeSlave.nipplePiercing > 0)>> 
+		The armbinder thrusts $his tits out nicely, and $his nipple rings are pulled tight by the weighted bells weighing them down. 
+		<<elseif ($activeSlave.nipplePiercing > 1)>> 
+		The armbinder thrusts $his tits out nicely, and ensures that $his nipple chains are pulled tight by the angle of $his shoulders. <<BoobWatch>> The bells on $his nipple piercings jungle sweetly as $he breathes. 
+		<<else>>
+		The armbinder thrusts $his tits out nicely and $his nipples are now red from the clamps pressing down hard on $his sensitive flesh. Every painful shudder makes the bells jungle ever so sweetly.
+		<</if>>
+	<</if>>
+"Ye<<s>> Ma<<s>>ter. Thank you, <<Master>>." $He is fully subservient to you, and would do anything to please you. 
+<</if>>	
+
+<<if ($activeSlave.devotion > 20)>>
+	<<if ($activeSlave.fetishStrength > 60)>>
+		<<switch $activeSlave.fetish>>
+		<<case "submissive">>
+			$He shifts her monoglove behind $his back, jingling $his nipple bells as $he does "Plea<<s>>e <<Master>>," $he begs with genuine humility, "Plea<<s>>e use your in whatever way you see fit. This <<s>>lave has no purpose but to please $his <<Master>>"
+		<<case "dom">>
+			$He looks up at you. Even from $his kneeling position $his eyes carry confident domination. "<<Master>>, I know my pla<<c>>e i<<s>> beneath you. Give me the authority to lord over your other <<s>>lave<<s>> and I will for<<c>>e them to <<s>>erve you a<<s>> I do."
+		<<case "masochist">>
+			"I know I haven't di<<s>>obeyed," $he begins, "but I ju<<s>>t need to be punished." You smile down at your little painslut, running your finger along $his chin. "Plea<<s>>e <<Master>>, beat me. Beat my a<<ss>> until it'<<s>> red and clamp my nipple<<s>> until they bleed. Plea<<s>>e! I need to feel your <<s>>trength!"
+		<<case "cumslut">>
+			Your little cumslut can't stop staring at your  
+				<<if $PC.balls > 2 && $PC.ballsImplant > 3>>
+				monstrous, massive pair of watermelon sized balls.
+				<<elseif $PC.balls == 2 && $PC.ballsImplant == 3>>
+				enormous, heavy pair of balls.
+				<<elseif $PC.balls == 1 && $PC.ballsImplant == 2>>
+				huge pair of balls, bulging like softballs from behind your suit.
+				<<elseif $PC.balls > 2 && $PC.ballsImplant > 2>>
+				enormous, heavy pair of balls.
+				<<elseif $PC.balls == 2 && $PC.ballsImplant == 2>>
+				huge pair of balls, bulging like softballs from behind your suit.
+				<<elseif $PC.balls == 1 && $PC.ballsImplant == 1>>
+				large pair of balls, swinging heavily as you move. 
+				<<elseif $PC.ballsImplant > 2>>
+				enormous, heavy pair of balls.
+				<<elseif $PC.ballsImplant == 2>>
+				huge pair of balls, bulging like heavy softballs from behind your suit.
+				<<elseif $PC.ballsImplant == 1>>
+				large pair of balls, swinging heavily as you move.
+				<<else>>
+				crotch.
+				<</if>>
+	Drool begins to drip from $his lips, and you have to remind your slave that $he is here to beg.
+			"<<Master>>," $he breathes heavily, "Please let me 
+		<<if $PC.dick != 0>> suck your magnificent cock
+			<<if $PC.vagina == 1>> and eat you out
+			<</if>>."
+		<<else>> eat your delicious pussy."
+		<</if>>	
+			You smile at the little cocksucker, so eager to please. 
+
+		<<case "humiliation">>
+			$He sits so that $her body is on full display, "Plea<<s>>e <<Master>>, use me and humilate me. Take me out to the public square so that everyone can see you overpower me." 
+		<<case "buttslut">>
+			$He positions $his back so $his ass sticks out even further "<<Master>>," $he begs, "u<<s>>e my a<<ss>>!
+			<<if ($activeSlave.sexualQuirk == "painal")>> make me <<s>>queel!
+			<</if>>
+			I just need your cock in my mo<<s>>t u<<s>>eful fuckhole, plea<<s>>e!"
+		<<case "boobs">>
+			$He takes $his hands and presses $his tits together, lifting them to display for you $his primary purpose in life.
+			<<if ($activeSlave.lactation > 0)>> More milk squirts from each teat as $he bears them. 
+			<</if>>
+		 "I beg of you, <<Master>>, I need you to u<<s>>e my tits. Suck them, squeeze them, fuck them, I cannot cum without you using my slave tits! I am nothing more than a walking tit-carrier, and my only purpose is to offer these breasts to you."
+		<<case "pregnant">>
+		$He begins to carress $his womb "Use me as your breeder, <<Master>>, plea<<s>>e! I ju<<s>>t want to be filled with your <<s>>eed forever!"
+		<<default>>
+			$He kneels with $his knees far spread, "use my fuckhole <<Master>>, I beg you. Plea<<s>>e, I need you to fuck me!"
+		<</switch>>
+	<<else>>
+	"<<Master>>, I exi<<s>>t to <<s>>erve you." $He say, "I have no other purpose in life. I beg of you, plea<<s>>e never let me leave your <<s>>ervi<<c>>e. Let me wait on you forever. I <<s>>wear I will alway<<s>> be obedient. Let me cook your meal<<s>>, clean your penthou<<s>>e, care for your other <<s>>lave<<s>>, even make me a cow. I don't care, a<<s>> long a<<s>> I'm here serving you." $He knows that $his rightful place is a slave, and $he is dedicated to living out that role to the fullest.  
+		<<if ($activeSlave.behavioralQuirk == "advocate")>> 
+		"I <<s>>ee now" $he continues, "that <<s>>lavery really i<<s>> a woman<<s>> rightful pla<<c>>e. She ha<<s>> no purpo<<s>>e except to <<s>>erve her <<Master>>."
+		<</if>>
+	<</if>>
+
+You smile at your obedient little slave, and agree to grant $his request. 
+<</if>>
+
+
+
+<<if (random(1,100) > (100 + $activeSlave.devotion))>>
+	<<if ($activeSlave.fetish != "submissive") && ($activeSlave.energy <= 95) && ($activeSlave.behavioralFlaw != "liberated")>>
+		Seeing the humiliating acts your slaves are expected to preform has made $him @@.red;determined to be free.@@
+		<<set $activeSlave.behavioralFlaw = "liberated">>
+	<</if>>
+<<elseif (random(1,100) > (110 - $activeSlave.devotion))>>
+	<<if ($activeSlave.fetish == "none") && ($activeSlave.behavioralFlaw != "liberated")>>
+		Feeling the joy of kneeling before such a powerful master and begging at his feet has @@.lightcoral;encouraged $him to be more submissive.@@
+		<<set $activeSlave.fetish = "submissive", $activeSlave.fetishKnown = 1>>
+	<</if>>
+<</if>>
+
+<<if passage() != "Slave Interact">>
+	<<set _fl = $slaveIndices[$activeSlave.ID]>>
+	<<if def _fl>>
+		<<set $slaves[_fl] = $activeSlave>>
+	<</if>>
+<</if>>
\ No newline at end of file
diff --git a/src/npc/fDance.tw b/src/npc/fDance.tw
new file mode 100644
index 0000000000000000000000000000000000000000..3c20e8ad7fb8f9ac8b5173e985ccadfef1e19d35
--- /dev/null
+++ b/src/npc/fDance.tw
@@ -0,0 +1,446 @@
+:: FDance [nobr]
+
+/* this needs better support for different devotion/trust combinations, perhaps dance alterations for bodytypes? */
+
+<<set $desc = SlaveTitle($activeSlave)>>
+<<run clearSummaryCache($activeSlave)>>
+<<setLocalPronouns $activeSlave>>
+<<setPlayerPronouns>>
+
+You tell your assistant to summon your slave and set some erotic music. When your slave arrives $he finds the lights in your office flashing club colors. You gesture towards a sturdy platform in the center of your office and tell $him to dance for you.
+
+<<if ($activeSlave.entertainmentSkill >= 100)>>
+	Your slave has a level of skill previously unseen in the old world; even $his blinks have the seductive pull of a goddess. $He slides his ass gracefully unto the stage, then dramatically raises $his elongated legs one at a time onto the platform. Circling to $his knees, $he raises $his ass in the air and glides $his hands up $his legs as $he stands upright. As you watch $him preform, you think how no man of the old world would ever get to see pure sexuality like this. And not only do get to watch $him, you OWN $him. $His body moves like water, and hips that ebbed and flowed as if the tides themselves panged for a rock hard cock to come and take them. You try to go back to your work, but cannot take your eyes off $him for even a second.
+<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+	$He takes his rightful place on your stage. $His skill would have only been matched by the best of the best old world erotic dancers, but in your Free City expectations are high. $He dances with seduction in every move, alternating $his style between everything from belly dancing to club twerking, and each with the skill level of a trained professional. You resume your work, but often find yourself pulled back in by the tide of $his rolling hips.
+<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+	$He goes to take $his place on your stage and dance for $his <<= writtenMaster($activeSlave)>>. $He has impressive skill and would have been a top-tier dancer in the old world. One of the many benefits of being a leader of a Free City is the ability to work in an atmosphere of pure servitude. You smile as you continue your work in an office an old world _womanP could only dream of.
+<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+	$He ascends the platform and begins to grind on the pole. Despite being an average entertainer, it is clear that $he is doing $his best. You enjoy the new ambiance while continuing your work.
+<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+	$He climbs up onto the platform and grabs hold of the pole. $He is still learning the nuances of seductive dance, but at least able to move with the rhythm. It isn't long before you are distracted with work, leaving your slave to continue to dance without an audience, and unable to stop until you command it.
+<<else>>
+	$He unceremoniously climbs on the platform and begins to dance — or, at least, $his best attempt at dancing. $His arms flail about awkwardly as $he crouches and straightens off-beat to the music. You try to tune $him out and get some work done.
+<</if>>
+
+The atmosphere of your office is a testament to masculine opulence. Few _womenP in the old world would have the pleasure of completing their work while an attractive $girl flaunts $himself for _hisP pleasure. You allow the situation to continue for about an hour, before deciding it's time to escalate. You look up once more at your slave and congratulate yourself for choosing such a delicious outfit for $him.
+/* I do not like this part */
+<<switch $activeSlave.clothes>>
+	<<case "uncomfortable straps">>
+		<<if $activeSlave.boobs < 300>>
+			The rings constantly rub against $his chest and force $his nipples to stick out.
+		<<else>>
+			The strap over $his tits presses the soft flesh, and the ring around each nipple
+			<<if $activeSlave.nipples == "fuckable">>
+				forces them open.
+			<<else>>
+				forces them to stick out.
+			<</if>>
+		<</if>>
+	<<case "shibari ropes">>
+		<<if $activeSlave.boobs < 300>>
+			The ropes binding $his chest shift slightly with every step, since $he lacks any breasts to hold them in place.
+		<<else>>
+			The ropes binding $his chest dig into the soft flesh as $he moves.
+		<</if>>
+	<<case "attractive lingerie for a pregnant women">>
+		<<if $activeSlave.boobs < 300>>
+			The bulge of $his $activeSlave.nipples nipples can be seen under the taut silk.
+		<<else>>
+			$His silken bra causes $his breasts to bulge around them.
+		<</if>>
+	<<case "a maternity dress">>
+		<<if $activeSlave.boobs < 300>>
+			$His low cut dress was made with breasts in mind; every step $he takes risks it sliding down and revealing $his $activeSlave.nipples nipples.
+		<<else>>
+			$His low cut dress shows ample cleavage and is made to be easy to pull down.
+		<</if>>
+	<<case "stretch pants and a crop-top">>
+		<<if $activeSlave.boobs < 300>>
+			$His flat chest makes the perfect canvas to read $his crop-top.
+		<<else>>
+			$His crop-top tightly clings to $his breasts and moves along with them. $His jiggling cleavage distracts from the writing on $his tits.
+		<</if>>
+	<<case "restrictive latex">>
+		<<if $activeSlave.boobs < 300>>
+			$His lack of breasts draws your eyes straight to $his exposed nipples.
+		<<else>>
+			$His tits stick out through $his latex outfit.
+		<</if>>
+	<<case "attractive lingerie">>
+		$His pretty white lace bra has thoughtful cuts that tastefully let $his nipples stick through.
+	<<case "a succubus outfit">>
+		<<if $activeSlave.boobs < 300>>
+			$His succubus outfit presents this sex demon's flat chest, inviting a damning fondle.
+		<<else>>
+			$His succubus outfit presents this sex demon's breasts, inviting a damning fondle.
+		<</if>>
+	<<case "a slutty maid outfit">>
+		<<if $activeSlave.boobs < 300>>
+			$His maid outfit covers $his flat chest with a thin white blouse designed to be easy to pull down.
+		<<else>>
+			$His maid outfit covers $his breasts with a thin white blouse designed to be easy to pull down.
+		<</if>>
+	<<case "a nice maid outfit">>
+		<<if $activeSlave.boobs < 300>>
+			$His maid outfit covers $his flat chest demurely, offering the diverting task of pulling it off $him.
+		<<else>>
+			$His maid outfit covers $his breasts demurely, offering the diverting task of pulling it off $him.
+		<</if>>
+	<<case "a monokini">>
+		The straps of $his monokini cross in the center of $his chest, leaving the rest of $his <<if $activeSlave.boobs < 300>>flat <</if>>breasts naked.
+	<<case "a cybersuit">>
+		$His bodysuit is tight enough to show off <<if $activeSlave.boobs < 300>>just how flat $he is<<else>>every contour of $his chest<</if>>.
+	<<case "a string bikini">>
+		$His string bikini covers only $his nipples, leaving the remainder of $his <<if $activeSlave.boobs < 300>>flat chest<<else>>breasts<</if>> naked.
+	<<case "a scalemail bikini">>
+		$His scalemail bikini covers <<if $activeSlave.boobs < 300>>all of $his flat chest.<<elseif $activeSlave.boobs < 700>>$his breasts entirely.<<elseif $activeSlave.boobs <1500>>much of $his breasts, while still emphasizing them.<<else>>the front of $his breasts.<</if>> .
+	<<case "clubslut netting">>
+		As $he moves, the weave of the netting over $his chest slips back and forth across $his nipples.
+	<<case "a cheerleader outfit">>
+		<<if $activeSlave.boobs < 300>>
+			As $he moves, the tight fabric rubs across $his obvious nipples.
+		<<else>>
+			As $he moves, $his chest threatens to fall out of $his cheerleader top.
+		<</if>>
+	<<case "an apron">>
+		<<if $activeSlave.boobs < 300>>
+			As $he moves, $his apron threatens to bounce off $his flat chest and expose $his nipples.
+		<<else>>
+			As $he moves, $his apron provides excellent views of the sides of $his breasts.
+		<</if>>
+	<<case "cutoffs and a t-shirt">>
+		<<if $activeSlave.boobs < 300>>
+			$His non-existent breasts are bare under $his t-shirt; not that you can really tell since they lack motion completely.
+		<<else>>
+			$His tits are bare under $his t-shirt, so movement gives delicious hints of their motion.
+		<</if>>
+	<<case "spats and a tank top">>
+		<<if $activeSlave.boobs < 300>>
+			$His flat chest makes $his form-fitting tank top look as if it's clinging to a tube.
+		<<else>>
+			$His breasts bounce slightly under $his tank top as $he moves.
+		<</if>>
+	<<case "a slutty outfit">>
+		<<if (random(1,100) > 50)>>
+			For today's slutty outfit $he's chosen a handkerchief top that occasionally comes untied and <<if $activeSlave.boobs < 300>>reveals $his flat chest<<else>>spills $his breasts out naked<</if>>.
+		<<else>>
+			For today's slutty outfit $he's chosen a halter top cut so low that <<if $activeSlave.boobs < 300>>it occasionally slips down $his flat chest to reveal a nipple<<else>>$his breasts occasionally pop out<</if>>.
+		<</if>>
+	<<case "a slave gown">>
+		$His gorgeous dress has thoughtful cuts that tastefully bares $his <<if $activeSlave.boobs < 300>>non-existent <</if>>breasts.
+	<<case "slutty business attire">>
+		$His suit jacket and blouse are low enough to show off a lot of boob<<if $activeSlave.boobs < 300>>, or they would, had $he had any<</if>>.
+	<<case "nice business attire">>
+		$His suit jacket and blouse are businesslike, but they could be removed easily enough.
+	<<case "a halter top dress">>
+		$His beautiful halter top dress almost seems to be sculpted around $his body.
+	<<case "a ball gown">>
+		$His fabulous silken ball gown is tailored to accentuate the shape of $his <<if $activeSlave.boobs < 300>>flat chest<<else>>breasts<</if>>.
+	<<case "a slutty nurse outfit">>
+		$His jacket presents $his <<if $activeSlave.boobs < 300>>nipples<<else>>breasts<</if>> to be ogled.
+	<<case "a schoolgirl outfit">>
+		$His blouse lewdly displays $his <<if $activeSlave.boobs < 300>>$activeSlave.nipples nipples<<else>>breasts<</if>>.
+	<<case "a kimono">>
+		$His kimono is clearly designed to accentuate $his <<if $activeSlave.boobs < 300>>flat chest<<else>>breasts<</if>>.
+	<<case "a hijab and abaya">>
+		$His abaya covers $his <<if $activeSlave.boobs < 300>>flat chest<<else>>breasts<</if>> totally.
+	<<case "a huipil">>
+		$His huipil hugs the curves of $his <<if $activeSlave.boobs < 300>>$activeSlave.nipples nipples<<else>>breasts<</if>>.
+	<<case "battledress">>
+		<<if $activeSlave.boobs < 300>>
+			As $he moves, you can occasionally spot $his lack of undergarments.
+		<<else>>
+			$His tank top and sports bra support rather than flatter $his breasts.
+		<</if>>
+	<<case "a fallen nuns habit">>
+		$His slutty nun outfit leaves $his <<if $activeSlave.boobs < 300>>flat <</if>>tits sinfully bare.
+	<<case "a chattel habit">>
+		$His chattel habit leaves $his <<if $activeSlave.boobs < 300>>flat <</if>>tits virtuously bare.
+	<<case "a penitent nuns habit">>
+		$His habit chafes $his nipples so harshly that it would probably be a relief to $his to have it stripped off $his.
+	<<case "a comfortable bodysuit">>
+		$His bodysuit is tight enough to show off <<if $activeSlave.boobs < 300>>just how flat $he is<<else>>every contour of $his chest<</if>>.
+	<<case "a latex catsuit">>
+		$His latex catsuit is tight enough to show off <<if $activeSlave.boobs < 300>>just how flat $he is<<else>>every contour of $his chest<</if>>.
+	<<case "a military uniform">>
+		$His uniform tunic and shirt are formal, but they could be removed easily enough.
+	<<case "a schutzstaffel uniform">>
+		$His uniform tunic and shirt are formal, but they could be removed easily enough.
+	<<case "a slutty schutzstaffel uniform">>
+		$His uniform tunic and shirt are formal, but they could be removed easily enough.
+	<<case "a red army uniform">>
+		$His uniform tunic and shirt are formal, but they could be removed easily enough.
+	<<case "a nice nurse outfit">>
+		$His nurse's outfit is functional, but they could be removed easily enough.
+	<<case "a mini dress">>
+		$His mini dress is tight enough to show off <<if $activeSlave.boobs < 300>>just how flat $he is<<else>>every contour of $his chest<</if>>.
+	<<case "a leotard">>
+		<<if $activeSlave.boobs < 300>>
+			$His leotard draws the eye straight to $his obvious nipples, since it lacks anything else to show off.
+		<<else>>
+			$His leotard is tight enough that it not only hugs $his breasts, but shows off $his nipples.
+		<</if>>
+	<<case "a bunny outfit">>
+		<<if $activeSlave.boobs < 300>>
+			With no breasts to speak of, $his strapless corset teddy manages to look rather slutty.
+		<<else>>
+			$His strapless corset teddy presents $his boobs while still managing to look a bit classy.
+		<</if>>
+	<<case "harem gauze">>
+		$His <<if $activeSlave.boobs < 300>>non-existent <</if>>breasts are clearly visible through the thin gauze that covers them.
+	<<case "slutty jewelry">>
+		<<if $activeSlave.boobs < 300>>
+			The light chain across $his non-existent breasts is the only thing on $his chest capable of moving as $he walks.
+		<<else>>
+			The light chain under $his breasts accentuates their natural movement.
+		<</if>>
+	<<default>>
+		<<if ($activeSlave.vaginalAccessory == "chastity belt")>>
+			Since $he's wearing nothing but a chastity belt, $his <<if $activeSlave.boobs < 300>>non-existent <</if>>breasts are delightfully naked.
+		<<else>>
+			$His naked <<if $activeSlave.boobs < 300>> flat chest and nipples<<else>>breasts<</if>> catch your eye.
+		<</if>>
+<</switch>>
+
+You tell your slave that it's time to incorporate some stripping into $his dance.
+
+<<if ($activeSlave.sexualFlaw == "shamefast")>>
+	$He immediately begins to tear up at the thought of being naked. $His shame is obvious to you, and you remind $him that $his comfort is not your concern.
+	<<if ($activeSlave.entertainmentSkill >= 100)>>
+		Even though $he is crippled by shame, your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. With tears still streaming down $his face, $he begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose, even as $he sniffles at the shame of revealing $himself for you. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+	<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+		Even though $he is crippled by shame, your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+	<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+		Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+	<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+		Your slave works hard to keep with the rhythm while removing articles of clothing. $His attempts are inhibited by $his shame, which makes $him shudder and cry whenever it's time for another article of clothing to come off.
+	<<elseif ($activeSlave.entertainmentnSkill >= 20)>>
+		Your slave is not a skilled performer, and $his movements are uninspired. $He is too concerned with protecting $his nakedness to be obedient and attractive simultaneously, and you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+	<<else>>
+		Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to shamefully remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+	<</if>>
+<<elseif ($activeSlave.sexualQuirk == "tease")>>
+	<<if ($activeSlave.entertainmentSkill >= 100)>>
+		Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. Being a tease, $he is able to maintain an attractive blend of shame and arousal at the thought of being naked before you, and this inspires $him to tease you endlessly. With cheeks still flushed and red, $he begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose, even as $he blushes at the shame and arousal of revealing $himself for you. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+	<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+		Your slave is a skilled entertainer, well above average. Being a tease, $he is able to maintain an attractive blend of shame and arousal at the thought of being naked before you, and this inspires $him to tease you endlessly. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+	<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+		Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. The true entertainment comes from $his teasing nature, which makes $him blush cutely anytime $he shows a bit of skin. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+	<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+		Your slave works hard to keep with the rhythm while removing articles of clothing. $His attempts are made more entertaining by $his shame, which makes $him redden and blush whenever it's time for another article of clothing to come off. Even though $his entertainment skill needs improving, you genuinely enjoy the teasing way $he tugs at $his wear and makes you anticipate the removal of each article.
+	<<elseif ($activeSlave.entertainmentnSkill >= 20)>>
+		Your slave is not a skilled performer, and $his movements are uninspired. $He is a tease, which adds a bit of value, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+	<<else>>
+		Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+	<</if>>
+<<elseif ($activeSlave.behavioralFlaw == "odd")>>
+	<<if ($activeSlave.entertainmentSkill >= 100)>>
+		Even though $he is extremely odd, your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. With $his ass cheeks straddling the pole $he begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+	<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+		Even though $he is extremely odd, your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+	<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+		Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he shouts wildly before upping the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+	<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+		Your slave works hard to keep with the rhythm while removing articles of clothing. $His attempts are inhibited by $his oddness, which results in $him crouching and squealing at inappropriate times. $He wonders aloud and you instruct $him to be silent the remainder of the dance.
+	<<elseif ($activeSlave.entertainmentnSkill >= 20)>>
+		Your slave is not a skilled performer, and $his movements are uninspired. $He is so odd that $his moves more resembles the chicken dance than any form of erotic dancing. You find yourself unable to look away, and for all the wrong reasons. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+	<<else>>
+		Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. Deciding that the rhythm is to blame, $he decides instead to sing $his own song to strip to. $He proceeds to hum string of off beat notes peppered with random words and scats, all punctuated by the sloppy kicking of clothes from $his ankles. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to roughly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+	<</if>>
+<<elseif ($activeSlave.sexualFlaw == "attention whore")>>
+	As an attention whore, this is what $he lives for.
+	<<if ($activeSlave.entertainmentSkill >= 100)>>
+		Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. Being an attention whore, $he is obsessed with attracting the sexual arousal of others. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose, even though $he is also fulfilled by the event $he knows that your desire is all that matters. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+	<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+		Your slave is a skilled entertainer, well above average. Being an attention whore, $he is obsessed with attracting the sexual arousal of others. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He surely wishes $he were a better entertainer so you would call on $him to strip more often.
+	<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+		Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. The true entertainment comes from $his teasing nature, which makes $him blush cutely anytime $he shows a bit of skin. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+	<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+		Your slave works hard to keep with the rhythm while removing articles of clothing. $His attempts are overshadowed by $his clear desire to be looked at, and you can tell $he is distracted by this.
+	<<elseif ($activeSlave.entertainmentnSkill >= 20)>>
+		Your slave is not a skilled performer, and $his movements are uninspired. $He is trying much too hard to get your attention, and is visibly angered whenever $he sees that you are not aroused by $his fumblings. You find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+	<<else>>
+		Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to over-dramatically remove an article of clothing. After each article removed $he stops and looks at you to make sure you're watching. $His clear desire to be looked at makes $him more self-conscious which offsets the rhythm of the dance even more. $He decides to pick up the pace, aiming to be naked as quickly as possible so that you can admire $his body. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+	<</if>>
+<<else>>
+	<<if ($activeSlave.fetishKnown == 1)>>
+		<<switch $activeSlave.fetish>>
+		<<case "submissive">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "dom">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "sadist">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "masochist">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "cumslut">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "humiliation">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "buttslut">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "pregnancy">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<case "boobs">>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<<default>>
+			<<if ($activeSlave.entertainmentSkill >= 100)>>
+				Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+			<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+				Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+			<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+				Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+			<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+				Your slave works hard to keep with the rhythm while removing articles of clothing.
+			<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+				Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+			<<else>>
+				Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+			<</if>>
+		<</switch>>
+	<<else>>
+		<<if ($activeSlave.entertainmentSkill >= 100)>>
+			Your slave is a masterful entertainer, able to keep anyone entertained for even the most lengthy of strip teases. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he knows how to fulfill $his purpose. You keep trying to get back to work, but your slave's movements are so enthralling that you cannot seem to break free.
+		<<elseif ($activeSlave.entertainmentSkill >= 80)>>
+			Your slave is a skilled entertainer, well above average. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He knows how to use $his hips and ass to draw and keep your attention while slowly moving up to $his chest. <<= boobWatch($activeSlave)>> $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose.
+		<<elseif ($activeSlave.entertainmentSkill >= 60)>>
+			Your slave is a practiced entertainer, not masterful but still able to give an arousing performance. $He begins by writhing $his hips and rolling $his ass. <<ButtDescription>> $He is able to use $his hips and ass to draw your attention before suddenly moving up to $his chest. <<= boobWatch($activeSlave)>> $He isn't able to fully keep your attention, but whenever $he sees that you are becoming distracted $he ups the ante to draw you back in. $His body is nothing more than an object for your desire, and $he is learning to fulfill $his purpose. $He does $his best to direct your arousal onto $his body.
+		<<elseif ($activeSlave.entertainmentSkill >= 40)>>
+			Your slave works hard to keep with the rhythm while removing articles of clothing.
+		<<elseif ($activeSlave.entertainmentSkill >= 20)>>
+			Your slave is not a skilled performer, and $his movements are uninspired. $His movements are still attractive, but you find yourself becoming distracted, $his dance not enough to keep your attention or draw you back. You take out your tablet and make a note that this slave will need to practice $his seduction if $he is to be allowed to dance for you again. Even without skill you still can admire $his body. <<= boobWatch($activeSlave)>><<ButtDescription>> You imagine how much more attractive $his tits and ass could be if $he knew how to move them right.
+		<<else>>
+			Your slave has no skills to speak of, and isn't able to keep even the simplest of rhythms. $He fumbles about awkwardly and clumsily, stopping abruptly every so often to gracelessly remove an article of clothing. You decide to find $his lack of skill amusing, and allow $him to continue practicing while you resume your work.
+		<</if>>
+	<</if>>
+<</if>>
+
+After the last piece of clothing has hit the floor you let your little slut dance naked a little while longer while you finish your last report. Once you have gotten enough of $his dancing, you snap your fingers and $he hurries to your side and drops to $his knees, awaiting further orders.
+
+<<if (random(1,100) > (100 + $activeSlave.devotion))>>
+	<<if ($activeSlave.fetish != "humiliation") && ($activeSlave.energy <= 50) && ($activeSlave.sexualFlaw == "none")>>
+		Being forced to reveal $himself has given $him a @@.red;desire to always be clothed.@@
+		<<set $activeSlave.sexualFlaw = "shamefast">>
+	<</if>>
+<<elseif ($activeSlave.fetish == "none") && ($activeSlave.sexualFlaw != "shamefast")>>
+	<<if fetishChangeChance($activeSlave) > random(0,100)>>
+		Being on display for your pleasure has @@.lightcoral;encouraged $him to savor humiliation.@@
+		<<set $activeSlave.fetish = "humiliation", $activeSlave.fetishKnown = 1, $activeSlave.fetishStrength = 65>>
+	<</if>>
+<</if>>
+
+<<if passage() != "Slave Interact">>
+	<<set _fl = $slaveIndices[$activeSlave.ID]>>
+	<<if def _fl>>
+		<<set $slaves[_fl] = $activeSlave>>
+	<</if>>
+<</if>>
diff --git a/src/npc/fFeelings.tw b/src/npc/fFeelings.tw
index f253578503c356702214eef85615399478562ac3..6fb17488f81381b2b36f72e2e54494c9346d88fe 100644
--- a/src/npc/fFeelings.tw
+++ b/src/npc/fFeelings.tw
@@ -152,7 +152,7 @@ My favorite part of my body i<<s>>
 		<<elseif $PC.dick == 1>>
 			my tummy — and my womb! The <<s>>lo<<sh>>y feeling when I'm all packed full of cum in both end<<s>> get<<s>> me <<s>>o incredibly horny. <<S>>ometime<<s>> I wonder what it would be like if I were ju<<s>>t a puffed up, cum-balloon of a $woman, helple<<ss>> and filled with cum, over, and over, and — I'm <<s>>orry, <<Master>>. I'm being weird again, aren't I?
 		<<else>>
-			my mouth, I love how it feel<<s>> to — to eat pu<<ss>>y, <<Master>>. I love eating out your pu<<ss>>y. E<<s>>pe<<c>>ially when it<<s>> been filled up with <<s>>ome yummy cum. Maybe you could let me eat cum out of your pu<<ss>>y <<s>>oon?
+			my mouth, I love how it feel<<s>> to — to eat pu<<ss>>y, <<Master>>. I love eating out your pu<<ss>>y. E<<s>>pe<<c>>ially when it'<<s>> been filled up with <<s>>ome yummy cum. Maybe you could let me eat cum out of your pu<<ss>>y <<s>>oon?
 		<</if>>
 	<<elseif ($activeSlave.sexualFlaw == "attention whore") && ($activeSlave.fetishStrength > 95)>>
 		my whole $activeSlave.skin body, and whatever part of me i<<s>> be<<s>>t u<<s>>ed to make me look like a total <<s>>lut.
@@ -209,7 +209,7 @@ My favorite part of my body i<<s>>
 		<<elseif ($activeSlave.counter.birthsTotal > 10) && isFertile($activeSlave)>>
 			my womb. It'<<s>> made <<s>>o many babie<<s>>. It feel<<s>> <<s>>o <<s>>ad and empty right now. I really wi<<sh>> we could ju<<s>>t keep it <<s>>tuffed full of babie<<s>> forever.
 		<<elseif isFertile($activeSlave)>>
-			my womb. It<<s>> ready, <<Master>>. It feel<<s>> <<s>>o <<s>>ad and empty right now. I really wi<<sh>> we could ju<<s>>t keep it <<s>>tuffed full of babie<<s>> forever.
+			my womb. It'<<s>> ready, <<Master>>. It feel<<s>> <<s>>o <<s>>ad and empty right now. I really wi<<sh>> we could ju<<s>>t keep it <<s>>tuffed full of babie<<s>> forever.
 		<<else>>
 			my tight tummy, I like to imagine how it would <<s>>well if I got pregnant. I... I really wi<<sh>> we could put a baby in me, <<Master>>.
 		<</if>>
diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw
index c643de1c7a2dd4b185376821a6a2aad7fbb0fb56..c4aa1b4ea135dd68cc40a7294d313374e0838457 100644
--- a/src/npc/startingGirls/startingGirls.tw
+++ b/src/npc/startingGirls/startingGirls.tw
@@ -791,34 +791,34 @@ __You are customizing this slave:__
 <br>
 <<options $activeSlave.face>>
 	''Facial attractiveness:''
-<<optionlt -95 -100 "Very ugly">>  Very ugly.
-<<optionlt -40 -55 "Ugly">>  Ugly.
-<<optionlt -10 -15 "Unattractive">>  Unattractive.
-<<optionlte 10 0 "Average">>  Average.
-<<optionlte 40 15 "Attractive">>  Attractive.
-<<optionlte 95 55 "Beautiful">>  Beautiful.
-<<optiondefault 100 "Very beautiful">>  Very beautiful.
+<<optionlt -95 -100 "Very ugly">> Very ugly.
+<<optionlt -40 -55 "Ugly">> Ugly.
+<<optionlt -10 -15 "Unattractive">> Unattractive.
+<<optionlte 10 0 "Average">> Average.
+<<optionlte 40 15 "Attractive">> Attractive.
+<<optionlte 95 55 "Beautiful">> Beautiful.
+<<optiondefault 100 "Very beautiful">> Very beautiful.
 <</options>>
 
 <br>
 <<if $seeExtreme == 1>>
 	<<options $activeSlave.lips>>
 		''Lips:''
-		<<optionlte 10 5 "Thin">>  Thin.
-		<<optionlte 20 15 "Normal">>  Normal.
-		<<optionlte 40 25 "Pretty">>  Pretty.
-		<<optionlte 70 55 "Plush">>  Plush.
-		<<optionlte 95 85 "Huge">>  Huge.
+		<<optionlte 10 5 "Thin">> Thin.
+		<<optionlte 20 15 "Normal">> Normal.
+		<<optionlte 40 25 "Pretty">> Pretty.
+		<<optionlte 70 55 "Plush">> Plush.
+		<<optionlte 95 85 "Huge">> Huge.
 		<<optiondefault 100 "Facepussy">> Facepussy.
 	<</options>>
 <<else>>
 	<<options $activeSlave.lips>>
 		''Lips:''
-		<<optionlte 10 5 "Thin">>  Thin.
-		<<optionlte 20 15 "Normal">>  Normal.
-		<<optionlte 40 25 "Pretty">>  Pretty.
-		<<optionlte 70 55 "Plush">>  Plush.
-		<<optionlte 95 85 "Huge">>  Huge.
+		<<optionlte 10 5 "Thin">> Thin.
+		<<optionlte 20 15 "Normal">> Normal.
+		<<optionlte 40 25 "Pretty">> Pretty.
+		<<optionlte 70 55 "Plush">> Plush.
+		<<optionlte 95 85 "Huge">> Huge.
 	<</options>>
 <</if>>
 <br>
@@ -892,15 +892,15 @@ __You are customizing this slave:__
 	<br>
 	<<options $activeSlave.smells>>
 		''Smell ability:''
-		<<option 0 "Normal">> Normal.
-		<<option -1 "None">> Unable to smell.
+		<<option 0 "Normal">> Normal
+		<<option -1 "None">> Unable to smell
 	<</options>>
 
 	<br>
 	<<options $activeSlave.tastes>>
 		''Taste ability:''
-		<<option 0 "Normal">> Normal.
-		<<option -1 "None">> Unable to taste.
+		<<option 0 "Normal">> Normal
+		<<option -1 "None">> Unable to taste
 	<</options>>
 <</if>>
 <br>
@@ -952,31 +952,31 @@ __You are customizing this slave:__
 <br>
 <<options $activeSlave.shoulders>>
 	''Shoulders:''
-	<<option -2 "Very narrow">>  Very narrow.
+	<<option -2 "Very narrow">> Very narrow.
 	<<option -1 "Narrow">> Narrow.
 	<<option 0 "Feminine">> Feminine.
-	<<option 1 "Broad">>Broad.
+	<<option 1 "Broad">> Broad.
 	<<option 2 "Very broad">> Very broad.
 <</options>>
 
 <br>
 <<options $activeSlave.hips>>
 	''Hips:''
-	<<option -2 "Very narrow">>  Very narrow.
-	<<option -1 "Narrow">>  Narrow.
+	<<option -2 "Very narrow">> Very narrow.
+	<<option -1 "Narrow">> Narrow.
 	<<option 0 "Normal">> Normal.
-	<<option 1 "Broad">>Broad.
-	<<option 2 "Very broad">>Very broad.
+	<<option 1 "Broad">> Broad.
+	<<option 2 "Very broad">> Very broad.
 <</options>>
 
 <br>
 <<options $activeSlave.butt>>
 	''Butt:''
 	<<option 0 "Flat">> Flat.
-	<<option 1 "Small">>  Small.
-	<<option 2 "Plump">>  Plump.
-	<<option 3 "Big">>  Big.
-	<<option 4 "Huge">>  Huge.
+	<<option 1 "Small">> Small.
+	<<option 2 "Plump">> Plump.
+	<<option 3 "Big">> Big.
+	<<option 4 "Huge">> Huge.
 	<<option 5 "Enormous">> Enormous.
 	<<option 6 "Gigantic">> Gigantic.
 	<<optiondefault 7 "Massive">> Massive.
@@ -994,11 +994,11 @@ __You are customizing this slave:__
 <br>
 <<options $activeSlave.vagina>>
 	''Vagina:''
-	<<option -1 "No vagina" "$activeSlave.preg = 0, WombFlush($activeSlave), $activeSlave.belly = 0,$activeSlave.bellyPreg = 0, $activeSlave.pregType = 0, $activeSlave.pregSource = 0, $activeSlave.pregWeek = 0, $activeSlave.pregKnown = 0,$activeSlave.pubertyXX = 0,$activeSlave.pubertyAgeXX = $fertilityAge, $activeSlave.ovaries = 0">>//No vagina//.
-	<<option 0 "Virgin" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">>@@.lime;Virgin.@@
-	<<option 1 "Normal" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">>Normal.
-	<<option 2 "Veteran" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">>Veteran.
-	<<optiondefault 3 "Gaping" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">>Gaping.
+	<<option -1 "No vagina" "$activeSlave.preg = 0, WombFlush($activeSlave), $activeSlave.belly = 0,$activeSlave.bellyPreg = 0, $activeSlave.pregType = 0, $activeSlave.pregSource = 0, $activeSlave.pregWeek = 0, $activeSlave.pregKnown = 0,$activeSlave.pubertyXX = 0,$activeSlave.pubertyAgeXX = $fertilityAge, $activeSlave.ovaries = 0">> //No vagina//.
+	<<option 0 "Virgin" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">> @@.lime;Virgin.@@
+	<<option 1 "Normal" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">> Normal.
+	<<option 2 "Veteran" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">> Veteran.
+	<<optiondefault 3 "Gaping" "$activeSlave.preg = -1, $activeSlave.belly = 0, $activeSlave.bellyPreg = 0, $activeSlave.ovaries = 1">> Gaping.
 <</options>>
 <br>
 
@@ -1007,17 +1007,17 @@ __You are customizing this slave:__
 	<<if $activeSlave.dick == 0>>
 		<<options $activeSlave.clit>>
 			''Clit:''
-			<<option 0 "Normal">>Normal.
-			<<option 1 "Large">>Large.
-			<<optiondefault 2 "Huge">>Huge.
+			<<option 0 "Normal">> Normal.
+			<<option 1 "Large">> Large.
+			<<optiondefault 2 "Huge">> Huge.
 		<</options>>
 		<br>
 	<</if>>
 	<<options $activeSlave.labia>>
 		''Labia:''
-		<<option 0 "Normal">>Normal.
-		<<option 1 "Large">>Large.
-		<<optiondefault 2 "Huge">>Huge.
+		<<option 0 "Normal">> Normal.
+		<<option 1 "Large">> Large.
+		<<optiondefault 2 "Huge">> Huge.
 	<</options>>
 	<br>
 	<<options $activeSlave.vaginaLube>>
@@ -1101,7 +1101,7 @@ __You are customizing this slave:__
 				<<option 2 "Small">> Small.
 				<<option 3 "Normal">> Normal.
 				<<option 4 "Large">> Large.
-				<<optiondefault 5 "Massive">>Massive.
+				<<optiondefault 5 "Massive">> Massive.
 			<</options>>
 		<<else>>
 			<<if $activeSlave.foreskin == 0>><<set $activeSlave.foreskin = 3>><</if>>
@@ -1111,7 +1111,7 @@ __You are customizing this slave:__
 				<<option 2 "Small">> Small.
 				<<option 3 "Normal">> Normal.
 				<<option 4 "Large">> Large.
-				<<optiondefault 5 "Massive">>Massive.
+				<<optiondefault 5 "Massive">> Massive.
 			<</options>>
 		<</if>>
 	<</if>>
@@ -1167,20 +1167,20 @@ __You are customizing this slave:__
 <<else>>
 	<<options $activeSlave.skill.anal>>
 		''Anal sex:''
-		<<optionlte 10 0 "Unskilled">>Unskilled.
-		<<optionlte 30 15 "Basic">>@@.cyan;Basic.@@
-		<<optionlte 60 35 "Skilled">>@@.cyan;Skilled.@@
-		<<optiondefault 65 "Expert">>@@.cyan;Expert.@@
+		<<optionlte 10 0 "Unskilled">> Unskilled.
+		<<optionlte 30 15 "Basic">> @@.cyan;Basic.@@
+		<<optionlte 60 35 "Skilled">> @@.cyan;Skilled.@@
+		<<optiondefault 65 "Expert">> @@.cyan;Expert.@@
 	<</options>>
 <</if>>
 <br>
 
 <<options $activeSlave.skill.oral>>
 	''Oral sex:''
-	<<optionlte 10 0 "Unskilled">>  Unskilled.
-	<<optionlte 30 15 "Basic">>  @@.cyan;Basic.@@
-	<<optionlte 60 35 "Skilled">>  @@.cyan;Skilled.@@
-	<<optiondefault 65 "Expert">>@@.cyan;Expert.@@
+	<<optionlte 10 0 "Unskilled">> Unskilled.
+	<<optionlte 30 15 "Basic">> @@.cyan;Basic.@@
+	<<optionlte 60 35 "Skilled">> @@.cyan;Skilled.@@
+	<<optiondefault 65 "Expert">> @@.cyan;Expert.@@
 <</options>>
 
 <br>
@@ -1200,35 +1200,35 @@ __You are customizing this slave:__
 <<else>>
 	<<options $activeSlave.skill.vaginal>>
 		''Vaginal sex:''
-		<<optionlte 10 0  "Unskilled">>Unskilled.
-		<<optionlte 30 15 "Basic">>@@.cyan;Basic.@@
-		<<optionlte 60 35 "Skilled">>@@.cyan;Skilled.@@
-		<<optiondefault 65 "Expert">>@@.cyan;Expert.@@
+		<<optionlte 10 0  "Unskilled">> Unskilled.
+		<<optionlte 30 15 "Basic">> @@.cyan;Basic.@@
+		<<optionlte 60 35 "Skilled">> @@.cyan;Skilled.@@
+		<<optiondefault 65 "Expert">> @@.cyan;Expert.@@
 	<</options>>
 <</if>>
 
 <br>
 <<options $activeSlave.skill.whoring>>
 	''Prostitution:''
-	<<optionlte 10 0 "Unskilled">>  Unskilled.
-	<<optionlte 30 15 "Basic">>  @@.cyan;Basic.@@
-	<<optionlte 60 35 "Skilled">>  @@.cyan;Skilled.@@
-	<<optiondefault 65 "Expert">>@@.cyan;Expert.@@
+	<<optionlte 10 0 "Unskilled">> Unskilled.
+	<<optionlte 30 15 "Basic">> @@.cyan;Basic.@@
+	<<optionlte 60 35 "Skilled">> @@.cyan;Skilled.@@
+	<<optiondefault 65 "Expert">> @@.cyan;Expert.@@
 <</options>>
 
 <<options $activeSlave.skill.entertainment>>
 	''Entertainment:''
-	<<optionlte 10 0 "Unskilled">>  Unskilled.
-	<<optionlte 30 15 "Basic">>  @@.cyan;Basic.@@
-	<<optionlte 60 35 "Skilled">>  @@.cyan;Skilled.@@
-	<<optiondefault 65 "Expert">>@@.cyan;Expert.@@
+	<<optionlte 10 0 "Unskilled">> Unskilled.
+	<<optionlte 30 15 "Basic">> @@.cyan;Basic.@@
+	<<optionlte 60 35 "Skilled">> @@.cyan;Skilled.@@
+	<<optiondefault 65 "Expert">> @@.cyan;Expert.@@
 <</options>>
 
 <br>
 <<options $activeSlave.skill.combat>>
 	''Combat:''
-	<<option 0 "Unskilled">>Unskilled
-	<<option 1 "Skilled">>@@.cyan;Skilled.@@
+	<<option 0 "Unskilled">> Unskilled
+	<<option 1 "Skilled">> @@.cyan;Skilled.@@
 <</options>>
 <br>
 <<if $activeSlave.skill.whoring+$activeSlave.skill.entertainment+$activeSlave.skill.vaginal+$activeSlave.skill.anal+$activeSlave.skill.oral+($activeSlave.skill.combat*100) > 200>>
diff --git a/src/pregmod/MpregSelf.tw b/src/pregmod/MpregSelf.tw
index da73b882939c8b442ccf13f36846926f97c1846c..1faeb63e78f519b7d0816213f438f7ca2966af06 100644
--- a/src/pregmod/MpregSelf.tw
+++ b/src/pregmod/MpregSelf.tw
@@ -19,7 +19,7 @@
 	<<elseif $PC.balls == 2>>
 		Calling over your closest slave, you order _himU to bring you one of the enema syringes from the slave quarters. _HeU rushes off, and you set about getting naked before lying down on your luxurious bed. Your cock is already rock-hard, sending a steady stream of precum running down to pool on your huge balls. Your pussy is similarly soaked, imagining your latest deviancy has it practically puddling. Just as you start to think about punishing your slave for taking too long, you hear a knock before _heU enters carrying the glass enema syringe. Impatient, you give _himU your instructions: "pull out the plunger and keep the syringe handy. You're going to suck me off, but I want every drop of my cum to go into that syringe. No spilling. Now get started."
 		<br><br>Following your instructions, _heU eagerly drops to _hisU knees and inhales your soaked member. The large volume of precum coming from your swollen prostate necessitates regular swallowing that only adds to your pleasure. You lay back and enjoy yourself as _heU massages your huge balls before slipping _hisU hand underneath to start fingering your soaked pussy. The expert ministrations from your slave combine with your thoughts of what comes next, and soon your sack is clenching your huge balls as your body prepares to cum. Recognizing the signs, your slave removes _hisU mouth and replaces it with the open end of the syringe. _HeU takes _hisU sodden hand from your cunt and starts stroking vigorously, and soon you're spraying massive jets of alabaster cum into the enema syringe. It's good that you decided on an enema syringe instead of a normal dildo suppository, as the huge quantity of fertile semen would have overflowed from a smaller container.
-		<br><br>You sit up and pick up the previously discarded plunger while your slave continues to hold the syringe. _HeU has thoughtfully blocked the tip with the palm of _hisU hand, keeping any of the precious fluid from escaping. You position the plunger and barely insert it into the open syringe, not wanting to accidentally force out your semen. The two of you flip the full syringe over so that the business end is pointing upward, and the slave removes _his hand while you make sure the plunger is secure and won't leak any of the precious cargo. Your slave eagerly licks the drop of cum off the palm of _hisU hand, but you don't begrudge _himU a small treat. Instead, you get a firm grasp on the glass of the thick enema syringe and lay back once more.
+		<br><br>You sit up and pick up the previously discarded plunger while your slave continues to hold the syringe. _HeU has thoughtfully blocked the tip with the palm of _hisU hand, keeping any of the precious fluid from escaping. You position the plunger and barely insert it into the open syringe, not wanting to accidentally force out your semen. The two of you flip the full syringe over so that the business end is pointing upward, and the slave removes _hisU hand while you make sure the plunger is secure and won't leak any of the precious cargo. Your slave eagerly licks the drop of cum off the palm of _hisU hand, but you don't begrudge _himU a small treat. Instead, you get a firm grasp on the glass of the thick enema syringe and lay back once more.
 		You spread your legs into a wide "M" shape, as if preparing for a gynecological exam. You can't demean yourself by allowing your slave to penetrate you, so you carefully position the girthy syringe between your huge balls and slowly shove it into your pussy. Adjusting your grip, you keep pushing; you're unable to suppress a moan when you feel the nubby plug-like tip knock at the entrance of your womb. Thoroughly penetrated, you lay back and give your slave instructions: "Fuck me good and hard with the syringe until I cum. When I do, I want you to take both hands and ram that plunger in. Push hard, I want that syringe completely empty when you're done."
 		<br><br>The _girlU does as _heU's told, getting a firm grip on the syringe and pushing in slightly before drawing it outward. After a brief pause, _heU shoves it back inside you. Seeing the undeniable pleasure on your face, _heU takes it as permission to continue and quickly picks up the pace. Soon _heU's fucking you hard and fast with the syringe. Thanks to the position caused by your widely-splayed legs, your fertile womb is lined up perfectly for each thrust to slam the pointy enema bulb into the opening of your cervix, forcibly stretching it further open with each piercing impact. The sensation is too much to bear after having cum so recently, and you rapidly moan your way towards another orgasm.
 		Your fevered thoughts are focused on the perverse pleasure of giving yourself a creampie, intensifying the extreme pleasure you're feeling. Soon you are cumming with a scream of ecstasy, your neglected cock making your orgasm obvious as it sends thick streams of cum spraying all over the place to coat you and your slave. Seeing _hisU cue, the _girlU grabs the large plunger with both hands and starts shoving it in the direction of your womb. _HeU leans in, using _hisU body weight to help fight the resistance of your richly-thick and fertile semen that's filling the syringe. The pressure forces the whole enema syringe further inside you, causing a blissful stretching sensation as the squirting enema bulb penetrates your cervix to lodge in your womb.
diff --git a/src/pregmod/basenationalitiesControls.tw b/src/pregmod/basenationalitiesControls.tw
index 21d4a28a50535981a1a8cefec77dab7d8834ee0a..5a28b3895d209e116d64a6e3e08dee4c489842e3 100644
--- a/src/pregmod/basenationalitiesControls.tw
+++ b/src/pregmod/basenationalitiesControls.tw
@@ -107,7 +107,7 @@ Filter by Region:
 		</div>
 	<</for>>
 	<div style="clear: both;">By dominant race/ethnicity (hover over the name to see the nationalities affected):</div>
-	<<foreach _race of setup.filterRaces>>
+	<<for _race range setup.filterRaces>>
 		<<set _racialNationalities = setup.baseNationalities.filter(function(n) {
 			var races = setup.raceSelector[n] || setup.raceSelector[''];
 			return races[_race.toLowerCase()] * 3.5 > hashSum(races); })>>
@@ -126,7 +126,7 @@ Filter by Region:
 				<<replace '#PopControl'>><<include 'Basenationalities Controls'>><</replace>>
 			<</link>>@@</div>">>
 		<</if>>
-	<</foreach>>
+	<</for>>
 <<else>>
 /* Filtered pop controls */
 	<<set _controlsNationality = setup[$baseControlsFilter+'Nationalities']>>
diff --git a/src/pregmod/editGenetics.tw b/src/pregmod/editGenetics.tw
index c5bbf98119b70502fdc101fa31dfd65bf4e6063b..0e769b45a9e6ea0911a76fab9524b21e774629a7 100644
--- a/src/pregmod/editGenetics.tw
+++ b/src/pregmod/editGenetics.tw
@@ -66,7 +66,7 @@
 			<th>Rear</th><td class="editor number-editor" data-param="butt" data-min="0" data-max="20"><%= tmpl.buttDesc(s.butt) %></td>
 		</tr>
 		<tr>
-			<th>Breasts</th><td class="editor number-editor" data-param="boobs" data-min="0" data-max="25000"><%- s.boobs %> cc (<%- tmpl.cupCat.cat(s.boobs) %>)</td>
+			<th>Breasts</th><td class="editor number-editor" data-param="boobs" data-min="0" data-max="100000"><%- s.boobs %> cc (<%- tmpl.cupCat.cat(s.boobs) %>)</td>
 			<th>Breast shape</th><td class="editor choice-editor" data-param="boobShape" data-choices="normal, perky, saggy, torpedo-shaped, downward-facing, wide-set"><%- s.boobShape %></td>
 			<th>Nipples</th><td class="editor choice-editor" data-param="nipples" data-choices="huge, puffy, inverted, tiny, cute, partially inverted"><%- s.nipples %></td>
 			<th>Areolae</th><td class="editor number-editor" data-param="areolae" data-min="0" data-max="5"><%- tmpl.areolaeDesc(s.areolae) %></td>
diff --git a/src/pregmod/electiveSurgery.tw b/src/pregmod/electiveSurgery.tw
index 81461c5f6d362c9372507b580f9220cd61ab455a..9034d75ae3b138c4bc307e6b2a3b9aef255140ed 100644
--- a/src/pregmod/electiveSurgery.tw
+++ b/src/pregmod/electiveSurgery.tw
@@ -3,52 +3,52 @@
 You arrive at your favorite plastic surgeon for your appointment to find them as busy as ever, but you find yourself quickly hurried into an exam room by their cute assistant. She wastes no time in hurrying you into her office, stripping you down, measuring you and making sure you are healthy enough for surgery, all the while not so subtly running her hands across every part of you. "So, what can I help you with?"
 
 <br><br>
-"You sure you want to mess with that lovely face?" She teases, caressing your cheek. "@@.yellowgreen;<<print cashFormat(5000)>>.@@ Also wouldn't recommend changing your eyes, face shape or skin color; some security systems get real uppity over things like that. Though I s'pose race and hair can fall under that as well, but hey, we don't handle racial surgery and this isn't a hair salon, so nothing to worry about, right? Yes, I'm certain your systems will recognize you after we finish working on you — give us some credit."
+"You sure you want to mess with that lovely face?" she teases, caressing your cheek. "@@.yellowgreen;<<print cashFormat(5000)>>.@@ Also wouldn't recommend changing your eyes, face shape or skin color; some security systems get real uppity over things like that. Though I s'pose race and hair can fall under that as well, but hey, we don't handle racial surgery and this isn't a hair salon, so nothing to worry about, right? Yes, I'm certain your systems will recognize you after we finish working on you — give us some credit."
 <br>
 You're @@.orange;$PC.actualAge years old.@@
 <<if $PC.actualAge >= 65>>
 	<<if $PC.visualAge > $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look older.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<elseif $PC.visualAge < $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look younger.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<else>>
 		You could benefit from a face lift.
-		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageUp"]]
+		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageUp"]]
 	<</if>>
 <<elseif $PC.actualAge >= 50>>
 	<<if $PC.visualAge > $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look older.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<elseif $PC.visualAge < $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look younger.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<else>>
 		You could benefit from a face lift.
-		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageUp"]]
+		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageUp"]]
 	<</if>>
 <<elseif $PC.actualAge >= 35>>
 	<<if $PC.visualAge > $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look older.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<elseif $PC.visualAge < $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look younger.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<else>>
 		You could go for a face lift, though making yourself look older could be useful.
-		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageUp"]]
+		<br>[[Get a face lift|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageUp"]]
 	<</if>>
 <<else>>
 	<<if $PC.visualAge > $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look older.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<elseif $PC.visualAge < $PC.actualAge>>
 		You've had surgery to make yourself @@.lime;look younger.@@
-		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(-5000, "PCmedical"), $surgeryType = "restoreFace"]]
+		<br>[[Undo Facial surgery|PC Surgery Degradation][$PC.faceImplant = 0, $PC.visualAge = $PC.physicalAge, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "restoreFace"]]
 	<<else>>
 		You could undergo facial surgery to make yourself look older, though you could also make yourself look even younger.
-		<br>[[Remodel your face to appear younger|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(-5000, "PCmedical"), $surgeryType = "ageUp"]]
+		<br>[[Remodel your face to appear younger|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageDown"]] | [[Remodel your face to appear older|PC Surgery Degradation][$PC.faceImplant = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "ageUp"]]
 	<</if>>
 <</if>>
 
@@ -58,308 +58,308 @@ You're @@.orange;$PC.actualAge years old.@@
 You have @@.orange;$PC.skin skin.@@<<if $PC.skin != $PC.origSkin>> Your original skin tone was $PC.origSkin.<</if>>
 <br>
 <<if $PC.skin != $PC.origSkin>>
-	[[Restore natural color|PC Surgery Degradation][$PC.skin = $PC.origSkin, cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Restore natural color|PC Surgery Degradation][$PC.skin = $PC.origSkin, cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "pure white">>
-	[[Pure White|PC Surgery Degradation][$PC.skin = "pure white", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Pure White|PC Surgery Degradation][$PC.skin = "pure white", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "ivory">>
-	[[Ivory|PC Surgery Degradation][$PC.skin = "ivory", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Ivory|PC Surgery Degradation][$PC.skin = "ivory", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "white">>
-	[[White|PC Surgery Degradation][$PC.skin = "white", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[White|PC Surgery Degradation][$PC.skin = "white", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "extremely pale">>
-	[[Extremely Pale|PC Surgery Degradation][$PC.skin = "extremely pale", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Extremely Pale|PC Surgery Degradation][$PC.skin = "extremely pale", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "very pale">>
-	[[Very Pale|PC Surgery Degradation][$PC.skin = "very pale", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Very Pale|PC Surgery Degradation][$PC.skin = "very pale", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "pale">>
-	[[Pale|PC Surgery Degradation][$PC.skin = "pale", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Pale|PC Surgery Degradation][$PC.skin = "pale", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "extremely fair">>
-	[[Extremely Fair|PC Surgery Degradation][$PC.skin = "extremely fair", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Extremely Fair|PC Surgery Degradation][$PC.skin = "extremely fair", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "very fair">>
-	[[Very Fair|PC Surgery Degradation][$PC.skin = "very fair", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Very Fair|PC Surgery Degradation][$PC.skin = "very fair", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "fair">>
-	[[Fair|PC Surgery Degradation][$PC.skin = "fair", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Fair|PC Surgery Degradation][$PC.skin = "fair", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "light">>
-	[[Light|PC Surgery Degradation][$PC.skin = "light", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Light|PC Surgery Degradation][$PC.skin = "light", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "light olive">>
-	[[Light Olive|PC Surgery Degradation][$PC.skin = "light olive", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Light Olive|PC Surgery Degradation][$PC.skin = "light olive", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "tan">>
-	[[Tan|PC Surgery Degradation][$PC.skin = "tan", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Tan|PC Surgery Degradation][$PC.skin = "tan", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "olive">>
-	[[Olive|PC Surgery Degradation][$PC.skin = "olive", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Olive|PC Surgery Degradation][$PC.skin = "olive", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "bronze">>
-	[[Bronze|PC Surgery Degradation][$PC.skin = "bronze", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Bronze|PC Surgery Degradation][$PC.skin = "bronze", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "dark olive">>
-	[[Dark Olive|PC Surgery Degradation][$PC.skin = "dark olive", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Dark Olive|PC Surgery Degradation][$PC.skin = "dark olive", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "dark">>
-	[[Dark|PC Surgery Degradation][$PC.skin = "dark", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Dark|PC Surgery Degradation][$PC.skin = "dark", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "light beige">>
-	[[Light Beige|PC Surgery Degradation][$PC.skin = "light beige", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Light Beige|PC Surgery Degradation][$PC.skin = "light beige", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "beige">>
-	[[Beige|PC Surgery Degradation][$PC.skin = "beige", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Beige|PC Surgery Degradation][$PC.skin = "beige", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "dark beige">>
-	[[Dark Beige|PC Surgery Degradation][$PC.skin = "dark beige", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Dark Beige|PC Surgery Degradation][$PC.skin = "dark beige", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "light brown">>
-	[[Light Brown|PC Surgery Degradation][$PC.skin = "light brown", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Light Brown|PC Surgery Degradation][$PC.skin = "light brown", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "brown">>
-	[[Brown|PC Surgery Degradation][$PC.skin = "brown", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Brown|PC Surgery Degradation][$PC.skin = "brown", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "dark brown">>
-	[[Dark Brown|PC Surgery Degradation][$PC.skin = "dark brown", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Dark Brown|PC Surgery Degradation][$PC.skin = "dark brown", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "black">>
-	[[Black|PC Surgery Degradation][$PC.skin = "black", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Black|PC Surgery Degradation][$PC.skin = "black", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "ebony">>
-	[[Ebony|PC Surgery Degradation][$PC.skin = "ebony", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]] |
+	[[Ebony|PC Surgery Degradation][$PC.skin = "ebony", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]] |
 <</if>>
 <<if $PC.skin != "pure black">>
-	[[Pure Black|PC Surgery Degradation][$PC.skin = "pure black", cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]]
+	[[Pure Black|PC Surgery Degradation][$PC.skin = "pure black", cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]]
 <</if>>
-[[Custom Color|PC Skin Workaround][cashX(forceNeg(Math.trunc(2000 * $upgradeMultiplierMedicine)), "PCmedical"), $surgeryType = "skinTone"]]
+[[Custom Color|PC Skin Workaround][cashX(forceNeg(2000), "PCmedical"), $surgeryType = "skinTone"]]
 
 
 <br><br>"Maybe some breast work? I assure you they are lovely." She says as she brushes the back of your head with her own pair. "@@.yellowgreen;<<print cashFormat(5000)>>@@ for a reduction, @@.yellowgreen;<<print cashFormat(10000)>>@@ for implants, that includes size ups, and @@.yellowgreen;<<print cashFormat(15000)>>@@ for additional breast tissue. That last one might as well be real!<<if $PC.boobsBonus <= 0>> With a little work, we can even remove a small amount of fat from your breasts to bring your cup size down without damaging their inner workings. Though we'll have to build them up some before we can stick reasonable implants into you.<</if>>"<br>
 <<if $PC.boobsBonus > 2>>
 	<<if $PC.boobsImplant == 1>>
 		You have a @@.orange;pair of round H-cup breasts;@@ they are very obviously implants.
-		<br>//You are starting to experience back pain; any bigger and they might seriously impede your ability to run your arcology.// | [[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "breastReductionImplant"]]
+		<br>//You are starting to experience back pain; any bigger and they might seriously impede your ability to run your arcology.// | [[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastReductionImplant"]]
 	<<else>>
 		You have a @@.orange;heavy H-cup bust.@@ They tend to sag a little when you free them from your top, though they have some perk to them.
-		<br>//You are starting to experience back pain; any bigger and they might seriously impede your ability to run your arcology.// | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]]
+		<br>//You are starting to experience back pain; any bigger and they might seriously impede your ability to run your arcology.// | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]]
 	<</if>>
 <<elseif $PC.boobsBonus == 2>>
 	<<if $PC.boobsImplant == 1>>
 		You have a @@.orange;pair of rounded G-cup breasts;@@ they are a little too perky for their size to pass as natural.
-		<br>[[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "breastReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.boobsBonus = 3, cashX(-10000, "PCmedical"), $surgeryType = "breastEnlargementImplant"]]
+		<br>[[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.boobsBonus = 3, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "breastEnlargementImplant"]]
 	<<else>>
 		You have a @@.orange;huge G-cup bust.@@
-		<br>[[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 3, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 1, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]]
+		<br>[[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]]
 	<</if>>
 <<elseif $PC.boobsBonus == 1>>
 	<<if $PC.boobsImplant == 1>>
 		You have a @@.orange;pair of perky F-cup breasts;@@ you can barely tell they are implanted.
-		<br>[[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "breastReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(-10000, "PCmedical"), $surgeryType = "breastEnlargementImplant"]]
+		<br>[[Have your implants removed|PC Surgery Degradation][$PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "breastEnlargementImplant"]]
 	<<else>>
 		You have a @@.orange;hefty F-cup bust.@@
-		<br>[[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 0, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]]
+		<br>[[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have tissue removed|PC Surgery Degradation][$PC.boobsBonus = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]]
 	<</if>>
 <<elseif $PC.boobsBonus == -1>>
 	You have a @@.orange;pair of D-cup breasts.@@
-	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = 0, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -2, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(-5000, "PCmedical"), $surgeryType = "flatChest"]]
+	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = 0, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -2, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "flatChest"]]
 <<elseif $PC.boobsBonus == -2>>
 	You have a @@.orange;average pair of C-cup breasts.@@
-	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = -1, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -3, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(-5000, "PCmedical"), $surgeryType = "flatChest"]]
+	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = -1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -3, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "flatChest"]]
 <<elseif $PC.boobsBonus == -3>>
 	You have a @@.orange;small pair of B-cup breasts.@@
-	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = -2, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(-5000, "PCmedical"), $surgeryType = "flatChest"]] | //You lack sufficient fatty tissue to permit additional size reduction short of total breast removal.//
+	<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.boobsBonus = -2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "flatChest"]] | //You lack sufficient fatty tissue to permit additional size reduction short of total breast removal.//
 <<elseif $PC.boobs == 1>>
 	You have a @@.orange;big pair of DD-cup breasts.@@
-	<br>[[Get a pair of breast implants|PC Surgery Degradation][$PC.boobsBonus = 1, $PC.boobsImplant = 1, cashX(-10000, "PCmedical"), $surgeryType = "breastEnlargementImplant"]] | [[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 1, cashX(-15000, "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -1, cashX(-5000, "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(-5000, "PCmedical"), $surgeryType = "flatChest"]]
+	<br>[[Get a pair of breast implants|PC Surgery Degradation][$PC.boobsBonus = 1, $PC.boobsImplant = 1, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "breastEnlargementImplant"]] | [[Add additional breast tissue|PC Surgery Degradation][$PC.boobsBonus = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breastEnlargement"]] | [[Have fatty tissue removed|PC Surgery Degradation][$PC.boobsBonus = -1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "breastShrinkage"]] | [[Have them removed|PC Surgery Degradation][$PC.boobs = 0, $PC.boobsBonus = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "flatChest"]]
 <<elseif $PC.title == 1>>
 	You have a @@.orange;masculine chest.@@ At your request, breast tissue could be added until you have a healthy bust, though society is unlikely to approve.
-	<br>[[Get a pair of breasts|PC Surgery Degradation][$PC.boobs = 1, $PC.boobsBonus = -1, cashX(-15000, "PCmedical"), $surgeryType = "breasts"]]
+	<br>[[Get a pair of breasts|PC Surgery Degradation][$PC.boobs = 1, $PC.boobsBonus = -1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breasts"]]
 <<else>>
 	@@.orange;You're flat.@@ "We can fix that, if you want."
-	<br>[[Get a pair of breasts|PC Surgery Degradation][$PC.boobs = 1, $PC.boobsBonus = -1, cashX(-15000, "PCmedical"), $surgeryType = "breasts"]]
+	<br>[[Get a pair of breasts|PC Surgery Degradation][$PC.boobs = 1, $PC.boobsBonus = -1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "breasts"]]
 <</if>>
 
 <<if $PC.belly >= 100 && $PC.preg > 3>>
-<br><br>She darts for your middle.
-<<if $PC.belly >= 120000>>
-	"My god! What happened to you? You might now want to hit the fertility drugs so hard next time. Then again, I don't think you'll see us complaining when you come in for a tummy tuck to get everything back where it used to be." She says with a wink as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue octuplet-bursting belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>over-crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 110000>>
-	"My god! What happened to you? You might now want to hit the fertility drugs so hard next time. Then again, I don't think you'll see us complaining when you come in for a tummy tuck to get everything back where it used to be." She says with a wink as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue septuplet-stuffed belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>over-crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 95000>>
-	Oh wow! It's like a party in there!" She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue sextuplet-stuffed belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 80000>>
-	You must feel so full, like all the time. What's it feel like? Do they every calm down?" She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue quadruplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 64000>>
-	Oh wow! You're immense! I almost can't wrap my arms around it!" She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue quadruplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 48000>>
-	"Oh wow! You're gigantic! Are you sure you want to have surgery in this state? Things start to get complicated when you're this pregnant." She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue triplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 32000>>
-	"My word, are you sure you want to have surgery in this state? You're gigantic! Plus things start to get complicated when you're this pregnant." She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue twin-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>crowded belly.
-	<</if>>
-	<br>
-<<elseif $PC.belly >= 16000>>
-	"My word, are you sure you want to have surgery in this state? You're giant!" She says as she uses both hands to massage your
-	<<if $PC.preg > 40>>overdue belly, enjoying the kicks from your child within. "If you go into labor, we have everything you'll need, so don't worry."
-	<<else>>belly, taking note of the extra occupants.
+	<br><br>She darts for your middle.
+	<<if $PC.belly >= 120000>>
+		"My god! What happened to you? You might now want to hit the fertility drugs so hard next time. Then again, I don't think you'll see us complaining when you come in for a tummy tuck to get everything back where it used to be." She says with a wink as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue octuplet-bursting belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>over-crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 110000>>
+		"My god! What happened to you? You might now want to hit the fertility drugs so hard next time. Then again, I don't think you'll see us complaining when you come in for a tummy tuck to get everything back where it used to be." She says with a wink as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue septuplet-stuffed belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>over-crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 95000>>
+		Oh wow! It's like a party in there!" She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue sextuplet-stuffed belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 80000>>
+		You must feel so full, like all the time. What's it feel like? Do they every calm down?" She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue quadruplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 64000>>
+		Oh wow! You're immense! I almost can't wrap my arms around it!" She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue quadruplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 48000>>
+		"Oh wow! You're gigantic! Are you sure you want to have surgery in this state? Things start to get complicated when you're this pregnant." She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue triplet-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 32000>>
+		"My word, are you sure you want to have surgery in this state? You're gigantic! Plus things start to get complicated when you're this pregnant." She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue twin-filled belly, enjoying the kicks from your children within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>crowded belly.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 16000>>
+		"My word, are you sure you want to have surgery in this state? You're giant!" She says as she uses both hands to massage your
+		<<if $PC.preg > 40>>overdue belly, enjoying the kicks from your child<<if $PC.pregType > 1>>ren<</if>> within. "If you go into labor, we have everything you'll need, so don't worry."
+		<<else>>belly, taking note of the extra occupants.
+		<</if>>
+		<br>
+	<<elseif $PC.belly >= 14000>>
+		"Wow, are you going to be ok? That looks really heavy." She says as she uses both hands to grope your massive belly, paying extra attention to your navel. "Are you sure you don't want to take a seat?"<br>
+	<<elseif $PC.belly >= 12000>>
+		"You're huge! Look at that adorable navel!" She says as she uses both hands to grope your huge belly, paying extra attention to your navel.<br>
+	<<elseif $PC.belly >= 10000>>
+		"Look how big you are!" she says as she uses both hands to grope your huge belly.<br>
+	<<elseif $PC.belly >= 7000>>
+		"You're getting so big!" she says as she uses both hands to massage your big pregnant belly.<br>
+	<<elseif $PC.belly >= 5000>>
+		"You're getting so big!" she says as she uses both hands to massage your pregnant belly.<br>
+	<<elseif $PC.belly >= 3000>>
+		"Looks like fun!" she says as she uses both hands to rub your pregnant belly.<br>
+	<<elseif $PC.belly >= 1500>>
+		"Awwww, you're getting soo big!" she says as she rubs your pregnant belly.<br>
+	<<elseif $PC.belly >= 500>>
+		"Awwww, you have a bun in the oven! That's so adorable; didn't think you the type." She says as she pats your rounded middle.<br>
+	<<elseif $PC.belly >= 300>>
+		"Awwww, you have a bun in the oven! That's so adorable; didn't think you the type," she says as she rubs your slightly rounded middle.<br>
+	<<elseif $PC.belly >= 100>>
+		"Awwww, you have a bun in the oven! That's so adorable; didn't think you the type." She says as she rubs your slightly swollen belly. No denying it now.<br>
 	<</if>>
-	<br>
-<<elseif $PC.belly >= 14000>>
-	"Wow, are you going to be ok? That looks really heavy." She says as she uses both hands to grope your massive belly, paying extra attention to your navel. "Are you sure you don't want to take a seat?"<br>
-<<elseif $PC.belly >= 12000>>
-	"You're huge! Look at that adorable navel!" She says as she uses both hands to grope your huge belly, paying extra attention to your navel.<br>
-<<elseif $PC.belly >= 10000>>
-	"Look how big you are!" she says as she uses both hands to grope your huge belly.<br>
-<<elseif $PC.belly >= 7000>>
-	"You're getting so big!" she says as she uses both hands to massage your big pregnant belly.<br>
-<<elseif $PC.belly >= 5000>>
-	"You're getting so big!" she says as she uses both hands to massage your pregnant belly.<br>
-<<elseif $PC.belly >= 3000>>
-	"Looks like fun!" she says as she uses both hands to rub your pregnant belly.<br>
-<<elseif $PC.belly >= 1500>>
-	"Awwww, you're getting soo big!" she says as she rubs your pregnant belly.<br>
-<<elseif $PC.belly >= 500>>
-	"Awwww, you have a bun in the oven! That's so adorable, didn't think you the type." She says as she pats your rounded middle.<br>
-<<elseif $PC.belly >= 300>>
-	"Awwww, you have a bun in the oven! That's so adorable, didn't think you the type," she says as she rubs your slightly rounded middle.<br>
-<<elseif $PC.belly >= 100>>
-	"Awwww, you have a bun in the oven! That's so adorable, didn't think you the type." She says as she rubs your slightly swollen belly. No denying it now.<br>
-<</if>>
 <<elseif $PC.belly >= 100 && $PC.preg < 1>>
 	She pinches your belly. "How about a tummy tuck? We can smooth this right out, cheaply too, @@.yellowgreen;<<print cashFormat(500)>>.@@" She lets your saggy middle flop back to its usual drooping state.
-	[[Firm up your stomach|PC Surgery Degradation][$PC.belly = 0, cashX(-500, "PCmedical"), $surgeryType = "tummyTuck"]]
+	[[Firm up your stomach|PC Surgery Degradation][$PC.belly = 0, cashX(forceNeg(500), "PCmedical"), $surgeryType = "tummyTuck"]]
 <</if>>
 
 <br><br>"How about a new butt?" She says as she wiggles her own at you. "Same prices as the breasts."<br>
 <<if $PC.butt > 2>>
 	<<if $PC.buttImplant == 1>>
 		You have an @@.orange;enormous, round, hard butt;@@ it is very obviously a pair of huge implants.
-		<br>//You can barely squeeze your rear into your clothes and are starting to get stuck in chairs; any bigger and it might seriously impede your ability to run your arcology.// | [[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "buttReductionImplant"]]
+		<br>//You can barely squeeze your rear into your clothes and are starting to get stuck in chairs; any bigger and it might seriously impede your ability to run your arcology.// | [[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttReductionImplant"]]
 	<<else>>
 		You have an @@.orange;enormous, jiggly butt.@@
-		<br>//You can barely squeeze your rear into your clothes and are starting to get stuck in chairs; any bigger and it might seriously impede your ability to run your arcology.// | [[Have fat removed|PC Surgery Degradation][$PC.butt = 2, cashX(-5000, "PCmedical"), $surgeryType = "buttShrinkage"]]
+		<br>//You can barely squeeze your rear into your clothes and are starting to get stuck in chairs; any bigger and it might seriously impede your ability to run your arcology.// | [[Have fat removed|PC Surgery Degradation][$PC.butt = 2, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttShrinkage"]]
 	<</if>>
 <<elseif $PC.butt == 2>>
 	<<if $PC.buttImplant == 1>>
 		You have a @@.orange;huge, round, firm butt;@@ it's easily identifiable as fake.
-		<br>[[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "buttReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.butt = 3, cashX(-10000, "PCmedical"), $surgeryType = "buttEnlargementImplant"]]
+		<br>[[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.butt = 3, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "buttEnlargementImplant"]]
 	<<else>>
 		You have a @@.orange;huge, soft butt.@@
-		<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 3, cashX(-15000, "PCmedical"), $surgeryType = "buttEnlargement"]] | [[Have fat removed|PC Surgery Degradation][$PC.butt = 1, cashX(-5000, "PCmedical"), $surgeryType = "buttShrinkage"]]
+		<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "buttEnlargement"]] | [[Have fat removed|PC Surgery Degradation][$PC.butt = 1, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttShrinkage"]]
 	<</if>>
 <<elseif $PC.butt == 1>>
 	<<if $PC.buttImplant == 1>>
 		You have a @@.orange;big firm butt;@@ anyone that feels it can tell it's fake, but at a glance you can't tell otherwise.
-		<br>[[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(-5000, "PCmedical"), $surgeryType = "buttReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.butt = 2, cashX(-10000, "PCmedical"), $surgeryType = "buttEnlargementImplant"]]
+		<br>[[Have your implants removed|PC Surgery Degradation][$PC.butt = 0, $PC.buttImplant = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttReductionImplant"]] | [[Get the next size up|PC Surgery Degradation][$PC.butt = 2, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "buttEnlargementImplant"]]
 	<<else>>
 		You have a @@.orange;big butt.@@
-		<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 2, cashX(-15000, "PCmedical"), $surgeryType = "buttEnlargement"]] | [[Have fat removed|PC Surgery Degradation][$PC.butt = 0, cashX(-5000, "PCmedical"), $surgeryType = "buttShrinkage"]]
+		<br>[[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "buttEnlargement"]] | [[Have fat removed|PC Surgery Degradation][$PC.butt = 0, cashX(forceNeg(5000), "PCmedical"), $surgeryType = "buttShrinkage"]]
 	<</if>>
 <<else>>
 	You have a @@.orange;cute, but normal butt.@@ At your request, fat could be added until you have a healthy rear; alternatively, a pair of implants could be inserted instead.
-	<br>[[Get a pair of butt implants|PC Surgery Degradation][$PC.butt = 1, $PC.buttImplant = 1, cashX(-10000, "PCmedical"), $surgeryType = "buttEnlargementImplant"]] | [[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 1, cashX(-15000, "PCmedical"), $surgeryType = "buttEnlargement"]]
+	<br>[[Get a pair of butt implants|PC Surgery Degradation][$PC.butt = 1, $PC.buttImplant = 1, cashX(forceNeg(10000), "PCmedical"), $surgeryType = "buttEnlargementImplant"]] | [[Add additional fatty tissue|PC Surgery Degradation][$PC.butt = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "buttEnlargement"]]
 <</if>>
 
 <<if $PC.dick == 1>>
-<br><br>"We could add gel around your testes to make your balls look bigger. Would also dampen any impacts to them as well, if that is anything to consider." She says, running a finger down the length of your shaft. "@@.yellowgreen;<<print cashFormat(7500)>>@@ for draining and @@.yellowgreen;<<print cashFormat(15000)>>@@ for filling, it's not the most simple procedure, you know? Anyway, they'll be very obvious, if that turns you on."
-<<if $AGrowth == 2>>
-	She takes another look at you before offering another option "of course, if you want bigger balls in a <i>functional</i> sense, we can do that too. The doctor's research in advanced targeted growth hormones has shown promising results in slaves, and he's been able to use them successfully on a few citizen patients so far. A direct injection of hormone gel, and your testes and prostate will grow on their own. Unlike the cosmetic gel, there's no reversing this treatment. It's expensive too, for the high quality drugs you want, @@.yellowgreen;<<print cashFormat(15000)>>@@ for one round of therapy. It'll cost @@.yellowgreen;<<print cashFormat(20000)>>@@ if you want hormone treatment and a gel adjustment at the same time.<br>
-<<else>>
-	She takes another look at you before continuing. "Of course, you seem like the type that might want bigger balls in a <i>functional</i> sense. The doctor's been working on a treatment using advanced targeted growth hormones, but it isn't quite ready yet. Might be something to keep in mind before you decide on a gel injection."<br>
-<</if>>
-<<if $PC.balls > 2 && $PC.ballsImplant > 3>>
-	You have a @@.orange;monstrous, massive pair of balls@@ roughly the size of small watermelons; it's impossible to sit normally so you've had to buy special chairs, you've given up on wearing pants, and they're so obvious that people probably assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them, and you love it.
-	<br>//You have trouble moving around and need special furniture thanks to your over-sized nuts, even bringing your legs together is a pain; you can hardly even walk anymore. It might be worth getting rid of the cosmetic gel.// | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 3, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
-<<elseif $PC.balls == 2 && $PC.ballsImplant == 3>>
-	You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and they're so obvious that people probably assume they're fake, but every slave you fuck gets a swollen belly from all the cum you pump into them, and you love it.
-	<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 3, $PC.ballsImplant = 4, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 3, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
-<<elseif $PC.balls == 1 && $PC.ballsImplant == 2>>
-	You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time.
-	<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 2, $PC.ballsImplant = 3, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
-<<elseif $PC.balls > 2 && $PC.ballsImplant > 2>>
-	You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and your all-natural balls are so obvious they attract a lot of attention, but every slave you fuck gets a distended belly from all the cum you pump into them, and you love it.
-	<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 4, $PC.balls = 3, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
-<<elseif $PC.balls == 2 && $PC.ballsImplant == 2>>
-	You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time but every slave you fuck gets a swollen belly from all the cum you pump into them, and you love it.
-	<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 3, $PC.ballsImplant = 3, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
-<<elseif $PC.balls == 1 && $PC.ballsImplant == 1>>
-	You have a @@.orange;large pair of balls;@@ you can certainly feel them as you move.
-	<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 2, $PC.ballsImplant = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
-<<elseif $PC.balls == 0 && $AGrowth == 2>>
-	<<if $PC.ballsImplant > 2>>
-		You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone can tell they are fake, but every slave you fuck gets a distinct slap with each thrust and you love it.
-		<br>//Getting growth hormones is going to require reducing the amount of cosmetic gel you already have. // | [[Have some gel extracted and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(-20000, "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Completely remove gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(-20000, "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]]
-	<<elseif $PC.ballsImplant == 2>>
-		You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time.
-		<br>//Getting growth hormones is going to require reducing the amount of cosmetic gel you already have. // | [[Have some gel extracted and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(-20000, "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Completely remove gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(-20000, "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]] | [[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
-	<<elseif $PC.ballsImplant == 1>>
-		You have a @@.orange;large pair of balls;@@ you can certainly feel them as you move.
-		<br>[[Remove the gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(-20000, "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get hormone treatment|PC Surgery Degradation][$PC.balls = 1, $PC.ballsImplant = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 0, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]] | [[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
+	<br><br>"We could add gel around your testes to make your balls look bigger. Would also dampen any impacts to them as well, if that is anything to consider." She says, running a finger down the length of your shaft. "@@.yellowgreen;<<print cashFormat(7500)>>@@ for draining and @@.yellowgreen;<<print cashFormat(15000)>>@@ for filling, it's not the most simple procedure, you know? Anyway, they'll be very obvious, if that turns you on."
+	<<if $AGrowth == 2>>
+		She takes another look at you before offering another option. "Of course, if you want bigger balls in a <i>functional</i> sense, we can do that too. The doctor's research in advanced targeted growth hormones has shown promising results in slaves, and he's been able to use them successfully on a few citizen patients so far. A direct injection of hormone gel, and your testes and prostate will grow on their own. Unlike the cosmetic gel, there's no reversing this treatment. It's expensive too, for the high quality drugs you want; @@.yellowgreen;<<print cashFormat(15000)>>@@ for one round of therapy. It'll cost @@.yellowgreen;<<print cashFormat(20000)>>@@ if you want hormone treatment and a gel adjustment at the same time.<br>
 	<<else>>
-		You have a @@.orange;normal, uneventful pair of balls.@@
-		<br>[[Get hormone treatment|PC Surgery Degradation][$PC.balls = 1, $PC.ballsImplant = 1, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have the gel added|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
+		She takes another look at you before continuing. "Of course, you seem like the type that might want bigger balls in a <i>functional</i> sense. The doctor's been working on a treatment using advanced targeted growth hormones, but it isn't quite ready yet. Might be something to keep in mind before you decide on a gel injection."<br>
 	<</if>>
-<<else>>
-	<<if $PC.ballsImplant > 2>>
-		You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone can tell they are fake, but every slave you fuck gets a distinct slap with each thrust and you love it.
-		<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]]
-	<<elseif $PC.ballsImplant == 2>>
+	<<if $PC.balls > 2 && $PC.ballsImplant > 3>>
+		You have a @@.orange;monstrous, massive pair of balls@@ roughly the size of small watermelons; it's impossible to sit normally, so you've had to buy special chairs, you've given up on wearing pants, and they're so obvious that people probably assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them, and you love it.
+		<br>//You have trouble moving around and need special furniture thanks to your over-sized nuts, even bringing your legs together is a pain; you can hardly even walk anymore. It might be worth getting rid of the cosmetic gel.// | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 3, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
+	<<elseif $PC.balls == 2 && $PC.ballsImplant == 3>>
+		You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and they're so obvious that people probably assume they're fake, but every slave you fuck gets a swollen belly from all the cum you pump into them, and you love it.
+		<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 3, $PC.ballsImplant = 4, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 3, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
+	<<elseif $PC.balls == 1 && $PC.ballsImplant == 2>>
 		You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time.
-		<br>[[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 3, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]]
-	<<elseif $PC.ballsImplant == 1>>
+		<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 2, $PC.ballsImplant = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkageHorm"]]
+	<<elseif $PC.balls > 2 && $PC.ballsImplant > 2>>
+		You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and your all-natural balls are so obvious they attract a lot of attention, but every slave you fuck gets a distended belly from all the cum you pump into them, and you love it.
+		<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 4, $PC.balls = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+	<<elseif $PC.balls == 2 && $PC.ballsImplant == 2>>
+		You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time but every slave you fuck gets a swollen belly from all the cum you pump into them, and you love it.
+		<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 3, $PC.ballsImplant = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 3, $PC.balls = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+	<<elseif $PC.balls == 1 && $PC.ballsImplant == 1>>
 		You have a @@.orange;large pair of balls;@@ you can certainly feel them as you move.
-		<br>[[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 0, cashX(-7500, "PCmedical"), $surgeryType = "ballShrinkage"]]
+		<br>[[Get another round of growth hormones|PC Surgery Degradation][$PC.balls = 2, $PC.ballsImplant = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have gel added|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+	<<elseif $PC.balls == 0 && $AGrowth == 2>>
+		<<if $PC.ballsImplant > 2>>
+			You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone can tell they are fake, but every slave you fuck gets a distinct slap with each thrust and you love it.
+			<br>//Getting growth hormones is going to require reducing the amount of cosmetic gel you already have. // | [[Have some gel extracted and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(forceNeg(20000), "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Completely remove gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(forceNeg(20000), "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]]
+		<<elseif $PC.ballsImplant == 2>>
+			You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time.
+			<br>//Getting growth hormones is going to require reducing the amount of cosmetic gel you already have. // | [[Have some gel extracted and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 2, $PC.balls = 1, cashX(forceNeg(20000), "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Completely remove gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(forceNeg(20000), "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]] | [[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+		<<elseif $PC.ballsImplant == 1>>
+			You have a @@.orange;large pair of balls;@@ you can certainly feel them as you move.
+			<br>[[Remove the gel and get hormone treatment|PC Surgery Degradation][$PC.ballsImplant = 1, $PC.balls = 1, cashX(forceNeg(20000), "PCmedical"), $surgeryType = "ballBigShrinkage"]] | [[Just get hormone treatment|PC Surgery Degradation][$PC.balls = 1, $PC.ballsImplant = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Just get gel extracted|PC Surgery Degradation][$PC.ballsImplant = 0, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]] | [[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+		<<else>>
+			You have a @@.orange;normal, uneventful pair of balls.@@
+			<br>[[Get hormone treatment|PC Surgery Degradation][$PC.balls = 1, $PC.ballsImplant = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargementHorm"]] | [[Have the gel added|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+		<</if>>
 	<<else>>
-		You have a @@.orange;normal, uneventful pair of balls.@@
-		<br>[[Have the gel added|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(-15000, "PCmedical"), $surgeryType = "ballEnlargement"]]
+		<<if $PC.ballsImplant > 2>>
+			You have an @@.orange;enormous, heavy pair of balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone can tell they are fake, but every slave you fuck gets a distinct slap with each thrust and you love it.
+			<br>//You're beginning to have trouble moving around and using furniture thanks to your over-sized nuts, even bringing your legs together is a pain; any bigger and they might seriously impede your ability to run your arcology, or walk, for that matter.// | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]]
+		<<elseif $PC.ballsImplant == 2>>
+			You have a @@.orange;huge pair of balls@@ roughly the size of softballs; they make quite a bulge in your clothes and dangle heavily any other time.
+			<br>[[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 3, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]]
+		<<elseif $PC.ballsImplant == 1>>
+			You have a @@.orange;large pair of balls;@@ you can certainly feel them as you move.
+			<br>[[Have more gel added|PC Surgery Degradation][$PC.ballsImplant = 2, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]] | [[Have gel extracted|PC Surgery Degradation][$PC.ballsImplant = 0, cashX(forceNeg(7500), "PCmedical"), $surgeryType = "ballShrinkage"]]
+		<<else>>
+			You have a @@.orange;normal, uneventful pair of balls.@@
+			<br>[[Have the gel added|PC Surgery Degradation][$PC.ballsImplant = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "ballEnlargement"]]
+		<</if>>
 	<</if>>
 <</if>>
-<</if>>
 
 <<if $PC.vagina == 1 && $PC.newVag == 0 && ($PC.births > 2 || $PC.career == "servant" || $PC.career == "escort")>>
-<br><br>
-"Looking a little loose down there, I can fix that for you. Get you nice and tight again. Oh, and our pussies are guaranteed to not lose their tightness or your money back! @@.yellowgreen;<<print cashFormat(15000)>>@@ for a brand new vagina."
-<br>
-[[Get a tighter vagina|PC Surgery Degradation][$PC.newVag = 1, cashX(-15000, "PCmedical"), $surgeryType = "tightPussy"]]
+	<br><br>
+	"Looking a little loose down there, I can fix that for you. Get you nice and tight again. Oh, and our pussies are guaranteed to not lose their tightness or your money back! @@.yellowgreen;<<print cashFormat(15000)>>@@ for a brand new vagina."
+	<br>
+	[[Get a tighter vagina|PC Surgery Degradation][$PC.newVag = 1, cashX(forceNeg(15000), "PCmedical"), $surgeryType = "tightPussy"]]
 <</if>>
 
 <<if $PC.preg == -2 && $PC.physicalAge < 70>>
 	<br><br>
 	Now we can only do this so many times before your body just can't handle it, but if you absolutely must have a child with your, um, vintage, then we can do something for you. For @@.yellowgreen;<<print cashFormat(50000)>>,@@ we can clone and replace your depleted ovaries with slightly younger ones. They'll get you a couple more years of ovulation before they dry up too, but if you're desperate for a child, they may be your last option.
-	[[Regenerate your ovaries and cheat menopause for a couple more years|PC Surgery Degradation][$PC.ovaryAge = 53, $PC.preg = 0, cashX(-50000, "PCmedical"), $surgeryType = "ovulationRestart"]]
+	[[Regenerate your ovaries and cheat menopause for a couple more years|PC Surgery Degradation][$PC.ovaryAge = 53, $PC.preg = 0, cashX(forceNeg(50000), "PCmedical"), $surgeryType = "ovulationRestart"]]
 <</if>>
 
 <br><br>
-"Now, if what you are looking for is sex reassignment surgery, that's going to be more complicated. Personally I think you are fine the way you are, but if you insist on paying me, I won't say no to it. We'll need to take a DNA sample to clone the required organs, and that will take some time to complete, so tell me early if this is what you really want. I've had a few patients seeking a working set of both sexes, so if that gets you off, it is an option. As for prices, @@.yellowgreen;<<print cashFormat(50000)>>@@ for a sex swap, @@.yellowgreen;<<print cashFormat(150000)>>@@ to be a fully functional herm, oh and @@.red;breasts are not included unless you undergo a full body remodeling.@@ You'll have to set up another appointment for that, however. Oh, and I guess @@.yellowgreen;<<print cashFormat(25000)>>@@ is fair for having a sex organ removed, if you have both. It's a very invasive procedure, as we will be near completely remodeling your body. I assure you, we do such fantastic work that no one will know you weren't naturally born that way! Oh, and due to the extent of the surgery, we will not perform the procedure if you are pregnant, please clean yourself out before you arrive."
+"Now, if what you are looking for is sex reassignment surgery, that's going to be more complicated. Personally I think you are fine the way you are, but if you insist on paying me, I won't say no to it. We'll need to take a DNA sample to clone the required organs, and that will take some time to complete, so tell me early if this is what you really want. I've had a few patients seeking a working set of both sexes, so if that gets you off, it is an option. As for prices, @@.yellowgreen;<<print cashFormat(50000)>>@@ for a sex swap, @@.yellowgreen;<<print cashFormat(150000)>>@@ to be a fully functional herm, oh and @@.red;breasts are not included unless you undergo a full body remodeling.@@ You'll have to set up another appointment for that, however. Oh, and I guess @@.yellowgreen;<<print cashFormat(25000)>>@@ is fair for having a sex organ removed, if you have both. It's a very invasive procedure, as we will be near completely remodeling your body. I assure you, we do such fantastic work that no one will know you weren't naturally born that way! Oh, and due to the extent of the surgery, we will not perform the procedure if you are pregnant; please clean yourself out before you arrive."
 <br>
 <<if $PC.preg > 0>>
 	She pokes your belly. "You're pregnant. What did I tell you?"
@@ -367,30 +367,30 @@ You have @@.orange;$PC.skin skin.@@<<if $PC.skin != $PC.origSkin>> Your original
 	<<if $PC.dick == 1 && $PC.vagina == 1>>
 		You have working @@.orange;male and female reproductive organs@@ and a @@.orange;<<if $PC.title > 0>>masculine<<else>>feminine<</if>> appearance.@@ "We'll store some of your sperm for you, should you decide to lose your maleness, and have it shipped to your arcology. Who you decide to use it on, well... That's up to you!"
 		<br>
-		[[Remove your male half|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, cashX(-25000, "PCmedical"), $surgeryType = "herm2female"]] |
-		[[Remove your female half|PC Surgery Degradation][$PC.vagina = 0, $PC.preg = 0, WombFlush($PC), cashX(-25000, "PCmedical"), $surgeryType = "herm2male"]]
+		[[Remove your male half|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2female"]] |
+		[[Remove your female half|PC Surgery Degradation][$PC.vagina = 0, $PC.preg = 0, WombFlush($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2male"]]
 		<<if $PC.title > 0>>
-			| [[Remove your male half completely|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, $PC.title = 0, generatePlayerPronouns($PC), cashX(-25000, "PCmedical"), $surgeryType = "herm2truefemale"]]
+			| [[Remove your male half completely|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2truefemale"]]
 		<<else>>
-			| [[Remove your female half completely|PC Surgery Degradation][$PC.vagina = 0, $PC.preg = 0, WombFlush($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, $PC.title = 1, generatePlayerPronouns($PC), cashX(-25000, "PCmedical"), $surgeryType = "herm2truemale"]]
+			| [[Remove your female half completely|PC Surgery Degradation][$PC.vagina = 0, $PC.preg = 0, WombFlush($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, $PC.title = 1, generatePlayerPronouns($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2truemale"]]
 		<</if>>
 	<<elseif $PC.dick == 1>>
 		You have @@.orange;male genitalia@@ and a @@.orange;<<if $PC.title > 0>>masculine<<else>>feminine<</if>> appearance.@@ "We'll store some of your sperm for you, should you decide to lose your maleness, and have it shipped to your arcology. Who you decide to use it on, well... That's up to you!"
 		<br>
-		[[Have your male organs replaced with female ones|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.vagina = 1, $PC.newVag = 1, cashX(-50000, "PCmedical"), $surgeryType = "male2female"]] |
-		[[Add a female reproductive tract|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, WombFlush($PC), cashX(-150000, "PCmedical"), $surgeryType = "male2herm"]]
+		[[Have your male organs replaced with female ones|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.vagina = 1, $PC.newVag = 1, cashX(forceNeg(50000), "PCmedical"), $surgeryType = "male2female"]] |
+		[[Add a female reproductive tract|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, WombFlush($PC), cashX(forceNeg(150000), "PCmedical"), $surgeryType = "male2herm"]]
 		<<if $PC.title > 0>>
-			| [[Become a woman|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, $PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, $PC.title = 0, generatePlayerPronouns($PC), cashX(-50000, "PCmedical"), $surgeryType = "male2truefemale"]]
-			| [[Become a hermaphrodite girl|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, WombFlush($PC), $PC.title = 0, generatePlayerPronouns($PC), cashX(-150000, "PCmedical"), $surgeryType = "male2hermfemale"]]
+			| [[Become a woman|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 0, $PC.storedCum += 10, $PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(50000), "PCmedical"), $surgeryType = "male2truefemale"]]
+			| [[Become a hermaphrodite girl|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.preg = 0, WombFlush($PC), $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(150000), "PCmedical"), $surgeryType = "male2hermfemale"]]
 		<</if>>
 	<<else>>
 		You have @@.orange;female genitalia@@ and a @@.orange;<<if $PC.title > 0>>masculine<<else>>feminine<</if>> appearance.@@
 		<br>
-		[[Have your female organs replaced with male ones|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.vagina = 0, cashX(-50000, "PCmedical"), $surgeryType = "female2male"]] |
-		[[Add a male reproductive tract|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, cashX(-150000, "PCmedical"), $surgeryType = "female2herm"]]
+		[[Have your female organs replaced with male ones|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.vagina = 0, cashX(forceNeg(50000), "PCmedical"), $surgeryType = "female2male"]] |
+		[[Add a male reproductive tract|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, cashX(forceNeg(150000), "PCmedical"), $surgeryType = "female2herm"]]
 		<<if $PC.title == 0>>
-			| [[Become a man|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.vagina = 0, $PC.preg = 0, WombFlush($PC), $PC.title = 1, generatePlayerPronouns($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(-50000, "PCmedical"), $surgeryType = "female2truemale"]]
-			| [[Become a hermaphrodite boy|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.title = 1, generatePlayerPronouns($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(-150000, "PCmedical"), $surgeryType = "female2hermmale"]]
+			| [[Become a man|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.vagina = 0, $PC.preg = 0, WombFlush($PC), $PC.title = 1, generatePlayerPronouns($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(forceNeg(50000), "PCmedical"), $surgeryType = "female2truemale"]]
+			| [[Become a hermaphrodite boy|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.dick = 1, $PC.title = 1, generatePlayerPronouns($PC), $PC.boobs = 0, $PC.boobsBonus = 0, $PC.boobsImplant = 0, cashX(forceNeg(150000), "PCmedical"), $surgeryType = "female2hermmale"]]
 		<</if>>
 	<</if>>
 <</if>>
diff --git a/src/pregmod/eliteSlave.tw b/src/pregmod/eliteSlave.tw
index 638c5003cab004e3135568e9ba1dbe1c6c545590..85428f3fc3f6c2fdb481197d4692bff1fe707d91 100644
--- a/src/pregmod/eliteSlave.tw
+++ b/src/pregmod/eliteSlave.tw
@@ -26,7 +26,7 @@ You check to see if any potential breeding slaves are on auction. <<if $eliteAuc
 	<<set _races = _races.delete($arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was purchased from a member of the Elite.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.prestige = 1>>
diff --git a/src/pregmod/eliteTakeOverResult.tw b/src/pregmod/eliteTakeOverResult.tw
index 13fd792c24261ed16402ba5c9ff0d2b40e864a31..825eb7dac4e824f2af613d4ef343f6b5f13d11d4 100644
--- a/src/pregmod/eliteTakeOverResult.tw
+++ b/src/pregmod/eliteTakeOverResult.tw
@@ -127,13 +127,13 @@
 			<<set $fixedRace = _races.random()>>
 		<</if>>
 		<<if $seeDicks == 0>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<elseif $seeDicks == 100>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<else>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 		<</if>>
 		<<set _origin = "She was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
 		<<set $activeSlave.origin = _origin>>
@@ -171,13 +171,13 @@
 			<<set $fixedRace = _races.random()>>
 		<</if>>
 		<<if $seeDicks == 0>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<elseif $seeDicks == 100>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<else>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 		<</if>>
 		<<set _origin = "She was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
 		<<set $activeSlave.origin = _origin>>
diff --git a/src/pregmod/fMarry.tw b/src/pregmod/fMarry.tw
index 1465fe709dac399a592597cee2e92a35f7952b9a..707e6b680d6847dbe53e968987a981c7e8a74fad 100644
--- a/src/pregmod/fMarry.tw
+++ b/src/pregmod/fMarry.tw
@@ -63,25 +63,25 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 		"Thank you, <<Master>>. I am going to do my be<<s>>t to be a
 		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60)>>
 			<<if ($activeSlave.fetish == "submissive")>>
-			perfect <<s>>ubmi<<ss>>ive wife to you,
+				perfect <<s>>ubmi<<ss>>ive wife to you,
 			<<elseif ($activeSlave.fetish == "cumslut")>>
-			perfect oral wifey,
+				perfect oral wifey,
 			<<elseif ($activeSlave.fetish == "humiliation")>>
-			hot wife for you,
+				hot wife for you,
 			<<elseif ($activeSlave.fetish == "buttslut")>>
-			perfect little anal wifey,
+				perfect little anal wifey,
 			<<elseif ($activeSlave.fetish == "boobs")>>
-			<<if $activeSlave.boobs > 800>>perfect big-boobed<<else>>perfect-boobed<</if>> wife
+				<<if $activeSlave.boobs > 800>>perfect big-boobed<<else>>perfect-boobed<</if>> wife
 			<<elseif ($activeSlave.fetish == "pregnancy")>>
-			perfect barefoot breeding wife,
+				perfect barefoot breeding wife,
 			<<elseif ($activeSlave.fetish == "dom")>>
-			perfect, you know, <<sh>>aring wife with other <<s>>lave<<s>>,
+				perfect, you know, <<sh>>aring wife with other <<s>>lave<<s>>,
 			<<elseif ($activeSlave.fetish == "sadist")>>
-			perfect wife to u<<s>>e on other <<s>>lave<<s>>,
+				perfect wife to u<<s>>e on other <<s>>lave<<s>>,
 			<<elseif ($activeSlave.fetish == "masochist")>>
-			good, beaten wife,
+				good, beaten wife,
 			<<else>>
-			good wife,
+				good wife,
 			<</if>>
 		<<else>>
 			good wife,
@@ -128,15 +128,15 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 		$He <<say>>s, "Plea<<s>>e <<Master>>, I don't want to
 		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60)>>
 			<<if ($activeSlave.fetish == "submissive")>>
-			be your little <<s>>ubmi<<ss>>ive fucktoy,
+				be your little <<s>>ubmi<<ss>>ive fucktoy,
 			<<elseif ($activeSlave.fetish == "cumslut")>>
-			be your cum <<s>>ucker,
+				be your cum <<s>>ucker,
 			<<elseif ($activeSlave.fetish == "humiliation")>>
-			be <<s>>tripped bare and <<sh>>own off,
+				be <<s>>tripped bare and <<sh>>own off,
 			<<elseif ($activeSlave.fetish == "buttslut")>>
-			have thing<<s>> <<sh>>oved up my butt,
+				have thing<<s>> <<sh>>oved up my butt,
 			<<elseif ($activeSlave.fetish == "boobs")>>
-			have my tit<<s>> tea<<s>>ed every night,
+				have my tit<<s>> tea<<s>>ed every night,
 			<<elseif ($activeSlave.fetish == "pregnancy")>>
 				<<if canGetPregnant($activeSlave)>>
 					get knocked up by you,
@@ -144,13 +144,13 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 					be your pregnant toy,
 				<</if>>
 			<<elseif ($activeSlave.fetish == "dom")>>
-			have to rule your <<s>>i<<ss>>y dick,
+				have to rule your <<s>>i<<ss>>y dick,
 			<<elseif ($activeSlave.fetish == "sadist")>>
-			<<s>>pank your a<<ss>>,
+				<<s>>pank your a<<ss>>,
 			<<elseif ($activeSlave.fetish == "masochist")>>
-			get beaten by you,
+				get beaten by you,
 			<<else>>
-			<<s>>tay in your ni<<c>>e room,
+				<<s>>tay in your ni<<c>>e room,
 			<</if>>
 		<<else>>
 			<<s>>tay in your ni<<c>>e room,
@@ -532,25 +532,25 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 		$His slave dick is hidden by its chastity cage.
 	<<elseif canAchieveErection($activeSlave)>>
 		<<if ($activeSlave.dick > 4) && ($activeSlave.belly >= 5000)>>
-		$He's hugely erect, with $his lacy g-string only serving to hold $his dick agonizingly pressed against the bottom of $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnant <</if>>belly.
+			$He's hugely erect, with $his lacy g-string only serving to hold $his dick agonizingly pressed against the bottom of $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnant <</if>>belly.
 		<<elseif $activeSlave.dick > 4>>
-		$He's hugely erect, with $his lacy g-string only serving to hold $his dick upright along $his belly.
+			$He's hugely erect, with $his lacy g-string only serving to hold $his dick upright along $his belly.
 		<<else>>
-		$His erection tents the front of $his lacy g-string.
+			$His erection tents the front of $his lacy g-string.
 		<</if>>
 	<<elseif ($activeSlave.dick > 0)>>
 		<<if $activeSlave.dick > 10>>
-		$His huge soft cock is allowed to dangle freely as no g-string could hope to contain it.
+			$His huge soft cock is allowed to dangle freely as no g-string could hope to contain it.
 		<<elseif $activeSlave.dick > 4>>
-		$His big soft cock forms a lewd mass, stuffed into $his lacy g-string.
+			$His big soft cock forms a lewd mass, stuffed into $his lacy g-string.
 		<<else>>
-		$His lacy g-string perfectly conceals $his soft dick.
+			$His lacy g-string perfectly conceals $his soft dick.
 		<</if>>
 	<<else>>
 		<<if $activeSlave.clit > 1>>
-		$His huge clit is quite hard, making $his shift uncomfortably as $his lacy g-string stimulates it.
+			$His huge clit is quite hard, making $his shift uncomfortably as $his lacy g-string stimulates it.
 		<<else>>
-		$His lacy g-string is starting to look a bit moist in front.
+			$His lacy g-string is starting to look a bit moist in front.
 		<</if>>
 	<</if>>
 	<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> marries $him to you in a brief ceremony adapted for slaves and their owners. You place a
@@ -605,25 +605,25 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 		"Done," _heA says when you climax. "Enjoy your
 		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60)>>
 			<<if ($activeSlave.fetish == "submissive")>>
-			submissive slave wife!"
+				submissive slave wife!"
 			<<elseif ($activeSlave.fetish == "cumslut")>>
-			slave wife's mouth!"
+				slave wife's mouth!"
 			<<elseif ($activeSlave.fetish == "humiliation")>>
-			exhibitionist slave wife!"
+				exhibitionist slave wife!"
 			<<elseif ($activeSlave.fetish == "buttslut")>>
-			slave wife's butthole!"
+				slave wife's butthole!"
 			<<elseif ($activeSlave.fetish == "boobs")>>
-			slave wife's boobs!"
+				slave wife's boobs!"
 			<<elseif ($activeSlave.fetish == "pregnancy")>>
-			breeder wife!"
+				breeder wife!"
 			<<elseif ($activeSlave.fetish == "dom")>>
-			slave wife's aggression!"
+				slave wife's aggression!"
 			<<elseif ($activeSlave.fetish == "sadist")>>
-			slave wife's sadistic tendencies!"
+				slave wife's sadistic tendencies!"
 			<<elseif ($activeSlave.fetish == "masochist")>>
-			slave wife's pain!"
+				slave wife's pain!"
 			<<else>>
-			slave wife!"
+				slave wife!"
 			<</if>>
 		<<else>>
 			slave wife!"
@@ -715,7 +715,7 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 <<if $cash > 10000>>
 	<<if $weddingPlanned > 0>>
 		<<if $weddingPlanned == 1>>
-			<br>Invite prominent citizens to a wedding (This will cost <<print cashFormat(10000)>>):
+			<br>Invite prominent citizens to a wedding:
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
 			<<link "Straightforward ceremony">>
 				<<replace "#result">>
@@ -724,7 +724,7 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 				<<set $marrying.push($activeSlave.ID)>>
 				<<run cashX(-10000, "event", $activeSlave)>>
 				<</replace>>
-			<</link>>
+			<</link>> //This will cost <<print cashFormat(10000)>>//
 		<<else>>
 			<br>
 			&nbsp;&nbsp;&nbsp;&nbsp;
@@ -746,7 +746,7 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 					<<set $marrying.push($activeSlave.ID)>>
 					<<run cashX(-10000, "event", $activeSlave)>>
 					<</replace>>
-				<</link>> //This will involve the slave having sex with a very large number of citizens//
+				<</link>> //This will involve the slave having sex with a very large number of citizens, and will cost <<print cashFormat(10000)>>//
 			<<else>>
 				<br>
 				&nbsp;&nbsp;&nbsp;&nbsp;
@@ -769,7 +769,7 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 					<<set $marrying.push($activeSlave.ID)>>
 					<<run cashX(-10000, "event", $activeSlave)>>
 					<</replace>>
-				<</link>> //This will involve you impregnating the slave//
+				<</link>> //This will involve you impregnating the slave, and will cost <<print cashFormat(10000)>>//
 				<br>
 			<<else>>
 				<br>
@@ -784,7 +784,7 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 			<</if>>
 		<</if>>
 	<<else>>
-		<br>Invite prominent citizens to a wedding (This will cost <<print cashFormat(10000)>>):
+		<br>Invite prominent citizens to a wedding:
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
 		<<link "Straightforward ceremony">>
 			<<replace "#result">>
@@ -793,28 +793,28 @@ You tell $activeSlave.slaveName that you're going to marry $him. (A proposal, of
 			<<set $marrying.push($activeSlave.ID)>>
 			<<run cashX(-10000, "event", $activeSlave)>>
 			<</replace>>
-			<</link>>
+		<</link>> //This will cost <<print cashFormat(10000)>>//
 		<<if ($activeSlave.vagina != 0) && ($activeSlave.anus != 0)>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-		<<link "Orgiastic ceremony">>
-			<<replace "#result">>
-			You order $assistantName to invite deserving citizens to an orgiastic ceremony for a slave being married to a slaveowner, and to make the arrangements. The wedding orgy will take place during the upcoming week.
-			<<set $weddingPlanned = 2>>
-			<<set $marrying.push($activeSlave.ID)>>
-			<<run cashX(-10000, "event", $activeSlave)>>
-			<</replace>>
-			<</link>> //This will involve the slave having sex with a very large number of citizens//
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;
+			<<link "Orgiastic ceremony">>
+				<<replace "#result">>
+				You order $assistantName to invite deserving citizens to an orgiastic ceremony for a slave being married to a slaveowner, and to make the arrangements. The wedding orgy will take place during the upcoming week.
+				<<set $weddingPlanned = 2>>
+				<<set $marrying.push($activeSlave.ID)>>
+				<<run cashX(-10000, "event", $activeSlave)>>
+				<</replace>>
+			<</link>> //This will involve the slave having sex with a very large number of citizens, and will cost <<print cashFormat(10000)>>//
 		<</if>>
 		<<if isFertile($activeSlave) && ($PC.dick == 1)>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-		<<link "Impregnation ceremony">>
-			<<replace "#result">>
-			You order $assistantName to invite deserving citizens to a ceremony for a fertile slave being married to a slaveowner, and to make the arrangements. The wedding will take place during the upcoming week.
-			<<set $weddingPlanned = 3>>
-			<<set $marrying.push($activeSlave.ID)>>
-			<<run cashX(-10000, "event", $activeSlave)>>
-			<</replace>>
-			<</link>> //This will involve you impregnating the slave//
+			<br>&nbsp;&nbsp;&nbsp;&nbsp;
+			<<link "Impregnation ceremony">>
+				<<replace "#result">>
+				You order $assistantName to invite deserving citizens to a ceremony for a fertile slave being married to a slaveowner, and to make the arrangements. The wedding will take place during the upcoming week.
+				<<set $weddingPlanned = 3>>
+				<<set $marrying.push($activeSlave.ID)>>
+				<<run cashX(-10000, "event", $activeSlave)>>
+				<</replace>>
+			<</link>> //This will involve you impregnating the slave, and will cost <<print cashFormat(10000)>>//
 		<</if>>
 	<</if>>
 <<else>>
diff --git a/src/pregmod/hotswapprosthetics.tw b/src/pregmod/hotswapprosthetics.tw
deleted file mode 100644
index 638b62ea01229c4b69f54f1847089f67e183cc25..0000000000000000000000000000000000000000
--- a/src/pregmod/hotswapprosthetics.tw
+++ /dev/null
@@ -1,130 +0,0 @@
-:: Hotswap Prosthetics [nobr]
-
-<<set $activeLimbs = $limbs.find(function(s) { return s.ID == $activeSlave.ID; })>>
-<<if $activeSlave.amp < 0>>
-	<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-	<<set _oldLimbs.type = $activeSlave.amp, _oldLimbs.armsTat = $activeSlave.armsTat, _oldLimbs.legsTat = $activeSlave.legsTat>>
-<<else>>
-	<<unset _oldLimbs>>
-<</if>>
-<<set _readyLimbs = []>>
-<<for _hsp = 0; _hsp < $activeSlave.readyLimbs.length; _hsp++>>
-	<<set _readyLimbs.push($activeSlave.readyLimbs[_hsp].type)>>
-<</for>>
-
-	__Swap out $his prosthetics__:
-	<<if $activeSlave.amp < 0>>
-		<<link "Remove current prostheses">>
-			<<set $activeSlave.amp = 1, $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1, _oldLimbs)>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>> |
-	<</if>>
-
-	<<if $activeSlave.amp == -1>>
-		<strong>Basic P-limbs equipped</strong>
-	<<elseif _readyLimbs.includes(-1)>>
-		<<link "A basic set">>
-			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -1; })>>
-			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
-			<<set $activeSlave.amp = -1, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1)>>
-			<<if def _oldLimbs>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>>
-	<<elseif (def $activeLimbs) && $activeLimbs.type == "simple" && $activeSlave.ID == $activeLimbs.ID>>
-		//Basic P-limbs being built
-	<<else>>
-		//Basic prostheses unavailable
-	<</if>>|
-
-	<<if $activeSlave.amp == -2>>
-		<strong>Sex focused P-limbs equipped</strong>
-	<<elseif _readyLimbs.includes(-2)>>
-		<<link "A sex focused set">>
-			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -2; })>>
-			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
-			<<set $activeSlave.amp = -2, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1)>>
-			<<if def _oldLimbs>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>>
-	<<elseif (def $activeLimbs) && $activeLimbs.type == "sex" && $activeSlave.ID == $activeLimbs.ID>>
-		//Sex focused P-limbs being built
-	<<else>>
-		//Sex focused prostheses unavailable
-	<</if>>|
-
-	<<if $activeSlave.amp == -3>>
-		<strong>Natural looking P-limbs equipped</strong>
-	<<elseif _readyLimbs.includes(-3)>>
-		<<link "A natural looking set">>
-			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -3; })>>
-			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
-			<<set $activeSlave.amp = -3, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1)>>
-			<<if def _oldLimbs>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>>
-	<<elseif (def $activeLimbs) && $activeLimbs.type == "beauty" && $activeSlave.ID == $activeLimbs.ID>>
-		//Natural looking P-limbs being built
-	<<else>>
-		//Natural looking prostheses unavailable
-	<</if>>|
-
-	<<if $activeSlave.amp == -4>>
-		<strong>Combat P-limbs equipped</strong>
-	<<elseif _readyLimbs.includes(-4)>>
-		<<link "Military grade arms">>
-			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -4; })>>
-			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
-			<<set $activeSlave.amp = -4, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1)>>
-			<<if def _oldLimbs>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>>
-	<<elseif (def $activeLimbs) && $activeLimbs.type == "combat" && $activeSlave.ID == $activeLimbs.ID>>
-		//Combat P-limbs being built
-	<<else>>
-		//Combat prostheses unavailable
-	<</if>>|
-
-	<<if $activeSlave.amp == -5>>
-		<strong>Cybernetic P-limbs equipped</strong>
-	<<elseif _readyLimbs.includes(-5)>>
-		<<link "Advanced cybernetics">>
-			<<set _hsp = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -5; })>>
-			<<set _newLimbs = $activeSlave.readyLimbs[_hsp]>>
-			<<set $activeSlave.amp = -5, $activeSlave.armsTat = _newLimbs.armsTat, $activeSlave.legsTat = _newLimbs.legsTat>>
-			<<set $activeSlave.readyLimbs.splice(_hsp, 1)>>
-			<<if def _oldLimbs>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-			<<replace "#LimbOptions">>
-			<<include "Hotswap Prosthetics">>
-			<</replace>>
-		<</link>>
-	<<elseif (def $activeLimbs) && $activeLimbs.type == "cyber" && $activeSlave.ID == $activeLimbs.ID>>
-		//Cybernetic P-limbs being built
-	<<else>>
-		//Cybernetic prostheses unavailable
-	<</if>>
-<br>
diff --git a/src/pregmod/huskSlaveSwapWorkaround.tw b/src/pregmod/huskSlaveSwapWorkaround.tw
index d6aa1f3198d38d72e9f0465d39189155605bc4fe..7bbecbd60d6ac127159ee5cd1a2dfeb64569b56c 100644
--- a/src/pregmod/huskSlaveSwapWorkaround.tw
+++ b/src/pregmod/huskSlaveSwapWorkaround.tw
@@ -4,7 +4,7 @@
 
 "This operation is neither simple nor is it perfected. There are extreme health risks involved and no guarantee of success. Strap a slave into your remote surgery to consent to the operation. Indentured servants<<if ($incubator > 0) || ($nurseryBabies)>> and slaves with reserved children<</if>> are not eligible."
 <br>
-//Select the slave whose mind will be transferred into the waiting husk.<<if $cyberMod == 1>> Amputated slaves must not be wearing prosthetics.<</if>> This operation will cost <<print cashFormat(10000)>>.//
+//Select the slave whose mind will be transferred into the waiting husk. Amputated slaves must not be wearing prosthetics. This operation will cost <<print cashFormat(10000)>>.//
 
 <br><br>
 __Select an eligible slave:__
diff --git a/src/pregmod/incubator.tw b/src/pregmod/incubator.tw
index 25ee6a8a7bfd3f11200b8ad48cb13edc238cf1cf..6bc095da5dc9dcf54f75f5647c50f84a65c3518f 100644
--- a/src/pregmod/incubator.tw
+++ b/src/pregmod/incubator.tw
@@ -431,7 +431,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 		<<if $incubatorUpgradeMuscles == 1>>
 			<br>
 			<<if $incubatorMusclesSetting == 2>>
-				$His strength levels are purposefully set higher than recommended; excessive muscle gain likely.
+				$His strength levels are purposefully set higher than recommended; $he is likely to have excessive musculature.
 			<<elseif $incubatorMusclesSetting == 1>>
 				$His musculature is being carefully managed; $he will be released with near normal strength.
 			<<elseif $incubatorMusclesSetting == 0>>
@@ -441,7 +441,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 		<<if $incubatorUpgradeGrowthStims == 1>>
 			<br>
 			<<if $incubatorGrowthStimsSetting == 2>>
-				$He is being injected with higher than recommended doses of stimulants; exceeding expected final height is likely.
+				$He is being injected with higher than recommended doses of stimulants; $he is likely to be much taller than expected.
 			<<elseif $incubatorGrowthStimsSetting == 1>>
 				$He is injected with the recommended dosage of stimulants; $he will grow to $his full expected height.
 			<<elseif $incubatorGrowthStimsSetting == 0>>
@@ -451,7 +451,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 		<<if $incubatorUpgradeReproduction == 1>>
 			<br>
 			<<if $incubatorReproductionSetting == 2>>
-				$His hormone levels are purposefully set higher than recommended; over-active reproductive systems likely.
+				$His hormone levels are purposefully set higher than recommended; $his reproductive systems are likely to be over-active.
 			<<elseif $incubatorReproductionSetting == 1>>
 				$His hormone levels are being carefully managed; $he will be released with fully functional reproductive organs.
 			<<elseif $incubatorReproductionSetting == 0>>
@@ -561,7 +561,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 
 <<if $incubatorUpgradeWeight == 1>>
 	<<if $incubatorWeightSetting == 1>>
-		Weight is not being properly managed, saving costs but likely causing excessive weight gain. [[Monitor|Incubator][$incubatorWeightSetting = 2]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
+		Weight is not being properly managed; excessive weight gain is likely. [[Monitor|Incubator][$incubatorWeightSetting = 2]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
 	<<elseif $incubatorWeightSetting == 2>>
 		Weight is being carefully managed; children will be released at a healthy weight. [[Estimate only|Incubator][$incubatorWeightSetting = 1]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
 	<<elseif $incubatorWeightSetting == 0>>
@@ -571,7 +571,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 <br>
 <<if $incubatorUpgradeMuscles == 1>>
 	<<if $incubatorMusclesSetting == 2>>
-		Strength levels are purposefully set higher than recommended; excessive muscle gain likely. [[Limit|Incubator][$incubatorMusclesSetting = 1]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
+		Strength levels are purposefully set higher than recommended; excessive muscle gain is likely. [[Limit|Incubator][$incubatorMusclesSetting = 1]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
 	<<elseif $incubatorMusclesSetting == 1>>
 		Musculature is being carefully managed; children will be released with near normal strength. [[Overload|Incubator][$incubatorMusclesSetting = 2]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
 	<<elseif $incubatorMusclesSetting == 0>>
@@ -581,7 +581,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
 <br>
 <<if $incubatorUpgradeReproduction == 1>>
 	<<if $incubatorReproductionSetting == 2>>
-		Hormone levels are purposefully set higher than recommended; over-active reproductive systems likely. [[Limit|Incubator][$incubatorReproductionSetting = 1]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
+		Hormone levels are purposefully set higher than recommended; over-active reproductive systems are likely. [[Limit|Incubator][$incubatorReproductionSetting = 1]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
 	<<elseif $incubatorReproductionSetting == 1>>
 		Hormone levels are being carefully managed; children will be released with fully functional reproductive organs. [[Overload|Incubator][$incubatorReproductionSetting = 2]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
 	<<elseif $incubatorReproductionSetting == 0>>
diff --git a/src/pregmod/managePersonalAffairs.tw b/src/pregmod/managePersonalAffairs.tw
index edfb88868e65d658c356092a9bbc33de5655d21f..2376de6fe693273e969bacf35c8351aff40628ed 100644
--- a/src/pregmod/managePersonalAffairs.tw
+++ b/src/pregmod/managePersonalAffairs.tw
@@ -21,13 +21,13 @@ You pause for a moment from your busy day to day life to return to <<if $masterS
 	You're @@.orange;$PC.actualAge@@ and full of vigor.<<if $PC.visualAge > $PC.actualAge>> You've taken measures to @@.lime;look an older $PC.visualAge@@ and reap the respect that comes with it.<<elseif $PC.visualAge < $PC.actualAge>> You've taken measures to @@.lime;look a younger $PC.visualAge,@@ even though society may find your looks uncomfortable.<</if>>
 <</if>>
 <<if ($playerAging != 0)>>Your birthday is <<if $PC.birthWeek == 51>>next week<<else>>in <<print 52-$PC.birthWeek>> weeks<</if>>.<</if>>
-Looking down;
+Looking down,
 <<PlayerBoobs>>
 <<PlayerBelly>>
 <<if $PC.balls == 2 && $PC.belly < 5000>> Your pubic mound swells outward slightly due to your oversized prostate. <<elseif $PC.balls > 2 && $PC.belly < 10000>> Your pubic mound bulges outward noticeably thanks to your massive prostate. <</if>>
-Beneath all that;
+Beneath all that,
 <<PlayerCrotch>>
-Around back;
+Around back,
 <<PlayerButt>>
 
 <br><<if $playerSurgery == 0>>[[Visit your plastic surgeon.|Elective Surgery][$playerSurgery = 4]]<<elseif $playerSurgery == 1>>Your favorite plastic surgeon is booked solid for the next week.<<else>>Your favorite plastic surgeon is booked solid for the next $playerSurgery weeks.<</if>>
@@ -143,7 +143,7 @@ Around back;
 		You don't watch FCTV. [[Watch every week|Manage Personal Affairs][$FCTVrate = 1]] | [[Watch every other week|Manage Personal Affairs][$FCTVrate = 2]] | [[Watch once a month|Manage Personal Affairs][$FCTVrate = 4]]
 	<</if>>
 	<<if $saveImported > 0 && $FCTVremote == 0>>
-		<br>You know TVs should have a remote. [[Buy one yourself|Manage Personal Affairs][$FCTVremote = 1, cashX(-100, "capEx")]]
+		<br>You know TVs should have a remote. [[Buy one yourself|Manage Personal Affairs][$FCTVremote = 1, cashX(forceNeg(100*$upgradeMultiplierTrade), "capEx")]]
 	<</if>>
 <</if>>
 
@@ -346,23 +346,24 @@ On formal occasions, you are announced as $PCTitle. By slaves, however, you pref
 </span>
 
 <<if $PC.degeneracy > 0>>
-<br><br>
-__Rumors__
-<br>
 
-<<if $PC.degeneracy > 100>>
-	There are severe and devastating rumors about you spreading across the arcology.
-<<elseif $PC.degeneracy > 75>>
-	There are severe rumors about you spreading across the arcology.
-<<elseif $PC.degeneracy > 50>>
-	There are bad rumors about you spreading across the arcology.
-<<elseif $PC.degeneracy > 25>>
-	There are rumors about you spreading across the arcology.
-<<elseif $PC.degeneracy > 10>>
-	There are minor rumors about you spreading across the arcology.
-<<else>>
-	The occasional rumor about you can be heard throughout the arcology.
-<</if>>
+	<br><br>
+	__Rumors__
+	<br>
+
+	<<if $PC.degeneracy > 100>>
+		There are severe and devastating rumors about you spreading across the arcology.
+	<<elseif $PC.degeneracy > 75>>
+		There are severe rumors about you spreading across the arcology.
+	<<elseif $PC.degeneracy > 50>>
+		There are bad rumors about you spreading across the arcology.
+	<<elseif $PC.degeneracy > 25>>
+		There are rumors about you spreading across the arcology.
+	<<elseif $PC.degeneracy > 10>>
+		There are minor rumors about you spreading across the arcology.
+	<<else>>
+		The occasional rumor about you can be heard throughout the arcology.
+	<</if>>
 
 <</if>>
 
diff --git a/src/pregmod/newChildIntro.tw b/src/pregmod/newChildIntro.tw
index d7823617056bdf9801f7945871b02689ef9e931b..4c93f89d8c7d3a2e1e37acf09469d98d7485cb44 100644
--- a/src/pregmod/newChildIntro.tw
+++ b/src/pregmod/newChildIntro.tw
@@ -600,7 +600,7 @@ You slowly strip down, gauging $his reactions to your show, until you are fully
 <</if>>
 <<if $arcologies[0].FSHedonisticDecadence >= 50>>
 	<<if ($activeSlave.weight > 50)>>
-		$He noticed all fat girls lazing about your penthouse; $he pats $his own soft belly, @@.mediumaquamarine;feeling right at home.@@
+		$He noticed all fat slaves lazing about your penthouse; $he pats $his own soft belly, @@.mediumaquamarine;feeling right at home.@@
 		<<set $activeSlave.trust += 2>>
 	<</if>>
 <</if>>
@@ -646,7 +646,7 @@ You slowly strip down, gauging $his reactions to your show, until you are fully
 <<set $activeSlave.trust -= 30>>
 <<set $activeSlave.health -= 20>>
 <<replace "#result">>
-	You drag $him to the body modification studio and strap $him down with $his $brandTarget clear and defenseless. $He doesn't understand what's on, becoming even more confused as disinfectant is applied to $his $brandTarget. $He can't see the approaching brand, but eventually $he feels the radiated heat on $his skin and manages to get one inarticulate, wordless noise of terror out before the dreadful sizzling noise and the sweet smell of burning flesh. If $he trusted you at all before, @@.mediumorchid;$he doesn't now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to remind $him should $he start to forget.
+	You drag $him to the body modification studio and strap $him down with $his $brandTarget clear and defenseless. $He doesn't understand what's on, becoming even more confused as disinfectant is applied to $his $brandTarget. $He can't see the approaching brand, <<if !canSee($activeSlave)>>of course, <</if>>but eventually $he feels the radiated heat on $his skin and manages to get one inarticulate, wordless noise of terror out before the dreadful sizzling noise and the sweet smell of burning flesh. If $he trusted you at all before, @@.mediumorchid;$he doesn't now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to remind $him should $he start to forget.
 	<<if ($arcologies[0].FSSubjugationistRace == $activeSlave.race) && ($arcologies[0].FSSubjugationist > 0)>>
 		Society @@.green;approves@@ of your purchase and branding of an inferior $activeSlave.race person; this advances the idea that $activeSlave.race people ought to be enslaved.
 		<<= FSChange("Subjugationist", 2)>>
@@ -798,69 +798,75 @@ You slowly strip down, gauging $his reactions to your show, until you are fully
 	<<elseif $activeSlave.dick == 6>>
 		You grin sadistically at $him as $his massive dick fills both of your hands.
 	<</if>>
-As $he begins to moan with lust, you grip down tightly and force $him to the floor. You straddle $him and lower your dripping pussy onto $his face<<if $PC.dick == 1>>, your erect cock coming to rest on $his forehead<</if>>. You continue stroking your toy's rod as $he eagerly begins eating you out. As $his cock begins to throb, anticipating $his upcoming orgasm,
-<<if (overpowerCheck($activeSlave, $PC) < random(1,100)) && ($incubatorReproductionSetting > 0)>>
-	$he shoves you onto your back and deeply penetrates you. Before you can kick $him off, $he thrusts twice and unloads $his pent up orgasm deep into your pussy. $He pulls out with a huge smile on $his face and a @@.hotpink;deep love@@ for $his mate. You glower at $him as cum pools from your stretched cunt; $he might not be a dom now, but $he may certainly become one.
-	<<set $activeSlave.devotion += 5>>
-	<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
-	<<if random(1,100) > 60 && $activeSlave.fetish == "none">>
-		<<set $activeSlave.fetish = "dom">>
-		<<set $activeSlave.fetishStrength = 20>>
-	<</if>>
-	<<if canImpreg($PC, $activeSlave)>>
-		<<= knockMeUp($PC, 100, 0, $activeSlave.ID)>>
-		You groan as you rub your belly. You were fertile and are now likely @@.lime;quite pregnant.@@
-	<</if>>
-	<span id="result2">
-		<br><<link "Teach $him what $he did wrong">>
-			<<replace "#result2">>
-				$His language skills may be undeveloped, but the tank instilled certain phrases into $him as it raised $him. Taking advantage of those commands, you chastise $him for $his impudence and instruct $him that only you may decide if $he is allowed to do that. $He @@.mediumorchid;hangs $his head in disappointment@@ but understands your decree. $He doesn't know why $he is compelled by what you said, but deep down $he @@.gold;fears what this means.@@
-				<<set $activeSlave.devotion -= 5>>
-				<<set $activeSlave.trust -= 5>>
-			<</replace>>
-		<</link>>
-		<br><<link "Punish $his nuts">>
-			<<replace "#result2">>
-				Righting yourself, you land a kick firmly and directly into $his dangling balls. $He collapses to the ground @@.mediumorchid;wailing with betrayal@@ and @@.gold;desperately trying to protect $himself from you.@@
-				<<set $activeSlave.devotion -= 25>>
-				<<set $activeSlave.trust -= 50>>
-			<</replace>>
-		<</link>>
-		<br><<link "Punish $him with a chastity belt">>
-			<<replace "#result2">>
-				Righting yourself, you head to your desk and pull out a chastity cage. Calling the curious $girl over, you tease $his genitals until $he lowers $his guard and lock $his dick in the device. $He @@.mediumorchid;howls with displeasure@@ at the tightness around $his cock and @@.gold;begins to panic@@ when $he finds $he can't remove it. You send $him off to learn $his place.
-				<<set $activeSlave.devotion -= 15>>
-				<<set $activeSlave.trust -= 5>>
-				<<set $activeSlave.chastityPenis = 1>>
-			<</replace>>
-		<</link>>
-		<<if $seeExtreme == 1>>
-		<br><<link "Geld $him as punishment">>
-			<<replace "#result2">>
-				Righting yourself, you grab the gloating slave, drag $him to the autosurgery and strap $him face-down with $his legs spread. $He doesn't understand what's happening, but giggles at the sensations running through $his numb body. $He's so drugged and drowsy with @@.red;surgical recovery@@ that it takes a while for $him to figure out what's happened. When $he does, $his poor mind scarcely processes the @@.gold;horror@@ of what's happened. $He spends the rest of the week dimly trying to find where $his balls went.
-				<<if $arcologies[0].FSGenderRadicalist != "unset">>
-					Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all societal inferiors can be made female.
-					<<= FSChange("GenderRadicalist", 2)>>
-				<</if>>
-				<<if $arcologies[0].FSRestart != "unset" && $activeSlave.pubertyXY == 1>>
-					Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all only the elite should breed.
-					<<= FSChange("Eugenics", 2)>>
-				<</if>>
-				<<set $activeSlave.devotion -= 25>>
-				<<set $activeSlave.trust -= 50>>
-				<<set $activeSlave.balls = 0>>
-			<</replace>>
-		<</link>>
+	As $he begins to moan with lust, you grip down tightly and force $him to the floor. You straddle $him and lower your dripping pussy onto $his face<<if $PC.dick == 1>>, your erect cock coming to rest on $his forehead<</if>>. You continue stroking your toy's rod as $he eagerly begins eating you out. As $his cock begins to throb, anticipating $his upcoming orgasm,
+	<<if (overpowerCheck($activeSlave, $PC) < random(1,100)) && ($incubatorReproductionSetting > 0)>>
+		$he shoves you onto your back and deeply penetrates you. Before you can kick $him off, $he thrusts twice and unloads $his pent up orgasm deep into your pussy. $He pulls out with a huge smile on $his face and a @@.hotpink;deep love@@ for $his mate. You glower at $him as cum pools from your stretched cunt; $he might not be a dom now, but $he may certainly become one.
+		<<set $activeSlave.devotion += 5>>
+		<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
+		<<if random(1,100) > 60 && $activeSlave.fetish == "none">>
+			<<set $activeSlave.fetish = "dom">>
+			<<set $activeSlave.fetishStrength = 20>>
+		<</if>>
+		<<if canImpreg($PC, $activeSlave)>>
+			<<= knockMeUp($PC, 100, 0, $activeSlave.ID)>>
+			You groan as you rub your belly. You were fertile and are now likely @@.lime;quite pregnant.@@
+		<</if>>
+		<span id="result2">
+			<br><<link "Let it slide for now">>
+				<<replace "#result2">>
+					You decide to yourself that it may be for the best to just send $him on $his way for now. You quietly order $activeSlave.slaveName out into the penthouse, while you head off to wash out $his seed. You can't reasonably expect $him to know the full ramifications of what $he did; $he can't exactly be considered an adult<<if $activeSlave.physicalAge < 18>>, by any means<</if>>. Indeed, the $girl is mostly just bewildered by your sudden change in mood, but seems pretty sure that @@.orangered;$he had nothing to do with it.@@
+					<<set $activeSlave.trust += 20>>
+				<</replace>>
+			<</link>>
+			<br><<link "Teach $him what $he did wrong">>
+				<<replace "#result2">>
+					$His language skills may be undeveloped, but the tank instilled certain phrases into $him as it raised $him. Taking advantage of those commands, you chastise $him for $his impudence and instruct $him that only you may decide if $he is allowed to do that. $He @@.mediumorchid;hangs $his head in disappointment@@ but understands your decree. $He doesn't know why $he is compelled by what you said, but deep down $he @@.gold;fears what this means.@@
+					<<set $activeSlave.devotion -= 5>>
+					<<set $activeSlave.trust -= 5>>
+				<</replace>>
+			<</link>>
+			<br><<link "Punish $his nuts">>
+				<<replace "#result2">>
+					Righting yourself, you land a kick firmly and directly into $his dangling balls. $He collapses to the ground @@.mediumorchid;wailing with betrayal@@ and @@.gold;desperately trying to protect $himself from you.@@
+					<<set $activeSlave.devotion -= 25>>
+					<<set $activeSlave.trust -= 50>>
+				<</replace>>
+			<</link>>
+			<br><<link "Punish $him with a chastity belt">>
+				<<replace "#result2">>
+					Righting yourself, you head to your desk and pull out a chastity cage. Calling the curious $girl over, you tease $his genitals until $he lowers $his guard and lock $his dick in the device. $He @@.mediumorchid;howls with displeasure@@ at the tightness around $his cock and @@.gold;begins to panic@@ when $he finds $he can't remove it. You send $him off to learn $his place.
+					<<set $activeSlave.devotion -= 15>>
+					<<set $activeSlave.trust -= 5>>
+					<<set $activeSlave.chastityPenis = 1>>
+				<</replace>>
+			<</link>>
+			<<if $seeExtreme == 1>>
+				<br><<link "Geld $him as punishment">>
+					<<replace "#result2">>
+						Righting yourself, you grab the gloating slave, drag $him to the autosurgery and strap $him face-down with $his legs spread. $He doesn't understand what's happening, but giggles at the sensations running through $his numb body. $He's so drugged and drowsy with @@.red;surgical recovery@@ that it takes a while for $him to figure out what's happened. When $he does, $his poor mind scarcely processes the @@.gold;horror@@ of what's happened. $He spends the rest of the week dimly trying to find where $his balls went.
+						<<if $arcologies[0].FSGenderRadicalist != "unset">>
+							Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all societal inferiors can be made female.
+							<<= FSChange("GenderRadicalist", 2)>>
+						<</if>>
+						<<if $arcologies[0].FSRestart != "unset" && $activeSlave.pubertyXY == 1>>
+							Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all only the elite should breed.
+							<<= FSChange("Eugenics", 2)>>
+						<</if>>
+						<<set $activeSlave.devotion -= 25>>
+						<<set $activeSlave.trust -= 50>>
+						<<set $activeSlave.balls = 0>>
+					<</replace>>
+				<</link>>
+			<</if>>
+		</span>
+	<<else>>
+		you quickly bind the base of $his penis, denying $him release. You grind your cunt into $his face, letting $him know that YOU are the one who'll be orgasming here, not $him. Only once you have initiated the new slave by soaking $his face in your cum do you release $his dick and lean back to avoid the coming blast. A few strokes later and your hand is coated in $his cum. You turn around and order the exhausted $girl to clean $his cum off your hand<<if $PC.dick == 1>> and to finish off $his twitching dick<</if>>; $he might not be a submissive, but $he is @@.hotpink;willing to let you have your way@@ with $his body used and may even grow to enjoy it.
+		<<set $activeSlave.devotion += 5>>
+		<<if random(1,100) > 60 && $activeSlave.fetish == "none">>
+			<<set $activeSlave.fetish = "submissive">>
+			<<set $activeSlave.fetishStrength = 20>>
 		<</if>>
-	</span>
-<<else>>
-	you quickly bind the base of $his penis, denying $him release. You grind your cunt into $his face, letting $him know that YOU are the one who'll be orgasming here, not $him. Only once you have initiated the new slave by soaking $his face in your cum do you release $his dick and lean back to avoid the coming blast. A few strokes later and your hand is coated in $his cum. You turn around and order the exhausted $girl to clean $his cum off your hand<<if $PC.dick == 1>> and to finish off $his twitching dick<</if>>; $he might not be a submissive, but $he is @@.hotpink;willing to let you have your way@@ with $his body used and may even grow to enjoy it.
-	<<set $activeSlave.devotion += 5>>
-	<<if random(1,100) > 60 && $activeSlave.fetish == "none">>
-		<<set $activeSlave.fetish = "submissive">>
-		<<set $activeSlave.fetishStrength = 20>>
 	<</if>>
-<</if>>
 <</replace>>
 <</link>>
 <</if>>
@@ -869,9 +875,9 @@ As $he begins to moan with lust, you grip down tightly and force $him to the flo
 <<if $PC.boobsBonus == 3>>
 <br><<link "Permit $him to explore your expansive bust">>
 <<replace "#result">>
-You beckon the curious $girl to your hefty breasts, having noticed how hungrily $he has been eying them. $He eagerly places $his hands to them and begins squeezing and massaging them, quickly becoming aroused $himself. $He pays close attention to your nipples, <<if $PC.lactation > 0>> squealing happily when milk begins to flow from them<<set $PC.lactationDuration = 2>><<else>> grumbling unhappily when $he finds no milk within<</if>>.
-<<if $activeSlave.muscles > 30 && $incubatorReproductionSetting > 0 && canAchieveErection($activeSlave)>>
-	Suddenly, $he shoves you onto your back and begins enthusiastically fucking your breasts. Before you can push $him off, $he thrusts hard and unloads $his pent up orgasm deep into your cleavage and across your face. $He sits back with a huge smile on $his face and a @@.hotpink;new connection to you.@@ $He @@.gold;recoils in surprise and fear@@ when you respond by slapping $him across the face for $his impudence. $He might not look like a dom, but $he may turn into one.
+You beckon the curious $girl to your hefty breasts, having noticed how hungrily $he has been <<if canSee($activeSlave)>>eying<<else>>focusing on<</if>> them. $He eagerly places $his hands to them and begins squeezing and massaging them, quickly becoming aroused $himself. $He pays close attention to your nipples, <<if $PC.lactation > 0>> squealing happily when milk begins to flow from them<<set $PC.lactationDuration = 2>><<else>> grumbling unhappily when $he finds no milk within<</if>>.
+<<if (overpowerCheck($activeSlave, $PC) < random(1,100)) && $activeSlave.muscles > 30 && $incubatorReproductionSetting > 0 && canAchieveErection($activeSlave)>>
+	Suddenly, $he shoves you onto your back and begins enthusiastically fucking your breasts. Before you can push $him off, $he thrusts hard and unloads $his pent-up orgasm deep into your cleavage and across your face. $He sits back with a huge smile on $his face and a @@.hotpink;new connection to you.@@ $He @@.gold;recoils in surprise and fear@@ when you respond by slapping $him across the face for $his impudence. $He might not look like a dom, but $he may turn into one.
 	<<set $activeSlave.devotion += 5>>
 	<<set $activeSlave.trust -= 5>>
 	<<if random(1,100) > 60 && $activeSlave.fetish == "none">>
@@ -879,6 +885,12 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 		<<set $activeSlave.fetishStrength = 20>>
 	<</if>>
 	<span id="result2">
+		<br><<link "Let it slide for now">>
+			<<replace "#result2">>
+				You decide to yourself that it may be for the best to just send $him on $his way for now. You quietly order $activeSlave.slaveName out into the penthouse, while you fetch a towel to wipe off $his seed. You can't reasonably expect $him to know the full ramifications of what $he did; $he can't exactly be considered an adult<<if $activeSlave.physicalAge < 18>>, by any means<</if>>. Indeed, the $girl is mostly just bewildered by your sudden change in mood, but seems pretty sure that @@.orangered;$he had nothing to do with it.@@
+				<<set $activeSlave.trust += 25>>
+			<</replace>>
+		<</link>>
 		<br><<link "Teach $him what $he did wrong">>
 			<<replace "#result2">>
 				$His language skills may be undeveloped, but the tank instilled certain phrases into $him as it raised $him. Taking advantage of those commands, you chastise $him for $his impudence and instruct $him that only you may decide if $he is allowed to do that. $He @@.hotpink;nods along to your words@@ understanding concepts but mostly following along @@.gold;in fear@@ of you.
@@ -895,26 +907,26 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 			<</replace>>
 		<</link>>
 		<<if $seeExtreme == 1>>
-		<br><<link "Geld $him as punishment">>
-			<<replace "#result2">>
-				Righting yourself, you grab the cowering slave, drag $him to the autosurgery and strap $him face-down with $his legs spread. $He doesn't understand what's happening, but giggles at the sensations running through $his numb body. $He's so drugged and drowsy with @@.red;surgical recovery@@ that it takes a while for $him to figure out what's happened. When $he does, $his poor mind scarcely processes the @@.gold;horror@@ of what's happened. $He spends the rest of the week dimly trying to find where $his balls went.
-				<<if $arcologies[0].FSGenderRadicalist != "unset">>
-					Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all societal inferiors can be made female.
-					<<= FSChange("GenderRadicalist", 2)>>
-				<</if>>
-				<<if $arcologies[0].FSRestart != "unset">>
-					Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all only the elite should breed.
-					<<= FSChange("Eugenics", 2)>>
-				<</if>>
-				<<set $activeSlave.devotion -= 25>>
-				<<set $activeSlave.trust -= 50>>
-				<<set $activeSlave.balls = 0>>
-			<</replace>>
-		<</link>>
+			<br><<link "Geld $him as punishment">>
+				<<replace "#result2">>
+					Righting yourself, you grab the cowering slave, drag $him to the autosurgery and strap $him face-down with $his legs spread. $He doesn't understand what's happening, but giggles at the sensations running through $his numb body. $He's so drugged and drowsy with @@.red;surgical recovery@@ that it takes a while for $him to figure out what's happened. When $he does, $his poor mind scarcely processes the @@.gold;horror@@ of what's happened. $He spends the rest of the week dimly trying to find where $his balls went.
+					<<if $arcologies[0].FSGenderRadicalist != "unset">>
+						Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all societal inferiors can be made female.
+						<<= FSChange("GenderRadicalist", 2)>>
+					<</if>>
+					<<if $arcologies[0].FSRestart != "unset">>
+						Society @@.green;approves@@ of your promptly gelding $him; this advances the idea that all only the elite should breed.
+						<<= FSChange("Eugenics", 2)>>
+					<</if>>
+					<<set $activeSlave.devotion -= 25>>
+					<<set $activeSlave.trust -= 50>>
+					<<set $activeSlave.balls = 0>>
+				<</replace>>
+			<</link>>
 		<</if>>
 	</span>
 <<else>>
-	Suddenly, $he buries $his head into your cleavage, knocking you off balance and to the floor. As you try to right yourself, you notice $he has fallen asleep in your pillowy breasts. Sighing, you make yourself comfortable until $he finishes $his nap. When the first the $he sees when $he awakes is your face; a @@.hotpink;lasting bond@@ is established between you two. $He happily returns to snuggling your tits before you can help $him up and send $him off. $He might be turning into a breast fetishist, if you had to guess.
+	Suddenly, $he buries $his head into your cleavage, knocking you off balance and to the floor. As you try to right yourself, you notice $he has fallen asleep in your pillowy breasts. Sighing, you make yourself comfortable until $he finishes $his nap. When <<if canSee($activeSlave)>>the first thing $he sees when $he awakes is your face<<else>>he wakes up still enveloped in your bosom<</if>>, a @@.hotpink;lasting bond@@ is established between you two. $He happily returns to snuggling your tits before you can help $him up and send $him off. $He might be turning into a breast fetishist, if you had to guess.
 	<<set $activeSlave.devotion += 5>>
 	<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
 		<<set $activeSlave.fetish = "boobs">>
@@ -928,7 +940,7 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 <<if $PC.preg >= 24>>
 <br><<link "Permit $him to explore your pregnancy">>
 <<replace "#result">>
-	You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to wrap $his arms around it. $He happily runs $his hands across your belly, cooing with delight at the tautness and warmth. $He jumps back with a gasp the first time $he is met with a kick from within you, but @@.hotpink;giggles pleasantly@@ as you help $him back to $his feet. $He spends a lot of time comparing your belly to $his own, $he might not be a pregnancy fetishist, but it seems likely $he may become one.
+	You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to wrap $his arms around it. $He happily runs $his hands across your belly, cooing with delight at the tautness and warmth. $He jumps back with a gasp the first time $he is met with a kick from within you, but @@.hotpink;giggles pleasantly@@ as you help $him back to $his feet. $He spends a lot of time comparing your belly to $his own; $he might not be a pregnancy fetishist, but it seems likely $he may become one.
 	<<set $activeSlave.devotion += 5>>
 	<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
 		<<set $activeSlave.fetish = "pregnancy">>
@@ -937,30 +949,30 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 <</replace>>
 <</link>>
 <<if $PC.pregMood == 2>>
-	<br><<link "Teach $him how to satisfy a pregnant woman">>
+	<br><<link "Teach $him how to satisfy a pregnant _womanP">>
 	<<replace "#result">>
-	You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> knocking $him to the ground. <<if canPenetrate($activeSlave)>>A simple stroke is all it takes to get $him hard, so you quickly mount and begin riding $him. $He @@.hotpink;happily@@ runs $his hands across the underside of your belly as $he gets into the rhythm of thrusting up into you. After an unsatisfyingly short amount of time, $he cums deep in you<<else>>You quickly mount $his face and force $him to eat you out. $He @@.hotpink;happily@@ runs $his hands across the underside your belly as $he gets into the rhythm of penetrating you. It doesn't take long for the poor $girl to be out of breath and panicking<</if>>. Sighing, you pull the spent $girl upright so $he can fondle your belly and hopefully recover enough for a second go. $He spends a lot of time comparing your belly to $his own, $he might not be a pregnancy fetishist, but it seems likely $he may become one.
-	<<set $activeSlave.devotion += 5>>
-	<<if canPenetrate($activeSlave)>>
-		<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
-	<<else>>
-		<<set $activeSlave.counter.oral++, $oralTotal++>>
-	<</if>>
-	<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
-		<<set $activeSlave.fetish = "pregnancy">>
-		<<set $activeSlave.fetishStrength = 20>>
-	<</if>>
+		You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> knocking $him to the ground. <<if canPenetrate($activeSlave)>>A simple stroke is all it takes to get $him hard, so you quickly mount and begin riding $him. $He @@.hotpink;happily@@ runs $his hands across the underside of your belly as $he gets into the rhythm of thrusting up into you. After an unsatisfyingly short amount of time, $he cums deep in you<<else>>You quickly mount $his face and force $him to eat you out. $He @@.hotpink;happily@@ runs $his hands across the underside your belly as $he gets into the rhythm of penetrating you. It doesn't take long for the poor $girl to be out of breath and panicking<</if>>. Sighing, you pull the spent $girl upright so $he can fondle your belly and hopefully recover enough for a second go. $He spends a lot of time comparing your belly to $his own, $he might not be a pregnancy fetishist, but it seems likely $he may become one.
+		<<set $activeSlave.devotion += 5>>
+		<<if canPenetrate($activeSlave)>>
+			<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
+		<<else>>
+			<<set $activeSlave.counter.oral++, $oralTotal++>>
+		<</if>>
+		<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
+			<<set $activeSlave.fetish = "pregnancy">>
+			<<set $activeSlave.fetishStrength = 20>>
+		<</if>>
 	<</replace>>
 	<</link>>
 <<elseif $PC.pregMood == 1>>
 	<br><<link "Nurse $him">>
 	<<replace "#result">>
-	You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to wrap $his arms around it. $He happily runs $his hands across your belly, cooing with delight at the tautness and warmth. $He jumps back with a gasp the first time $he is met with a kick from within you, but @@.hotpink;giggles pleasantly@@ as you help $him back to $his feet and pull $him into an embrace, guiding $him to the couch. You tweak one of your nipples, encouraging your milk to flow and enticing <<if $activeSlave.mother == -1>>your daughter to suckle from $his mother<<else>>the $girl to suckle from your aching breasts<</if>>. $He eagerly complies, drinking deeply as you stroke $his head.<<if canPenetrate($activeSlave)>> Before long, you feel something hard prodding your leg; it seems someone is getting turned on by all this. As you shift $him to your other breast, you reach down and begin stroking $his erection. You can feel $his gulps become erratic as $his cock begins throbbing in your grip. $He moans lewdly as $he cums, but makes sure not to miss a single drop of your milk in the process.<</if>> Once $he drains you of your supply, you @@.mediumaquamarine;cuddle up to $him@@ and allow $him to caress your body. $He spends a lot of time comparing your belly to $his own, $he might not be a pregnancy fetishist, but it seems likely $he may become one.
-	<<set $activeSlave.devotion += 15, $activeSlave.trust += 15>>
-	<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
-		<<set $activeSlave.fetish = "pregnancy">>
-		<<set $activeSlave.fetishStrength = 20>>
-	<</if>>
+		You beckon the curious $girl to your weighty pregnancy and as $he approaches push it directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to wrap $his arms around it. $He happily runs $his hands across your belly, cooing with delight at the tautness and warmth. $He jumps back with a gasp the first time $he is met with a kick from within you, but @@.hotpink;giggles pleasantly@@ as you help $him back to $his feet and pull $him into an embrace, guiding $him to the couch. You tweak one of your nipples, encouraging your milk to flow and enticing <<if $activeSlave.mother == -1>>your daughter to suckle from $his mother<<else>>the $girl to suckle from your aching breasts<</if>>. $He eagerly complies, drinking deeply as you stroke $his head.<<if canPenetrate($activeSlave)>> Before long, you feel something hard prodding your leg; it seems someone is getting turned on by all this. As you shift $him to your other breast, you reach down and begin stroking $his erection. You can feel $his gulps become erratic as $his cock begins throbbing in your grip. $He moans lewdly as $he cums, but makes sure not to miss a single drop of your milk in the process.<</if>> Once $he drains you of your supply, you @@.mediumaquamarine;cuddle up to $him@@ and allow $him to caress your body. $He spends a lot of time comparing your belly to $his own, $he might not be a pregnancy fetishist, but it seems likely $he may become one.
+		<<set $activeSlave.devotion += 15, $activeSlave.trust += 15>>
+		<<if random(1,100) > 40 && $activeSlave.fetish == "none">>
+			<<set $activeSlave.fetish = "pregnancy">>
+			<<set $activeSlave.fetishStrength = 20>>
+		<</if>>
 	<</replace>>
 	<</link>>
 <</if>>
@@ -1009,7 +1021,7 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 		<<set $activeSlave.health -= 10>>
 		<<set $activeSlave.trust -= 5>>
 		<<replace "#result">>
-			You escort $him to the remote surgery and strap $him face-down with $his legs bare. $He doesn't understand what's coming for a while, but giggles as $his lower legs are carefully cleaned and disinfected. $He can't see the approaching surgical manipulators, but eventually $he feels a tugging at $his lower legs even through the local anesthetic. $He gets one squeal of protest out before the surgery begins to apply healing agents. $He now requires special heels to walk, and will @@.gold;remember your power@@ with every @@.red;painful@@ step $he takes. $He seems @@.hotpink;inappropriately happy@@ about getting to wear pretty shoes when $he can no longer walk without them.
+			You escort $him to the remote surgery and strap $him face-down with $his legs bare. $He doesn't understand what's coming for a while, but giggles as $his lower legs are carefully cleaned and disinfected. $He can't see the approaching surgical manipulators, <<if !canSee($activeSlave)>>of course, <</if>>but eventually $he feels a tugging at $his lower legs even through the local anesthetic. $He gets one squeal of protest out before the surgery begins to apply healing agents. $He now requires special heels to walk, and will @@.gold;remember your power@@ with every @@.red;painful@@ step $he takes. $He seems @@.hotpink;inappropriately happy@@ about getting to wear pretty shoes when $he can no longer walk without them.
 		<</replace>>
 		<</link>>
 	<</if>>
@@ -1018,17 +1030,17 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 <<if $arcologies[0].FSRestart >= 10>>
 	<<if $activeSlave.preg != -2 && $activeSlave.ovaries > 0>>
 		<<if $activeSlave.breedingMark == 0 || $propOutcome == 0>>
-		<br><<link "Sterilize $him">>
+			<br><<link "Sterilize $him">>
 			<<set $activeSlave.preg = -2>>
 			<<set $activeSlave.pregType = 0>>
 			<<set $activeSlave.ovaries = 0>>
 			<<set $activeSlave.devotion -= 100>>
 			<<set $activeSlave.health -= 10>>
 			<<set $activeSlave.trust -= 100>>
-		<<replace "#result">>
-			You escort $him to the remote surgery and strap $his face up with $his stomach bare. $He doesn't understand what's coming for a while, even giggling as $his belly is carefully cleaned and disinfected. $He begins to panic at the sight of the approaching surgical manipulators, screaming out as they cut into $his abdomen. $He squeals in horror as $his womb and ovaries are extracted before $his eyes. $He will never bear children, and will @@.mediumorchid;remember $his status@@ with every fucking $he receives. Your absolute power is rightfully @@.gold;terrifying@@ to $his undeveloped mind.
-		<</replace>>
-		<</link>>
+			<<replace "#result">>
+				You escort $him to the remote surgery and strap $his face up with $his stomach bare. $He doesn't understand what's coming for a while, even giggling as $his belly is carefully cleaned and disinfected. $He begins to panic at the sight of the approaching surgical manipulators, screaming out as they cut into $his abdomen. $He squeals in horror as $his womb and ovaries are extracted before $his eyes. $He will never bear children, and will @@.mediumorchid;remember $his status@@ with every fucking $he receives. Your absolute power is rightfully @@.gold;terrifying@@ to $his undeveloped mind.
+			<</replace>>
+			<</link>>
 		<</if>>
 	<</if>>
 <</if>>
@@ -1068,7 +1080,7 @@ You beckon the curious $girl to your hefty breasts, having noticed how hungrily
 			<<set $activeSlave.counter.anal += 10, $analTotal += 10>>
 			<<= assignJob($activeSlave, "dairy")>>
 			<<replace "#result">>
-				Making use of $his blissful ignorance, you restrain $him on one of the chairs in your office in an approximation of the position $he'll occupy in $dairyName. Then you put a mask on $him, like the ones the machines there feature, and turn it on, watching the slave squirm against $his restraints under the sudden bombardment of garish hardcore porn. Finally, you add a dildo gag, both to mimic the dildo that will feed $him, and to keep your office reasonably quiet. Then, for the rest of the day, you use $his vulnerable <<if $activeSlave.vagina > -1>>holes<<else>>asshole<</if>> as an outlet for your sexual energy. You are not gentle; in fact, the point of the whole exercise is to gape $him. By the evening $he's been fucked so hard that $he's stopped jerking against the chair when you pound <<if $PC.dick == 1>>your huge cock<<else>>a huge strap-on<</if>> in and out of $him, so you're obliged to get creative, sliding fingers in alongside <<if $PC.dick == 1>>yourself<<else>>it<</if>> to really blow $him out. Once that gets too easy, you start adding dildos for double penetration. By the night $he's properly prepared to take $dairyName's giant phalli, and you're bored, so you consign $him to $his fate. $He might have some opinion on how $he's spent $his day, but it's unlikely $he'll remember it by tomorrow, what with the forearm-sized dildos sliding in and out of $his<<if $activeSlave.vagina > -1>> cunt,<</if>> throat, and asshole.
+				Making use of $his blissful ignorance, you restrain $him on one of the chairs in your office in an approximation of the position $he'll occupy in $dairyName. Then you put a mask on $him, like the ones the machines there feature, and turn it on, watching the slave squirm against $his restraints under the sudden bombardment of garish hardcore porn. Finally, you add a dildo gag, both to mimic the dildo that will feed $him, and to keep your office reasonably quiet. Then, for the rest of the day, you use $his vulnerable <<if $activeSlave.vagina > -1>>holes<<else>>asshole<</if>> as an outlet for your sexual energy. You are not gentle; in fact, the point of the whole exercise is to gape $him. By the evening $he's been fucked so hard that $he's stopped jerking against the chair when you pound <<if $PC.dick == 1>>your huge cock<<else>>a huge strap-on<</if>> in and out of $him, so you're obliged to get creative, sliding fingers in alongside <<if $PC.dick == 1>>yourself<<else>>it<</if>> to really blow $him out. Once that gets too easy, you start adding dildos for double penetration. By the night $he's properly prepared to take $dairyName's giant phalli, and you're bored, so you consign $him to $his fate. $He might have some opinion on how $he's spent $his day, but it's unlikely $he'll remember it by tomorrow, what with the forearm-sized dildos sliding in and out of $his throat<<if $activeSlave.vagina > -1>>, cunt,<</if>> and asshole.
 			<</replace>>
 			<</link>>
 		<</if>>
diff --git a/src/pregmod/organFarmOptions.tw b/src/pregmod/organFarmOptions.tw
index 8716101fe16214677a3ca5f896082796b2413a46..10145ba7f8a1dfa6f1198001fb3bf2ea82bfac0a 100644
--- a/src/pregmod/organFarmOptions.tw
+++ b/src/pregmod/organFarmOptions.tw
@@ -286,7 +286,7 @@ The fabricator is ready to grow an organ for $him. Extract tissue to begin growi
 	<<if $activeSlave.hears <= -2>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
 		<<link "Cochleae">>
-			<<run cashX(-10000, "slaveSurgery", $activeSlave)>>
+			<<run cashX(-8000, "slaveSurgery", $activeSlave)>>
 			<<set _newOrgan = {type: "cochleae", weeksToCompletion: "6", ID: 0}>>
 			<<set _newOrgan.ID = $activeSlave.ID>>
 			<<set $organs.push(_newOrgan)>>
@@ -368,9 +368,9 @@ The fabricator is ready to grow an organ for $him. Extract tissue to begin growi
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
 			$His
 			<<switch $organs[_i].type>>
-			<<case "penis" "scrotum" "foreskin" "prostate" "voicebox">>
+			<<case "foreskin" "penis" "prostate" "scrotum" "voicebox">>
 				$organs[_i].type is
-			<<case "testicles" "ovaries" "eyes" "cochleae" "ears">>
+			<<case "cochleae" "ears" "eyes" "ovaries" "testicles">>
 				$organs[_i].type are
 			<<case "pigTesticles">>
 				pig testicles are
diff --git a/src/pregmod/pRaped.tw b/src/pregmod/pRaped.tw
index ea0c45e4942f1dae025593242a1c1bd42692f46f..3cccd40ba963c5a37dc353fcf2046eeaad5bba0b 100644
--- a/src/pregmod/pRaped.tw
+++ b/src/pregmod/pRaped.tw
@@ -2,14 +2,37 @@
 
 <<set $raped = 1, $nextLink = "Nonrandom Event", $returnTo = "Nonrandom Event">>
 
+<<set $activeSlaveOneTimeMinAge = 16>>
+<<set $oneTimeDisableDisability = 1>>
+<<if $arcologies[0].FSSupremacistLawME == 1>>
+	<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
+<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
+	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set $fixedRace = _races.random()>>
+<</if>>
+<<set $activeSlave = GenerateNewSlave("XY")>>
+<<set $activeSlave.origin = "You sentenced her to enslavement for the attempted rape of a free woman.">>
+<<set $activeSlave.devotion = -100>>
+<<set $activeSlave.trust = -100>>
+<<set $activeSlave.health = random(-50,-20)>>
+<<set $activeSlave.anus = 0>>
+<<set $activeSlave.dick = 6>>
+<<set $activeSlave.balls = 5>>
+<<set $activeSlave.boobs = 0>>
+<<set $activeSlave.waist = 50>>
+<<set $activeSlave.skill.oral = 0>>
+<<set $activeSlave.skill.anal = 0>>
+<<set $activeSlave.behavioralFlaw = "arrogant">>
+<<set $activeSlave.sexualFlaw = "judgemental">>
+
 <<setPlayerPronouns>>
 
 While returning from a meeting with a prospective investor, an unfortunate wrong turn has led you into a rather seedy area of your arcology. You feel distinctly uncomfortable for some reason.
 
-<<if $PC.career == "mercenary">>
+<<if $PC.career == "mercenary" || $PC.warfare >= 85>>
 	The moment you hear the sound of the knife unsheathe your reflexes take over. With a single strike, the man tailing you lies in a heap on the ground.
 	<<set $raped = 0>>
-<<elseif $PC.career == "slaver">>
+<<elseif $PC.career == "slaver" || $PC.warfare >= 45>>
 	The moment you notice an arm coming around from behind you does your training kick in. You quickly disarm the assailant and knock them to the floor before placing them in a chokehold. Once they are subdued, you stand back to decide what to do next.
 	<<set $raped = 0>>
 <<elseif $PC.career == "gang">>
@@ -115,29 +138,6 @@ It would be prudent to up security in your arcology. That or take a guard along
 
 <<else>>
 
-<<set $activeSlaveOneTimeMinAge = 16>>
-<<set $oneTimeDisableDisability = 1>>
-<<if $arcologies[0].FSSupremacistLawME == 1>>
-	<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
-<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
-	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
-	<<set $fixedRace = _races.random()>>
-<</if>>
-<<include "Generate XY Slave">>
-<<set $activeSlave.origin = "You sentenced her to enslavement for the attempted rape of a free woman.">>
-<<set $activeSlave.devotion = -100>>
-<<set $activeSlave.trust = -100>>
-<<set $activeSlave.health = random(-50,-20)>>
-<<set $activeSlave.anus = 0>>
-<<set $activeSlave.dick = 6>>
-<<set $activeSlave.balls = 5>>
-<<set $activeSlave.boobs = 0>>
-<<set $activeSlave.waist = 50>>
-<<set $activeSlave.skill.oral = 0>>
-<<set $activeSlave.skill.anal = 0>>
-<<set $activeSlave.behavioralFlaw = "arrogant">>
-<<set $activeSlave.sexualFlaw = "judgemental">>
-
 <br><br>
 Now the only question is what to do with the would-be rapist. You could toss them out of the arcology, but it might be more fun to turn the tables on them.
 
@@ -155,7 +155,7 @@ Now the only question is what to do with the would-be rapist. You could toss the
 		<<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>>
 		<<replace "#result">>
 			You complete the legalities and biometric scanning quickly and without fuss. The idiot will regret crossing you when $he wakes in the penthouse for basic slave induction.
-		<<include "New Slave Intro">>
+			<<include "New Slave Intro">>
 		<</replace>>
 	<</link>>
 	<br><<link "Sentence $him to a day in the stocks, then enslave $him">>
@@ -174,9 +174,9 @@ Now the only question is what to do with the would-be rapist. You could toss the
 		<<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>>
 		<<replace "#result">>
 			You declare $his holes fair game for the entire arcology. $He spends a torturous day in the stocks before being hauled in for enslavement, somewhat @@.red;the worse for wear@@ and @@.red;acting oddly@@ due to $his ordeal, bruises all over $his body, cum leaking from $his @@.lime;loosened@@ anus<<if $activeSlave.vagina > -1>> and @@.lime;fucked-out@@ pussy<</if>>. The public @@.green;enjoys the fun.@@
-		<<run repX(500, "event")>>
-		<<set $arcologies[0].prosperity += 2>>
-		<<include "New Slave Intro">>
+			<<run repX(500, "event")>>
+			<<set $arcologies[0].prosperity += 2>>
+			<<include "New Slave Intro">>
 		<</replace>>
 	<</link>>
 	<<if $arcade > 0>>
@@ -186,7 +186,7 @@ Now the only question is what to do with the would-be rapist. You could toss the
 			<<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>>
 			<<replace "#result">>
 				You complete the legalities and biometric scanning quickly and cautiously. The idiot will be in for a surprise when $he awakes to find $he can't move and a dick is in $his ass.
-			<<run newSlave($activeSlave)>> /* skip New Slave Intro */
+				<<run newSlave($activeSlave)>> /* skip New Slave Intro */
 			<</replace>>
 		<</link>>
 	<</if>>
@@ -197,8 +197,8 @@ Now the only question is what to do with the would-be rapist. You could toss the
 				<<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>>
 				<<replace "#result">>
 					You complete the legalities and biometric scanning quickly and cautiously. The idiot will wake up <<if $dairyStimulatorsSetting > 1>>in agony as $his anus takes the rectal hydration dildo<<else>>to find $his chest has begun swelling with milk<</if>>.
-				<<set $activeSlave.boobs += 300>>
-				<<run newSlave($activeSlave)>> /* skip New Slave Intro */
+					<<set $activeSlave.boobs += 300>>
+					<<run newSlave($activeSlave)>> /* skip New Slave Intro */
 				<</replace>>
 			<</link>>
 		<</if>>
@@ -232,18 +232,18 @@ Now the only question is what to do with the would-be rapist. You could toss the
 			<<run newSlave($activeSlave)>>
 			<<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>>
 			<<replace "#result">>
-			You want $him to suffer for what $he tried to pull on you. You make sure $he is fully awake as $he is strapped into the autosurgery, taking the time to roughly fondle $his balls. You take great pleasure in watching $him struggle as $his testicles are removed. Once $he can stand again, it's off to the penthouse for basic slave induction.
-			<<include "New Slave Intro">>
+				You want $him to suffer for what $he tried to pull on you. You make sure $he is fully awake as $he is strapped into the autosurgery, taking the time to roughly fondle $his balls. You take great pleasure in watching $him struggle as $his testicles are removed. Once $he can stand again, it's off to the penthouse for basic slave induction.
+				<<include "New Slave Intro">>
 			<</replace>>
 		<</link>>
 	<</if>>
 <<else>>
 	//You lack the necessary funds to enslave $him.//
 <</if>>
-<<link "Publicly flog the criminal">>
+<br><<link "Publicly flog the criminal">>
 	<<replace "#result">>
-		Naturally, the wretch will be thrown out of the arcology: but an example must first be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting malefactor is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
-	<<run repX(500, "event")>>
+		Naturally, the wretch will be thrown out of the arcology, but an example must first be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting malefactor is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
+		<<run repX(500, "event")>>
 	<</replace>>
 <</link>>
 </span>
diff --git a/src/pregmod/pcSurgeryDegredation.tw b/src/pregmod/pcSurgeryDegredation.tw
index 6210a3b954b599dc73ea7fcdff9fb0c05127269f..aba352b342033f006db713277733d63d6d4c124c 100644
--- a/src/pregmod/pcSurgeryDegredation.tw
+++ b/src/pregmod/pcSurgeryDegredation.tw
@@ -158,9 +158,9 @@
 <<case "herm2truefemale">>
 	After a few hours, you awaken in the recovery wing with a distinct soreness between your legs and pain practically all over your body. You pull the covers off of yourself to catch sight of the result of the surgery and
 	<<if $PC.boobsBonus == 3>>
-		find that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. Your penis is gone, leaving you with just a vagina. Given the soreness in your lower belly, your prostate and other male reproductive organs have been removed as well. You can't tell much more until you get a good feel of it. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		find that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. Your penis is gone, leaving you with just a vagina. Given the soreness in your lower belly, your prostate and other male reproductive organs have been removed as well. You can't tell much more until you get a good feel of it. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<<else>>
-		find your penis and testicles removed, leaving you with just a vagina. Given the soreness in your lower belly, your prostate and other male reproductive organs have been removed as well. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		find your penis and testicles removed, leaving you with just a vagina. Given the soreness in your lower belly, your prostate and other male reproductive organs have been removed as well. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<</if>>
 	"So, how do you feel?", asks the surgeon's assistant, seating herself beside you. "I'd take it easy for the rest of the week, your body is going to take some time to get used to not having a penis anymore and to recover from all the changes. But if it makes you feel any better, you certainly are a lovely woman. Feel free to rest as long as you need before departing. If you need, or want, me, I'll be around." Exhausted from the procedure, you settle back down to recover for the rest of your stay.
 
@@ -188,9 +188,9 @@
 <<case "male2truefemale">>
 	After a few hours, you awaken in the recovery wing with a distinct soreness between your legs and pain practically all over your body. You pull the covers off of yourself to catch sight of the result of the surgery and find
 	<<if $PC.boobsBonus == 3>>
-		that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. Your dick is gone, along with the rest of your male reproductive organs, leaving you with a pussy, a new fertile set of ovaries and a fresh womb. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. Your dick is gone, along with the rest of your male reproductive organs, leaving you with a pussy, a new fertile set of ovaries and a fresh womb. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<<else>>
-		your dick is gone, along with the rest of your male reproductive organs, leaving you with a pussy, a new fertile set of ovaries and a fresh womb. You can't tell much more until you get a good feel of it, but you're too sore to try.<<if $PC.boobs == 0>> You do take a moment to fondle your new C-cup breasts though; they feel nice.<</if>> Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		your dick is gone, along with the rest of your male reproductive organs, leaving you with a pussy, a new fertile set of ovaries and a fresh womb. You can't tell much more until you get a good feel of it, but you're too sore to try.<<if $PC.boobs == 0>> You do take a moment to fondle your new C-cup breasts though; they feel nice.<</if>> Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<</if>>
 	"So, how do you feel?", asks the surgeon's assistant, seating herself beside you and placing a hand on your belly. "I'd take it easy for the rest of the week, your body is going to take some time to recover from all the changes. Now, this might be uncomfortable, but it would be best to check if your new parts are functioning correctly." She circles around until she is between your legs and disappears between your thighs. You feel face brush your inner legs as she brings her mouth to your fresh pussy and begins to enthusiastically eat you out. She is quite good at her job and quickly brings you to climax; your new vagina squirting girl cum across her face. She raises from your crotch and licks her lips. "Your new taste is good too. Feel free to rest as long as you need before departing. If you need, or want, me, I'll be around. Oh! And before you leave, we'll write a prescription for some birth control for you. You don't have to use it, but it'll be there for you." Exhausted from the procedure, you settle back down to play with your tits and recover for the rest of your stay.
 	<<if $PC.boobs == 0>><<set $PC.boobs = 1, $PC.boobsBonus = -2>><</if>>
@@ -198,9 +198,9 @@
 <<case "male2hermfemale">>
 	After a few hours, you awaken in the recovery wing with a distinct soreness between your legs and in your lower belly. You pull the covers off of yourself to catch sight of the result of the surgery and find
 	<<if $PC.boobsBonus == 3>>
-		that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. You see<<if $PC.ballsImplant < 1>> your new pussy peeking from under your testicles<<else>> that your balls are big enough to completely obscure your new pussy<</if>>. Your lower belly is slightly larger too, likely from your new womb. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		that your enormous breasts make it difficult to get a good look so you settle for the mirror-covered wall across from your bed. You see<<if $PC.ballsImplant < 1>> your new pussy peeking from under your testicles<<else>> that your balls are big enough to completely obscure your new pussy<</if>>. Your lower belly is slightly larger too, likely from your new womb. You can't tell much more until you get a good feel of it, but you're too sore to try. Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<<else>>
-		<<if $PC.ballsImplant < 1>>your new pussy peeking from under your testicles<<else>>that your balls are big enough to completely obscure your new pussy<</if>>. Your lower belly is slightly larger too, likely from your new womb. You can't tell much more until you get a good feel of it, but you're too sore to try.<<if $PC.boobs == 0>> You do take a moment to fondle your new C-cup breasts though; they feel nice.<</if>> Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you a man anymore.
+		<<if $PC.ballsImplant < 1>>your new pussy peeking from under your testicles<<else>>that your balls are big enough to completely obscure your new pussy<</if>>. Your lower belly is slightly larger too, likely from your new womb. You can't tell much more until you get a good feel of it, but you're too sore to try.<<if $PC.boobs == 0>> You do take a moment to fondle your new C-cup breasts though; they feel nice.<</if>> Your body has also undergone large-scale reconstructive surgery; it is unlikely anyone will recognize you as a man anymore.
 	<</if>>
 	"So, how do you feel?", asks the surgeon's assistant, seating herself beside you and placing a hand on your belly. "I'd take it easy for the rest of the week, your body is going to take some time to recover from all the changes. Now, this might be uncomfortable, but it would be best to check if your new parts are functioning correctly." She circles around until she is between your legs and disappears between your thighs. You feel <<if $PC.ballsImplant > 1>>her lift your engorged sack and leave it resting atop her head<<else>>her head brush against your sack<</if>> as she brings her mouth to your fresh pussy and begins to enthusiastically eat you out. She is quite good at her job and quickly brings you to climax; your new vagina squirting girl cum across her face and your neglected dick spraying cum across your belly. She raises from your crotch to lick up your wayward cum. "I always did like the taste of you and your new flavor is good too. Feel free to rest as long as you need before departing. If you need, or want, me, I'll be around. Oh! And before you leave, we'll write a prescription for some birth control for you. You don't have to use it, but it'll be there for you. Just try not to mix your two halves, unless you want to watch your middle steadily swell with your own child." Exhausted from the procedure, you settle back down to play with your tits and recover for the rest of your stay.
 	<<if $PC.boobs == 0>><<set $PC.boobs = 1, $PC.boobsBonus = -2>><</if>>
diff --git a/src/pregmod/reMaleArcologyOwner.tw b/src/pregmod/reMaleArcologyOwner.tw
index 4719c281cc81106dba5fc8f7dba84105e37df7e4..bcf092d66b697125aba391231802a713297bd5b9 100644
--- a/src/pregmod/reMaleArcologyOwner.tw
+++ b/src/pregmod/reMaleArcologyOwner.tw
@@ -4,9 +4,9 @@
 
 The more reputable you've gotten, the more rarefied your entertainments have become. Parties featuring celebrities, old world national leaders, and Free Cities arcology owners have become a nearly nightly experience for you, an expected part of your routine as one of the Free Cities' leading citizens. According to your whims and predilections, you have the choice of participating all night or just making a brief appearance at the start. The important thing is that they're here, come to pay tribute by their presence.
 <br><br>
-Tonight there are several attendees of such stature that you must exchange pleasantries with each. The last is a fellow arcology owner, not quite up to your stature of course, but certainly worth conciliating. As usual, it's a man. He stands a touch taller than you, and is wearing one of the best-tailored suits you've ever seen. The pants are cut perfectly to draw your eyes to his bulge, and, from what you can see, he is quite toned; the jacket is masculine, and accentuates his fine chest. He is obviously well into middle age, but has made no attempt to hide the fact, allowing his graying hair to proudly display his experience.
+Tonight there are several attendees of such stature that you must exchange pleasantries with each. The last is a fellow arcology owner, not quite up to your stature of course, but certainly worth conciliating. As usual, it's a man. He stands a touch taller than you, and is wearing one of the best-tailored suits you've ever seen. The pants are cut perfectly to draw your eyes to his bulge, and, from what you can see, he is quite toned; the jacket is masculine, and accentuates his fine chest. He is obviously well into middle age, but has made no attempt to hide this fact, allowing his graying hair to proudly display his experience.
 <br><br>
-He strikes a fine balance in conversation with you, firm enough to not overpower you, yet neither aggressive nor insistent. He does not take too much of your time, but after you've moved on to your next prominent guest, you receive a brief private message from him. "Surely it's been a while since you've met someone who could make you feel like a woman," it reads. "I'm sure your slaves are fun enough, but letting one of them or some citizen be your man would be fatally stupid. I don't think anyone would look down on you for hooking up with me, though. No strings attached." You glance over at where he's standing<<if $PC.belly >= 5000>> a little surprised, men usually aren't so forthcoming with women as visibly pregnant as you are<</if>>. He's listening politely to a business proposition, and he turns his head slightly toward you, one corner of his firm mouth quirking upward.
+He strikes a fine balance in conversation with you, firm enough to not overpower you, yet neither aggressive nor insistent. He does not take too much of your time, but after you've moved on to your next prominent guest, you receive a brief private message from him. "Surely it's been a while since you've met someone who could make you feel like a woman," it reads. "I'm sure your slaves are fun enough, but letting one of them or some citizen be your man would be fatally stupid. I don't think anyone would look down on you for hooking up with me, though. No strings attached." You glance over at where he's standing<<if $PC.belly >= 5000>> a little surprised; men usually aren't so forthcoming with women as visibly pregnant as you are<</if>>. He's listening politely to a business proposition, and he turns his head slightly toward you, one corner of his firm mouth quirking upward.
 <br><br>
 
 <span id="result">
@@ -42,7 +42,7 @@ He strikes a fine balance in conversation with you, firm enough to not overpower
 				<<set $desc = "a thank-you note from a male arcology owner of your acquaintance that smells strongly of lust">>
 				<<set $trinkets.push($desc)>>
 			<<else>>
-				He slips out of his clothes, revealing a triathlete's tanned and sculpted body, and joins you in the bed. You direct him onto his back and hilt yourself on his dick. As you savor the feeling of being filled, you notice he doesn't quite know how to properly please a woman of your fecundity, something easily corrected. You're certain he has learned several new positions by the end of your several hour long session and after you both stumble back to the party, he gives you a deep kiss in full public view. @@.green;Your reputation has greatly improved.@@
+				He slips out of his clothes, revealing a triathlete's tanned and sculpted body, and joins you in the bed. You direct him onto his back and hilt yourself on his dick. As you savor the feeling of being filled, you notice he doesn't quite know how to properly please a woman of your fecundity, something easily corrected. You're certain he has learned several new positions by the end of your several-hour-long session and after you both stumble back to the party, he gives you a deep kiss in full public view. @@.green;Your reputation has greatly improved.@@
 				<<run repX(500, "event")>>
 				<<set $desc = "a flirtatious thank-you note from a male arcology owner you broke in to lusty preggo sex">>
 				<<set $trinkets.push($desc)>>
@@ -56,18 +56,18 @@ He strikes a fine balance in conversation with you, firm enough to not overpower
 				<<if $PC.boobsImplant != 1>>
 					After a few minutes of you jiggling your cleavage around, however, it becomes apparent that, while he does frequently eye it, it just isn't to his tastes. He excuses himself and withdraws. You return to your <<if $PC.refreshmentType == 0>>$PC.refreshment<<elseif $PC.refreshmentType == 1>>glass of $PC.refreshment<<elseif $PC.refreshmentType == 2>>plate of $PC.refreshment<<elseif $PC.refreshmentType == 3>>pouch of $PC.refreshment<<elseif $PC.refreshmentType == 4>>syringe of $PC.refreshment<<elseif $PC.refreshmentType == 5>>bottle of $PC.refreshment<<elseif $PC.refreshmentType == 6>>sheet of $PC.refreshment<</if>>, consoling yourself that you are not exactly starved for company.
 				<<else>>
-					After a few minutes, it becomes clear that something else is on his mind than renewable energy and he politely excuses himself, though not before dropping something into your cleavage. The women watches dejectedly as you fish out his business card. Taking the hint, you scan the room and find him slowly leaving once he makes eye contact; a clear invitation to follow him. As you wander down the hall, you feel a hand cup one of your firm globes and pull you into an embrace. While he seems content to just grope you, you had other plans and begin undoing his belt. You gasp a little as his member pops out into your hands, eager for some attention of its own. He wastes no time in pulling your ample bust downwards and slipping his eager cock between your breasts. You grab his hips for support as he vigorously pistons into your chest, struggling to retake control of the situation before he renders you enable to return to the party. With a joyous groan, he blows his load deep into your bosom and down your dress. As he helps you to your feet, and the stain under your wrack grows larger, you give him a kiss on the cheek and head off to change. He returns to the party, and from your serving slaves, seems to have boasted about how well you do business. @@.green;Your reputation has slightly improved,@@ though nowhere near as much as his.
+					After a few minutes, it becomes clear that something else is on his mind than renewable energy and he politely excuses himself, though not before dropping something into your cleavage. The women watches dejectedly as you fish out his business card. Taking the hint, you scan the room and find him slowly leaving once he makes eye contact; a clear invitation to follow him. As you wander down the hall, you feel a hand cup one of your firm globes and pull you into an embrace. While he seems content to just grope you, you had other plans and begin undoing his belt. You gasp a little as his member pops out into your hands, eager for some attention of its own. He wastes no time in pulling your ample bust downwards and slipping his eager cock between your breasts. You grab his hips for support as he vigorously pistons into your chest, struggling to retake control of the situation before he renders you unable to return to the party. With a joyous groan, he blows his load deep into your bosom and down your dress. As he helps you to your feet, and the stain under your rack grows larger, you give him a kiss on the cheek and head off to change. He returns to the party, and from what your serving slaves tell you later, seems to have boasted about how well you do business. @@.green;Your reputation has slightly improved,@@ though nowhere near as much as his.
 					<<run repX(100, "event")>>
 					<<set $desc = "a thank-you note from a male arcology owner of your acquaintance that not-so-subtly suggests getting a bigger pair of implants">>
 					<<set $trinkets.push($desc)>>
 				<</if>>
 			<<elseif _randomForeignFS > 40 && $PC.boobsImplant != 1>> purist + expansion
-				conversation between him and the woman trying to convince him to invest in her solar power concern. After a few minutes of you jiggling your cleavage around, it becomes clear that his attention span for renewable energy is no where near what it is for big breasts just begging to pop out of their top. He excuses himself from the conversion, though not without intentionally bumping into your rack and slipping into the hall. The women glares daggers at you and returns to her drink, leaving you to follow suit and slip out of the party. As you wander down the hall, you feel a hand struggle to cup one of your jiggly globes and pull you into an embrace. While he seems content to just grope you, you had other plans and begin undoing his belt. You gasp a little as his member pops out into your hands, eager for some attention of its own. He wastes no time in pulling your ample bust downwards and slipping his eager cock between your breasts. You grab his hips for support as he vigorously pistons into your chest in an attempt to keep your balance under their motion and to make an attempt to retake control of the situation before he renders you enable to return to the party. With a joyous groan, he blows his load deep into your bosom and down your dress. As he helps you to your feet, and the stain under your wrack grows larger, you give him a kiss on the cheek and head off to change. He returns to the party, and from your serving slaves, seems to have boasted about how well you do business. @@.green;Your reputation has slightly improved,@@ though nowhere near as much as his.
+				conversation between him and the woman trying to convince him to invest in her solar power concern. After a few minutes of you jiggling your cleavage around, it becomes clear that his attention span for renewable energy is no where near what it is for big breasts just begging to pop out of their top. He excuses himself from the conversion, though not without intentionally bumping into your rack and slipping into the hall. The woman glares daggers at you and returns to her drink, leaving you to follow suit and slip out of the party. As you wander down the hall, you feel a hand struggle to cup one of your jiggly globes and pull you into an embrace. While he seems content to just grope you, you had other plans and begin undoing his belt. You gasp a little as his member pops out into your hands, eager for some attention of its own. He wastes no time in pulling your ample bust downwards and slipping his eager cock between your breasts. You grab his hips for support as he vigorously pistons into your chest in an attempt to keep your balance under their motion and to make an attempt to retake control of the situation before he renders you unable to return to the party. With a joyous groan, he blows his load deep into your bosom and down your dress. As he helps you to your feet, and the stain under your rack grows larger, you give him a kiss on the cheek and head off to change. He returns to the party, and from what your serving slaves tell you later, seems to have boasted about how well you do business. @@.green;Your reputation has slightly improved,@@ though nowhere near as much as his.
 				<<run repX(100, "event")>>
-				<<set $desc = "a thank-you note from a male arcology owner of your acquaintance with an attach list of natural supplements to make your tits even bigger">>
+				<<set $desc = "a thank-you note from a male arcology owner of your acquaintance with an attached list of natural supplements to make your tits even bigger">>
 				<<set $trinkets.push($desc)>>
 			<<else>>
-				conversation between him and the woman trying to convince him to invest in her solar power concern. You attempts, at first, appear to be working as he begins to stutter and lose focus on the topic at hand, but he soon apologizes, wraps an arm around your shoulders, pulls you close and starts groping your enormous funbags. He returns to discussing business while using you like a stress ball and manages to seal a rather lucrative business deal. He gives you an appreciative squeeze and heads on his way, leaving you dumbfounded at what just happened. His reputation has improved significantly, while your status @@.red;as nothing more than stress relief@@ is made clear.
+				conversation between him and the woman trying to convince him to invest in her solar power concern. Your attempts, at first, appear to be working as he begins to stutter and lose focus on the topic at hand, but he soon apologizes, wraps an arm around your shoulders, pulls you close and starts groping your enormous funbags. He returns to discussing business while using you like a stress ball and manages to seal a rather lucrative business deal. He gives you an appreciative squeeze and heads on his way, leaving you dumbfounded at what just happened. His reputation has improved significantly, while your status @@.red;as nothing more than stress relief@@ is made clear.
 				<<run repX(-500, "event")>>
 			<</if>>
 		<<else>>
diff --git a/src/pregmod/reMaleCitizenHookup.tw b/src/pregmod/reMaleCitizenHookup.tw
index 03bf1292df03f8a308365ecfbd9d82e9b9550562..e44c6ac301147e2385b9604dabd98246daf6a71b 100644
--- a/src/pregmod/reMaleCitizenHookup.tw
+++ b/src/pregmod/reMaleCitizenHookup.tw
@@ -189,8 +189,8 @@ He's clearly attracted to you; even the most consummate actor would have difficu
 	<<replace "#result">>
 	You're not exactly starved for casual sex, but you've never thought there was any such thing as too much of a good thing. <<if _FS != "Physical Idealist">>You pull his arm around your waist<<else>>You nudge him in the ribs and motion to the door<</if>>. You hear a slight gasp from him as he realizes that his gambit has succeeded with more immediate effect than he expected. He shivers with anticipation as you steer him back through a side door, grabbing a pair of glasses of <<if $PC.refreshmentType == 1>>$PC.refreshment<<else>>liquor<</if>> on the way, and making a discreet exit towards your private suite.
 	<<if $Concubine != 0 && $Concubine.intelligence+$Concubine.intelligenceImplant > 50>>
-		<<setLocalPronouns $Concubine 2>>
-		$Concubine.slaveName is there, of course, and _he2 instantly <<if canSee($Concubine)>>sees<<else>>realizes<</if>> that _his2 continued presence for a ménage à trois is wanted by both you and your guest.
+		<<setLocalPronouns $Concubine>>
+		$Concubine.slaveName is there, of course, and $he instantly <<if canSee($Concubine)>>sees<<else>>realizes<</if>> that $his continued presence for a ménage à trois is wanted by both you and your guest.
 	<</if>>
 	Your guest restrains his eager praise now that you're in private, but his wide-eyed appreciation of your domain is compliment enough. Once in your suite, you undress him, revealing
 	<<switch _FS>>
@@ -227,7 +227,7 @@ He's clearly attracted to you; even the most consummate actor would have difficu
 	<<case "Slimness Enthusiast">>
 		lean muscles, a smooth waist, trim hips and a cute little ass, and gently push him back onto your bed. You tease him as you remove your evening dress, crawl over him and impale yourself on his eager shaft before beginning to ride him. Even a female arcology owner like yourself appreciates a good hard fuck, since regular submission to a pounding from sex slaves would be a scandal. There's little opprobrium waiting for you if it's known he had you, though, and he is eagerly thrusting into your pussy. You shift into a slightly more comfortable position<<if $PC.belly >= 5000>> (one that forces him to bear the weight of your heavy middle) <</if>>and ride him to orgasm. You follow shortly after, feeling the heat of his seed in the depths of your pussy as it clamps down around his dick. Thankfully, he isn't spent yet and begins anew, quickly carrying your climax to a second orgasm and drawing an adorable moan out of you.
 	<<case "Asset Expansionist">>
-		an inhumanly enormous ass to counterbalance those enormous balls and a semihard cock, unable to become fully erect. You have to struggle to get him onto your bed. You tease him as you remove your evening dress, crawl over him and
+		an inhumanly enormous ass to counterbalance those enormous balls and a semi-hard cock, unable to become fully erect. You have to struggle to get him onto your bed. You tease him as you remove your evening dress, crawl over him and
 		<<if $PC.newVag == 1>>
 			impale yourself on his monster shaft as far as you can, quivering in joy at its girth filling you.
 		<<elseif $PC.career == "escort">>
@@ -296,7 +296,8 @@ He's clearly attracted to you; even the most consummate actor would have difficu
 		<</if>>
 	<<elseif _FS != "Youth Preferentialist">>
 		<<if $Concubine != 0 && $Concubine.amp != 1>>
-			The <<if canSee($Concubine)>>view of your bouncing tits<<elseif canHear($activeSlave)>>sound of lusty sex<<else>>vibrations from your bed bouncing up and down<</if>> is too much for $Concubine.slaveName to resist and crawls over to kiss and caress you as your lover finishes.
+			<<setLocalPronouns $Concubine>>
+			The <<if canSee($Concubine)>>view of your bouncing tits<<elseif canHear($activeSlave)>>sound of lusty sex<<else>>vibrations from your bed bouncing up and down<</if>> is too much for $Concubine.slaveName to resist and so $he crawls over to kiss and caress you as your lover finishes.
 		<</if>>
 	<</if>>
 	Sometimes society overlooks that you are a woman and have certain needs, but your lover tonight knows exactly how to treat you. When your guest <<if _FS != "Youth Preferentialist">>is finally spent<<else>>wakes up from against your body<</if>>, he showers, dresses, and leaves discreetly, offering you a proper thank you. This is the kind of thing that @@.green;builds a lasting reputation@@ in the Free Cities.
diff --git a/src/pregmod/rePregInventor.tw b/src/pregmod/rePregInventor.tw
index 8d1549144dea6c8d881f622226b44cc1cb423b7d..21c9224fab9e150de1a9c8c9ba936a9bdd20e2ac 100644
--- a/src/pregmod/rePregInventor.tw
+++ b/src/pregmod/rePregInventor.tw
@@ -94,7 +94,7 @@
 					<<else>>
 						surprisingly resilient, tight little pussy,
 					<</if>>
-					<<set _dump = VaginalVCheck()>>
+					<<run VaginalVCheck()>>
 			<<else>>
 				clench your legs around $his slutty head as $he drives your pussy over the edge with $his tongue,
 				<<set $activeSlave.counter.oral++, $oralTotal++>>
diff --git a/src/pregmod/saClothes.tw b/src/pregmod/saClothes.tw
index 914cf0a4ae70428043c41a2618ba380caa62096a..83f0f74c83c61be9f421819d49f88a88f7835146 100644
--- a/src/pregmod/saClothes.tw
+++ b/src/pregmod/saClothes.tw
@@ -408,13 +408,13 @@
 			<<if ($slaves[$i].collar == "dildo gag")>>
 				<<if $slaves[$i].skill.oral <= 10>>
 					Living gagged by a dildo, $he can't help but get better at having things down $his throat.
-					<<set $skillIncrease = 5>><<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+					<<= SkillIncrease.Oral($slaves[$i], 5)>>
 				<</if>>
 			<</if>>
 			<<if ($slaves[$i].collar == "massive dildo gag")>>
 				<<if $slaves[$i].skill.oral < 75>>
 					Living gagged by such an immense dildo, $he can't help but get even better at having giant things rammed down $his throat.
-					<<set $skillIncrease = 5>><<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+					<<= SkillIncrease.Oral($slaves[$i], 5)>>
 				<</if>>
 			<</if>>
 		<</if>>
diff --git a/src/pregmod/saPorn.tw b/src/pregmod/saPorn.tw
index 1c25c8d4df73435c8a467fcab66b15f2c739ca1e..059e99f3b75f2564b1128e266ae9e88aa42cc115 100644
--- a/src/pregmod/saPorn.tw
+++ b/src/pregmod/saPorn.tw
@@ -96,7 +96,7 @@
 	<<elseif $PC.hacking < 0>>
 		With your lack of skill with computers you manage to misidentify $his content, complicating searches.
 	<</if>>
-	<<= IncreasePCSkills('hacking',  0.1)>>
+	<<= IncreasePCSkills('hacking', 0.1)>>
 
 	/*Paraphilias have the highest take of viewers*/
 	<<if $slaves[$i].sexualFlaw == "neglectful">>
@@ -1168,7 +1168,7 @@
 				watching $him abuse others,
 			<<case "sexual torture">>
 				<<set $slaves[$i].pornPrestigeDesc = "She has a following in slave pornography. Thousands have enjoyed her getting off from the suffering she caused.">>
-				$him getting off from the suffering she caused,
+				$him getting off from the suffering $he caused,
 			<<case "self hating">>
 				<<set $slaves[$i].pornPrestigeDesc = "She has a following in slave pornography. Thousands have enjoyed watching her happily suffer.">>
 				watching $him happily suffer,
diff --git a/src/pregmod/seDeath.tw b/src/pregmod/seDeath.tw
index 27e6a0cdc31efd6aa0a029e75c5b85a36aee4d15..51cd278c447670cf8fcd9d2f936b1f266cf768d5 100644
--- a/src/pregmod/seDeath.tw
+++ b/src/pregmod/seDeath.tw
@@ -3,7 +3,7 @@
 <<set $nextButton = "Continue", $nextLink = "Scheduled Event">>
 
 <<set _killedSlaves = []>>
-<<foreach _slave of $slaves>>
+<<for _slave range $slaves>>
 	<<switch _slave.death.toLowerCase()>>
 		<<case "old">>
 			<<DeathOldAge _slave>>
@@ -22,16 +22,16 @@
 			<br><br><hr style="margin:0"><br>
 			<<set _killedSlaves.push(_slave)>>
 	<</switch>>
-<</foreach>>
+<</for>>
 <<if _killedSlaves.length == 0>>
 	/* if something beats this to the slaves, this should kick the player along instead of leaving them at a blank screen */
 	<<set $slaveDeath = 0>>
 	<<goto "Scheduled Event">>
 <</if>>
-<<foreach _slave of _killedSlaves>>
+<<for _slave range _killedSlaves>>
 	<<set $activeSlave = _slave>>
 	<<= removeActiveSlave() >>
-<</foreach>>
+<</for>>
 <<unset _killedSlaves>>
 
-<<set $slaveDeath = 0>>
\ No newline at end of file
+<<set $slaveDeath = 0>>
diff --git a/src/pregmod/seFCTVshows.tw b/src/pregmod/seFCTVshows.tw
index b9f4c00eed4a4142503c7a4b69967c462b7d1fe0..dd352779a515d38ac102935f62885a044998105a 100644
--- a/src/pregmod/seFCTVshows.tw
+++ b/src/pregmod/seFCTVshows.tw
@@ -6,22 +6,22 @@
 <<else>>
 	/* we need to check for pansy no-extreme squick stuff */
 	<<if $minimumSlaveAge > 13 && ($randShow == 12 || $randShow == 14)>>
-		<<set $randShow = either(0,1,2,3,4,5,6,7,8,9,10,11,13)>>
+		<<set $randShow = either(0,1,2,3,4,5,6,7,8,9,10,11,13,16)>>
 		There is an audible tone from your screen, which then displays a message: <i>Actor not vintage enough, changing program.</i>
 	<</if>>
 	<<if $seeExtreme == 0 && $randShow == 10>>
-		<<set $randShow = either(0,1,2,3,4,5,6,7,8,9,11,12)>>
+		<<set $randShow = either(0,1,2,3,4,5,6,7,8,9,11,12,16)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too much hugging detected, changing program.</i>
 	<</if>>
 	<<if $seeHyperPreg == 0 && $randShow == 8>>
-		<<set $randShow = either(0,1,2,3,4,5,6,7,9,11,12)>>
+		<<set $randShow = either(0,1,2,3,4,5,6,7,9,11,12,16)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too much happiness detected, changing program.</i>
 	<</if>>
 	<<if $seePreg == 0 && ($randShow == 5 || $randShow == 8)>>
-		<<set $randShow = either(0,1,2,3,4,6,7,9,11,12)>>
+		<<set $randShow = either(0,1,2,3,4,6,7,9,11,12,16)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too much baking detected, changing program.</i>
 	<</if>>
-	<<if $seeDicks == 0 && $makeDicks == 0 && $randShow == 10>>
+	<<if $seeDicks == 0 && $makeDicks == 0 && ($randShow == 10 || $randShow == 16)>>
 		<<set $randShow = either(0,1,2,3,4,11,12)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too many hot dogs detected, changing program.</i>
 	<</if>>
@@ -240,7 +240,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.devotion = random(40,60)>>
 		<<set $activeSlave.weight = random(-10,10)>>
 		<<set $activeSlave.waist = random(-45,25)>>
@@ -287,7 +287,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 20>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.weight = random(10,20)>>
 		<<set $activeSlave.waist = random(-25,25)>>
 		<<set $activeSlave.anus = 1>>
@@ -340,7 +340,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 24>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.weight = random(20,40)>>
 		<<set $activeSlave.waist = random(-25,25)>>
 		<<set $activeSlave.boobs = (random(4,6)*100)>>
@@ -385,7 +385,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 40>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.weight = random(20,90)>>
 		<<set $activeSlave.waist = random(-45,45)>>
 		<<set $activeSlave.boobs = (random(20,30)*50)>>
@@ -426,7 +426,7 @@
 	<<elseif $randShow == 6>> /* discount young hottie */
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.face = random(70,100)>>
 		<<set $activeSlave.weight = random(-5,10)>>
 		<<set $activeSlave.waist = random(-45,25)>>
@@ -460,7 +460,7 @@
 	<<elseif $randShow == 7 || $randShow == 8>> /* huge balls */
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.anus = 2>>
 		<<set $activeSlave.balls = random(20,35)>>
 		<<set $activeSlave.scrotum = $activeSlave.balls>>
@@ -475,7 +475,7 @@
 	<<elseif $randShow == 9>> /* mpreg dickgirl */
 		<<set $activeSlaveOneTimeMaxAge = 22>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.anus = 2>>
 		<<set $activeSlave.vagina = -1>>
 		<<set $activeSlave.ovaries = 0>>
@@ -787,7 +787,7 @@
 			<<set _model.boobs = 0>>
 			<<set _model.hLength = 10>>
 			<<set _model.hColor = "black">>
-			
+
 			<<set _model2 = BaseSlave()>>
 			<<set _model2.devotion = 0>>
 			<<set _model2.trust = 0>>
@@ -846,7 +846,7 @@
 			<<set _model.hips = 3>>
 			<<set _model.clothes = "a ball gown">>
 			<<set _model.shoes = "heels">>
-			
+
 			<<set _model2 = BaseSlave()>>
 			<<set _model2.dick = 4>>
 			<<set _model2.boobs = 0>>
@@ -920,7 +920,7 @@
 		<<set _mindy.butt = 3>>
 		<<set _mindy.hips = 3>>
 		<<set _mindy.clothes = "a string bikini">>
-		
+
 		<<set _mike = BaseSlave()>>
 		<<set _mike.dick = 7>>
 		<<set _mike.faceShape = "masculine">>
@@ -1593,6 +1593,49 @@
 		<br><br>
 		Captain Orca rushes up the stairs to reveal over the aft the approach of a viking ship. Standing at its prow a blonde man covered in blue woad tattoos shouting wildly and firing two automatic rifles off into the air. The screen stops there with a "to be continued" overlaid on the screen.
 	<</if>>
+<<case 16>>
+	<<set $lastShow = 16, $showSixteen++>>
+	<<if $showSixteen == 3>><<set $showSixteen = 1>><</if>>
+	/*<<if $showSixteen == 1>>*/
+
+	/* All actors are at least 18 */
+	<br>As you snuggle in for the night<<if $Concubine != 0>> with your concubine<</if>>, you <<if $FCTVremote == 1>>tune to<<else>>begin watching<</if>> the <i>Age of Slavery</i> channel.  With so many new types of archologies emerging, it's sometimes difficult to tell if you are watching events unfolding on a set or in a real archology with a historical society.
+	<br><br>“Well, you did well to win the ‘cleanest urchin’ contest.”
+	<br>Currently you seem to be watching a scene from the industrial revolution, in a smoke smudged brick courtyard by a factory.  A stout manager, dressed in a black suit, is leading a thin urchin toward a wooden building built out from the main factory.
+	<br>“Thank you, sir,” the urchin gulps.  “My mother really needs the money. You promised a shilling?”
+	<br>“And I really need to recover these bearings!” The stout man proclaims.  “I’m surprised you were so modest, though.  Someone with skin as pure as yours doesn’t need to be ashamed of it.”
+	<br>“Uh, I'm fair like my mother, sir.” The waif hugs their arms around their chest.
+	<br>“Well she must be helping keep you clean, boy!”  The man laughs, and flings open the door to the outbuilding, revealing a series of tanks about three times as tall as he is.
+	<br>“This one right here,” he taps the nearest, “is almost full of water.  However, the blasted mixer for the tank has fallen apart.”  There is enough light entering from the door to show a belt driven mixer hanging above the tank, with a missing plate and empty sockets. “The bearings are about an inch across, and fell right in the damn tank.  I can’t drain the tank without those bearings because they’re valuable, and I can’t foul the drain.  But I can’t seem to fish them out either, it’s too dark.  That’s why I needed someone clean, someone that won’t get their filth in my tank.  There’s a shilling if you can get me back all eight of my bearings in ten minutes.”
+	<br>“Just ten minutes sir?”
+	<br>“Time is money.  Now strip.”
+	<br>The urchin hesitates.
+	<br>“Still shy?” the man leers.
+	<br>“I’ll do it.” The youth strips off his shirt and steps inside, shutting the door before dropping his trousers.
+	<br>“Hand me your clothes then, NOTHING IN MY TANK.” The man grumps.
+	<br>The camera cuts inside to show a dim black and white view of the youth’s nude silhouette scrambling up the tank, fumbling with the lid and slipping inside.  They pass up a series of bearings quickly for a while, but seem to struggle to find the final ones.
+	<br>“TIME!” Calls the man, holstering his pocket watch.
+	<br>“Sir, I can’t find the last two!”  The youth splutters.
+	<br>“Can you find the fucking holes!?!” the man roars.
+	<br>“E-eight…” the lad responds, crestfallen.
+	<br>“Then here’s the deal.  Let’s make it interesting.  I will double your wages.  Double them!  Two shillings! If you can find your own fucking asshole and shove the six you have in there, then find the last two.  Sloppy idiot.”
+	<br>The youth freezes.  “Sir?”
+	<br>“You heard me.  You’re not losing those; polish them!  I’m not even peeking, keep your precious privacy.”
+	<br>You can see the hesitation in the outline of the desperate youth, then a slump of the shoulders.  “Yes, sir.”
+	<br>Perched on top of the tank, they bend over with their hand on the mixer and begin inserting the bearings into their new housing.  They are each about an inch wide, and the first takes quite some time.
+	<br>“Hurry up, damn it!” the man roars.
+	<br>The urchin jumps, and then jumps again as the bearing slips home.  They freeze for a moment, trembling.  Then begin pushing in the others.
+	<br>“WELL?”
+	<br>“They’re in, sir,” he responds weakly, and slips into the tank.  The man harrumphs and starts examining his watch again.  After a few minutes have passed, the lad pops up with the seventh bearing, and then returns to the bottom.  They’re clearly holding their breath as long as they can.
+	<br><br>“TIME!” The man roars again.
+	<br>Spluttering, the youth surfaces.  “I-I… I can’t find it!” he cries desperately.  Splashing his way out of the tank and scrambling toward the door, he pauses to force down a sudden erection.  The man flings open the door, letting daylight stream in and briefly washing out the black and white camera.  His pants are also open and showing an erection raging as fiercely as he is.
+	<br>“Then you need some blasted motivation!  I’ll pack those bearings in myself!”
+	<br>The youth shrieks, and in a panic sprints around the tank.  The man follows closely, and then chases him out the door.  With no time to grab his clothing, the youth squirts out bearings as he runs, before making the relative safety of the street, still nude.  A camera from the street reveals an interesting surprise as the desperation on the fleeing youth’s face shifts to consternation.  Heads on the street turn, too, as he drops the last bearings and spurts white over coal black skin.  There was more than water in the tank: he’s dyed now as black as night from head to toe.
+	<br>Pointing and laughing uproariously, the man flips the eighth bearing into the air before pocketing it again and buttoning up his pants.  The camera pans out to show the factory’s name as “Titan’s Textiles.”
+	<<if $Concubine != 0 && canTalk($Concubine)>>
+		<<run Enunciate($Concubine)>>
+		<br><br>“Mmm, I could u<<s>>e a little <<s>>omething like that in<<s>>ide MY butt,” $Concubine.slaveName whispers in your ear. You mention you have something better in mind, and pounce.
+	<</if>>
 
 <<default>>
 	It seems there's a technical error preventing you from streaming, you tell $assistantName to look into it.
diff --git a/src/pregmod/seFCTVwatch.tw b/src/pregmod/seFCTVwatch.tw
index c9734cc524680d91f1198cead25687f986d226db..dda84826e9f0d66fa9106ff22396d571ef2a495e 100644
--- a/src/pregmod/seFCTVwatch.tw
+++ b/src/pregmod/seFCTVwatch.tw
@@ -16,11 +16,15 @@
 <<if ndef $showFifteen>> /* the pirate channel */
 	<<set $showFifteen = 0>>
 <</if>>
-<<set $randShow = random(0,15)>>
+<<if ndef $showSixteen>> /* Ages of Slavery channel */
+	<<set $showSixteen = 0>>
+<</if>>
+
+<<set $randShow = random(0,16)>>
 <<set $FCTVshow = 0>>
 <<if $randShow == $lastShow>>
 	<<set $randShow += 1>>
-	<<if $randShow > 15>>
+	<<if $randShow > 16>>
 		<<set $randShow = 0>>
 	<</if>>
 <</if>>
@@ -45,20 +49,20 @@ Tired after a long day, you tell <<if $Concubine != 0>>@@.pink;$Concubine.slaveN
 <tr><th>
 <<link 0>>
 	<<set $randShow = 0>>
-    <<replace "#show">>
-        <<include "SE FCTV Shows">>
-    <</replace>>
+	<<replace "#show">>
+		<<include "SE FCTV Shows">>
+	<</replace>>
 <</link>>
 <<link 1>>
 	<<set $randShow = 1>>
-    <<replace "#show">>
-        <<include "SE FCTV Shows">>
-    <</replace>>
+	<<replace "#show">>
+		<<include "SE FCTV Shows">>
+	<</replace>>
 <</link>>
 <<link 2>>
 	<<set $randShow = 2>>
-    <<replace "#show">>
-        <<include "SE FCTV Shows">>
+	<<replace "#show">>
+		<<include "SE FCTV Shows">>
 	<</replace>>
 <</link>>
 <<if $cheatMode == 1 || $debugMode == 1>> /* Disable the home slave shopping network for normies because exploits. */
@@ -143,6 +147,12 @@ Tired after a long day, you tell <<if $Concubine != 0>>@@.pink;$Concubine.slaveN
 		<<include "SE FCTV Shows">>
 	<</replace>>
 <</link>>
+<<link 16>>
+	<<set $randShow = 16>>
+	<<replace "#show">>
+		<<include "SE FCTV Shows">>
+	<</replace>>
+<</link>>
 <<if $cheatMode == 1 || $debugMode == 1>> /* remove toggle for normies */
 	|
 	<<link "Toggle inappropriate">>
@@ -174,7 +184,7 @@ Tired after a long day, you tell <<if $Concubine != 0>>@@.pink;$Concubine.slaveN
 		<<set $randShow = either(0,1,2,3,4,6,7,9,11,12)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too much baking detected, changing program.</i>
 	<</if>>
-	<<if $seeDicks == 0 && $makeDicks == 0 && $randShow == 10>>
+	<<if $seeDicks == 0 && $makeDicks == 0 && ($randShow == 10 || $randShow == 16)>>
 		<<set $randShow = either(0,1,2,3,4,11,12)>>
 		There is an audible tone from your screen, which then displays a message: <i>Too many hot dogs detected, changing program.</i>
 	<</if>>
diff --git a/src/pregmod/seHuskSlaveDelivery.tw b/src/pregmod/seHuskSlaveDelivery.tw
index 3e8a54e1455a0ef6b7ee05eb2d80639c7ea49924..c8dd367ffed388162f543d56edfd63ce3aa1203a 100644
--- a/src/pregmod/seHuskSlaveDelivery.tw
+++ b/src/pregmod/seHuskSlaveDelivery.tw
@@ -9,11 +9,11 @@
 <<set $fixedNationality = $huskSlave.nationality>>
 <<set $fixedRace = $huskSlave.race>>
 <<if $huskSlave.sex == 2>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.boobs = 0>>
 	<<set $activeSlave.boobsImplant = 0>>
 <<else>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 <</if>>
 
 <<set $activeSlave.slaveName = "Doll">>
diff --git a/src/pregmod/sePlayerBirth.tw b/src/pregmod/sePlayerBirth.tw
index d7c4dbcf5f7b565c356a1a23f16683a7f41829d8..840c6eb87241b48bc752451e0962ed86513a8905 100644
--- a/src/pregmod/sePlayerBirth.tw
+++ b/src/pregmod/sePlayerBirth.tw
@@ -37,7 +37,7 @@ PC.pregSource documentation
 /* Difference in code below:
  * _curBabies - count of live babies after birth
  * $PC.pregType = all babies in PC.
- * I assume that dead fetuses do not count to reputation, etc, and PC manages to hide them. This mainly for future possibilities, or early birth triggers.
+ * I assume that dead fetuses do not count to reputation, etc., and PC manages to hide them. This mainly for future possibilities, or early birth triggers.
  * PC will not support partial birth - even if she happens to be pregnant at different stages at once, undeveloped babies will be dead as result.
  * _stilBirth currently not used - it's just for future improvements. */
 <<set $PC.preg = 0, $PC.pregKnown = 0, $PC.labor = 0, $PC.births += _curBabies>>
@@ -85,7 +85,7 @@ PC.pregSource documentation
 <<set _babiesReduced = removeDuplicates(_babies)>>
 
 <<if _elite > 0>> /* for simplicity's sake, not going to allow other embryos to be added during an elite pregnancy */
-	Since you are heavily pregnant with a child of the Societal Elite, you are quickly taken to the finest clinic the arcology has to offer. After a quick sedation, you awake to find your belly no longer round with child; that and a note stating your next breeding partner and a notice that <<print cashFormat(50000)>> has been added to your account. The Societal Elite are @@.green;very pleased@@ at their new addition to the ranks. You just wish you could have seen your <<if _curBabies == 1>>little <<if _gender == "XX">>girl<<else>>boy<</if>> before they took <<if _gender == "XX">>her<<else>>him<</if>><<else>>babies before they took them<</if>> away to be raised into a proper member of the future world.
+	Since you are heavily pregnant with a child of the Societal Elite, you are quickly taken to the finest clinic the arcology has to offer. After a quick sedation, you awake to find your belly no longer round with child; that and a note stating your next breeding partner and a notice that <<print cashFormat(50000)>> has been added to your account. The Societal Elite are @@.green;very pleased@@ at their new addition to the ranks. You just wish you could have seen your <<if _curBabies == 1>>little <<if _gender == "XX">>girl<<else>>boy<</if>> before they took <<if _gender == "XX">>her<<else>>him<</if>><<else>>babies before they took them<</if>> away to be raised into <<if _curBabies > 1>>proper members<<else>>a proper member<</if>> of the future world.
 	<<set $PC.birthElite += _elite>>
 	<<if $PC.ovaryAge >= 55 && $playerAging == 2>>
 		You are getting too old to have children; you feel like <<if _curBabies > 1>>they<<else>>this<</if>> may be your last.
@@ -243,7 +243,7 @@ You arrange yourself to give birth, relaxing until your body urges you to begin
 			<<elseif tooBigButt($Concubine)>>
 				You don't know how _he2 managed to get you here when _his2 ass prevent _him2 from walking<<if $PC.pregType == 8>>, especially with how heavy your pregnancy was<</if>>, but you give the jiggling giant a gentle caress as thanks.
 			<<elseif tooBigBalls($Concubine)>>
-				You don't know how _he2 managed to get you here when _his2 balls prevent _him2 from walking<<if $PC.pregType == 8>>, especially with how heavy your pregnancy was<</if>>, but you give the pair a gentle caress as thanks. _He returns the kindness with a shudder and a large wet spot forming over _his2 crotch.
+				You don't know how _he2 managed to get you here when _his2 balls prevent _him2 from walking<<if $PC.pregType == 8>>, especially with how heavy your pregnancy was<</if>>, but you give the pair a gentle caress as thanks. _He2 returns the kindness with a shudder and a large wet spot forming over _his2 crotch.
 			<<elseif tooFatSlave($Concubine)>>
 				You don't know how _he2 managed to get you here when _he2's so fat _he2 can't walk<<if $PC.pregType == 8>>, especially with how heavy your pregnancy was<</if>>, but you give _his2 soft body a gentle caress as thanks.
 			<<else>>
diff --git a/src/pregmod/testGenetics.tw b/src/pregmod/testGenetics.tw
index e7064b3cc5231b02a3eaeee43ce31d5155f6bbae..aa29f07550ca72e59a06a1f3fd50b4ba89129ca3 100644
--- a/src/pregmod/testGenetics.tw
+++ b/src/pregmod/testGenetics.tw
@@ -1,6 +1,6 @@
 :: test genetics [nobr]
 
-<<set $nextButton = "Back", $nextLink = "Main">>
+<<set $nextButton = "Back", $nextLink = "Options">>
 <<set _seed = 0>>
 
 All slave array slaves MUST be present in genePool or else there is a malfunction.
@@ -16,7 +16,7 @@ All slave array slaves MUST be present in genePool or else there is a malfunctio
 <</for>>
 </table>
 
-<<set _neededProperties = ['genes', 'origSkin', 'origEye', 'origHColor', 'nationality', 'origRace', 'face', 'intelligence', 'underArmHStyle', 'pubicHStyle']>>
+<<set _neededProperties = ['genes', 'origSkin', 'origEye', 'origHColor', 'nationality', 'origRace', 'face', 'faceShape', 'markings', 'intelligence', 'underArmHStyle', 'pubicHStyle']>>
 <table><caption style="background-color: rgba(127, 127, 127, 0.2)">slaves</caption>
 <tr><th>index</th><th>name</th><th>ID</th><th>origin</th><th>assignment</th></tr>
 <<for _i = 0; _i < $slaves.length; _i++>>
@@ -53,12 +53,11 @@ All slave array slaves MUST be present in genePool or else there is a malfunctio
 
 <<if _errorCause>>
 	@@.red;Errors in the gene pool detected! Please report this.@@
-	<<link "Add missing slaves to the gene pool">>
+	<<link "Add missing slaves to the gene pool" "Main">>
 		<<for _i = 0; _i < $slaves.length; _i++>>
 			<<if $genePool.every(function(g) { return $slaves[_i].ID !== g.ID; })>>
 				<<set $genePool.push($slaves[_i])>>
 			<</if>>
 		<</for>>
-		<<goto "Main">>
 	<</link>> //This will not fix missing properties.//
 <</if>>
diff --git a/src/pregmod/theBlackMarket.tw b/src/pregmod/theBlackMarket.tw
index c1296c69b739963b3e692e3746f6322b47bebf9d..1cf02234a608eba86ce1a6e52f79d2ca5e04ea2d 100644
--- a/src/pregmod/theBlackMarket.tw
+++ b/src/pregmod/theBlackMarket.tw
@@ -12,8 +12,8 @@ You board your VTOL bird for the trip to the current location of the particularl
 <br><br>
 
 Once inside, you are able to fully absorb in the sights and sounds of the market proper. All sorts of items are available for purchase, from exotic beasts that may very well be the last of their kind, to the most lethal of weaponry both old and new, and even luxuries long gone. Despite the overbearing security, one's wallet can easily be emptied in this place.
-
-<br><br>There is quite the selection of refreshments available, you could always shift your orders from $PC.refreshment to something new. You want <<textbox "$PC.refreshment" $PC.refreshment "The Black Market">> and you want to
+<br><br>
+There is quite the selection of refreshments available, you could always shift your orders from $PC.refreshment to something new. You want <<textbox "$PC.refreshment" $PC.refreshment "The Black Market">> and you want to
 ''<<if $PC.refreshmentType == 0>>smoke<<elseif $PC.refreshmentType == 1>>drink<<elseif $PC.refreshmentType == 2>>eat<<elseif $PC.refreshmentType == 3>>snort<<elseif $PC.refreshmentType == 4>>inject<<elseif $PC.refreshmentType == 5>>pop<<else>>orally dissolve<</if>> it.'' |
 <<if $PC.refreshmentType != 0>>[[smoke it.|The Black Market][$PC.refreshmentType = 0]] |<</if>>
 <<if $PC.refreshmentType != 1>>[[drink it.|The Black Market][$PC.refreshmentType = 1]] |<</if>>
@@ -303,7 +303,7 @@ He gestures to a door in the back of the stall. "The good shit's back there<<if
 			<<if $sympatheticOvaries == 0>>
 				<<if $seePreg == 1>>
 					<<if $ImplantProductionUpgrade == 1>>
-						<<if $cash >= 20000>>
+						<<if $cash >= 50000>>
 							[[Purchase schematics for implants that synchronize ova release|The Black Market][cashX(-50000, "capEx"), $sympatheticOvaries = 1, _dump = $merchantIllegalWares.delete("sympatheticOvaries")]] //@@.yellowgreen;<<print cashFormat(50000)>>.@@//
 						<<else>>
 							You cannot afford the asking price of @@.red;<<print cashFormat(50000)>>@@ for implants that synchronize ova release.
@@ -327,7 +327,7 @@ He gestures to a door in the back of the stall. "The good shit's back there<<if
 			<<if $asexualReproduction == 0>>
 				<<if $seePreg == 1>>
 					<<if $organFarmUpgrade > 0>>
-						<<if $cash >= 20000>>
+						<<if $cash >= 80000>>
 							[[Purchase designs for asexually reproducing ovaries|The Black Market][cashX(-80000, "capEx"), $asexualReproduction = 1, _dump = $merchantIllegalWares.delete("asexualReproduction")]] //@@.yellowgreen;<<print cashFormat(80000)>>.@@//
 						<<else>>
 							You cannot afford the asking price of @@.red;<<print cashFormat(80000)>>@@ for asexually reproducing ovaries.
diff --git a/src/pregmod/theCattleRanch.tw b/src/pregmod/theCattleRanch.tw
index 097f92898fa00e78ea6be8f07594d150f8704bc1..5c7668bcd18402eba44d2248d7a758912f9d1472 100644
--- a/src/pregmod/theCattleRanch.tw
+++ b/src/pregmod/theCattleRanch.tw
@@ -7,7 +7,7 @@
 	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = "TCR", $returnTo = "Main", $newSlaveIndex = 0>>
 <</if>>
 
-//The Cattle Ranch is a controversial slave school operating primarily out of Pastoralistic Free Cities. Its business model is to offer the ideal free range dairy cow; one whose tits and belly reach the floor when she is on all fours. All cattle come optimized for milking, with big breasts and gravid middles. Slave orphans have their heels clipped shortly after birth and are conditioned to believe they are actual livestock, resulting in a mindbreak-like state. Between their wide hips and big butts and their heavy, milky breasts, they are often popular breeding slaves. They rarely display their stock over video call, instead favoring a more hands-on approach. Buyers can visit their local shops to view grazing cattle available for sale. Alternatively, they can watch the calves frolic among their mothers or enjoy the sight of a breeding bull impregnating an empty womb. Cows are also specially trained to respond to spectators banging on the fence; oral awaits if you drop trou for them! <<if $TCR.schoolUpgrade != 0>><br><br>You have endowed <<if $TCR.schoolUpgrade == 1>>a healthy sum of credits to make their breeding bulls available for sale.<<else>>a healthy sum of credits to encourage the sale of heifers.<</if>> As a major <<if $PC.title == 0>>benefactrix<<else>>benefactor<</if>> of the ranch, you also receive a discount on them.<</if>>//
+//The Cattle Ranch is a controversial slave school operating primarily out of Pastoralistic Free Cities. Its business model is to offer the ideal free range dairy cow; one whose tits and belly reach the floor when on all fours. All cattle come optimized for milking, with big breasts and gravid middles. Slave orphans have their heels clipped shortly after birth and are conditioned to believe they are actual livestock, resulting in a mindbreak-like state. Between their wide hips and big butts and their heavy, milky breasts, they are often popular breeding slaves. They rarely display their stock over video call, instead favoring a more hands-on approach. Buyers can visit their local shops to view grazing cattle available for sale. Alternatively, they can watch the calves frolic among their mothers or enjoy the sight of a breeding bull impregnating an empty womb. Cows are also specially trained to respond to spectators banging on the fence; oral awaits if you drop trou for them! <<if $TCR.schoolUpgrade != 0>><br><br>You have endowed <<if $TCR.schoolUpgrade == 1>>a healthy sum of credits to make their breeding bulls available for sale.<<else>>a healthy sum of credits to encourage the sale of heifers.<</if>> As a major <<if $PC.title == 0>>benefactrix<<else>>benefactor<</if>> of the ranch, you also receive a discount on them.<</if>>//
 
 <br><br>The Cattle Ranch parades a choice selection of cows for your viewing pleasure. You're free to do as you please to the slaves, as long as you don't cause lasting harm to them.<<if isPlayerFertile($PC)>> You can't help but notice the number of bulls lining up along the fence sniffing at you.<</if>>
 
diff --git a/src/pregmod/widgets/assignmentFilterWidget.tw b/src/pregmod/widgets/assignmentFilterWidget.tw
index 87ce972f2e3744befa869e33ff1e71a8327fdef7..2c47355fb694d3e9d1cf7763cc568473082a3fa0 100644
--- a/src/pregmod/widgets/assignmentFilterWidget.tw
+++ b/src/pregmod/widgets/assignmentFilterWidget.tw
@@ -78,23 +78,24 @@
 /*
  * Checks from which Facility its get called and removes it from the list
  * this is the Main Filter widget used on all Passages atm
- * sets Flag = zero so slave summary provides send-to-facility links
+ * sets SlaveSummaryFiler = "assignable" so slave summary provides send-to-facility links
 */
 <<widget "assignmentFilter">>
-	<<link All>><<showallAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>>
-	<<if passage() != "Arcade">><<print " | ">><<link Arcade>><<arcadeAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Brothel">><<print " | ">><<link Brothel>><<brothelAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Cellblock">><<print " | ">><<link Cellblock>><<cellblockAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Clinic">><<print " | ">><<link Clinic>><<clinicAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Club">><<print " | ">><<link Club>><<clubAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Dairy">><<print " | ">><<link Dairy>><<dairyAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Farmyard">><<print " | ">><<link Farmyard>><<farmyardAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<print " | ">><<link Penthouse>><<penthouseAssignmentFilter>><<replace #ComingGoing>><<include 'Slave Summary'>><<set $Flag = 0>><<resetAssignmentFilter>><</replace>><</link>>
-	<<if passage() != "Schoolroom">><<print " | ">><<link Schoolroom>><<schoolAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Spa">><<print " | ">><<link Spa>><<spaAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Nursery">><<print " | ">><<link Nursery>><<nurseryAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Master Suite">><<print " | ">><<link Suite>><<suiteAssignmentFilter>><<replace #ComingGoing>><<set $Flag = 0>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
-	<<if passage() != "Servants' Quarters">><<print " | ">><<link Quarters>><<quartersAssignmentFilter>><<set $Flag = 0>><<replace #ComingGoing>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<link All>><<showallAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>>
+	<<if passage() != "Arcade">><<print " | ">><<link Arcade>><<arcadeAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Brothel">><<print " | ">><<link Brothel>><<brothelAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Cellblock">><<print " | ">><<link Cellblock>><<cellblockAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Clinic">><<print " | ">><<link Clinic>><<clinicAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Club">><<print " | ">><<link Club>><<clubAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Dairy">><<print " | ">><<link Dairy>><<dairyAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Farmyard">><<print " | ">><<link Farmyard>><<farmyardAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<print " | ">><<link Penthouse>><<penthouseAssignmentFilter>><<replace #ComingGoing>><<include 'Slave Summary'>><<set $SlaveSummaryFiler = "assignable">><<resetAssignmentFilter>><</replace>><</link>>
+	<<if passage() != "Schoolroom">><<print " | ">><<link Schoolroom>><<schoolAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Spa">><<print " | ">><<link Spa>><<spaAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Nursery">><<print " | ">><<link Nursery>><<nurseryAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Master Suite">><<print " | ">><<link Suite>><<suiteAssignmentFilter>><<replace #ComingGoing>><<set $SlaveSummaryFiler = "assignable">><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<if passage() != "Servants' Quarters">><<print " | ">><<link Quarters>><<quartersAssignmentFilter>><<set $SlaveSummaryFiler = "assignable">><<replace #ComingGoing>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><</link>><</if>>
+	<<print " | ">><<link @@.lime;Experienced@@>><<showallAssignmentFilter>><<set $SlaveSummaryFiler = "experienced">><<replace #ComingGoing>><<include 'Slave Summary'>><<resetAssignmentFilter>><</replace>><<set $SlaveSummaryFiler = "">><</link>>
 <</widget>>
 
 /*
diff --git a/src/pregmod/widgets/bodyswapWidgets.tw b/src/pregmod/widgets/bodyswapWidgets.tw
index 2b2d3cde64e0bc9b8d0cb0409778e0b503111a1d..0444fc2aa337f7d1013e7f392219384d071c6532 100644
--- a/src/pregmod/widgets/bodyswapWidgets.tw
+++ b/src/pregmod/widgets/bodyswapWidgets.tw
@@ -22,6 +22,7 @@
 <<set $args[0].origSkin = $args[1].origSkin>>
 <<set $args[0].markings = $args[1].markings>>
 <<set $args[0].eyes = $args[1].eyes>>
+<<set $args[0].eyesImplant = $args[1].eyesImplant>>
 <<set $args[0].origEye = $args[1].origEye>>
 <<set $args[0].eyeColor = $args[1].eyeColor>>
 <<set $args[0].hears = $args[1].hears>>
@@ -46,6 +47,7 @@
 <<set $args[0].corsetPiercing = $args[1].corsetPiercing>>
 <<set $args[0].amp = $args[1].amp>>
 <<set $args[0].PLimb = $args[1].PLimb>>
+<<set $args[0].readyProsthetics = $args[1].readyProsthetics>>
 <<set $args[0].heels = $args[1].heels>>
 <<set $args[0].voice = $args[1].voice>>
 <<set $args[0].voiceImplant = $args[1].voiceImplant>>
@@ -203,7 +205,6 @@
 	<<set $args[0].cervixImplant = $args[1].cervixImplant>>
 	<<set $args[0].scars = $args[1].scars>>
 	<<set $args[0].pregControl = $args[1].pregControl>>
-	<<set $args[0].readyLimbs = $args[1].readyLimbs>>
 <</if>>
 /*
 <<if def $args[2]>>
diff --git a/src/pregmod/widgets/marketWidgets.tw b/src/pregmod/widgets/marketWidgets.tw
index c9d19f880eaa6f8e82568347ae9b63de191a00a8..b568f38367b81882839bfeb336e8b259d8ae36fe 100644
--- a/src/pregmod/widgets/marketWidgets.tw
+++ b/src/pregmod/widgets/marketWidgets.tw
@@ -19,9 +19,9 @@
 			while(match = re.exec(wp.text)) { result.push(match[1]); }
 			return result; })
 		.value()>>
-	<<silently>><<foreach _widget of _widgets>>
+	<<silently>><<for _widget range _widgets>>
 		<<= "<<" + _widget + " $args[1]>>">>
-	<</foreach>><</silently>>
+	<</for>><</silently>>
 <</if>>
 <</widget>>
 
@@ -35,4 +35,4 @@
 		<<include "Generate Random Slave">>
 	<</if>>
 <</silently>>
-<</widget>>
\ No newline at end of file
+<</widget>>
diff --git a/src/pregmod/widgets/playerDescriptionWidgets.tw b/src/pregmod/widgets/playerDescriptionWidgets.tw
index 3272a5c21901e2738e062ae14a6b272c4c0f2b61..7176d3858a491749e90a623788663f01f84d9467 100644
--- a/src/pregmod/widgets/playerDescriptionWidgets.tw
+++ b/src/pregmod/widgets/playerDescriptionWidgets.tw
@@ -13,7 +13,7 @@
 			They are all natural, heavy, and a bit saggy though they have some perk to them. Once they get going, it's hard to make them stop.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel even more enormous lately; likely a side effect of your lactation.
+			Your breasts feel even more enormous lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -28,7 +28,7 @@
 			They are all natural and a little heavy. The bounce everywhere when you fuck your slaves.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel even more huge lately; likely a side effect of your lactation.
+			Your breasts feel even more huge lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -43,7 +43,7 @@
 			They are nice and perky, despite their size. They bounce lewdly as you fuck your slaves.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -53,7 +53,7 @@
 	<<elseif $PC.boobsBonus == -1>>
 		you have a @@.orange;pair of D-cup breasts.@@ They are nice, perky and bounce pleasantly as you fuck your slaves.
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -73,7 +73,7 @@
 	<<elseif $PC.boobsBonus == -3>>
 		you have a @@.orange;pair of B-cup breasts.@@ They are nice and perky, with almost no bounce when you fuck your slaves.
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -83,7 +83,7 @@
 	<<elseif $PC.boobs == 1>>
 		you have a @@.orange;healthy pair of DD-cup breasts.@@ They are nice, perky and jiggle pleasantly with your every move.
 		<<if $PC.lactation > 0>>
-			Your breasts feel fuller lately; likely a side effect of your lactation.
+			Your breasts feel fuller lately; this is likely a side effect of your lactation.
 		<</if>>
 		<<if $PC.markings == "freckles">>
 			The tops of your breasts and your cleavage are lightly freckled.
@@ -159,7 +159,7 @@
 			They are all natural, heavy, and a bit saggy though they retain some perk. Every single move you make sends ripples through your cleavage. You catch yourself watching them move in the mirror every so often.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel even more enormous lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel even more enormous lately; this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobsBonus == 2>>
 		Your breasts are
@@ -176,7 +176,7 @@
 			They are all natural and a little heavy. They bounce lewdly when you shake them and take a little too long to calm down.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel even more huge lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel even more huge lately; this is this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobsBonus == 1>>
 		Your breasts are pretty
@@ -193,7 +193,7 @@
 			They are nice and perky, despite their size. They bounce lewdly when you shake them.
 		<</if>>
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobsBonus == -1>>
 		Your breasts are certainly
@@ -206,7 +206,7 @@
 		<</if>>
 		They are nice and perky, with just the right amount of bounce when you shake them.
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobsBonus == -2>>
 		Your breasts are fairly average, at least to old world
@@ -219,7 +219,7 @@
 		<</if>>
 		They are very perky, but aren't big enough to have a nice bounce when you shake them.
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobsBonus == -3>>
 		Your breasts are considered small by most
@@ -232,7 +232,7 @@
 		<</if>>
 		Their size makes them extremely perky, at the cost of having little to no bounce.
 		<<if $PC.lactation > 0>>
-			Your breasts feel bigger lately; likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
+			Your breasts feel bigger lately; this is likely a side effect of your lactation, though you could do without the wet spots forming over your nipples.
 		<</if>>
 	<<elseif $PC.boobs == 1>>
 		Your breasts are on the larger side of things<<if $PC.lactation > 0>>, though you could do without the wet spots forming over your nipples<</if>>.
@@ -343,11 +343,11 @@
 			<<elseif $PC.belly >= 10000>>
 				Your huge pregnant belly is tiring to carry around, but you're well versed in moving about with a rounded middle.
 			<<elseif $PC.belly >= 7000>>
-				You've stopped bothering to tie your apron behind you, allowing your dress the freedom to stretch with your growing child.
+				You've stopped bothering to tie your apron behind you, allowing your dress the freedom to stretch with your growing child<<if $PC.pregType > 1>>ren<</if>>.
 			<<elseif $PC.belly >= 5000>>
 				Your maid's outfit is rounded out by your baby-filled belly; not only is it obvious, but it is slowing you down in your day to day affairs.
 			<<elseif $PC.belly >= 3000>>
-				You're starting to get pretty big; you feel like all eyes are centered on her baby-filled middle.
+				You're starting to get pretty big; you feel like all eyes are centered on your baby-filled middle.
 			<<elseif $PC.belly >= 1500>>
 				Your belly is now large enough that there is no hiding it. After you've let out your apron, your dress fits nicely again.
 			<<elseif $PC.belly >= 500>>
@@ -358,13 +358,13 @@
 				Your dress and apron feel tight around your middle.
 			<</if>>
 			<<if $PC.preg >= 41>>
-				Your bab<<if $PC.pregType > 1>>ies are<<else>>y is<</if>> overdue and your master isn't here anymore to comfort your exhausted body. You try your best, <<if $PC.pregSource == -3>>drawing strength from the knowledge that you carry your late master's legacy within you<<else>>but deep down you are saddened that your child isn't his<</if>>.<<if $PC.pregMood == 1>> However, thanks to all your mothering, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you try to fill the hole left by your late master.<</if>>
+				Your bab<<if $PC.pregType > 1>>ies are<<else>>y is<</if>> overdue and your master isn't here anymore to comfort your exhausted body. You try your best, <<if $PC.pregSource == -3>>drawing strength from the knowledge that you carry your late master's legacy within you<<else>>but deep down you are saddened that your <<if $PC.pregType > 1>>children aren't<<else>>child isn't<</if>> his<</if>>.<<if $PC.pregMood == 1>> However, thanks to all your mothering, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you try to fill the hole left by your late master.<</if>>
 			<<elseif $PC.preg >= 39>>
 				Every action you take is exhausting, and even though your slaves are more than capable of serving your every desire, you refuse to slow down with your duties.<<if $PC.pregMood == 1>> Though you definitely appreciate their aid.<<elseif $PC.pregMood == 2>> Your hormones practically rule you, leading you to demand your slaves to be prepared to pleasure you at a moments notice. Your needy cunt hungers for dick and you don't care what it is attached to right now.<</if>>
 			<<elseif $PC.preg >= 36>>
-				Your child<<if $PC.pregType > 1>>ren<</if>> happily kicks away inside your womb, and each time a small bump appears on the outside of your dress.<<if $PC.pregMood == 1>> While hormones may have you demanding and needy, you do everything you can to treat your slaves as if they were your own children.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but your former master loved to fuck you while you were pregnant with his children and your body misses his touch.<</if>>
+				Your child<<if $PC.pregType > 1>>ren<</if>> happily kick<<if $PC.pregType == 1>>s<</if>> away inside your womb, and each time a small bump appears on the outside of your dress.<<if $PC.pregMood == 1>> While hormones may have you demanding and needy, you do everything you can to treat your slaves as if they were your own children.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but your former master loved to fuck you while you <<if $PC.birthMaster > 0>>were pregnant with his children<<else>>wore a big fake belly<</if>> and your body misses his touch.<</if>>
 			<<elseif $PC.preg >= 32>>
-				<<if $PC.pregMood == 1>> You can't help but enjoy having a slave suckle from you while you relax with her in your lap.<<elseif $PC.pregMood == 2>> You know how to have sex while pregnant, and as such, so will your slaves.<</if>>
+				<<if $PC.pregMood == 1>> You can't help but enjoy having a slave suckle from you while you relax with _himU in your lap.<<elseif $PC.pregMood == 2>> You know how to have sex while pregnant, and as such, so will your slaves.<</if>>
 			<<elseif $PC.preg >= 28>>
 				<<if $PC.pregMood == 1>> You catch yourself babying your slaves from time to time.<<elseif $PC.pregMood == 2>>Your sex drive has become unquenchable as of late.<</if>>
 			<<elseif $PC.preg == 22>>
@@ -393,12 +393,22 @@
 					<<set _fertRefresh = 1>>
 				<</if>>
 				You may have a problem<<if _fertRefresh == 1>>, but then again, you did take all those fertility drugs, so you can't really say you didn't want it.<<else>>. You know you took fertility drugs, but you weren't supposed to get this big!<</if>> Feeling yourself up, you'd fancy a guess that there are about
-				<<if $PC.pregType == 8>>
-					a dozen babies
-				<<elseif $PC.pregType == 7>>
-					ten babies
+				<<if $PC.medicine >= 45>>
+					<<if $PC.pregType == 8>>
+						eight babies
+					<<elseif $PC.pregType == 7>>
+						seven babies
+					<<else>>
+						six babies
+					<</if>>
 				<<else>>
-					eight babies
+					<<if $PC.pregType == 8>>
+						a dozen babies
+					<<elseif $PC.pregType == 7>>
+						ten babies
+					<<else>>
+						eight babies
+					<</if>>
 				<</if>>
 				in your belly.
 			<<elseif $PC.belly >= 75000>>
@@ -408,7 +418,7 @@
 			<<elseif $PC.belly >= 45000>>
 				You both look and feel enormous, your belly juts out so much now. Your strategy worked! Eyes always end up locked onto you or your pregnancy, but they quickly return to your milky breasts.
 			<<elseif $PC.belly >= 30000>>
-				You feel absolutely gigantic; you look like you're full-term with twins. You find the skimpiest outfit you can to complement your size; if people won't notice your other assets, then they might as well not notice your outfit either.
+				You feel absolutely gigantic; you look like you're full-term with twins<<if $PC.pregType == 2>> (which you are)<</if>>. You find the skimpiest outfit you can to complement your size; if people won't notice your other assets, then they might as well not notice your outfit either.
 			<<elseif $PC.belly >= 14000>>
 				You don't even bother to try to be slutty anymore; your full-term globe of a belly just steals all the attention away from your other assets.
 			<<elseif $PC.belly >= 12000>>
@@ -431,11 +441,11 @@
 				When you look down, you can't help but notice your belly sticking out a little.
 			<</if>>
 			<<if $PC.preg >= 41>>
-				You can barely pull yourself and your overdue child out of bed; every action is a chore, you keep bumping things, and your child just won't calm down.<<if $PC.pregMood == 1>> However, thanks to all your tenderness, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you satisfy your desires.<</if>>
+				You can barely pull yourself and your overdue child<<if $PC.pregType > 1>>ren<</if>> out of bed; every action is a chore, you keep bumping things, and your child<<if $PC.pregType > 1>>red<</if>> just won't calm down.<<if $PC.pregMood == 1>> However, thanks to all your tenderness, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you satisfy your desires.<</if>>
 			<<elseif $PC.preg >= 39>>
-				Every action you take is exhausting; though your slaves are more than capable of serving your every whim.<<if $PC.pregMood == 1>> Even in the final stages of pregnancy, you make sure the slaves attending you are treated as if the were your favorite clients.<<elseif $PC.pregMood == 2>> Your hormones practically rule you, leading you to demand your slaves to be prepared to pleasure you at a moments notice. Your needy cunt hungers for dick and you don't care what it is attached to right now.<</if>>
+				Every action you take is exhausting, though your slaves are more than capable of serving your every whim.<<if $PC.pregMood == 1>> Even in the final stages of pregnancy, you make sure the slaves attending you are treated as if the were your favorite clients.<<elseif $PC.pregMood == 2>> Your hormones practically rule you, leading you to demand your slaves to be prepared to pleasure you at a moment's notice. Your needy cunt hungers for dick and you don't care <<if $seeDicks != 0>>what it is attached to<<else>>if it's made of plastic<</if>> right now.<</if>>
 			<<elseif $PC.preg >= 36>>
-				Every kick from your eager child threatens to dislodge your breasts from your struggling top.<<if $PC.pregMood == 1>> While you may be demanding and needy, you do everything you can to treat them as if they were a virgin client.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but you need a dick in you even more than usual.<</if>>
+				Every kick from your eager child<<if $PC.pregType > 1>>ren<</if>> threatens to dislodge your breasts from your struggling top.<<if $PC.pregMood == 1>> While you may be demanding and needy, you do everything you can to treat them as if they were a virgin client.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but you need a dick in you even more than usual.<</if>>
 			<<elseif $PC.preg >= 32>>
 				<<if $PC.pregMood == 1>> You can't help but enjoy having a slave, or client, suckle from you while you relax with them in your lap.<<elseif $PC.pregMood == 2>> You don't let your pregnancy get in the way when it comes to sex; you make sure your slaves, and clients, learn just how much you know about sex.<</if>>
 			<<elseif $PC.preg >= 28>>
@@ -491,7 +501,7 @@
 			<<elseif $PC.belly >= 7000>>
 				You've switched to using what can only be called formal maternity wear to cover your pregnant belly.
 			<<elseif $PC.belly >= 5000>>
-				You can barely cover your baby filled belly; not only is it obvious, but it is getting in the way of your business.
+				You can barely cover your baby-filled belly; not only is it obvious, but it is getting in the way of your business.
 			<<elseif $PC.belly >= 3000>>
 				You're starting to get pretty big; you feel like everyone just focuses on your gravidity now.
 			<<elseif $PC.belly >= 1500>>
@@ -504,13 +514,13 @@
 				Your top feels oddly tight around your middle.
 			<</if>>
 			<<if $PC.preg >= 41>>
-				You can barely pull yourself and your overdue child out of bed; every action is a chore, you keep bumping things, and your child just won't calm down.<<if $PC.pregMood == 1>> However, thanks to all your mothering, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you satisfy your desires.<</if>>
+				You can barely pull yourself and your overdue child<<if $PC.pregType > 1>>ren<</if>> out of bed; every action is a chore, you keep bumping into things, and your child<<if $PC.pregType > 1>>ren<</if>> just won't calm down.<<if $PC.pregMood == 1>> However, thanks to all your mothering, your slaves are more than happy to do everything they can for you.<<elseif $PC.pregMood == 2>> Your slaves<<if $seeDicks != 0>>, those with dicks especially,<</if>> are terrified of being seen by you, knowing full well that they will be bearing the full weight of your body as you satisfy your desires.<</if>>
 			<<elseif $PC.preg >= 39>>
-				<<if $PC.pregMood == 1>> Even in the final stages of pregnancy, you make sure the slaves attending you are treated as if they were your own children.<<elseif $PC.pregMood == 2>> Your hormones practically rule you, leading you to demand your slaves to be prepared to pleasure you at a moments notice. Your needy cunt hungers for dick and you don't care what it is attached to right now.<</if>>
+				<<if $PC.pregMood == 1>> Even in the final stages of pregnancy, you make sure the slaves attending you are treated as if they were your own children.<<elseif $PC.pregMood == 2>> Your hormones practically rule you, leading you to demand your slaves to be prepared to pleasure you at a moment's notice. Your needy cunt hungers for dick and you don't care <<if $seeDicks != 0>>what it is attached to<<else>>if it's made of plastic<</if>> right now.<</if>>
 			<<elseif $PC.preg >= 36>>
-				Every kick from your eager child threatens to send your buttons flying.<<if $PC.pregMood == 1>> While you may be demanding and needy, you do everything you can to treat them as if they were your own children.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but you need a dick in you and you don't care from where.<</if>>
+				Every kick from your eager child<<if $PC.pregType > 1>>ren<</if>> threatens to send your buttons flying.<<if $PC.pregMood == 1>> While you may be demanding and needy, you do everything you can to treat them as if they were your own children.<<elseif $PC.pregMood == 2>> You know it's unbecoming for an arcology owner, but you need a dick in you and you don't care from where.<</if>>
 			<<elseif $PC.preg >= 32>>
-				<<if $PC.pregMood == 1>> You can't help but enjoy having a slave suckle from you while you relax with her in your lap.<<elseif $PC.pregMood == 2>> You don't let your pregnancy get in the way when it comes to sex; you make sure your slaves learn new positions to accommodate your bulk.<</if>>
+				<<if $PC.pregMood == 1>> You can't help but enjoy having a slave suckle from you while you relax with _himU in your lap.<<elseif $PC.pregMood == 2>> You don't let your pregnancy get in the way when it comes to sex; you make sure your slaves learn new positions to accommodate your bulk.<</if>>
 			<<elseif $PC.preg >= 28>>
 				<<if $PC.pregMood == 1>> You catch yourself babying your slaves from time to time.<<elseif $PC.pregMood == 2>>Your sex drive has become unquenchable as of late.<</if>>
 			<<elseif $PC.preg == 22>>
@@ -608,6 +618,7 @@
 <<set _passage = passage()>>
 
 <<if _passage == "Manage Personal Affairs">>
+	you have
 	<<if $PC.dick == 1 && $PC.vagina == 1>>
 		an @@.orange;above average penis@@
 		<<if $PC.balls > 2>>
@@ -623,9 +634,9 @@
 			<<else>>
 				you rest on the edge of your chair, allowing your oversized balls to dangle precariously.
 			<</if>>
-			You've given up on wearing pants around the penthouse, and their bulging mass is so gargantuan that people assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them. They make just about everything you do difficult: sitting, walking, fucking; but they certainly make life interesting.
+			You've given up on wearing pants around the penthouse, and their bulging mass is so gargantuan that people assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them. They make just about everything you do difficult: sitting, walking, fucking — but they certainly make life interesting.
 		<<elseif $PC.ballsImplant == 3>>
-			@@.orange;enormous, heavy balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone probably assumes they are fake, but every slave you fuck gets a distinct slap with each thrust. They get in the way of nearly everything you do: sitting, walking, fucking; but they make life certainly interesting.
+			@@.orange;enormous, heavy balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone probably assumes they are fake, but every slave you fuck gets a distinct slap with each thrust. They get in the way of nearly everything you do: sitting, walking, fucking — but they make life certainly interesting.
 		<<elseif $PC.ballsImplant == 2>>
 			@@.orange;huge balls@@ roughly the size of softballs; they are pretty heavy, but make sex and day-to-day affairs interesting.
 		<<elseif $PC.ballsImplant == 1>>
@@ -633,7 +644,7 @@
 		<<else>>
 			@@.orange;normal, uneventful balls.@@
 		<</if>>
-		Tucked away beneath them; a
+		Tucked away beneath them, you have a
 		<<if $PC.newVag == 1>>
 			@@.orange;tight vagina.@@ Your pussy is very resilient, you shouldn't be able to stretch it out again.
 		<<elseif $PC.career == "escort">>
@@ -664,11 +675,11 @@
 			<<if $ballsAccessibility == 1>>
 				but your penthouse has been redesigned with oversized balls in mind. There are plenty of chairs capable of handling you littering the penthouse.
 			<<else>>
-				you rest on the edge of your chair, allowing your oversized balls to dangle precariously.
+				so you rest on the edge of your chair, allowing your oversized balls to dangle precariously.
 			<</if>>
-			You've given up on wearing pants around the penthouse, and their bulging mass is so gargantuan that people assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them. They make just about everything you do difficult: sitting, walking, fucking; but they certainly make life interesting.
+			You've given up on wearing pants around the penthouse, and their bulging mass is so gargantuan that people assume they're fake, but every slave you fuck gets a distended belly from all the cum you pump into them. They make just about everything you do difficult: sitting, walking, fucking — but they certainly make life interesting.
 		<<elseif $PC.ballsImplant == 3>>
-			@@.orange;enormous, heavy balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone probably assumes they are fake, but every slave you fuck gets a distinct slap with each thrust. They get in the way of nearly everything you do: sitting, walking, fucking; but they make life certainly interesting.
+			@@.orange;enormous, heavy balls@@ roughly the size of cantaloupes; it's difficult to sit normally, your clothes barely fit, and everyone probably assumes they are fake, but every slave you fuck gets a distinct slap with each thrust. They get in the way of nearly everything you do: sitting, walking, fucking — but they certainly make life interesting.
 		<<elseif $PC.ballsImplant == 2>>
 			@@.orange;huge balls@@ roughly the size of softballs; they are pretty heavy, but make sex and day-to-day affairs interesting.
 		<<elseif $PC.ballsImplant == 1>>
@@ -721,7 +732,7 @@
 		<<if $PC.ballsImplant > 3>>
 			You've pretty much given up on suit pants because of your monstrous balls, but you've replaced them with a custom kilt tailored to match the rest of your business attire. People would wonder why you're wearing such old fashioned clothes if your ridiculous bulge didn't make it obvious.
 		<<elseif $PC.ballsImplant == 3>>
-			You've had to get your suit pants retailored again to fit your enormous balls. It is obvious that the bulge in your pants is not your penis<<if $PC.preg >= 28>>; you've had several people rush to your aid under the mistaken belief that your child was crowning into your pants<</if>>.
+			You've had to get your suit pants retailored again to fit your enormous balls. It is obvious that the bulge in your pants is not your penis<<if $PC.preg >= 28>>; you've had several people rush to your aid under the mistaken belief that <<if $PC.pregType > 1>>one of your children<<else>>your child<</if>> was crowning into your pants<</if>>.
 		<<elseif $PC.ballsImplant == 2>>
 			You've had to get your suit pants retailored to fit your huge balls. It gives you a striking figure, though.
 		<<elseif $PC.ballsImplant == 1>>
@@ -763,7 +774,7 @@
 <<if _passage == "Manage Personal Affairs">>
 	<<if $PC.butt > 2>>
 		<<if $PC.buttImplant == 1>>
-			an @@.orange;enormous, round, hard butt;@@ it is very obviously a pair of huge implants. They barely move at all when you walk or fuck, are difficult to cram into your clothing and you keep getting stuck in chairs, but you wouldn't have it any other way.
+			an @@.orange;enormous, round, hard butt;@@ it is very obviously a pair of huge implants. They barely move at all when you walk or fuck, are difficult to cram into your clothing, and you keep getting stuck in chairs, but you wouldn't have it any other way.
 		<<else>>
 			an @@.orange;enormous, jiggly butt.@@ It is always wobbling for some reason or another. It really fills out your clothing and practically consumes anything you sit on.
 		<</if>>
@@ -880,9 +891,9 @@
 		<<else>>
 			<<if $PC.butt > 2>>
 				<<if $PC.buttImplant == 1>>
-					Your skirt covers your enormous butt but does nothing to hide its size and shape; you're beginning to show too much leg again, it might be time for a longer skirt.
+					Your skirt covers your enormous butt but does nothing to hide its size and shape. You're beginning to show too much leg again; it might be time for a longer skirt.
 				<<else>>
-					Your skirt covers your enormous butt but does nothing to hide its size and fluidity; your rear is soft enough to fill out your skirt but not lift it up too far, it also translates every motion to the fabric, however.
+					Your skirt covers your enormous butt but does nothing to hide its size and fluidity. Your rear is soft enough to fill out your skirt but not lift it up too far; it also translates every motion to the fabric, however.
 				<</if>>
 			<<elseif $PC.butt == 2>>
 				Your skirt covers your huge butt but does nothing to hide its size; in fact, you've had to start wearing a longer one to make up for the extra surface area.
diff --git a/src/pregmod/widgets/seBirthWidgets.tw b/src/pregmod/widgets/seBirthWidgets.tw
index b09892e73b9a6519534526eb7e259049ccf0968a..947c76ef80dd020830db30c5d64b8245b5d17c5f 100644
--- a/src/pregmod/widgets/seBirthWidgets.tw
+++ b/src/pregmod/widgets/seBirthWidgets.tw
@@ -276,7 +276,7 @@
 
 	<</if>> /* close broodmother birth */
 
-<<else>> /* fuckdoll birth */
+<<else>> /* Fuckdoll birth */
 	<<if $universalRulesCSec == 1>>
 		<<set $csec = 1>>
 		$slaves[$i].slaveName's suit's systems alert that it is ready to give birth; it is taken to the remote surgery to have its child<<if $slaves[$i].pregType > 1>>ren<</if>> extracted and for it to be cleaned up.
@@ -289,7 +289,7 @@
 		$slaves[$i].slaveName's suit's systems alert you that it is ready to give birth. You carefully pose it as it labors on bringing its child<<if $slaves[$i].pregType > 1>>ren<</if>> into the world and sit back to enjoy yourself as its <<if $slaves[$i].pregType > 1>>first<</if>> baby starts to crown. Once both it and yourself are finished, you send its offspring off and it to the autosurgery for cleaning.
 	<</if>>
 	It barely comprehends what has happened, nor will it realize when another child is conceived in it.
-<</if>> /* close fuckdoll birth */
+<</if>> /* close Fuckdoll birth */
 
 /* end of 2.*/
 
diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw
index 5c2e77ec34b145be3e835aa82ebe55282f6d93a8..2fe2b72df3881cc8211cb8ab165bb14e3340ec6d 100644
--- a/src/uncategorized/BackwardsCompatibility.tw
+++ b/src/uncategorized/BackwardsCompatibility.tw
@@ -33,6 +33,10 @@
 	<<unset $drugs, $harshCollars, $shoes, $bellyAccessories, $vaginalAccessories, $dickAccessories, $buttplugs>>
 <</if>>
 
+<<if def $Flag>>
+	<<unset $Flag>>
+<</if>>
+
 <<if def $servantMilkersJobs>>
 	<<unset $servantMilkersJobs>>
 <</if>>
@@ -229,9 +233,7 @@
 	<<unset $customValue>>
 <</if>>
 <<if ndef $tabChoice>>
-	<<set $tabChoice = {
-		Main: "all"
-	}>>
+	<<set $tabChoice = {Main: "all"}>>
 <</if>>
 
 /* pregmod stuff */
@@ -1944,12 +1946,6 @@ Setting missing global variables:
 <<if ndef $prostheticsUpgrade>>
 	<<set $prostheticsUpgrade = 0>>
 <</if>>
-<<if ndef $limbs>>
-	<<set $limbs = []>>
-<</if>>
-<<if ndef $limbsCompleted>>
-	<<set $limbsCompleted = 0>>
-<</if>>
 <<if ndef $dispensaryUpgrade>>
 	<<set $dispensaryUpgrade = 0>>
 <</if>>
@@ -2065,48 +2061,6 @@ Setting missing global variables:
 	<<set $Role = "">>
 <</if>>
 
-/* Cybermod*/
-<<if ndef $cyberMod>>
-	<<set $cyberMod = 0>>
-<<elseif $cyberMod == 1>>
-	<<if ndef $stockpile>>
-		<<set $stockpile = {
-		basicPLimbInterface: 0,
-		advPLimbInterface: 0,
-		basicPLimb: 0,
-		advSexPLimb: 0,
-		advGracePLimb: 0,
-		advCombatPLimb: 0,
-		cyberneticPLimb: 0,
-		ocularImplant: 0,
-		cochlearImplant: 0,
-		electrolarynx: 0,
-		erectileImplant: 0
-		} >>
-	<<else>>
-		<<if ndef $stockpile.cochlearImplant>>
-			<<set $stockpile.cochlearImplant = 0>>
-		<</if>>
-		<<if ndef $stockpile.electrolarynx>>
-			<<set $stockpile.electrolarynx = 0>>
-		<</if>>
-	<</if>>
-<</if>>
-
-/* Neko*/
-	<<if ndef $stockpile.interfacePTail>>
-		<<set $stockpile.interfacePTail = 0>>
-	<</if>>
-	<<if ndef $stockpile.modPTail>>
-		<<set $stockpile.modPTail = 0>>
-	<</if>>
-	<<if ndef $stockpile.warPTail>>
-		<<set $stockpile.warPTail = 0>>
-	<</if>>
-	<<if ndef $stockpile.sexPTail>>
-		<<set $stockpile.sexPTail = 0>>
-	<</if>>
-
 <<if ndef $trinkets>>
 	<<set $trinkets = []>>
 
@@ -2137,11 +2091,6 @@ Setting missing global variables:
 	<</if>>
 <</if>>
 
-<<if ndef $researchLab>>
-	<<set $researchLab = {}>>
-	<<set $researchLab.built = "false">>
-<</if>>
-
 <<if ndef $TSS>>
 	<<set $TSS = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
 <</if>>
@@ -3351,17 +3300,12 @@ Setting missing slave variables:
 	<<set _Slave.faceImplant = 65>>
 <</if>>
 
-<<if $cyberMod == 0 && (_Slave.amp < 0 || _Slave.PLimb == 2)>>
+<<if _Slave.amp < 0>>
 	<<set _Slave.PLimb = 1>>
-<</if>>
-
-<<for _bci2 = 0; _bci2 < _Slave.readyLimbs.length; _bci2++>>
-	<<if typeof _Slave.readyLimbs[_bci2] != "object">>
-		<<set _storedLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-		<<set _storedLimbs.type = _Slave.readyLimbs[_bci2]>>
-		<<set _Slave.readyLimbs[_bci2] = _storedLimbs>>
+	<<if _Slave.amp == -5>>
+		<<set _Slave.PLimb = 2>>
 	<</if>>
-<</for>>
+<</if>>
 
 <<if def _Slave.areoleaPiercing>>
 	<<run delete _Slave.areoleaPiercing>>
@@ -3400,6 +3344,26 @@ Setting missing slave variables:
 	<</if>>
 <</if>>
 
+<<if ndef _Slave.readyProsthetics>>
+	<<set _Slave.readyProsthetics = []>>
+<</if>>
+<<if def _Slave.readyLimbs>>
+	<<for _k = 0; _k < _Slave.readyLimbs.length; _k++>>
+		<<switch _Slave.readyLimbs[_k].type>>
+			<<case -1>>
+				<<set _Slave.readyProsthetics.push({id: "basicL"})>>
+			<<case -2>>
+				<<set _Slave.readyProsthetics.push({id: "sexL"})>>
+			<<case -3>>
+				<<set _Slave.readyProsthetics.push({id: "beautyL"})>>
+			<<case -4>>
+				<<set _Slave.readyProsthetics.push({id: "combatL"})>>
+			<<case -5>>
+				<<set _Slave.readyProsthetics.push({id: "cyberneticL"})>>
+		<</switch>>
+	<</for>>
+<</if>>
+
 <<set $slaves[_bci] = _Slave>>
 <</for>>
 
@@ -3539,9 +3503,9 @@ Updating gene pool records:
 		<<set _Slave.eyeColor = _Slave.origEye>>
 		<<set _Slave.eyes = -4>>
 	<</if>>
-	
+
 	<<if ndef _Slave.custom>>
-	    <<set _Slave.custom = {tattoo: _Slave.customTat}>> /* should be the only thing needed */
+		<<set _Slave.custom = {tattoo: _Slave.customTat}>> /* should be the only thing needed */
 	<</if>>
 
 	<<run App.Entity.Utils.GenePoolRecordCleanup(_Slave)>>
@@ -3690,6 +3654,9 @@ Done!
 <<if ndef $abbreviateHormoneBalance>>
 	<<set $abbreviateHormoneBalance = 2>>
 <</if>>
+<<if def $skillIncrease>>
+	<<unset $skillIncrease>>
+<</if>>
 
 <<if $releaseID < 1043>>
 	<<for _rule range $defaultRules>>
@@ -3713,5 +3680,181 @@ Done!
 
 <<set $JobIDArray = resetJobIDArray()>>
 
+/* unifify cybermod & vanilla */
+/* limbs */
+<<if def $limbs>>
+	<<set $adjustProsthetics = []>>
+	<<for _l range $limbs>>
+		<<switch _l.type>>
+		<<case "simple">>
+			<<set $adjustProsthetics.push({id: "basicL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID})>>
+		<<case "sex">>
+			<<set $adjustProsthetics.push({id: "sexL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID})>>
+		<<case "beauty">>
+			<<set $adjustProsthetics.push({id: "beautyL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID})>>
+		<<case "combat">>
+			<<set $adjustProsthetics.push({id: "combatL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID})>>
+		<<case "cyber">>
+			<<set $adjustProsthetics.push({id: "cyberneticL", workLeft: _l.weeksToCompletion * 10, slaveID: _l.ID})>>
+		<</switch>>
+	<</for>>
+	<<unset $limbs>>
+<</if>>
+<<if def $limbsCompleted>>
+	<<set $adjustProstheticsCompleted = $limbsCompleted>>
+	<<unset $limbsCompleted>>
+<</if>>
+
+/* lab */
+<<if ndef $researchLab>>
+	<<set $researchLab = {
+		aiModule: 1,
+		tasks: [],
+		maxSpace: 0,
+		hired: 0,
+		menials: 0,
+	}>>
+<</if>>
+<<if ndef $researchLab.level>>
+	<<set $researchLab.level = 0>>
+	<<if def $researchLab.built>>
+		<<if $researchLab.built == "true">>
+			<<set $researchLab.level = 1>>
+			<<if $prostheticsUpgrade == 0>>
+				<<set $prostheticsUpgrade = 1>>
+			<</if>>
+		<</if>>
+		<<run delete $researchLab.built>>
+	<</if>>
+<</if>>
+<<if ndef $researchLab.speed>>
+	<<set $researchLab.speed = (($researchLab.hired * 3) + $researchLab.menials) * $researchLab.aiModule>>
+<</if>>
+<<if ndef $researchLab.tasks>>
+	<<set $researchLab.tasks = []>>
+<</if>>
+<<if def $researchLab.research>>
+	<<if $researchLab.research != "none">>
+		<<switch $researchLab.research>>
+		<<case "Basic prosthetics interface">>
+			<<set _id = "interfaceP1">>
+		<<case "Advanced prosthetics interface">>
+			<<set _id = "interfaceP2">>
+		<<case "Basic prosthetic limbs">>
+			<<set _id = "basicL">>
+		<<case "Advanced sex limbs">>
+			<<set _id = "sexL">>
+		<<case "Advanced beauty limbs">>
+			<<set _id = "beautyL">>
+		<<case "Advanced combat limbs">>
+			<<set _id = "combatL">>
+		<<case "Cybernetic limbs">>
+			<<set _id = "cyberneticL">>
+		<<case "Ocular implants">>
+			<<set _id = "ocular">>
+		<<case "Cochlear implants">>
+			<<set _id = "cochlear">>
+		<<case "Electrolarynx">>
+			<<set _id = "electrolarynx">>
+		<</switch>>
+		<<set $researchLab.tasks.push({type: "research", id: _id, workLeft: $researchLab.productionTime})>>
+	<</if>>
+	<<run delete $researchLab.research>>
+<</if>>
+<<if def $researchLab.manufacture>>
+	<<if $researchLab.manufacture != "none">>
+		<<switch $researchLab.manufacture>>
+		<<case "Basic prosthetics interface">>
+			<<set _id = "interfaceP1">>
+		<<case "Advanced prosthetics interface">>
+			<<set _id = "interfaceP2">>
+		<<case "Basic prosthetic limbs">>
+			<<set _id = "basicL">>
+		<<case "Advanced sex limbs">>
+			<<set _id = "sexL">>
+		<<case "Advanced beauty limbs">>
+			<<set _id = "beautyL">>
+		<<case "Advanced combat limbs">>
+			<<set _id = "combatL">>
+		<<case "Cybernetic limbs">>
+			<<set _id = "cyberneticL">>
+		<<case "Ocular implants">>
+			<<set _id = "ocular">>
+		<<case "Cochlear implants">>
+			<<set _id = "cochlear">>
+		<<case "Electrolarynx">>
+			<<set _id = "electrolarynx">>
+		<</switch>>
+		<<set $researchLab.tasks.push({type: "craft", id: _id, workLeft: $researchLab.productionTime})>>
+	<</if>>
+	<<run delete $researchLab.manufacture>>
+<</if>>
+<<if def $researchLab.productionTime>>
+	<<run delete $researchLab.productionTime>>
+<</if>>
+
+/* stockpile */
+<<if ndef $prosthetics>>
+	<<if ndef $stockpile>>
+		<<set $prosthetics = {}>>
+		<<run setup.prostheticIDs.forEach(function(id) {
+			$prosthetics[id] = {amount: 0, research: 0};
+		})>>
+	<<else>>
+		<<if ndef $stockpile.cochlearImplant>>
+			<<set $stockpile.cochlearImplant = 0>>
+		<</if>>
+		<<if ndef $stockpile.electrolarynx>>
+			<<set $stockpile.electrolarynx = 0>>
+		<</if>>
+		<<if ndef $stockpile.interfacePTail>>
+			<<set $stockpile.interfacePTail = 0>>
+		<</if>>
+		<<if ndef $stockpile.modPTail>>
+			<<set $stockpile.modPTail = 0>>
+		<</if>>
+		<<if ndef $stockpile.warPTail>>
+			<<set $stockpile.warPTail = 0>>
+		<</if>>
+		<<if ndef $stockpile.sexPTail>>
+			<<set $stockpile.sexPTail = 0>>
+		<</if>>
+		<<set $prosthetics = {
+			interfaceP1: {amount: $stockpile.basicPLimbInterface, research: $researchLab.basicPLimbInterface},
+			interfaceP2: {amount: $stockpile.advPLimbInterface, research: $researchLab.advPLimbInterface},
+			basicL: {amount: $stockpile.basicPLimb, research: $researchLab.basicPLimb},
+			sexL: {amount: $stockpile.advSexPLimb, research: $researchLab.advSexPLimb},
+			beautyL: {amount: $stockpile.advGracePLimb, research: $researchLab.advGracePLimb},
+			combatL: {amount: $stockpile.advCombatPLimb, research: $researchLab.advCombatPLimb},
+			cyberneticL: {amount: $stockpile.cyberneticPLimb, research: $researchLab.cyberneticPLimb},
+			ocular: {amount: $stockpile.ocularImplant, research: $researchLab.ocularImplant},
+			cochlear: {amount: $stockpile.cochlearImplant, research: $researchLab.cochlearImplant},
+			electrolarynx: {amount: $stockpile.electrolarynx, research: $researchLab.electrolarynx},
+			interfaceTail: {amount: $stockpile.interfacePTail, research: 0},
+			modT: {amount: $stockpile.modPTail, research: 0},
+			combatT: {amount: $stockpile.warPTail, research: 0},
+			sexT: {amount: $stockpile.sexPTail, research: 0},
+			erectile: {amount: $stockpile.erectileImplant, research: $researchLab.erectileImplant}
+		}>>
+		<<run delete $stockpile>>
+		<<run delete $researchLab.basicPLimbInterface>>
+		<<run delete $researchLab.advPLimbInterface>>
+		<<run delete $researchLab.basicPLimb>>
+		<<run delete $researchLab.advSexPLimb>>
+		<<run delete $researchLab.advGracePLimb>>
+		<<run delete $researchLab.advCombatPLimb>>
+		<<run delete $researchLab.cyberneticPLimb>>
+		<<run delete $researchLab.ocularImplant>>
+		<<run delete $researchLab.cochlearImplant>>
+		<<run delete $researchLab.electrolarynx>>
+		<<run delete $researchLab.erectileImplant>>
+	<</if>>
+<</if>>
+<<if def $cyberMod>>
+	<<unset $cyberMod>>
+<</if>>
+/* unifify cybermod & vanilla finished*/
+
+
 /* reset NaNArray after BC is run */
 <<set $NaNArray = findNaN()>>
diff --git a/src/uncategorized/REFS.tw b/src/uncategorized/REFS.tw
index ec2f9eecdfedd4d105b25f292f0186b479c5a3b0..691aaf76893f91110b5179b159adbc38adc976da 100644
--- a/src/uncategorized/REFS.tw
+++ b/src/uncategorized/REFS.tw
@@ -119,7 +119,7 @@
 		<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set $fixedRace = _races.random()>>
 	<</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was enslaved by you when you overcharged her for surgery.">>
 	<<set $activeSlave.devotion = random(-70,-55)>>
 	<<set $activeSlave.trust = random(-45,-25)>>
@@ -143,7 +143,7 @@
 		<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set $fixedRace = _races.random()>>
 	<</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.devotion = 20>>
 	<<set $activeSlave.trust = 20>>
 	<<set $activeSlave.health = -30>>
@@ -164,7 +164,7 @@
 		<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set $fixedRace = _races.random()>>
 	<</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was enslaved by you when you purchased her debt.">>
 	<<set $activeSlave.devotion = random(-55,0)>>
 	<<set $activeSlave.trust = random(-45,0)>>
@@ -190,7 +190,7 @@
 		<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 		<<set $fixedRace = _races.random()>>
 	<</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was enslaved by you when you purchased her debt.">>
 	<<set $activeSlave.devotion = random(-90,-75)>>
 	<<set $activeSlave.trust = random(-45,-25)>>
diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw
index d539ba4f53928c9115d0cfafaca95999b1177731..878331fd1a3f9c6f22fbc399a9d7db169b8c3b28 100644
--- a/src/uncategorized/RESS.tw
+++ b/src/uncategorized/RESS.tw
@@ -44,7 +44,7 @@
 <<set _clothesTemp = $activeSlave.clothes>>
 <<switch $RESSevent>>
 /*Some events start with the slave naked (any event that starts with the daily inspection, for example). Here we switch their clothing just for the image to load, then switch it back quickly so the player's choice is not messed up.*/
-<<case "devoted lotion" "sore shoulders" "bed snuggle" "confident tanning" "devoted nympho" "devoted exhibition" "permitted masturbation" "terrified inspection" "spa boobs" "resistant shower" "resistant gelding" "rebellious arrogant" "bondage gear" "vocal disobedience" "heavy piercing" "resting amp" "age implant" "shift masturbation" "shift sleep" "slave dick huge" "obedient idiot" "tendon fall" "unhappy virgin" "fearful balls" "extreme aphrodisiacs" "shaped areolae" "huge tits" "trusting HG" "ignorant horny" "used whore" "restricted smart" "restricted profession" "mods please" "penitent" "devoted waist" "muscles" "obedient girlish" "huge naturals" "hugely pregnant" "slave dick on slave" "slave clit on slave" "language lesson" "kitchen molestation" "mindbroken morning" "sleeping ambivalent" "sexy succubus" "PA flirting" "fucktoy tribbing" "tittymonster inspection" "bonded love" "bad dream" "cockfeeder resistance" "suppository resistance" "shower slip" "happy dance" "plimb help" "orchiectomy please" "torpedo squeeze" "retching cum feeding" "subjugation blues" "transition anxiety" "moist pussy" "breast expansion blues" "gaped asshole" "ara ara" "im scared" "ass fitting" "young PC age difference" "old PC age difference" "devoted educated slave" "devoted shortstack" "desperate null" "implant inspection" "back stretch" "modest clothes">>
+<<case "age implant" "ara ara" "ass fitting" "back stretch" "bad dream" "bed snuggle" "bondage gear" "bonded love" "breast expansion blues" "cockfeeder resistance" "confident tanning" "devoted educated slave" "devoted exhibition" "devoted lotion" "desperate null" "devoted nympho" "devoted shortstack" "devoted waist" "extreme aphrodisiacs" "fearful balls" "fucktoy tribbing" "gaped asshole" "happy dance" "heavy piercing" "huge naturals" "huge tits" "hugely pregnant" "ignorant horny" "im scared" "implant inspection" "kitchen molestation" "language lesson" "mindbroken morning" "modest clothes" "mods please" "moist pussy" "muscles" "obedient girlish" "obedient idiot" "old PC age difference" "orchiectomy please" "PA flirting" "penitent" "permitted masturbation" "plimb help" "rebellious arrogant" "resistant gelding" "resistant shower" "resting amp" "restricted profession" "restricted smart" "retching cum feeding" "sexy succubus" "shaped areolae" "shift masturbation" "shift sleep" "shower slip" "slave clit on slave" "slave dick huge" "slave dick on slave" "sleeping ambivalent" "sore shoulders" "spa boobs" "subjugation blues" "suppository resistance" "tendon fall" "terrified inspection" "tittymonster inspection" "torpedo squeeze" "transition anxiety" "trusting HG" "unhappy virgin" "used whore" "vocal disobedience" "young PC age difference">>
 	<<set $activeSlave.clothes = "no clothing">>
 <<case "whore rebellious">>
 	/* this scene states they are wearing "thick, durable latex with temperature regulation and anchor points for restraint" no matter what they are assigned to wear. */
@@ -200,7 +200,7 @@ $He was mindbroken, but seems to have snapped out of it due to a deep love of yo
 <<case "mutinery attempt">>
 
 <<set $mutinery = 1>>
-Finishing your work, you lean back for a break well deserved break. Your peace is quickly disturbed by several loud smashes from down the penthouse hall. As you get up from your desk, you hear somebody running down the hallway, and before you know it, <<EventNameLink>> is inside. $He is looking quite treacherous and <<if $activeSlave.skill.combat > 0>>relatively confident<<else>>somewhat unsure<</if>>. $He quickly reaches in to grab you,
+Finishing your work, you lean back for a well-deserved break. Your peace is quickly disturbed by several loud smashes from down the penthouse hall. As you get up from your desk, you hear somebody running down the hallway, and before you know it, <<EventNameLink>> is inside. $He is looking quite treacherous and <<if $activeSlave.skill.combat > 0>>relatively confident<<else>>somewhat unsure<</if>>. $He quickly reaches in to grab you,
 <<if ($PC.career == "gang")>>
 	<<if ($personalArms != 0)>>
 		but when you point your handgun towards $him, $he stutters back with $his hands pointing upwards.
@@ -217,8 +217,9 @@ Finishing your work, you lean back for a break well deserved break. Your peace i
 	<<set $mutinery = 0>>
 <<elseif ($PC.career == "escort")>>
 	but you simply give $him a kick to the groin; $he wouldn't be the first person to try this shit on you.
+	<<set $mutinery = 0>>
 <<elseif ($PC.career == "slaver") || $PC.slaving >= 20>>
-	but you simply give $him a kick to the groin, a little trick you remember from your early memories on how to deal with rebellious slaves.
+	but you simply give $him a kick to the groin, a little trick you remember from your early days on how to deal with rebellious slaves.
 	<<set $mutinery = 0>>
 <<elseif ($PC.warfare >= 20)>>
 	but you have no problem grabbing $him and pushing $him to the ground, grabbing both $his arms to make sure $he doesn't try to step up.
@@ -908,15 +909,15 @@ As if the invitation wasn't already blindingly clear, $he reaches a hand down wi
 $He pulls the buttock closest to you aside, giving you a clear view of $his
 <<if canDoVaginal($activeSlave)>>
 	<<if $activeSlave.vagina == 10>>
-		gaping birth hole<<if $activeSlave.belly >= 100000>> and nearly prolapsing cervix<</if>>. $He runs $his fingers around its edge before sinking $his fist into it and preparing $himself like a good slavegirl for $his <<= WrittenMaster()>>.
+		gaping birth hole<<if $activeSlave.belly >= 100000>> and nearly prolapsing cervix<</if>>. $He runs $his fingers around its edge before sinking $his fist into it and preparing $himself like a good slave<<= $girl>> for $his <<= WrittenMaster()>>.
 	<<elseif $activeSlave.vagina > 2>>
-		lewd, well traveled pussy. $He traces a finger around it before sinking $his hand into it and spreading $himself wide like a good slavegirl for $his <<= WrittenMaster()>>.
+		lewd, well traveled pussy. $He traces a finger around it before sinking $his hand into it and spreading $himself wide like a good slave<<= $girl>> for $his <<= WrittenMaster()>>.
 	<<elseif $activeSlave.vagina > 1>>
-		loose pussy. $He traces a finger around it before spreading $himself wide like a good slavegirl for $his <<= WrittenMaster()>>.
+		loose pussy. $He traces a finger around it before spreading $himself wide like a good slave<<= $girl>> for $his <<= WrittenMaster()>>.
 	<<elseif $activeSlave.vagina > 0>>
-		tight pussy. $He traces a finger around it before spreading $himself like a good slavegirl for $his <<= WrittenMaster()>>.
+		tight pussy. $He traces a finger around it before spreading $himself like a good slave<<= $girl>> for $his <<= WrittenMaster()>>.
 	<<else>>
-		virgin pussy. $He traces a finger around it before spreading $himself like a good slavegirl for $his <<= WrittenMaster()>>.
+		virgin pussy. $He traces a finger around it before spreading $himself like a good slave<<= $girl>> for $his <<= WrittenMaster()>>.
 	<</if>>
 <<else>>
 	<<if $activeSlave.anus > 2>>
@@ -4743,7 +4744,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<if !canTalk($activeSlave)>>
 		$His expression shifts to confusion.
 	<<else>>
-		"What<<s>> that mean <<Master>>?"
+		"What'<<s>> that mean, <<Master>>?"
 	<</if>>
 	You quickly approach and catch $him, forcing $his <<if $activeSlave.belly >= 1500>><<if $activeSlave.bellyPreg >= 1500>>gravid <<else>>distended <</if>><</if>>body face up onto the couch. $He <<if canSee($activeSlave)>>watches you carefully<<elseif canHear($activeSlave)>>listens to your movements<<else>>waits with trepidation<</if>> as you size up $his fully erect
 	<<if $activeSlave.dick == 1>>
@@ -4966,37 +4967,68 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<link "Fight $him off as much as you can">>
 		<<EventNameDelink $activeSlave>>
 		<<replace "#result">>
-		You know your own body well, at least enough to be able to make it as difficult as possible for $him to use you. If $he were to loosen $his grip by a little, you'd be quick to shake $him off, but the position $he's got you in doesn't leave much room to fight back. When you start to tire, $he pushes you to the wall and starts rubbing $his
-		<<if $activeSlave.dick == 1>>
-			pathetic
-		<<elseif $activeSlave.dick == 2>>
-			little
-		<<elseif $activeSlave.dick == 3>>
-		<<elseif $activeSlave.dick == 4>>
-			big
-		<<elseif $activeSlave.dick == 5>>
-			impressive
-		<<elseif $activeSlave.dick == 6>>
-			huge
-		<<elseif $activeSlave.dick == 7>>
-			gigantic
-		<<elseif $activeSlave.dick == 8>>
-			titanic
-		<<elseif $activeSlave.dick == 9>>
-			absurd
-		<<elseif $activeSlave.dick == 10>>
-			inhuman
-		<<else>>
-			hypertrophied
+		<<if overpowerCheck($activeSlave, $PC) >= random(1,100)>>
+			You know your own body well, at least enough to be able to make it as difficult as possible for $him to use you. If $he were to loosen $his grip by a little, you'd be quick to shake $him off, but the position $he's got you in doesn't leave much room to fight back. When you start to tire, $he pushes you to the wall and starts rubbing $his
+			<<if $activeSlave.dick == 1>>
+				pathetic
+			<<elseif $activeSlave.dick == 2>>
+				little
+			<<elseif $activeSlave.dick == 3>>
+			<<elseif $activeSlave.dick == 4>>
+				big
+			<<elseif $activeSlave.dick == 5>>
+				impressive
+			<<elseif $activeSlave.dick == 6>>
+				huge
+			<<elseif $activeSlave.dick == 7>>
+				gigantic
+			<<elseif $activeSlave.dick == 8>>
+				titanic
+			<<elseif $activeSlave.dick == 9>>
+				absurd
+			<<elseif $activeSlave.dick == 10>>
+				inhuman
+			<<else>>
+				hypertrophied
+			<</if>>
+			dick on your lower body, thrusting blindly around your belly, before lodging $himself between your thighs. You have a hard time fighting against $him in your position, but you're not about to let $him dominate you either. You continue trying to shake $him off, making sure at the same time that your movements are as aggressive as possible to try and distract $him with pain or pleasure. You feel $his grip loosen as $his body tenses before pending orgasm, so you strongly push into $him, knocking $him off balance and to the floor. $He spills $his seed all over $himself and you as you wrestle $him into a chokehold. Now that you have $him restrained, it's time $he learned $his place.
+		<<else>>
+			You know your own body well, but $activeSlave.slaveName is much stronger than you had thought. $His grip shows little sign of loosening despite your struggle, and $he's got you in a position that allows for little other options to fight back. When you soon start to tire, $he pushes you to the wall, tears off your clothing, and starts rubbing $his
+			<<if $activeSlave.dick == 1>>
+				pathetic
+			<<elseif $activeSlave.dick == 2>>
+				little
+			<<elseif $activeSlave.dick == 3>>
+			<<elseif $activeSlave.dick == 4>>
+				big
+			<<elseif $activeSlave.dick == 5>>
+				impressive
+			<<elseif $activeSlave.dick == 6>>
+				huge
+			<<elseif $activeSlave.dick == 7>>
+				gigantic
+			<<elseif $activeSlave.dick == 8>>
+				titanic
+			<<elseif $activeSlave.dick == 9>>
+				absurd
+			<<elseif $activeSlave.dick == 10>>
+				inhuman
+			<<else>>
+				hypertrophied
+			<</if>>
+			dick on your lower body, thrusting blindly around your belly, before suddenly lodging $himself in your pussy. You have an even harder time fighting against $him in this position, especially since your aggressive movements seem to send a pleasurable sensation to $his cock. You only manage to find an opportunity to free yourself when $he reaches orgasm, shooting $his seed deep inside you. As $he cums, you strongly push into $him, knocking $him off balance and to the floor. By sheer luck, $his head strikes a large paperweight that was thrown across the room in your struggle, knocking $him unconscious long enough for you to dislodge yourself and tie $him up. Now that you have $him restrained, it's time $he learned $his place.
+			<<if canImpreg($PC, $activeSlave)>>
+				<<= knockMeUp($PC, 50, 0, $activeSlave.ID)>>
+			<</if>>
+			<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
 		<</if>>
-		dick on your lower body, thrusting blindly around your belly, before lodging $himself between your thighs. You have a hard time fighting against $him in your position, but you're not about to let $him dominate you either. You continue trying to shake $him off, making sure at the same time that your movements are as aggressive as possible to try and distract $him with pain or pleasure. You feel $his grip loosen as $his body tenses before pending orgasm, so you strongly push into $him, knocking $him off balance and to the floor. $He spills $his seed all over $himself and you as you wrestle $him into a chokehold. Now that you have $him restrained, it's time $he learned $his place.
 		<<set $mutinery = 2>>
 
 		<br><br><span id="result2">
 		<<if $mutinery != 1>>
 			<br><<link "Lock $his dick in chastity">>
 				<<replace "#result2">>
-				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
+				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, $he immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
 				<<set $activeSlave.trust += 10, $activeSlave.chastityPenis = 1>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust += 5; } })>>
 				<</replace>>
@@ -5047,7 +5079,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 			<</if>>
 			<br><<link "Deny $him from ever having satisfying sex again">>
 				<<replace "#result2">>
-				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly find $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
+				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly finds $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
 				<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 30, $activeSlave.health -= 20, $activeSlave.dick = 0, $activeSlave.prostate = 0, $activeSlave.dickAccessory = "none", $activeSlave.chastityPenis = 0, $activeSlave.vagina = 0, $activeSlave.ovaries = 0, $activeSlave.clit = 0, $activeSlave.labia = 0, $activeSlave.vaginalAccessory = "none", $activeSlave.vaginalAttachment = "none", $activeSlave.chastityVagina = 0>>
 				<<= AnalVCheck()>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust -= 15; } })>>
@@ -5061,7 +5093,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<br><<link "Try to talk it out">>
 		<<EventNameDelink $activeSlave>>
 		<<replace "#result">>
-		You start trying to talk $him down, hoping to persuade $him that you might reconsider your punishment if they stopped this foolishness; $he doesn't seem too keen on <<if canHear($activeSlave)>>listening to<<else>>acknowledging<</if>> you, instead pushing you against a wall and tearing your clothes off. Ignoring your words, $he forces $his
+		You start trying to talk $him down, hoping to persuade $him that you might reconsider your punishment if $he stopped this foolishness; $he doesn't seem too keen on <<if canHear($activeSlave)>>listening to<<else>>acknowledging<</if>> you, instead pushing you against a wall and tearing your clothes off. Ignoring your words, $he forces $his
 		<<if $activeSlave.dick == 1>>
 			pathetic
 		<<elseif $activeSlave.dick == 2>>
@@ -5090,13 +5122,14 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 			<<= knockMeUp($PC, 100, 0, $activeSlave.ID)>>
 		<</if>>
 		Once spent, $he shoves you to the ground and crashes into your office chair. The moment $he lets down $his guard, you slam the heaviest object you can find into $his head. Now that you have $him controlled, it's time $he learned $his place; when $he wakes up, of course. It's more fun that way.
+		<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
 		<<set $mutinery = 2>>
 
 		<br><br><span id="result2">
 		<<if $mutinery != 1>>
 			<br><<link "Lock $his dick in chastity">>
 				<<replace "#result2">>
-				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
+				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, $he immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
 				<<set $activeSlave.trust += 10, $activeSlave.chastityPenis = 1>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust += 5; } })>>
 				<</replace>>
@@ -5147,7 +5180,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 			<</if>>
 			<br><<link "Deny $him from ever having satisfying sex again">>
 				<<replace "#result2">>
-				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly find $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
+				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly finds $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
 				<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 30, $activeSlave.health -= 20, $activeSlave.dick = 0, $activeSlave.prostate = 0, $activeSlave.dickAccessory = "none", $activeSlave.chastityPenis = 0, $activeSlave.vagina = 0, $activeSlave.ovaries = 0, $activeSlave.clit = 0, $activeSlave.labia = 0, $activeSlave.vaginalAccessory = "none", $activeSlave.vaginalAttachment = "none", $activeSlave.chastityVagina = 0>>
 				<<= AnalVCheck()>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust -= 15; } })>>
@@ -5184,14 +5217,14 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 		<<else>>
 			hypertrophied
 		<</if>>
-		dick inside your<<if $PC.career == "escort" || $PC.career == "servant">> expert<</if>> mouth. You diligently suck until you feel $him begin to tense up; this is your chance. You clamp down on $his cock while simultaneously punching $him in the balls. $He howls in pain, until you headbutt $him in the stomach and knock the wind out of $him. You quickly pull $him into an arm lock and force $him over your desk. Now that you have $him restrained, it's time $he learned $his place; after you've gotten the taste of the slut out of your mouth, that is.
+		dick inside your<<if $PC.career == "escort" || $PC.career == "servant">> expert<</if>> mouth. You diligently suck until you feel $him begin to tense up; this is your chance. You clamp down on $his cock while simultaneously punching $him in the balls. $He howls in pain, until you headbutt $him in the stomach and knock the wind out of $him. You quickly pull $him into an arm lock and force $him over your desk. Now that you have $him restrained, it's time $he learned $his place — after you've gotten the taste of the slut out of your mouth, that is.
 		<<set $mutinery = 2>>
 
 		<br><br><span id="result2">
 		<<if $mutinery != 1>>
 			<br><<link "Lock $his dick in chastity">>
 				<<replace "#result2">>
-				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
+				You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, $he immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
 				<<set $activeSlave.trust += 10, $activeSlave.chastityPenis = 1>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust += 5; } })>>
 				<</replace>>
@@ -5242,7 +5275,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 			<</if>>
 			<br><<link "Deny $him from ever having satisfying sex again">>
 				<<replace "#result2">>
-				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly find $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
+				You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly finds $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
 				<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 30, $activeSlave.health -= 20, $activeSlave.dick = 0, $activeSlave.prostate = 0, $activeSlave.dickAccessory = "none", $activeSlave.chastityPenis = 0, $activeSlave.vagina = 0, $activeSlave.ovaries = 0, $activeSlave.clit = 0, $activeSlave.labia = 0, $activeSlave.vaginalAccessory = "none", $activeSlave.vaginalAttachment = "none", $activeSlave.chastityVagina = 0>>
 				<<= AnalVCheck()>>
 				<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust -= 15; } })>>
@@ -5261,7 +5294,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<if $mutinery != 1>>
 		<br><<link "Lock $his dick in chastity">>
 			<<replace "#result2">>
-			You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
+			You simply clamp a chastity cage onto $his limp dick; $he'll be taking a little break from fucking girls for the time being. When $he comes to and finds $himself locked in chastity, $he immediately begins fiddling with it in an attempt to remove it. $He feels this punishment is laughable and only @@.mediumaquamarine;grows more defiant.@@ Word spreads through your chattel that the only downside of trying to rape <<= WrittenMaster()>> is getting locked in chastity, @@.mediumaquamarine;spreading defiance@@ through your rebellious slaves.
 			<<set $activeSlave.trust += 10, $activeSlave.chastityPenis = 1>>
 			<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust += 5; } })>>
 			<</replace>>
@@ -5312,7 +5345,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 		<</if>>
 		<br><<link "Deny $him from ever having satisfying sex again">>
 			<<replace "#result2">>
-			You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly find $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
+			You ask $him if $he enjoyed $his last orgasm, because $he won't be getting any more. Restrained as $he is, the most $he can do is cry and beg. Once $he comes to after the surgery, $he faces $his new body; @@.mediumorchid;$he's now a surgical null,@@ though $he retains $his balls, and $he's @@.gold;the only one to blame@@ for $his @@.red;suffering.@@ You waste no time in shoving $him against the wall and forcing your <<if $PC.dick == 1>>dick<<else>>strap-on<</if>> into $his anus. As $his arousal grows, $he realizes you not only took $his dick, but $his prostate as well. $He quickly finds $himself desperate for release but lacking any way to do so. You watch $him squirm in sexual frustration. This will be $his new life. Every other rebellious slave is @@.gold;horrified by the example.@@
 			<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 30, $activeSlave.health -= 20, $activeSlave.dick = 0, $activeSlave.prostate = 0, $activeSlave.dickAccessory = "none", $activeSlave.chastityPenis = 0, $activeSlave.vagina = 0, $activeSlave.ovaries = 0, $activeSlave.clit = 0, $activeSlave.labia = 0, $activeSlave.vaginalAccessory = "none", $activeSlave.vaginalAttachment = "none", $activeSlave.chastityVagina = 0>>
 			<<= AnalVCheck()>>
 			<<set $slaves.forEach(function(s) { if (s.devotion < -50) { s.trust -= 15; } })>>
@@ -5328,9 +5361,22 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 <<link "Push $him off of you">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
-		<<if $arcologies[0].FSPhysicalIdealist != "unset">>
-			You struggle underneath $his grip and manage to wriggle your arms free. You grab the amorous bull and effortlessly flip $him off of you. $He might be strong, but you are a chiseled goddess. You <<if $PC.dick == 0>>grab your biggest strap-on<<else>>stroke your growing erection<</if>> as $he struggles to right $himself, catching $his hips as $he tries to escape. You show no mercy as you force yourself into $his <<if $activeSlave.anus == 0>>virgin<</if>> ass and viciously fuck $him like $he intended to do to you. You savor the sight of your every thrust against $his prostate forcing spurts of precum out $his gigantic, throbbing erection. You pick up the pace as $he climaxes, soaking the sheets beneath $him; $he's not getting out of this until you are satisfied. By the end of things, the master suite reeks of fresh cum and $activeSlave.slaveName's twitching body is the center piece of $his semen puddle. The sheets will definitely need a changing, you note, as $his semi-erect cock twitches and a thick rope of jism sprays forth.
-			<<= AnalVCheck(5)>>
+		<<if overpowerCheck($activeSlave, $PC) >= random(1,100)>>
+			You struggle underneath $his grip and manage to wriggle your arms free. You grab the amorous bull and effortlessly flip $him off of you. $He might be strong, but you are <<if $arcologies[0].FSPhysicalIdealist != "unset">>a chiseled god<<if $PC.title == 0>>dess<</if>><<else>>far stronger<</if>>.
+			<br><br><span id="result2">
+			<<link "Show $him who's in charge">>
+				<<replace "#result2">>
+				You <<if $PC.dick == 0>>grab your biggest strap-on<<else>>stroke your growing erection<</if>> as $activeSlave.slaveName struggles to right $himself, catching $his hips as $he tries to escape. You show no mercy as you force yourself into $his <<if $activeSlave.anus == 0>>virgin<</if>> ass and viciously fuck $him like $he intended to do to you. You savor the sight of your every thrust against $his prostate forcing spurts of precum out $his gigantic, throbbing erection. You pick up the pace as $he climaxes, soaking the sheets beneath $him; $he's not getting out of this until you are satisfied. By the end of things, the master suite reeks of fresh cum and $activeSlave.slaveName's twitching body is the center piece of $his semen puddle. The sheets will definitely need a changing, you note, as $his semi-erect cock twitches and a thick rope of jism sprays forth.
+				<<= AnalVCheck(5)>>
+				<</replace>>
+			<</link>><<if ($activeSlave.anus == 0)>> //This option will take anal virginity//<</if>>
+			<br><<link "Just get $him out of here">>
+				<<replace "#result2">>
+				You grab $activeSlave.slaveName by the scruff of $his neck as $he struggles to right $himself and literally throw $him out of your room and into the hallway, where $he lands with a painful-sounding crash. You decide to deal with getting that mess cleaned up later; for now, you're going back to bed.
+				<<set $activeSlave.health -= 10>>
+				<</replace>>
+			<</link>>
+			</span>
 		<<else>>
 			You struggle underneath $his grip and manage to wriggle your arms free. You push at the amorous bull and attempt to lift the heavy $girl off you. $activeSlave.slaveName takes this poorly and rams $his gigantic dick straight into your vagina and through your cervix. You pass out from the pain.
 			<br><br>
@@ -5339,7 +5385,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 			<<set $activeSlave.counter.penetrative += 4, $penetrativeTotal += 4>>
 		<</if>>
 	<</replace>>
-<</link>><<if ($activeSlave.anus == 0) && $arcologies[0].FSPhysicalIdealist != "unset">> //This option will take anal virginity//<</if>>
+<</link>>
 <br><<link "Wait for a chance to escape">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
@@ -5369,7 +5415,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 		<</if>>
 	<</replace>>
 <</link>>
-<br><<link "Take it like a good girl">>
+<br><<link "Take it like a good _girlP">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 		$He is far stronger than you expected and has you trapped in a compromising position. You've seen $activeSlave.slaveName fuck before; $he's a quick shot, only in it to get $his mate pregnant. You question what you are thinking as $his gigantic dick pokes at your crotch, eager to find the egg at the end of the tunnel. $He lacks even the basic understanding of foreplay, you realize, as $he drives $his cock deep into your pussy. You groan with pain at the sheer size of the rod stretching out your poor hole and struggle to hold back the tears once $he starts thrusting. There is no pleasure for you here as $he batters your cervix; you barely stop yourself from screaming out as $he slams through your final defense and cums directly into your exposed womb.
@@ -5410,7 +5456,7 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<replace "#result">>
 		<<if ($activeSlave.diet == "fattening" || $activeSlave.dietMilk > 0) && $activeSlave.intelligence+$activeSlave.intelligenceImplant > 15>>
 			<<if canTalk($activeSlave)>>
-				"<<S>>o the diet i<<s>> working well, <<Master>>? That'<<s>> good, I <<s>>uppo<<s>>e. I'm ju<<s>>t a bit <<sh>>ocked at how hone<<s>>t you were, people u<<s>>ually try to dodge that que<<s>>tion or outright lie."
+				"<<S>>o the diet i<<s>> working well, <<Master>>? That'<<s>> good, I <<s>>uppo<<s>>e. I'm ju<<s>>t a bit <<sh>>ocked at how hone<<s>>t you were; people u<<s>>ually try to dodge that que<<s>>tion or outright lie."
 			<<else>>
 				$He smiles before explaining $he knows you want $him plumper and that $he accepts it, but is surprised by your honesty to such a question.
 			<</if>>
@@ -6956,14 +7002,14 @@ brought in to you. This time <<EventNameLink>> has been sent to deliver it. $He
 	<<if $activeSlave.nipples == "fuckable">>
 		<<set $activeSlave.counter.mammary += 2, $mammaryTotal += 2>>
 	<</if>>
-	<<set $skillIncrease = 10>>
+	<<set _skillIncrease = 10>>
 	<<if $activeSlave.skill.anal <= 10 && canDoAnal($activeSlave)>>
 		$He can't help but learn how to take a rough buttfuck.
-		<<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Anal($activeSlave, _skillIncrease)>>
 	<</if>>
 	<<if $activeSlave.skill.oral <= 10>>
 		$He can't help but learn how to deepthroat.
-		<<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Oral($activeSlave, _skillIncrease)>>
 	<</if>>
 	<</replace>>
 <</link>><<if ($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave))>> //This option will take virginity//<</if>>
@@ -7596,7 +7642,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<</if>>
 	You patiently explain that taking <<if $PC.dick == 0>>anything you feel like inserting into $his backdoor<<else>>your cock<</if>> is $his duty, and begin to massage $his sphincter open with a single gentle finger. $He doesn't enjoy the ensuing assfuck, but $he doesn't truly hate it either and @@.hotpink;begins to hope@@ that being your butt slave won't be so painful after all.
 	<<set $activeSlave.devotion += 4>>
-	<<set $skillIncrease = 10>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Anal($activeSlave, 10)>>
 	<<= AnalVCheck()>>
 	<</replace>>
 <</link>>
@@ -7612,7 +7658,14 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 <<link "Force $him out of bed and humiliate $him publicly">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
-	You drag $him unceremoniously out of bed and straight down into the public areas of $arcologies[0].name. $His struggles and protests grow more frantic as $he <<if canSee($activeSlave)>>sees the first passersby beginning to stare at the little spectacle<<elseif canHear($activeSlave)>>begins to hear the various catcalls and other comments directed at $him<<else>>feels the outdoor air on $his body<</if>>. You force $him right there, thoroughly raping the struggling $girl in public. @@.gold;$He learns the consequences of refusal,@@ but @@.red;your reputation has been decreased by the unseemly commotion.@@
+	You drag $him unceremoniously out of bed and straight down into the public areas of $arcologies[0].name. $His struggles and protests grow more frantic as $he <<if canSee($activeSlave)>>sees the first passersby beginning to stare at the little spectacle<<elseif canHear($activeSlave)>>begins to hear the various catcalls and other comments directed at $him<<else>>feels the outdoor air on $his body<</if>>. You force $him right there, thoroughly raping the struggling $girl in public. @@.gold;$He learns the consequences of refusal,@@ 
+	<<if $arcologies[0].FSDegradationist !== "unset">>
+		and @@.green;your citizens certainly enjoy the public spectacle.@@
+		<<run repX(100, "event", $activeSlave)>>
+	<<else>>
+		but @@.red;your reputation has been decreased by the unseemly commotion.@@
+		<<run repX(forceNeg(100), "event", $activeSlave)>>
+	<</if>>
 	<<if canDoVaginal($activeSlave) && canDoAnal($activeSlave)>>
 		<<= BothVCheck()>>
 	<<elseif canDoVaginal($activeSlave)>>
@@ -7623,16 +7676,25 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 		<<set $activeSlave.counter.oral++, $oralTotal++>>
 	<</if>>
 	<<set $activeSlave.trust -= 5>>
-	<<run repX(-100, "event", $activeSlave)>>
 	<</replace>>
-<</link>><<if (($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave))) && $seePee == 1>> //This option will take virginity//<</if>>
-<br><<link "Let $him stay in bed, but move it to a public restroom">>
+<</link>><<if (($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave)))>> //This option will take virginity//<</if>>
+<br><<link "Let $him stay in bed">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
-	You quickly pin the blanket to the mattress, securing $him in place. You direct that a urinal in one of $arcologies[0].name's public restrooms be unbolted and replaced by the mattress, slave and all. $He's been swearing and threatening all this time, but the calumny reaches a shrieking crescendo (though muffled by the blanket) when $he feels urine beginning to soak through the blanket. After an hour or so $he's begging to be let out, @@.gold;swearing $he'll improve $his conduct.@@
-	<<set $activeSlave.trust -= 5>>
+		You shrug and walk out of the room and back to your office; you've got more important things to worry about than this drowsy brat. $activeSlave.slaveName, for $his part, gets out of bed not long after you leave, but is surprised at @@.orangered;how easily $he got away with this,@@ and is wondering @@.mediumorchid;what else $he could get away with.@@
+		<<set $activeSlave.trust += 10>>
+		<<set $activeSlave.devotion -= 10>>
 	<</replace>>
 <</link>>
+<<if $seePee == 1>>
+	<br><<link "Let $him stay in bed, but move it to a public restroom">>
+		<<EventNameDelink $activeSlave>>
+		<<replace "#result">>
+			You quickly pin the blanket to the mattress, securing $him in place. You direct that a urinal in one of $arcologies[0].name's public restrooms be unbolted and replaced by the mattress, slave and all. $He's been swearing and threatening all this time, but the calumny reaches a shrieking crescendo (though muffled by the blanket) when $he feels urine beginning to soak through the blanket. After an hour or so $he's begging to be let out, @@.gold;swearing $he'll improve $his conduct.@@
+			<<set $activeSlave.trust -= 5>>
+		<</replace>>
+	<</link>>
+<</if>>
 <<if canDoAnal($activeSlave) || canDoVaginal($activeSlave)>>
 <br><<link "Let $him stay in bed, but move it to a whorehouse">>
 	<<EventNameDelink $activeSlave>>
@@ -7681,30 +7743,30 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 <</link>><<if ($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave))>> //This option will take virginity//<</if>>
 <</if>>
 <<if $arcade > 0>>
-<br><<link "Sentence $him to a month in the arcade">>
-	<<EventNameDelink $activeSlave>>
-	<<replace "#result">>
-	$activeSlave.slaveName screams and begs when $he realizes what $his punishment is, but you are obdurate.
-	<<if ($activeSlave.muscles > 30)>>
-		$His powerful form has to be sedated for immurement in the arcade.
-	<<elseif ($activeSlave.weight >= 190)>>
-		$He is so massively fat that immuring $him in the arcade is a struggle, even when $he isn't trying to.
-	<<elseif $activeSlave.belly >= 120000>>
-		$He is so enormously gravid that immuring $him in the arcade is a hassle, even though $his _belly middle limits $his ability to struggle.
-	<<elseif ($activeSlave.weight >= -10)>>
-		$His desperate struggles make immuring $him in the arcade difficult.
-	<<elseif $activeSlave.belly >= 1500>>
-		$His <<if $activeSlave.bellyPreg >= 3000>>pregnant<<else>>_belly<</if>> body makes it slightly difficult to fit $him properly into the restraints for immurement in the arcade.
-	<<elseif $activeSlave.muscles < -15>>
-		$His weak body makes immuring $him in the arcade pathetically easy.
-	<<else>>
-		$His thin form makes immuring $him in the arcade pathetically easy.
-	<</if>>
-	After $he's properly confined, the only sign of $his discomfiture is a slight movement of $his $activeSlave.skin butt as $he wriggles desperately against $his restraints.
-	<<= assignJob($activeSlave, "be confined in the arcade")>>
-	<<set $activeSlave.sentence = 4>>
-	<</replace>>
-<</link>>
+	<br><<link "Sentence $him to a month in the arcade">>
+		<<EventNameDelink $activeSlave>>
+		<<replace "#result">>
+		$activeSlave.slaveName screams and begs when $he realizes what $his punishment is, but you are obdurate.
+		<<if ($activeSlave.muscles > 30)>>
+			$His powerful form has to be sedated for immurement in the arcade.
+		<<elseif ($activeSlave.weight >= 190)>>
+			$He is so massively fat that immuring $him in the arcade is a struggle, even when $he isn't trying to.
+		<<elseif $activeSlave.belly >= 120000>>
+			$He is so enormously gravid that immuring $him in the arcade is a hassle, even though $his _belly middle limits $his ability to struggle.
+		<<elseif ($activeSlave.weight >= -10)>>
+			$His desperate struggles make immuring $him in the arcade difficult.
+		<<elseif $activeSlave.belly >= 1500>>
+			$His <<if $activeSlave.bellyPreg >= 3000>>pregnant<<else>>_belly<</if>> body makes it slightly difficult to fit $him properly into the restraints for immurement in the arcade.
+		<<elseif $activeSlave.muscles < -15>>
+			$His weak body makes immuring $him in the arcade pathetically easy.
+		<<else>>
+			$His thin form makes immuring $him in the arcade pathetically easy.
+		<</if>>
+		After $he's properly confined, the only sign of $his discomfiture is a slight movement of $his $activeSlave.skin butt as $he wriggles desperately against $his restraints.
+		<<= assignJob($activeSlave, "be confined in the arcade")>>
+		<<set $activeSlave.sentence = 4>>
+		<</replace>>
+	<</link>>
 <</if>>
 
 <<case "escapee">>
@@ -7775,6 +7837,13 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<= AnalVCheck()>>
 	<</replace>>
 <</link>>
+<br><<link "Allow $him to resume $his birth name">>
+	<<EventNameDelink $activeSlave>>
+	<<replace "#result">>
+	You calmly and charitably tell $him that that's acceptable; $he can be $activeSlave.birthName again. $He has the wit to be worried, but $he soon finds that $his fears are unjustified. You offer no condition or "catch" with this bit of generosity; it seems all $he really had to do was ask. You usher the stunned $desc out of your office and on to $his duties before $he can even offer a perfunctory "thanks". Over the next week, it's clear that while $activeSlave.slaveName — no, $activeSlave.birthName — is @@.mediumorchid;not sure what to think of you now,@@ it's clear that $he is at least @@.orangered;less afraid of you.@@
+	<<set $activeSlave.trust += 25, $activeSlave.devotion -= 15, $activeSlave.slaveName = $activeSlave.birthName>>
+	<</replace>>
+<</link>>
 <br><<link "Allow $him to resume $his birth name, but make it publicly humiliating">>
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
@@ -8402,20 +8471,20 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<</link>><<if ($activeSlave.anus == 0 && canDoAnal($activeSlave)) || ($activeSlave.vagina == 0 && canDoVaginal($activeSlave))>> //This option will take virginity//<</if>>
 	<</if>>
 	<<if $PC.vagina == 1>>
-	<br><<link "Exploit $his need for personal contact by giving $him a pussy to lick">>
-		<<EventNameDelink $activeSlave>>
-		<<replace "#result">>
-		Without a word, you push your eager pussy up against the hole. After a moment's pause, you feel $him begin to orally service you with almost desperate concentration. You climax quickly to $his manic efforts, and begin to rise. As you do, $he tearfully begs you not to go. $He promises to do better, to try to get you off harder, so you lower yourself back into position. You have to exert yourself to hold this position, so it better be worth it. You begin to back off whenever $he shows $himself any mercy, so $he eats you out so zealously that $he sobs a little when $he tries to catch $his breath. With $his mouth so busy, $he doesn't even have the time to talk to you, the lifeline $he so needs, but $he doesn't seem to notice. @@.hotpink;$His submission to you has increased.@@
-		<<set $activeSlave.devotion += 10>>
-		<</replace>>
-	<</link>>
+		<br><<link "Exploit $his need for personal contact by giving $him a pussy to lick">>
+			<<EventNameDelink $activeSlave>>
+			<<replace "#result">>
+			Without a word, you push your eager pussy up against the hole. After a moment's pause, you feel $him begin to orally service you with almost desperate concentration. You climax quickly to $his manic efforts, and begin to rise. As you do, $he tearfully begs you not to go. $He promises to do better, to try to get you off harder, so you lower yourself back into position. You have to exert yourself to hold this position, so it better be worth it. You begin to back off whenever $he shows $himself any mercy, so $he eats you out so zealously that $he sobs a little when $he tries to catch $his breath. With $his mouth so busy, $he doesn't even have the time to talk to you, the lifeline $he so needs, but $he doesn't seem to notice. @@.hotpink;$His submission to you has increased.@@
+			<<set $activeSlave.devotion += 10>>
+			<</replace>>
+		<</link>>
 	<</if>>
 <</if>>
 <<if $PC.preg > 30 && $PC.pregMood == 1 && $PC.boobs == 1 && $PC.boobsImplant == 0 && $PC.boobsBonus >= 0>>
 	<br><<link "$He just needs a mother's touch">> <<EventNameDelink $activeSlave>> <<replace "#result">>
 		You reassure the frightened $desc and beckon $him to return to the hole before settling your gravid body before the door and pushing a fat, milk-laden breast through the gap. You coax the nervous $girl to drink $his fill; $he must be starving in there, after all. After some hesitation, you finally feel a pair of lips wrap themselves around your erect nipple and begin to drink deep. You talk to the suckling slave, explaining to $him just what $he needs to do to thrive in $his new life, shushing $him whenever $he tries to object and asking $him to just listen. Before long, your teat is drained of all its mother's milk, and as you move to shift to the other closer to the door, the desperate slave begs you not to go. You slip a hand through the slat, caressing $his face as you let $him know you're just turning around. As $he suckles your remaining milk, you feel $him @@.mediumaquamarine;relax and lower $his guard.@@ $He needed to connect to someone and $he didn't expect it to be you, especially like not this. @@.hotpink;$His willingness to listen to you has increased.@@
 		<<set $activeSlave.devotion += 15, $activeSlave.trust += 5>>
-		<</replace>> <</link>>
+	<</replace>> <</link>>
 <</if>>
 
 <<case "scrubbing">>
@@ -8691,7 +8760,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	<<if $activeSlave.belly >= 600000>>
-		You struggle to heft $his overfilled body up, eliciting whimpers of joy at the impending relief and the pressure removed from $his body, and carefully secure $him with a few straps so $he can serve as your living cocksleeve. $He's attached to the front of your torso<<if $activeSlave.belly >= 5000>>, $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnancy<<else>>stomach<</if>> forcing you to experience what it is like to carry $activeSlave.pregType children,<</if>> with your cock up inside $him, and the gentle motion of your member as you waddle outside brings $him to climax within a few steps. You carefully stroll around the nicer levels of the arcology, admiring the views and <<if canSee($activeSlave)>>showing $activeSlave.slaveName the sights $he now requires assistance to see<<elseif canHear($activeSlave)>>explaining the sights as $activeSlave.slaveName soaks in the sounds <<if canSmell($activeSlave)>>and smells <</if>>$he now requires assistance to experience<<else>>explaining everything around $him as $he basks in the feeling of the fresh air on $his $activeSlave.skin skin<</if>> and leaving a large wake as people make room for your gravid mass. @@.hotpink;$He has become more devoted to you.@@ The sight of you waddling around with a living fucktoy on your cock @@.green;certainly cements your reputation as an arcology owner who has everything,@@ once they figure out that the belly attached to you is, in fact, owned by a barely visible slavegirl.
+		You struggle to heft $his overfilled body up, eliciting whimpers of joy at the impending relief and the pressure removed from $his body, and carefully secure $him with a few straps so $he can serve as your living cocksleeve. $He's attached to the front of your torso<<if $activeSlave.belly >= 5000>>, $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnancy<<else>>stomach<</if>> forcing you to experience what it is like to carry $activeSlave.pregType children,<</if>> with your cock up inside $him, and the gentle motion of your member as you waddle outside brings $him to climax within a few steps. You carefully stroll around the nicer levels of the arcology, admiring the views and <<if canSee($activeSlave)>>showing $activeSlave.slaveName the sights $he now requires assistance to see<<elseif canHear($activeSlave)>>explaining the sights as $activeSlave.slaveName soaks in the sounds <<if canSmell($activeSlave)>>and smells <</if>>$he now requires assistance to experience<<else>>explaining everything around $him as $he basks in the feeling of the fresh air on $his $activeSlave.skin skin<</if>> and leaving a large wake as people make room for your gravid mass. @@.hotpink;$He has become more devoted to you.@@ The sight of you waddling around with a living fucktoy on your cock @@.green;certainly cements your reputation as an arcology owner who has everything,@@ once they figure out that the belly attached to you is, in fact, owned by a barely visible slave<<= $girl>>.
 	<<elseif $activeSlave.belly >= 300000>>
 		You heft $his heavy body $him up, eliciting whimpers of joy at the impending relief, and carefully secure $him with a few straps so $he can serve as your living cocksleeve. $He's attached to the front of your torso<<if $activeSlave.belly >= 5000>>, $his _belly <<if $activeSlave.bellyPreg >= 3000>>pregnancy<<else>>stomach<</if>> massively jutting out in front of you,<</if>> with your cock up inside $him, and the gentle motion of your member as you waddle outside brings $him to climax within a few steps. You carefully stroll around the nicer levels of the arcology, admiring the views and <<if canSee($activeSlave)>>showing $activeSlave.slaveName the sights $he now requires assistance to see<<elseif canHear($activeSlave)>>explaining the sights as $activeSlave.slaveName soaks in the sounds <<if canSmell($activeSlave)>>and smells <</if>>$he now requires assistance to experience<<else>>explaining everything around $him as $he basks in the feeling of the fresh air on $his $activeSlave.skin skin<</if>>. @@.hotpink;$He has become more devoted to you.@@ The sight of you waddling around with a living fucktoy on your cock @@.green;certainly cements your reputation as an arcology owner who has everything.@@
 	<<else>>
@@ -9580,7 +9649,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<EventNameDelink $activeSlave>>
 	<<replace "#result">>
 	$He obeys your orders to keep $his hands off $his dick, but can't hide $his disappointment and frustration. You keep a close watch on $him, and buttfuck $him every chance you get, teaching $him the finer points of taking a <<if $PC.dick == 0>>strap-on<<else>>dick<</if>> up the butt. You focus entirely on your pleasure, teaching $him how to use $his <<if ($activeSlave.anus > 2)>>gaping<<elseif ($activeSlave.anus > 1)>>loose<<else>>tight<</if>> anal ring to extract orgasms from cocks. This experience was hard for $him but has increased $his anal skill.
-	<<set $skillIncrease = 10>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Anal($activeSlave, 10)>>
 	<<= AnalVCheck(9)>>
 	<</replace>>
 <</link>>
@@ -13613,7 +13682,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<if $activeSlave.physicalAge > 30>>
 		MILF.
 	<<elseif $activeSlave.physicalAge > 17>>
-		slavegirl.
+		slave<<= $girl>>.
 	<<elseif $activeSlave.physicalAge > 12>>
 		teenager.
 	<<else>>
@@ -15166,7 +15235,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<replace "#result">>
 	Simple problems require simple solutions — $he'll get fucked in the mouth until $he either gets over $his hang-ups about oral or learns to hide them. You drag the protesting $activeSlave.slaveName out in public, chain $him low so that $his mouth is available, and tell $him that $he'll suck dicks until $he gets through five in a row without grimacing, gagging, or resisting. You have a comfortable chair brought out to you and settle in to watch the show.
 	$activeSlave.slaveName tries, $he really does. But when word gets out as to the conditions of $his enslavement, $his users take a perverse enjoyment in being rougher than usual to evoke the exact reactions $he's trying to avoid. By the third failed streak, you've started to grow bored of the spectacle, but luckily you find entertainment in conversation with those who have already been entertained by poor $activeSlave.slaveName. Before long more chairs have been brought up and an impromptu salon has been set up alongside the blowbang line. By the sixth failed streak, an enterprising citizen has set up a small bar and is serving drinks. By the ninth, you've delegated watching $activeSlave.slaveName to your assistant. You personally break the eleventh streak after $he reached four, to general acclaim from your newfound friends and a toast to your virility.
-	When the fourteenth streak is finally successful, there are serious talks about making these blowbang salons a regular occurrence and some backslapping directed towards you for your innovation in genteel hedonism. While you seriously doubt $activeSlave.slaveName enjoys oral sex any more than $he did at the start of the day, $he's certainly @@.green;learned to keep $his feelings on the matter to $himself.@@ $He did, however, @@.red;have quite a rough time@@ of it<<if $activeSlave.skill.oral <= 30>>, though $he did learn a thing or two about sucking dick.<<set $skillIncrease = 10>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>><<else>>.<</if>> And last of all, you and $activeSlave.slaveName did make @@.green;quite a good impression@@ today, though for widely differing reasons.
+	When the fourteenth streak is finally successful, there are serious talks about making these blowbang salons a regular occurrence and some backslapping directed towards you for your innovation in genteel hedonism. While you seriously doubt $activeSlave.slaveName enjoys oral sex any more than $he did at the start of the day, $he's certainly @@.green;learned to keep $his feelings on the matter to $himself.@@ $He did, however, @@.red;have quite a rough time@@ of it<<if $activeSlave.skill.oral <= 30>>, though $he did learn a thing or two about sucking dick.<<= SkillIncrease.Oral($activeSlave, 10)>><<else>>.<</if>> And last of all, you and $activeSlave.slaveName did make @@.green;quite a good impression@@ today, though for widely differing reasons.
 	<<set $activeSlave.health -= 10, $activeSlave.sexualFlaw = "none">>
 	<<set _oralSeed = random(65,80)>>
 	<<set $activeSlave.counter.oral += _oralSeed, $activeSlave.counter.publicUse += _oralSeed, $oralTotal += _oralSeed>>
@@ -17765,56 +17834,10 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<= knockMeUp($activeSlave, 100, 2, -2, 1)>>
 	<<run cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave)>>
 	<<set $activeSlave.health -= 20>>
-	<<if ($arcologies[0].FSSubjugationistRace == "white")>>
-		<<set $activeSlave.race = "white">>
-		<<set $activeSlave.skin = either("fair", "light", "pale")>>
-		<<set $activeSlave.eyeColor = either("blue", "brown", "green")>>
-		<<set $activeSlave.hColor = either("black", "blonde", "brown", "red")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "latina")>>
-		<<set $activeSlave.race = "latina">>
-		<<set $activeSlave.skin = either("brown", "dark brown", "dark olive", "light olive", "tan")>>
-		<<set $activeSlave.hColor = either("black", "black", "brown", "brown")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "black")>>
-		<<set $activeSlave.race = "black">>
-		<<set $activeSlave.skin = either("black", "brown", "dark brown")>>
-		<<set $activeSlave.hColor = either("black", "black", "black", "brown")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "asian")>>
-		<<set $activeSlave.race = "asian">>
-		<<set $activeSlave.skin = either("dark olive", "light olive", "light")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "middle eastern")>>
-		<<set $activeSlave.race = "middle eastern">>
-		<<set $activeSlave.skin = either("dark olive", "light olive", "tan")>>
-		<<set $activeSlave.hColor = "black">>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "indo-aryan")>>
-		<<set $activeSlave.race = "indo-aryan">>
-		<<set $activeSlave.skin = either("dark", "light")>>
-		<<set $activeSlave.hColor = "black">>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "amerindian")>>
-		<<set $activeSlave.race = "amerindian">>
-		<<set $activeSlave.skin = either("dark", "light", "tan")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "pacific islander")>>
-		<<set $activeSlave.race = "pacific islander">>
-		<<set $activeSlave.skin = either("dark olive", "dark", "light olive")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "malay")>>
-		<<set $activeSlave.race = "malay">>
-		<<set $activeSlave.skin = either("dark olive", "light olive", "light")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "southern european")>>
-		<<set $activeSlave.race = "southern european">>
-		<<set $activeSlave.skin = either("dark olive", "light olive", "light")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "semitic")>>
-		<<set $activeSlave.race = "semitic">>
-		<<set $activeSlave.skin = either("dark olive", "light olive", "tan")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<<elseif ($arcologies[0].FSSubjugationistRace == "mixed race")>>
-		<<set $activeSlave.race = "mixed race">>
-		<<set $activeSlave.skin = either("brown", "dark")>>
-		<<set $activeSlave.hColor = either("black")>>
-	<</if>>
+	<<set $activeSlave.race = $arcologies[0].FSSubjugationistRace>>
+	<<set $activeSlave.skin = randomRaceSkin($arcologies[0].FSSubjugationistRace)>>
+	<<set $activeSlave.eyeColor = randomRaceEye($arcologies[0].FSSubjugationistRace)>>
+	<<set $activeSlave.hColor = randomRaceHair($arcologies[0].FSSubjugationistRace)>>
 	<</replace>>
 <</link>><<if ($activeSlave.anus == 0) || ($activeSlave.vagina == 0)>> //This option will take virginity and ignore chastity//<</if>>
 <br><<link "No surgery today, but give $him something to think about">>
@@ -18474,7 +18497,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 			<<case "torpedo-shaped">>
 				$His torpedoes are long enough that the weights are a long way from $his chest, allowing them to tug $his nipples a long way down.
 			<<case "wide-set">>
-				$His wide-set its are dragged together for once as their nipples are tugged downward.
+				$His wide-set tits are dragged together for once as their nipples are tugged downward.
 			<<case "saggy">>
 				$His poor, saggy boobs cause $his real trouble, letting the weights tug $his nipples quite a ways down.
 			<<default>>
@@ -19695,7 +19718,7 @@ You tell $him kindly that you understand, and that $he'll be trained to address
 	<<replace "#result">>
 	You tell $him $he'll get fucked in the mouth until $he either gets over the idea of being special for $his education or until all $his learning is fucked out of $his head. You drag the protesting $activeSlave.slaveName out into a public plaza, restrain $him in stocks so that $his mouth is available, and inform the gathering crowd of citizens that this particular slave thinks $himself more than a fuckhole because of some fancy 'education'.
 	<br><br>
-	When you return later in the evening, it becomes abundantly clear that your citizenry taught $activeSlave.slaveName a harsh lesson about a slave's place in $arcologies[0].name. $activeSlave.slaveName has certainly @@.green;learned to keep any pretentious thoughts about $his education in $his head.@@ $He did, however, @@.red;have quite a rough time@@ sucking all those dicks<<if $activeSlave.skill.oral <= 30>>, though $he did learn about sucking dick, so $he can't claim enslavement isn't educational.<<set $skillIncrease = 10>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>><<else>>.<</if>> And last of all, you and $activeSlave.slaveName did make @@.green;quite a good impression@@ today, though for widely differing reasons.
+	When you return later in the evening, it becomes abundantly clear that your citizenry taught $activeSlave.slaveName a harsh lesson about a slave's place in $arcologies[0].name. $activeSlave.slaveName has certainly @@.green;learned to keep any pretentious thoughts about $his education in $his head.@@ $He did, however, @@.red;have quite a rough time@@ sucking all those dicks<<if $activeSlave.skill.oral <= 30>>, though $he did learn about sucking dick, so $he can't claim enslavement isn't educational.<<= SkillIncrease.Oral($activeSlave, 10)>><<else>>.<</if>> And last of all, you and $activeSlave.slaveName did make @@.green;quite a good impression@@ today, though for widely differing reasons.
 	<<set $activeSlave.health -= 10>>
 	<<set _blowBang = random(65,80)>>
 	<<set $activeSlave.counter.oral += _blowBang, $activeSlave.counter.publicUse += _blowBang, $oralTotal += _blowBang>>
diff --git a/src/uncategorized/REroyalblood.tw b/src/uncategorized/REroyalblood.tw
index 36c3e1ae6f7380728a6ba911be00278ad7a832de..8061f8cac1e2a3de5eeaaeab412a2ca9d8d60865 100644
--- a/src/uncategorized/REroyalblood.tw
+++ b/src/uncategorized/REroyalblood.tw
@@ -6,7 +6,7 @@
 <<set $activeSlaveOneTimeMinAge = 16>>
 <<set $activeSlaveOneTimeMaxAge = 19>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.career = "a princess">>
 <<set $activeSlave.prestige = 2>>
 <<set $activeSlave.prestigeDesc = "She was the princess of an ancient kingdom.">>
@@ -331,7 +331,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was sold to you in exchange for credits.">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
@@ -382,7 +382,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was acquired by "+$SF.Lower+".">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
@@ -558,7 +558,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was sold for credits.">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
@@ -617,7 +617,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was acquired by "+$SF.Lower+".">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
@@ -674,7 +674,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was sold for credits.">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
@@ -752,7 +752,7 @@ Time is short, but you are well placed to acquire some choice slaves. With an ad
 			<<set $activeSlaveOneTimeMinAge = 21>>
 			<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set _origin = "She was a member of the court in an ancient kingdom, till it was overthrown and she was acquired by "+$SF.Lower+".">>
 			<<set $activeSlave.origin = _origin>>
 			<<set $activeSlave.career = "a lady courtier">>
diff --git a/src/uncategorized/arcade.tw b/src/uncategorized/arcade.tw
index f0b0ff337eafdf0f475e01a01180a98cee16ec59..d9ac9c962fae24160f16acdf35bc416b43d80f5f 100644
--- a/src/uncategorized/arcade.tw
+++ b/src/uncategorized/arcade.tw
@@ -95,7 +95,7 @@ $arcadeNameCaps
 <</if>>
 <<if $arcade > $arcadeSlaves && $fuckdolls > 0>>
 	<<set _fuckdollRoom = $arcade - $arcadeSlaves>>
-	<br>There is room in the arcade for <<print _fuckdollRoom>> menial fuckdolls. <<if $fuckdolls > 1>>They'll be more efficient in the arcade so you restrain them here.<<else>>Your fuckdoll will be more efficient serving in the arcade so you send her here.<</if>> 
+	<br>There is room in the arcade for <<print _fuckdollRoom>> menial Fuckdolls. <<if $fuckdolls > 1>>They'll be more efficient in the arcade, so you restrain them here.<<else>>Your Fuckdoll will be more efficient serving in the arcade, so you send it here.<</if>>
 <</if>>
 <<set _Tmult0 = Math.trunc($arcade*1000*$upgradeMultiplierArcology)>>
 [[Expand the arcade|Arcade][cashX(forceNeg(_Tmult0), "capEx"), $arcade += 10]] //Costs <<print cashFormat(_Tmult0)>> and will increase upkeep costs//
@@ -149,7 +149,7 @@ $arcadeNameCaps
 	<div class="content">
 		<<if $arcadeSlaves > 0>>
 			<<arcadeAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -164,7 +164,7 @@ $arcadeNameCaps
 			''$arcadeNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $arcadeSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/arcadeReport.tw b/src/uncategorized/arcadeReport.tw
index 190244fc68dd9cdf318d437bf65e37fdc184afa8..5ee020d75dd215af039e1bf082f780351a77ad60 100644
--- a/src/uncategorized/arcadeReport.tw
+++ b/src/uncategorized/arcadeReport.tw
@@ -76,11 +76,11 @@
 		<<else>>
 			is confined in $arcadeName.
 		<</if>>
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<print saWorkAGloryHole($slaves[$i])>>
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= saWorkAGloryHole($slaves[$i])>>
 	<<else>>
 		<<silently>>
 			<<include "SA chooses own job">>
-			<<print saWorkAGloryHole($slaves[$i])>>
+			<<run saWorkAGloryHole($slaves[$i])>>
 		<</silently>>
 	<</if>>
 	<<if ($arcadeUpgradeCollectors > 0)>>
@@ -216,7 +216,7 @@
 <<if ($arcadeUpgradeFuckdolls == 2)>>
 	<<set $activeSlave = 0, _Age = -1, _FD = -1, _MB = -1, _Con = -1>>
 	<<for _dI = 0; _dI < _DL; _dI++>>
-		<<if $slaves[$i].sentence == 0>> /* lets not convert slaves we are punishing into fuckdolls */
+		<<if $slaves[$i].sentence == 0>> /* lets not convert slaves we are punishing into Fuckdolls */
 			<<set $i = $slaveIndices[$ArcadeiIDs[_dI]]>>
 			<<if ($slaves[$i].fetish == "mindbroken")>>
 				<<if ($slaves[$i].fuckdoll == 0)>>
diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw
index 37f67e3fb921f16a638309550a048d1c6d9c770d..d6269a1ae8484a00db19ddab205ad77a71bf7cf4 100644
--- a/src/uncategorized/arcmgmt.tw
+++ b/src/uncategorized/arcmgmt.tw
@@ -1202,7 +1202,7 @@ You own
 <</if>>
 
 
-<<if $fuckdolls > 0>> 
+<<if $fuckdolls > 0>>
 	<<if ($fuckdolls > $arcade - $arcadeSlaves) && ($arcade > $arcadeSlaves)>>
 		<<set _fuckdollsArcade = $arcade - $arcadeSlaves>>
 	<<elseif $fuckdolls < $arcade - $arcadeSlaves>>
@@ -1218,18 +1218,18 @@ You own
 		<<set _arcadeUpgradeInjectors = 1.5>>
 	<</if>>
 	<<set _fuckdollsEarnings = Math.trunc((($fuckdolls - _fuckdollsArcade) * 140 + _fuckdollsArcade * (175 + 35 * _arcadeUpgradeInjectors)) * ($arcadePrice - 0.5) / 10)>> /*The "/ 10" at the end is just there to keep the price in line with other current prices, hopefully prices will get to a spot where this can be dropped*/
-	<<if $fuckdolls > 1>> <<print num($fuckdolls)>> standard fuckdolls,<<elseif $fuckdolls == 1>>one fuckdoll,<</if>><<if _fuckdollsArcade > 1>> <<print num(_fuckdollsArcade)>> of them are stationed in the arcade,<<elseif _fuckdollsArcade == 1 && $fuckdolls > 1>>one of them is stationed in the arcade,<<elseif _fuckdollsArcade == 1>>it is stationed in the arcade,<</if>>
+	<<if $fuckdolls > 1>> <<print num($fuckdolls)>> standard Fuckdolls,<<elseif $fuckdolls == 1>>one Fuckdoll,<</if>><<if _fuckdollsArcade > 1>> <<print num(_fuckdollsArcade)>> of which are stationed in the arcade,<<elseif _fuckdollsArcade == 1 && $fuckdolls > 1>>one of which is stationed in the arcade,<<elseif _fuckdollsArcade == 1>>which is stationed in the arcade,<</if>>
 	<<if $publicFuckdolls == 1>>
 		<<run repX(_fuckdollsEarnings / 5, "fuckdolls")>>
-		<<set _fuckdollsEarnings = Math.trunc($fuckdolls * -0.5)>> /*The upkeep of a fuckdoll*/
+		<<set _fuckdollsEarnings = Math.trunc($fuckdolls * -0.5)>> /*The upkeep of a Fuckdoll*/
 	<</if>>
 	<<run cashX(_fuckdollsEarnings, "fuckdolls")>>
 <</if>>
 
 <<if _menialEarnings + _bioreactorEarnings + _fuckdollsEarnings > 0>>
-earning you @@.yellowgreen;<<print cashFormat(_menialEarnings + _bioreactorEarnings + _fuckdollsEarnings)>>.@@
+	earning you @@.yellowgreen;<<print cashFormat(_menialEarnings + _bioreactorEarnings + _fuckdollsEarnings)>>.@@
 <<else>>
-costing you @@.red;<<print cashFormat(_menialEarnings + _bioreactorEarnings + _fuckdollsEarnings)>>@@ on account of your free fuckdoll policy.
+	costing you @@.red;<<print cashFormat(_menialEarnings + _bioreactorEarnings + _fuckdollsEarnings)>>@@ on account of your free Fuckdoll policy.
 <</if>>
 <</if>>
 
@@ -1467,7 +1467,7 @@ costing you @@.red;<<print cashFormat(_menialEarnings + _bioreactorEarnings + _f
 			The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators.
 			It will still take <<if $garrison.reactorTime> 1>>$garrison.reactorTime weeks<<else>>a week<</if>> to finish repair works.
 			<<set _AWeekGrowth -= random(1,2)>>
-			<<set $garrison.reactorTime--, IncreasePCSkills('engineering',  0.1)>>
+			<<set $garrison.reactorTime--, IncreasePCSkills('engineering', 0.1)>>
 		<</if>>
 	<</if>>
 	<<set _AWeekGrowth = Math.trunc(0.5*_AWeekGrowth)>>
diff --git a/src/uncategorized/arcologyOpinion.tw b/src/uncategorized/arcologyOpinion.tw
index 010b2780402d22934d07dd212e15204e619d5f5c..e10421c7df15abe7a16f55e4b2b96cc8397cccda 100644
--- a/src/uncategorized/arcologyOpinion.tw
+++ b/src/uncategorized/arcologyOpinion.tw
@@ -7,179 +7,179 @@
 
 <<if $activeArcology.FSSubjugationist != "unset">>
 	<<if $targetArcology.FSSubjugationist != "unset">>
-	<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSubjugationistRace>>
-		<<set $opinion += $activeArcology.FSSubjugationist>>
-		<<set $opinion += $targetArcology.FSSubjugationist>>
-	<<else>>
-		<<set $opinion -= $activeArcology.FSSubjugationist>>
-		<<set $opinion -= $targetArcology.FSSubjugationist>>
-	<</if>>
+		<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSubjugationistRace>>
+			<<set $opinion += $activeArcology.FSSubjugationist>>
+			<<set $opinion += $targetArcology.FSSubjugationist>>
+		<<else>>
+			<<set $opinion -= $activeArcology.FSSubjugationist>>
+			<<set $opinion -= $targetArcology.FSSubjugationist>>
+		<</if>>
 	<<elseif $targetArcology.FSSupremacist != "unset">>
-	<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSubjugationistRace>>
-		<<set $opinion -= $activeArcology.FSSubjugationist>>
-		<<set $opinion -= $targetArcology.FSSupremacist>>
-	<</if>>
+		<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSubjugationistRace>>
+			<<set $opinion -= $activeArcology.FSSubjugationist>>
+			<<set $opinion -= $targetArcology.FSSupremacist>>
+		<</if>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSSupremacist != "unset">>
 	<<if $targetArcology.FSSupremacist != "unset">>
-	<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSupremacistRace>>
-		<<set $opinion += $activeArcology.FSSupremacist>>
-		<<set $opinion += $targetArcology.FSSupremacist>>
-	<<else>>
-		<<set $opinion -= $activeArcology.FSSupremacist>>
-		<<set $opinion -= $targetArcology.FSSupremacist>>
-	<</if>>
+		<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSupremacistRace>>
+			<<set $opinion += $activeArcology.FSSupremacist>>
+			<<set $opinion += $targetArcology.FSSupremacist>>
+		<<else>>
+			<<set $opinion -= $activeArcology.FSSupremacist>>
+			<<set $opinion -= $targetArcology.FSSupremacist>>
+		<</if>>
 	<<elseif $targetArcology.FSSubjugationist != "unset">>
-	<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSupremacistRace>>
-		<<set $opinion -= $activeArcology.FSSupremacist>>
-		<<set $opinion -= $targetArcology.FSSubjugationist>>
-	<</if>>
+		<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSupremacistRace>>
+			<<set $opinion -= $activeArcology.FSSupremacist>>
+			<<set $opinion -= $targetArcology.FSSubjugationist>>
+		<</if>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSRepopulationFocus != "unset">>
 	<<if $targetArcology.FSRepopulationFocus != "unset">>
-	<<set $opinion += $activeArcology.FSRepopulationFocus>>
-	<<set $opinion += $targetArcology.FSRepopulationFocus>>
+		<<set $opinion += $activeArcology.FSRepopulationFocus>>
+		<<set $opinion += $targetArcology.FSRepopulationFocus>>
 	<<elseif $targetArcology.FSRestart != "unset">>
-	<<set $opinion -= $activeArcology.FSRepopulationFocus>>
-	<<set $opinion -= $targetArcology.FSRestart>>
+		<<set $opinion -= $activeArcology.FSRepopulationFocus>>
+		<<set $opinion -= $targetArcology.FSRestart>>
 	<</if>>
 <<elseif $activeArcology.FSRestart != "unset">>
 	<<if $targetArcology.FSRestart != "unset">>
-	<<set $opinion += $activeArcology.FSRestart>>
-	<<set $opinion += $targetArcology.FSRestart>>
+		<<set $opinion += $activeArcology.FSRestart>>
+		<<set $opinion += $targetArcology.FSRestart>>
 	<<elseif $targetArcology.FSRepopulationFocus != "unset">>
-	<<set $opinion -= $activeArcology.FSRestart>>
-	<<set $opinion -= $targetArcology.FSRepopulationFocus>>
+		<<set $opinion -= $activeArcology.FSRestart>>
+		<<set $opinion -= $targetArcology.FSRepopulationFocus>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSGenderRadicalist != "unset">>
 	<<if $targetArcology.FSGenderRadicalist != "unset">>
-	<<set $opinion += $activeArcology.FSGenderRadicalist>>
-	<<set $opinion += $targetArcology.FSGenderRadicalist>>
+		<<set $opinion += $activeArcology.FSGenderRadicalist>>
+		<<set $opinion += $targetArcology.FSGenderRadicalist>>
 	<<elseif $targetArcology.FSGenderFundamentalist != "unset">>
-	<<set $opinion -= $activeArcology.FSGenderRadicalist>>
-	<<set $opinion -= $targetArcology.FSGenderFundamentalist>>
+		<<set $opinion -= $activeArcology.FSGenderRadicalist>>
+		<<set $opinion -= $targetArcology.FSGenderFundamentalist>>
 	<</if>>
 <<elseif $activeArcology.FSGenderFundamentalist != "unset">>
 	<<if $targetArcology.FSGenderFundamentalist != "unset">>
-	<<set $opinion += $activeArcology.FSGenderFundamentalist>>
-	<<set $opinion += $targetArcology.FSGenderFundamentalist>>
+		<<set $opinion += $activeArcology.FSGenderFundamentalist>>
+		<<set $opinion += $targetArcology.FSGenderFundamentalist>>
 	<<elseif $targetArcology.FSGenderRadicalist != "unset">>
-	<<set $opinion -= $activeArcology.FSGenderFundamentalist>>
-	<<set $opinion -= $targetArcology.FSGenderRadicalist>>
+		<<set $opinion -= $activeArcology.FSGenderFundamentalist>>
+		<<set $opinion -= $targetArcology.FSGenderRadicalist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSPaternalist != "unset">>
 	<<if $targetArcology.FSPaternalist != "unset">>
-	<<set $opinion += $activeArcology.FSPaternalist>>
-	<<set $opinion += $targetArcology.FSPaternalist>>
+		<<set $opinion += $activeArcology.FSPaternalist>>
+		<<set $opinion += $targetArcology.FSPaternalist>>
 	<<elseif $targetArcology.FSDegradationist != "unset">>
-	<<set $opinion -= $activeArcology.FSPaternalist>>
-	<<set $opinion -= $targetArcology.FSDegradationist>>
+		<<set $opinion -= $activeArcology.FSPaternalist>>
+		<<set $opinion -= $targetArcology.FSDegradationist>>
 	<</if>>
 <<elseif $activeArcology.FSDegradationist != "unset">>
 	<<if $targetArcology.FSDegradationist != "unset">>
-	<<set $opinion += $activeArcology.FSDegradationist>>
-	<<set $opinion += $targetArcology.FSDegradationist>>
+		<<set $opinion += $activeArcology.FSDegradationist>>
+		<<set $opinion += $targetArcology.FSDegradationist>>
 	<<elseif $targetArcology.FSPaternalist != "unset">>
-	<<set $opinion -= $activeArcology.FSDegradationist>>
-	<<set $opinion -= $targetArcology.FSPaternalist>>
+		<<set $opinion -= $activeArcology.FSDegradationist>>
+		<<set $opinion -= $targetArcology.FSPaternalist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSBodyPurist != "unset">>
 	<<if $targetArcology.FSBodyPurist != "unset">>
-	<<set $opinion += $activeArcology.FSBodyPurist>>
-	<<set $opinion += $targetArcology.FSBodyPurist>>
+		<<set $opinion += $activeArcology.FSBodyPurist>>
+		<<set $opinion += $targetArcology.FSBodyPurist>>
 	<<elseif $targetArcology.FSTransformationFetishist != "unset">>
-	<<set $opinion -= $activeArcology.FSBodyPurist>>
-	<<set $opinion -= $targetArcology.FSTransformationFetishist>>
+		<<set $opinion -= $activeArcology.FSBodyPurist>>
+		<<set $opinion -= $targetArcology.FSTransformationFetishist>>
 	<</if>>
 <<elseif $activeArcology.FSTransformationFetishist != "unset">>
 	<<if $targetArcology.FSTransformationFetishist != "unset">>
-	<<set $opinion += $activeArcology.FSTransformationFetishist>>
-	<<set $opinion += $targetArcology.FSTransformationFetishist>>
+		<<set $opinion += $activeArcology.FSTransformationFetishist>>
+		<<set $opinion += $targetArcology.FSTransformationFetishist>>
 	<<elseif $targetArcology.FSBodyPurist != "unset">>
-	<<set $opinion -= $activeArcology.FSTransformationFetishist>>
-	<<set $opinion -= $targetArcology.FSBodyPurist>>
+		<<set $opinion -= $activeArcology.FSTransformationFetishist>>
+		<<set $opinion -= $targetArcology.FSBodyPurist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSYouthPreferentialist != "unset">>
 	<<if $targetArcology.FSYouthPreferentialist != "unset">>
-	<<set $opinion += $activeArcology.FSYouthPreferentialist>>
-	<<set $opinion += $targetArcology.FSYouthPreferentialist>>
+		<<set $opinion += $activeArcology.FSYouthPreferentialist>>
+		<<set $opinion += $targetArcology.FSYouthPreferentialist>>
 	<<elseif $targetArcology.FSMaturityPreferentialist != "unset">>
-	<<set $opinion -= $activeArcology.FSYouthPreferentialist>>
-	<<set $opinion -= $targetArcology.FSMaturityPreferentialist>>
+		<<set $opinion -= $activeArcology.FSYouthPreferentialist>>
+		<<set $opinion -= $targetArcology.FSMaturityPreferentialist>>
 	<</if>>
 <<elseif $activeArcology.FSMaturityPreferentialist != "unset">>
 	<<if $targetArcology.FSMaturityPreferentialist != "unset">>
-	<<set $opinion += $activeArcology.FSMaturityPreferentialist>>
-	<<set $opinion += $targetArcology.FSMaturityPreferentialist>>
+		<<set $opinion += $activeArcology.FSMaturityPreferentialist>>
+		<<set $opinion += $targetArcology.FSMaturityPreferentialist>>
 	<<elseif $targetArcology.FSYouthPreferentialist != "unset">>
-	<<set $opinion -= $activeArcology.FSMaturityPreferentialist>>
-	<<set $opinion -= $targetArcology.FSYouthPreferentialist>>
+		<<set $opinion -= $activeArcology.FSMaturityPreferentialist>>
+		<<set $opinion -= $targetArcology.FSYouthPreferentialist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSSlimnessEnthusiast != "unset">>
 	<<if $targetArcology.FSSlimnessEnthusiast != "unset">>
-	<<set $opinion += $activeArcology.FSSlimnessEnthusiast>>
-	<<set $opinion += $targetArcology.FSSlimnessEnthusiast>>
+		<<set $opinion += $activeArcology.FSSlimnessEnthusiast>>
+		<<set $opinion += $targetArcology.FSSlimnessEnthusiast>>
 	<<elseif $targetArcology.FSAssetExpansionist != "unset">>
-	<<set $opinion -= $activeArcology.FSSlimnessEnthusiast>>
-	<<set $opinion -= $targetArcology.FSAssetExpansionist>>
+		<<set $opinion -= $activeArcology.FSSlimnessEnthusiast>>
+		<<set $opinion -= $targetArcology.FSAssetExpansionist>>
 	<</if>>
 <<elseif $activeArcology.FSAssetExpansionist != "unset">>
 	<<if $targetArcology.FSAssetExpansionist != "unset">>
-	<<set $opinion += $activeArcology.FSAssetExpansionist>>
-	<<set $opinion += $targetArcology.FSAssetExpansionist>>
+		<<set $opinion += $activeArcology.FSAssetExpansionist>>
+		<<set $opinion += $targetArcology.FSAssetExpansionist>>
 	<<elseif $targetArcology.FSSlimnessEnthusiast != "unset">>
-	<<set $opinion -= $activeArcology.FSAssetExpansionist>>
-	<<set $opinion -= $targetArcology.FSSlimnessEnthusiast>>
+		<<set $opinion -= $activeArcology.FSAssetExpansionist>>
+		<<set $opinion -= $targetArcology.FSSlimnessEnthusiast>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSPastoralist != "unset">>
 	<<if $targetArcology.FSPastoralist != "unset">>
-	<<set $opinion += $activeArcology.FSPastoralist>>
-	<<set $opinion += $targetArcology.FSPastoralist>>
+		<<set $opinion += $activeArcology.FSPastoralist>>
+		<<set $opinion += $targetArcology.FSPastoralist>>
 	<<elseif $targetArcology.FSCummunism != "unset">>
-	<<set $opinion -= $activeArcology.FSPastoralist>>
-	<<set $opinion -= $targetArcology.FSCummunism>>
+		<<set $opinion -= $activeArcology.FSPastoralist>>
+		<<set $opinion -= $targetArcology.FSCummunism>>
 	<</if>>
 <<elseif $activeArcology.FSCummunism != "unset">>
 	<<if $targetArcology.FSCummunism != "unset">>
-	<<set $opinion += $activeArcology.FSCummunism>>
-	<<set $opinion += $targetArcology.FSCummunism>>
+		<<set $opinion += $activeArcology.FSCummunism>>
+		<<set $opinion += $targetArcology.FSCummunism>>
 	<<elseif $targetArcology.FSPastoralist != "unset">>
-	<<set $opinion -= $activeArcology.FSCummunism>>
-	<<set $opinion -= $targetArcology.FSPastoralist>>
+		<<set $opinion -= $activeArcology.FSCummunism>>
+		<<set $opinion -= $targetArcology.FSPastoralist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSPhysicalIdealist != "unset">>
 	<<if $targetArcology.FSPhysicalIdealist != "unset">>
-	<<set $opinion += $activeArcology.FSPhysicalIdealist>>
-	<<set $opinion += $targetArcology.FSPhysicalIdealist>>
+		<<set $opinion += $activeArcology.FSPhysicalIdealist>>
+		<<set $opinion += $targetArcology.FSPhysicalIdealist>>
 	<<elseif $targetArcology.FSHedonisticDecadence != "unset">>
-	<<set $opinion -= $activeArcology.FSPhysicalIdealist>>
-	<<set $opinion -= $targetArcology.FSHedonisticDecadence>>
+		<<set $opinion -= $activeArcology.FSPhysicalIdealist>>
+		<<set $opinion -= $targetArcology.FSHedonisticDecadence>>
 	<</if>>
 <<elseif $activeArcology.FSHedonisticDecadence != "unset">>
 	<<if $targetArcology.FSHedonisticDecadence != "unset">>
-	<<set $opinion += $activeArcology.FSHedonisticDecadence>>
-	<<set $opinion += $targetArcology.FSHedonisticDecadence>>
+		<<set $opinion += $activeArcology.FSHedonisticDecadence>>
+		<<set $opinion += $targetArcology.FSHedonisticDecadence>>
 	<<elseif $targetArcology.FSPhysicalIdealist != "unset">>
-	<<set $opinion -= $activeArcology.FSHedonisticDecadence>>
-	<<set $opinion -= $targetArcology.FSPhysicalIdealist>>
+		<<set $opinion -= $activeArcology.FSHedonisticDecadence>>
+		<<set $opinion -= $targetArcology.FSPhysicalIdealist>>
 	<</if>>
 <</if>>
 <<if $activeArcology.FSChattelReligionist != "unset">>
 	<<if $targetArcology.FSChattelReligionist != "unset">>
-	<<set $opinion += $activeArcology.FSChattelReligionist>>
-	<<set $opinion += $targetArcology.FSChattelReligionist>>
+		<<set $opinion += $activeArcology.FSChattelReligionist>>
+		<<set $opinion += $targetArcology.FSChattelReligionist>>
 	<<elseif $targetArcology.FSNull != "unset">>
-	<<set $opinion -= $activeArcology.FSChattelReligionist>>
-	<<set $opinion -= $targetArcology.FSNull>>
+		<<set $opinion -= $activeArcology.FSChattelReligionist>>
+		<<set $opinion -= $targetArcology.FSNull>>
 	<</if>>
 <<elseif $activeArcology.FSNull != "unset">>
 	<<if $targetArcology.FSNull != "unset">>
diff --git a/src/uncategorized/barracks.tw b/src/uncategorized/barracks.tw
index eb806561de3deb03693fdde634956d39343b7e27..eca275fe87d41d5e61af42acdb2a130fc919ac92 100644
--- a/src/uncategorized/barracks.tw
+++ b/src/uncategorized/barracks.tw
@@ -74,10 +74,11 @@ There are doors to magazines, armories, and training areas to all sides, and muf
 <br><br>
 You head up a deck, to the staff area, and up one more, to look into the living area. It's comfortable and very well-kept, since they have a large number of slaves here to look after them. Relaxing mercenaries are scattered around the common areas, and most are enjoying a slave or two.
 <<if $FSAnnounced>>
+	<<setNonlocalPronouns $seeDicks>>
 	They're obviously adopting the customs of $arcologies[0].name.
 	<<set _vignette = 0>>
 	<<if $arcologies[0].FSSubjugationist != "unset">>
-		A mercenary is fingering a $arcologies[0].FSSubjugationistRace girl's <<if $seeDicks != 100>>pussy<<else>>anus<</if>>. She's wincing a little; she must be new here.
+		A mercenary is fingering a $arcologies[0].FSSubjugationistRace _girlU's <<if $seeDicks != 100>>pussy<<else>>anus<</if>>. _HeU's wincing a little; _heU must be new here.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSSupremacist != "unset">>
@@ -90,9 +91,9 @@ You head up a deck, to the staff area, and up one more, to look into the living
 	<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
 		<<if _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is fucking a slave
 			<<if $arcologies[0].FSRestart != "unset">>
-				lotus style. His hands are greedily following her womanly curves as they bang.
+				lotus style. His hands are greedily following _hisU womanly curves as they bang.
 			<<else>>
-				doggy style. He's massaging her rounded belly as she enjoys her first foray into motherhood.
+				doggy style. He's massaging _hisU rounded belly as _heU enjoys _hisU first foray into motherhood.
 			<</if>>
 		<<set _vignette++>>
 	<</if>>
@@ -100,50 +101,50 @@ You head up a deck, to the staff area, and up one more, to look into the living
 		<<if _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is making out with a pretty slave. An old romantic movie is playing on a wallscreen in front of them, forgotten.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSDegradationist != "unset">>
-		<<if _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is using a slave as a footrest as he relaxes. She has a huge dildo up her ass, and whenever she moves, he uses a foot to shove it farther inside her.
+		<<if _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is using a slave as a footrest as he relaxes. _HeU has a huge dildo up _hisU ass, and whenever _heU moves, he uses a foot to shove it farther inside _himU.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSBodyPurist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is idly playing with a slave's natural breasts as he watches a wallscreen. He's being gentle and she doesn't seem to mind.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is idly playing with a slave's natural breasts as he watches a wallscreen. He's being gentle and _heU doesn't seem to mind.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSTransformationFetishist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is fucking a bimbo slave doggy style. Her fake tits are so huge that the motion is making them slap together under her.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is fucking a bimbo slave doggy style. _HisU fake tits are so huge that the motion is making them slap together under _himU.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSYouthPreferentialist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a blowjob from a young slave. He's playing with her <<if $seeDicks != 100>>fresh pussy<<else>>tight little anus<</if>> as she sucks his dick.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a blowjob from a young slave. He's playing with _hisU <<if $seeDicks != 100>>fresh pussy<<else>>tight little anus<</if>> as _heU sucks his dick.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSMaturityPreferentialist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a massage from a mature slave. She's wearing a towel, but he sneaks a hand back and steals it, freeing her heavy breasts.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a massage from a mature slave. _HeU's wearing a towel, but he sneaks a hand back and steals it, freeing _hisU heavy breasts.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSSlimnessEnthusiast != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a lap dance from a lithe slave. She's moving her cute butt lower and lower, getting ready to impale herself on his raging erection.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is getting a lap dance from a lithe slave. _HeU's moving _hisU cute butt lower and lower, getting ready to impale _himselfU on his raging erection.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSAssetExpansionist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is almost hidden by a slave he's got in his lap. He has his head buried between her monstrous breasts, and it's not clear how he's breathing.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is almost hidden by a slave he's got in his lap. He has his head buried between _hisU monstrous breasts, and it's not clear how he's breathing.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSPastoralist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is drinking a slave's milk, straight from the nipple, while idly massaging her other breast, bringing out a thin stream of milk.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is drinking a slave's milk, straight from the nipple, while idly massaging _hisU other breast, bringing out a thin stream of milk.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSPhysicalIdealist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is doing push-ups with a well-endowed slave sitting on his back to add weight. She's counting his reps for him.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is doing push-ups with a well-endowed slave sitting on his back to add weight. _HeU's counting his reps for him.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSHedonisticDecadence != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is doing squats with a rather portly slave sitting on his shoulders to add weight. She pops a cookie into his mouth with each completed set.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is doing squats with a rather portly slave sitting on his shoulders to add weight. _HeU pops a cookie into his mouth with each completed set.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSChattelReligionist != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is mounting a praying slave from behind. It doesn't distract her; her quiet devotions become more fervent as he fucks her.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is mounting a praying slave from behind. It doesn't distract _himU; _hisU quiet devotions become more fervent as he fucks _himU.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSRepopulationFocus != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is being ridden by an enormously pregnant slave. He's massaging her taut belly as she uses her hands to support her sore boobs.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is being ridden by an enormously pregnant slave. He's massaging _hisU taut belly as she uses _hisU hands to support _hisU sore boobs.
 		<<set _vignette++>>
 	<<elseif $arcologies[0].FSRestart != "unset">>
-		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is being serviced by a slave with a visibly smooth crotch. He has a dildo rammed in her ass and moves it along with her sucking.
+		<<if _vignette >= $FSCreditCount>>Finally, a<<elseif _vignette >= 3>>Yet another<<elseif _vignette >= 2>>A third<<elseif _vignette>>Another<<else>>A<</if>> mercenary is being serviced by a slave with a visibly smooth crotch. He has a dildo rammed in _hisU ass and moves it along with _hisU sucking.
 		<<set _vignette++>>
 	<</if>>
 	<<if $arcologies[0].FSRomanRevivalist != "unset">>
@@ -156,8 +157,9 @@ You head up a deck, to the staff area, and up one more, to look into the living
 <</if>>
 
 <<if $mercenariesHelpCorp > 0>>
+	<<setNonlocalPronouns $seeDicks>>
 	<br><br>
-	As you leave, a squad moves thunderously into the bay, fresh from a slave raid on behalf of your corporation. Most of their captures have been dropped off with the corporate receivers, but they've been given a pretty girl who isn't a good training prospect for the corporate brand, a common reward. The squad looks after their weapons and armor first, an inviolable rule, and as they do, they leave their naked slave standing in the middle of the bay, ignored. She isn't even bound, but she's standing nude and alone amongst modern mercenaries, so she knows that resistance is futile. So she does the only thing left available to her: try to cover herself with her hands and cry.
+	As you leave, a squad moves thunderously into the bay, fresh from a slave raid on behalf of your corporation. Most of their captures have been dropped off with the corporate receivers, but they've been given a pretty _girlU who isn't a good training prospect for the corporate brand, a common reward. The squad looks after their weapons and armor first, an inviolable rule, and as they do, they leave their naked slave standing in the middle of the bay, ignored. _HeU isn't even bound, but _heU's standing nude and alone amongst modern mercenaries, so _heU knows that resistance is futile. So _heU does the only thing left available to _himU: try to cover _himselfU with _hisU hands and cry.
 <</if>>
 
 <br><br>
diff --git a/src/uncategorized/brothel.tw b/src/uncategorized/brothel.tw
index d5fbc18b57f1a0a0974dcc38e6ddcffe857b8b05..bb80d9b4f8f0b3b9f8e83dbaf4ea8d5add533c24 100644
--- a/src/uncategorized/brothel.tw
+++ b/src/uncategorized/brothel.tw
@@ -1,6 +1,6 @@
 :: Brothel [nobr]
 
-<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Brothel", $showEncyclopedia = 1, $encyclopedia = "Brothel", $brothelSlaves = $BrothiIDs.length, $Flag = 0>>
+<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Brothel", $showEncyclopedia = 1, $encyclopedia = "Brothel", $brothelSlaves = $BrothiIDs.length, $SlaveSummaryFiler = "assignable">>
 
 <<if $brothelName != "the Brothel">>
 	<<set $brothelNameCaps = $brothelName.replace("the ", "The ")>>
@@ -207,7 +207,7 @@ Last week this
 
 <br><br>
 <<if $Madam != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a Madam. [[Appoint one|Madam Select]]
@@ -226,7 +226,7 @@ Last week this
 	<div class="content">
 		<<if $brothelSlaves > 0>>
 			<<brothelAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -241,7 +241,7 @@ Last week this
 			''$brothelNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $brothelSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/brothelReport.tw b/src/uncategorized/brothelReport.tw
index 8e11b8eab0c49b81628b85defb9bd602a8f48291..9d678966a9b442e0dddd7aa36c08737fa0ec6de4 100644
--- a/src/uncategorized/brothelReport.tw
+++ b/src/uncategorized/brothelReport.tw
@@ -158,7 +158,7 @@
 					$He uses $slaves[$i].slaveName as an example of how even a huge-balled freak like _him2 can be restored to proper femininity.
 					<<set $madamCashBonus += 0.20>>
 				<<else>>
-					$He tries to hide $slaves[$i].slaveName, 'her' body being notorious for defiance of conventional femininity.
+					$He tries to hide $slaves[$i].slaveName, "her" body being notorious for defiance of conventional femininity.
 				<</if>>
 			<<else>>
 				<<if (($slaves[$i].balls > 5) && ($slaves[$i].dick != 0)) || (($slaves[$i].balls > 4) && ($slaves[$i].dick != 0) && ($slaves[$i].prostate > 1))>>
@@ -197,7 +197,7 @@
 			<<if $showEWD != 0>>
 				<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= saWhore($slaves[$i])>>
 			<<else>>
-				<<set _dump = saWhore($slaves[$i])>>
+				<<run saWhore($slaves[$i])>>
 			<</if>>
 			<<set _seed = $cash-_oldCash, _cashX += Math.trunc(0.5*_seed), _seed = Math.trunc(1.5*_seed), _profits += _seed>>
 			<<run cashX(_cashX, "whore", $Madam)>>
@@ -355,8 +355,8 @@
 		<<else>>
 			<<silently>>
 			<<include "SA chooses own job">>
-			<<set _dump = saWhore($slaves[$i])>>
-			<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+			<<run saWhore($slaves[$i])>>
+			<<run saChoosesOwnClothes($slaves[$i])>>
 			<<include "SA rules">>
 			<<include "SA diet">>
 			<<include "SA long term effects">>
diff --git a/src/uncategorized/buildingWidgets.tw b/src/uncategorized/buildingWidgets.tw
index ecb0befa454d505274d8be20c30e3b8fcc2dc41b..384355f5569d1a8aab4cce98ae075818dc59326d 100644
--- a/src/uncategorized/buildingWidgets.tw
+++ b/src/uncategorized/buildingWidgets.tw
@@ -137,7 +137,7 @@ if(!Macro.has('sectorblock')) {
 		<td colspan="3"></td>
 		<td id="Penthouse" colspan="4">
 			<<link "Penthouse">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "Manage Penthouse">><</link>> @@.cyan;[P]@@
-			<<if $masterSuite||$HGSuite||$dojo||$servantsQuarters||$spa||$nursery||$clinic||$schoolroom||$cellblock||$incubator||$researchLab.built=="true">>
+			<<if $masterSuite||$HGSuite||$dojo||$servantsQuarters||$spa||$nursery||$clinic||$schoolroom||$cellblock||$incubator||$researchLab.level > 0>>
 				<br>
 				<<if $masterSuite>> <<print MasterSuiteUIName()>> ($masterSuiteSlaves/$masterSuite<<if $Concubine>>, C<</if>>)<</if>>
 				<<if $HGSuite>> <<print HeadGirlSuiteUIName()>> <<if $HeadGirl != 0>>(HG<<if $HGSuiteSlaves > 0>>, 1)<<else>>)<</if>><</if>><</if>>
@@ -149,7 +149,7 @@ if(!Macro.has('sectorblock')) {
 				<<if $schoolroom>> <<print SchoolRoomUIName()>> ($schoolroomSlaves/$schoolroom<<if $Schoolteacher>>, L<</if>>)<</if>>
 				<<if $cellblock>> <<print CellblockUIName()>> ($cellblockSlaves/$cellblock<<if $Wardeness>>, L<</if>>)<</if>>
 				<<if $incubator>> <<print IncubatorUIName()>> (<<if $incubator-$incubatorSlaves == 0>>No empty tanks<<elseif $incubator-$incubatorSlaves == 1>>1 empty tank<<else>><<print $incubator-$incubatorSlaves>> empty tanks<</if>>)<</if>>
-				<<if $researchLab.built == "true">>[[Research Lab][$temp = 0]]<</if>>
+				<<if $researchLab.level > 0>>[[Prosthetic Lab]]<</if>>
 			<</if>>
 		</td>
 		<td colspan="3"></td>
diff --git a/src/uncategorized/cellblock.tw b/src/uncategorized/cellblock.tw
index 1e396b40a2e4b8db39fd545c3d037474f8f357f5..424333eabcf931fea40b22aa14857c8f3b70860e 100644
--- a/src/uncategorized/cellblock.tw
+++ b/src/uncategorized/cellblock.tw
@@ -112,7 +112,7 @@ $cellblockNameCaps
 
 <br><br>
 <<if $Wardeness != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a Wardeness. [[Appoint one|Wardeness Select]]
@@ -131,7 +131,7 @@ $cellblockNameCaps
 	<div class="content">
 	<<if $cellblockSlaves > 0>>
 		<<cellblockAssignmentFilter>>
-		<<set $Flag = 1>>
+		<<set $SlaveSummaryFiler = "occupying">>
 		<<include "Slave Summary">>
 		<<resetAssignmentFilter>>
 	<<else>>
@@ -146,7 +146,7 @@ $cellblockNameCaps
 			''$cellblockNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $cellblockSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/cellblockReport.tw b/src/uncategorized/cellblockReport.tw
index 63778fa3315b0e6d1bf36564976762d1fe1e097f..b3d5d40ff90c6eb5e8f9642275587dad28a4aa8b 100644
--- a/src/uncategorized/cellblockReport.tw
+++ b/src/uncategorized/cellblockReport.tw
@@ -265,7 +265,7 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own job">>
-		<<set _dump = saStayConfined($slaves[$i])>>
+		<<run saStayConfined($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
diff --git a/src/uncategorized/clinic.tw b/src/uncategorized/clinic.tw
index ddb516b27b94453e8042a5827f8eec94b36a9c9f..80d8114857dc763592b0c372e260c00826ae3981 100644
--- a/src/uncategorized/clinic.tw
+++ b/src/uncategorized/clinic.tw
@@ -134,7 +134,7 @@ $clinicNameCaps
 
 <br><br>
 <<if $Nurse != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a clinical Nurse. [[Appoint one|Nurse Select]]
@@ -147,13 +147,14 @@ $clinicNameCaps
 <div class="tab">
 	<button class="tablinks" onclick="opentab(event, 'assign')" id="tab assign">Assign a slave</button>
 	<button class="tablinks" onclick="opentab(event, 'remove')" id="tab remove">Remove a slave</button>
+	<button class="tablinks" onclick="opentab(event, 'transfer')" id="tab transfer">Transfer from Facility</button>
 </div>
 
 <div id="remove" class="tabcontent">
 	<div class="content">
 		<<if $clinicSlaves > 0>>
 			<<clinicAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -168,7 +169,19 @@ $clinicNameCaps
 			''$clinicNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $clinicSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
+			<<include "Slave Summary">>
+		<</if>>
+	</div>
+</div>
+
+<div id="transfer" class="tabcontent">
+	<div class="content">
+		<<if ($clinic <= $clinicSlaves)>>
+			''$clinicNameCaps is full and cannot hold any more slaves''
+		<<elseif ($slaves.length > $clinicSlaves)>>
+			<<resetAssignmentFilter>>
+			<<set $SlaveSummaryFiler = "transferable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
@@ -176,8 +189,10 @@ $clinicNameCaps
 
 <<if ($tabChoice.Clinic == "assign")>>
 	<script>document.getElementById("tab assign").click();</script>
-<<else>>
+<<elseif ($tabChoice.Clinic == "remove")>>
 	<script>document.getElementById("tab remove").click();</script>
+<<elseif ($tabChoice.Clinic == "transfer")>>
+	<script>document.getElementById("tab transfer").click();</script>
 <</if>>
 
 </body>
diff --git a/src/uncategorized/clinicReport.tw b/src/uncategorized/clinicReport.tw
index bd774af0ecfbbd122f5f2b52104a0eb16dab7aa6..93d5e51cb5a0c8814022df89e7856abaf6590140 100644
--- a/src/uncategorized/clinicReport.tw
+++ b/src/uncategorized/clinicReport.tw
@@ -318,8 +318,8 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own job">>
-		<<set _dump = saRest($slaves[$i])>>
-		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+		<<run saRest($slaves[$i])>>
+		<<run saChoosesOwnClothes($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
diff --git a/src/uncategorized/club.tw b/src/uncategorized/club.tw
index 2350808bbda0370a844f69b7e114a1070d7a434d..2e69d4f5c9f95385189cbbb697e6f5329c0dde19 100644
--- a/src/uncategorized/club.tw
+++ b/src/uncategorized/club.tw
@@ -251,7 +251,7 @@ $clubNameCaps
 
 <br><br>
 <<if $DJ != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a DJ. [[Appoint one|DJ Select]]
@@ -270,7 +270,7 @@ $clubNameCaps
 	<div class="content">
 		<<if $clubSlaves > 0>>
 			<<clubAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -285,7 +285,7 @@ $clubNameCaps
 			''$clubNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $clubSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/clubReport.tw b/src/uncategorized/clubReport.tw
index b601dbea3161905611f877b1fa9a594f1ca77c6c..48cc7bbde6aae880a3c679004238347b3467e370 100644
--- a/src/uncategorized/clubReport.tw
+++ b/src/uncategorized/clubReport.tw
@@ -100,7 +100,7 @@
 			<<if $showEWD != 0>>
 				<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= saServeThePublic($slaves[$i])>>
 			<<else>>
-				<<set _dump = saServeThePublic($slaves[$i])>>
+				<<run saServeThePublic($slaves[$i])>>
 			<</if>>
 			<<run repX(Math.trunc(($beauty*$FResult)*(1+(0.003*$slaves[_FLs].skill.entertainment))*0.1*0.5), "club", $slaves[_FLs])>>
 		<</if>>
@@ -245,8 +245,8 @@
 		<<else>>
 			<<silently>>
 			<<include "SA chooses own job">>
-			<<set _dump = saServeThePublic($slaves[$i])>>
-			<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+			<<run saServeThePublic($slaves[$i])>>
+			<<run saChoosesOwnClothes($slaves[$i])>>
 			<<include "SA rules">>
 			<<include "SA diet">>
 			<<include "SA long term effects">>
diff --git a/src/uncategorized/corporateMarket.tw b/src/uncategorized/corporateMarket.tw
index 02d367a96f3907320a43509710cac0dada06ccd0..244ca432b6767fc5f7f375acfe445a6197f6e0a4 100644
--- a/src/uncategorized/corporateMarket.tw
+++ b/src/uncategorized/corporateMarket.tw
@@ -7,73 +7,81 @@
 	<<set $nextButton = "Continue", $nextLink = "Bulk Slave Intro", $slaveMarket = "corporate", $returnTo = "Main", $newSlaveIndex = 0>>
 <</if>>
 
+<<if $corpSpecGender == 2>>
+	<<setNonlocalPronouns 100>>
+<<elseif $corpSpecGender == 1>>
+	<<setNonlocalPronouns 0>>
+<<else>>
+	<<setNonlocalPronouns $seeDicks>>
+<</if>>
+
 You're in your corporation's flagship slave market.
 
 The corporation pays you only nominal rent for this space, but will offer you a discount on slaves here based on your shares in it. Additionally, having the corporation's premiere products sold here in $arcologies[0].name will associate them with you, allowing your reputation to improve the corporate brand. A pretty
 <<if $corpSpecDick == 1 && $corpSpecPussy == 1>>futanari<<elseif $corpSpecGender == 2>><<if $corpSpecBalls == -1>>clipped<<else>>shemale<</if>><</if>>
-sales<<if $corpSpecAge == 3>>woman<<else>>girl<</if>> in a slutty suit greets you properly. She's a corporate slave chosen for loyalty and intelligence, and to physically represent the brand.
+sales<<if $corpSpecAge == 3>>_womanU<<else>>_girlU<</if>> in a slutty suit greets you properly. _HeU's a corporate slave chosen for loyalty and intelligence, and to physically represent the brand.
 <<if $corpSpecHeight == 5>>
-	Even before she engaged with you her towering height made her stand out and caught your eye, from up close she's even more impressive.
+	Even before _heU engaged with you _hisU towering height made _himU stand out and caught your eye, from up close _heU's even more impressive.
 <<elseif $corpSpecHeight == 1>>
-	She's so short you have to physically look down on her.
+	_HeU's so short you have to physically look down on _himU.
 <</if>>
 <<if $corpSpecInjection == 4>>
-	She has awe-inspiring breasts which her suit jacket helps support; even so, their bottoms reach past her navel.
+	_HeU has awe-inspiring breasts which _hisU suit jacket helps support; even so, their bottoms reach past _hisU navel.
 <<elseif $corpSpecInjection == 5>>
-	She has gigantic, milk-swollen breasts almost spilling out of her suit.
+	_HeU has gigantic, milk-swollen breasts almost spilling out of _hisU suit.
 <<elseif $corpSpecImplants == 2>>
-	She has enormous fake tits that ride inhumanly high on her chest.
+	_HeU has enormous fake tits that ride inhumanly high on _hisU chest.
 <<elseif $corpSpecInjection == 3>>
-	She has huge tits and a nice broad butt which her tight skirt hugs closely.
+	_HeU has huge tits and a nice broad butt which _hisU tight skirt hugs closely.
 <<elseif $corpSpecImplants == 1>>
-	She has nice fake bimbo tits and a silicone bubble butt.
+	_HeU has nice fake bimbo tits and a silicone bubble butt.
 <<elseif $corpSpecInjection == 2>>
-	She's nice and curvy, with nice breasts and a lovely ass.
+	_HeU's nice and curvy, with nice breasts and a lovely ass.
 <<elseif $corpSpecInjection == 1>>
-	She has cute little breasts and a petite rump.
+	_HeU has cute little breasts and a petite rump.
 <</if>>
-<<if $corpSpecCosmetics == 1>>Her face is flawless.<</if>>
+<<if $corpSpecCosmetics == 1>>_HisU face is flawless.<</if>>
 <<if ($corpSpecRaces.length == 1)>>
 	<<set _corpSpecRace = $corpSpecRaces.random()>>
-	She's <<print _corpSpecRace>>, of course<<if $corpSpecAccent == 1>>, and has a cute accent<</if>>.
+	_HeU's <<print _corpSpecRace>>, of course<<if $corpSpecAccent == 1>>, and has a cute accent<</if>>.
 <</if>>
 <<if $corpSpecHormones == 1>>
-	Her voice is soft and feminine, and she bats her eyes at you.
+	_HisU voice is soft and feminine, and _heU bats _hisU eyes at you.
 <<elseif $corpSpecHormones == 2>>
-	She has a deep voice, and speaks assertively.
+	_HeU has a deep voice, and speaks assertively.
 <</if>>
 <<if $corpSpecMuscle == 4>>
-	Her hot body is perfectly toned under her suit.
+	_HisU hot body is perfectly toned under _hisU suit.
 <<elseif $corpSpecMuscle == 5>>
-	Her suit is specially tailored to flatter her visible musculature.
+	_HisU suit is specially tailored to flatter _hisU visible musculature.
 <</if>>
-Of course, you know all about the corporation, but sales<<if $corpSpecAge == 3>>women<<else>>girls<</if>> here have standing orders to treat you like any other customer, so you can review the market properly. The slave turns to <<if $corpSpecAmputee != 1>>a multimedia presentation on<<else>>a rack of<</if>> your corporation's slaves.
+Of course, you know all about the corporation, but sales<<if $corpSpecAge == 3>>_womenU<<else>><<= _girlU>>s<</if>> here have standing orders to treat you like any other customer, so you can review the market properly. The slave turns to <<if $corpSpecAmputee != 1>>a multimedia presentation on<<else>>a rack of<</if>> your corporation's slaves.
 
 <br><br>
 
-She explains that the corporation captures many people, so it only retains and trains those that fit its product lines.
+_HeU explains that the corporation captures many people, so it only retains and trains those that fit its product lines.
 
 <<GenerateMarketSlave "corporate">>
 <br><br>
 
-Her presentation done, the
+_HisU presentation done, the
 <<if $corpSpecDick == 1 && $corpSpecPussy == 1>>futanari<<elseif $corpSpecGender == 2>><<if $corpSpecBalls == -1>>clipped<<else>>shemale<</if>><</if>>
-sales<<if $corpSpecAge == 3>>woman<<else>>girl<</if>> directs you to the inventory interface that will allow you to peruse the corporation's slaves, and moves over to stand next to it, ready to answer any questions.
+sales<<if $corpSpecAge == 3>>_womanU<<else>>_girlU<</if>> directs you to the inventory interface that will allow you to peruse the corporation's slaves, and moves over to stand next to it, ready to answer any questions.
 <<if $PC.dick == 1>>
-	She positions herself facing away from you and hikes up her skirt to bare her
+	_HeU positions _himselfU facing away from you and hikes up _hisU skirt to bare _hisU
 	<<if $corpSpecInjection > 4>>gigantic ass<<elseif $corpSpecImplants > 0>>fake ass<<elseif $corpSpecInjection == 3>>big butt<<elseif $corpSpecInjection == 2>>cute butt<<else>>little behind<</if>>
-	and cocks her hips<<if $corpSpecBalls == -1>>, keeping her soft cock demurely out of sight<</if>>, if you feel like <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sodomizing<<else>>fucking<</if>> her
+	and cocks _hisU hips<<if $corpSpecBalls == -1>>, keeping _hisU soft cock demurely out of sight<</if>>, if you feel like <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sodomizing<<else>>fucking<</if>> _himU
 <<else>>
-	She gets down on her knees right there, making her mouth available if you feel like riding her face
+	_HeU gets down on _hisU knees right there, making _hisU mouth available if you feel like riding _hisU face
 <</if>>
 while you browse.
 <span id="result">
-<<link "Use her">>
+<<link "Use _himU">>
 	<<replace "#result">>
 		<<if $PC.dick == 1>>
-			Her <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>asshole is thoughtfully pre-lubed, and your cock slides easily up it<<else>>pussy is nice and wet, and your cock slides inside her easily<</if>> as you consider the slaves on offer. She's well trained, and uses her <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sphincter<<else>>womanly muscles<</if>> to please your member expertly as she ruts herself gently back against you, doing almost all the work. When you orgasm, she retains the load carefully, keeping your cum inside her and away from her nice clothes.
+			_HisU <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>asshole is thoughtfully pre-lubed, and your cock slides easily up it<<else>>pussy is nice and wet, and your cock slides inside _himU easily<</if>> as you consider the slaves on offer. _HeU's well trained, and uses _hisU <<if $corpSpecGender == 2 && $corpSpecPussy != 1>>sphincter<<else>>womanly muscles<</if>> to please your member expertly as _heU ruts _himselfU gently back against you, doing almost all the work. When you orgasm, _heU retains the load carefully, keeping your cum inside _himU and away from _hisU nice clothes.
 		<<else>>
-			She's very well trained, and does all the work. Once you move in and straddle her, she gets right down to it, or in this case, up to it. Her clever tongue runs gently along your labia to build anticipation before starting a delightful dance around and then atop your clitoris. You orgasm in no time at all, a climax which she carefully prolongs by kissing you full on the pussy in just the right way, only breaking the oral embrace when you've ridden it as far as you'll go.
+			_HeU's very well trained, and does all the work. Once you move in and straddle _himU, _heU gets right down to it, or in this case, up to it. _HisU clever tongue runs gently along your labia to build anticipation before starting a delightful dance around and then atop your clitoris. You orgasm in no time at all, a climax which _heU carefully prolongs by kissing you full on the pussy in just the right way, only breaking the oral embrace when you've ridden it as far as you'll go.
 		<</if>>
 	<</replace>>
 <</link>>
diff --git a/src/uncategorized/costsBudget.tw b/src/uncategorized/costsBudget.tw
index 8d3bd616b3405180f6624643cf3f0b118ce6eeda..107b728f9f873af7d979d42d5aa12fb8e0afb02a 100644
--- a/src/uncategorized/costsBudget.tw
+++ b/src/uncategorized/costsBudget.tw
@@ -162,7 +162,7 @@ for (var i = 0; i < State.variables.lastWeeksCashIncome.length; i++){
 
 	<<print budgetLine("cellblock", "[[$cellblockNameCaps|Cellblock][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]] ($cellblockSlaves slaves)")>>
 
-	<<print budgetLine("lab", "[[Research Lab][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]] maintenance")>>
+	<<print budgetLine("lab", "[[Prosthetic Lab][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]] maintenance")>>
 
 	<<print budgetLine("incubator", "[[$incubatorNameCaps|Incubator][$nextButton = \"Back to Budget\", $nextLink = \"Costs Budget\"]] ($incubatorSlaves slaves)")>>
 
diff --git a/src/uncategorized/costsReport.tw b/src/uncategorized/costsReport.tw
index 0b0bcf35d947bb169a10557cafe173418c0e29a4..1e64c24c10066258524043c2707bf2c210879ddb 100644
--- a/src/uncategorized/costsReport.tw
+++ b/src/uncategorized/costsReport.tw
@@ -157,7 +157,7 @@ your personal living expenses are @@.yellowgreen;<<print cashFormat(Math.trunc($
 
 <<if ($servantsQuarters > 0 && $servantsQuartersUpgradeMonitoring > 0) ||
 $nursery > 0 || $masterSuiteUpgradePregnancy > 0 || $incubator > 0 ||
-($cyberMod != 0 && $researchLab.built == "true")>>
+$researchLab.level > 0>>
 <br>__Penthouse Facility Maintenance__:
 	<<if ($servantsQuarters > 0) && ($servantsQuartersUpgradeMonitoring > 0)>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -183,9 +183,9 @@ $nursery > 0 || $masterSuiteUpgradePregnancy > 0 || $incubator > 0 ||
 			<<set _arcologyCosts += (($incubatorWeightSetting+$incubatorMusclesSetting+$incubatorReproductionSetting+$incubatorGrowthStimsSetting)*500)>>
 		<</if>>
 	<</if>>
-	<<if $cyberMod != 0 && $researchLab.built == "true">>
+	<<if $researchLab.level > 0>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-		Research Lab: @@.yellowgreen;<<print cashFormat((100*$researchLab.maxSpace))>>@@
+		Prosthetic Lab: @@.yellowgreen;<<print cashFormat((100*$researchLab.maxSpace))>>@@
 		<<set _arcologyCosts += 100*$researchLab.maxSpace>>
 		<<if $researchLab.hired != 0>><br>&nbsp;&nbsp;&nbsp;&nbsp;Scientists: @@.yellowgreen;<<print cashFormat((300*$researchLab.hired))>>@@
 		<<set _arcologyCosts += 300*$researchLab.hired>> <</if>>
diff --git a/src/uncategorized/costsWidgets.tw b/src/uncategorized/costsWidgets.tw
index fd33a509e5336b256d4b3687cc6e3df3bbca6398..22ec2b669732ffad0e17d9d0b7ab4b680473584e 100644
--- a/src/uncategorized/costsWidgets.tw
+++ b/src/uncategorized/costsWidgets.tw
@@ -511,7 +511,7 @@
 <<widget "setupLastWeeksCash">>
 /* Feel free to add categories. Just make sure to display them in costsBudget.tw as well! */
 <<set $lastWeeksCashIncome = {
-/*Slave Jobs*/
+/* Slave Jobs */
 whore: 0,
 whoreBrothel: 0,
 rest: 0,
@@ -529,7 +529,7 @@ porn: 0,
 recruiter: 0,
 
 
-/*Slaves in general*/
+/* Slaves in general */
 fuckdolls: 0,
 menialTrades: 0,
 menialBioreactors: 0,
diff --git a/src/uncategorized/coursingAssociation.tw b/src/uncategorized/coursingAssociation.tw
index e6d13b8d162eb260e0275fc3f5ef887fe2b46307..e774b3188ffc25a08a3afa395a058ac16ddeecc1 100644
--- a/src/uncategorized/coursingAssociation.tw
+++ b/src/uncategorized/coursingAssociation.tw
@@ -20,7 +20,7 @@ The chasing slaves are known as lurchers, the term once used for the sighthounds
 
 <<if $Lurcher != 0>>
 	<br><br>''Fire your Lurcher:''
-	<<set $Flag = 1>>
+	<<set $SlaveSummaryFiler = "occupying">>
 	<<include "Slave Summary">>
 <</if>>
 
@@ -28,7 +28,7 @@ The chasing slaves are known as lurchers, the term once used for the sighthounds
 <br><br>
 <<assignmentFilter>>
 <span id="ComingGoing">
-	<<set $Flag = 0>>
+	<<set $SlaveSummaryFiler = "assignable">>
 	<<showallAssignmentFilter>>
 	<<include "Slave Summary">>
 	<<resetAssignmentFilter>>
diff --git a/src/uncategorized/dairy.tw b/src/uncategorized/dairy.tw
index e5e43cfcc6167a78a10bdb2935455195f9ed6cb1..e0129d2ceda4b9eb8f3429e9b9d59c2d2b4f71ee 100644
--- a/src/uncategorized/dairy.tw
+++ b/src/uncategorized/dairy.tw
@@ -501,7 +501,7 @@ $dairyNameCaps
 
 <br><br>
 <<if ($Milkmaid != 0)>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 	<<if canAchieveErection($Milkmaid) && $Milkmaid.pubertyXY == 1>>
 		<<setLocalPronouns $Milkmaid>>
@@ -539,7 +539,7 @@ $dairyNameCaps
 	<div class="content">
 		<<if $dairySlaves > 0>>
 			<<dairyAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -554,7 +554,7 @@ $dairyNameCaps
 			''$dairyNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $dairySlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/dairyReport.tw b/src/uncategorized/dairyReport.tw
index 5c8ab29a9124d2bab9458203d3293f38da9d6fa3..a33099f30a0cfb7caa0fe106d62f723ee8027a7e 100644
--- a/src/uncategorized/dairyReport.tw
+++ b/src/uncategorized/dairyReport.tw
@@ -196,8 +196,7 @@
 		$His skilled tongue helps $him keep $his cattle happy.
 	<</if>>
 	<<if ($Milkmaid.skill.oral < 90)>>
-		<<set $skillIncrease = 3>>
-		<<= SkillIncrease.Oral($slaves[_FLs], $skillIncrease)>> 
+		<<= SkillIncrease.Oral($slaves[_FLs], 3)>> 
 	<</if>>
 	<<if ($Milkmaid.sexualQuirk == "caring")>>
 		<<set $milkmaidTrustBonus++>>
diff --git a/src/uncategorized/endWeek.tw b/src/uncategorized/endWeek.tw
index e866a913895d8536ca7251529a810a56c3ed457f..c3135d0d343b3d85265d7ef3a72242df8a789a58 100644
--- a/src/uncategorized/endWeek.tw
+++ b/src/uncategorized/endWeek.tw
@@ -94,15 +94,21 @@
 <</if>>
 */
 
-<<if $limbs.length > 0>>
-<<run $limbs.forEach(function(l) {
-	if (l.weeksToCompletion > 0) {
-		l.weeksToCompletion--;
-	}
-	if (l.weeksToCompletion == 0) {
-		$limbsCompleted++;
-	}
-})>>
+<<if $adjustProsthetics.length > 0>>
+	<<run $adjustProsthetics.forEach(function(p) {
+		if (p.workLeft > 0) {
+			if ($prostheticsUpgrade == 3) {
+				p.workLeft -= 40;
+			} else if ($prostheticsUpgrade == 2) {
+				p.workLeft -= 20;
+			} else {
+				p.workLeft -= 10;
+			}
+			if (p.workLeft <= 0){
+				$adjustProstheticsCompleted++;
+			}
+		}
+	})>>
 <</if>>
 
 /% Begin section: ensure minimum age is set (game may have been loaded from a non-modded version). %/
diff --git a/src/uncategorized/fullReport.tw b/src/uncategorized/fullReport.tw
index 60b6e3fe2edbe8e62ebaefded3f38e0b4efff46d..82cd23ccd10f8a9a87a4ee0a4261193872b0d79d 100644
--- a/src/uncategorized/fullReport.tw
+++ b/src/uncategorized/fullReport.tw
@@ -18,7 +18,7 @@
 <<case "serve the public">>
 	<<= saServeThePublic($slaves[$i])>>
 <<case "work a glory hole">>
-	<<print saWorkAGloryHole($slaves[$i])>>
+	<<= saWorkAGloryHole($slaves[$i])>>
 <<case "get milked">>
 	<<set $servantMilkersMultiplier = 1>>
 	<<include "SA get milked">>
diff --git a/src/uncategorized/generateXXSlave.tw b/src/uncategorized/generateXXSlave.tw
deleted file mode 100644
index f4c915d0f0b6d4696aff4dd52692c7179c3fe32a..0000000000000000000000000000000000000000
--- a/src/uncategorized/generateXXSlave.tw
+++ /dev/null
@@ -1,3 +0,0 @@
-:: Generate XX Slave [nobr]
-
-<<set $activeSlave = GenerateNewSlave("XX")>>
diff --git a/src/uncategorized/generateXYSlave.tw b/src/uncategorized/generateXYSlave.tw
deleted file mode 100644
index 47cf1b30672cb33dfff02328bb833871e7d19020..0000000000000000000000000000000000000000
--- a/src/uncategorized/generateXYSlave.tw
+++ /dev/null
@@ -1,3 +0,0 @@
-:: Generate XY Slave [nobr]
-
-<<set $activeSlave = GenerateNewSlave("XY")>>
diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw
index 700c08d9f10206f8302de841d67abeb4df847ff4..f58bbf079ac3f905802309eb6ef034aa2210d767 100644
--- a/src/uncategorized/genericPlotEvents.tw
+++ b/src/uncategorized/genericPlotEvents.tw
@@ -252,7 +252,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<set $activeSlaveOneTimeMinAge = 30>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was the head of a religious community of women you enslaved.">>
 	<<set $activeSlave.career = "a nun">>
 	<<set $activeSlave.devotion = -20>>
@@ -280,7 +280,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<for $i = 0; $i < 3; $i++>>
 		<<set $activeSlaveOneTimeMinAge = 18>>
 		<<set $activeSlaveOneTimeMaxAge = 24>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was an initiate in a religious community of women you enslaved.">>
 		<<set $activeSlave.career = "a nun">>
 		<<set $activeSlave.devotion = random(-90,-75)>>
@@ -306,7 +306,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<set $activeSlaveOneTimeMinAge = 26>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was the principal of a girls' school whose remnants you enslaved. A strap-on and a large quantity of personal lubricant were found in her possession when she was enslaved.">>
 	<<set $activeSlave.intelligence = random(16,80)>>
 	<<set $activeSlave.intelligenceImplant = 15>>
@@ -335,7 +335,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<for $i = 0; $i < 3; $i++>>
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was a student at a girls' school whose remnants you enslaved.">>
 		<<set $activeSlave.career = "a student">>
 		<<set $activeSlave.devotion = random(-90,-75)>>
@@ -367,7 +367,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 		<</if>>
 		<<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was an expectant mother you enslaved when you evacuated her from a threatened old world hospital.">>
 		<<set $activeSlave.career = "a housewife">>
 		<<set $activeSlave.devotion = random(-90,-75)>>
@@ -417,7 +417,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<set $activeSlaveOneTimeMinAge = 26>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "She was the owner of a religious orientation conversion therapy camp whose remnants you enslaved.">>
 	<<set $activeSlave.career = "a business owner">>
 	<<set $activeSlave.devotion = -20>>
@@ -442,7 +442,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 		<<set $activeSlaveOneTimeMinAge = 16>>
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was an inmate at a religious orientation conversion therapy camp whose remnants you enslaved.">>
 	<<set $activeSlave.career = "a student">>
 		<<set $activeSlave.devotion = random(-90,-75)>>
@@ -469,7 +469,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.height = Math.round(Height.random($activeSlave, {skew: 1, limitMult: [0, 2]}))>>
 		<<set $activeSlave.origin = "She was a volleyball player you enslaved when you evacuated her from a broken down bus.">>
 		<<set $activeSlave.career = "a student athlete">>
@@ -541,7 +541,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/
 	<<set $oneTimeDisableDisability = 1>>
 	<<set $fixedRace = "white">>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was a nun in a felled mission. Once claimed, she was reduced to nothing more than a cum dump for her black masters.">>
 	<<set $activeSlave.career = "a nun">>
 	<<set $activeSlave.intelligenceImplant = 15>>
@@ -586,7 +586,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/
 	<<set $oneTimeDisableDisability = 1>>
 	<<set $fixedRace = "white">>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was a nun in a felled mission. Once claimed, she was reduced to nothing more than a cum dump for her black masters.">>
 	<<set $activeSlave.career = "a nun">>
 	<<set $activeSlave.devotion = 50>>
@@ -692,7 +692,7 @@ When the aircraft lands at your penthouse pad, the would-be escapees are still u
 		<<set $activeSlaveOneTimeMinAge = 26>>
 		<<set $activeSlaveOneTimeMaxAge = 42>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was a wealthy housewife who you enslaved as she fled societal collapse.">>
 		<<set $activeSlave.career = "a housewife">>
 		<<set $activeSlave.devotion = -20>>
@@ -1135,7 +1135,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<set $activeSlaveOneTimeMaxAge = 28>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You won her at a shotgun match against other arcology owners.">>
 	<<set $activeSlave.lips = random(5,25)>>
 	<<set $activeSlave.anus = 1>>
@@ -1184,7 +1184,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<set $activeSlaveOneTimeMaxAge = 8>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You won her at a shotgun match against other arcology owners.">>
 	<<set $activeSlave.lips = random(5,25)>>
 	<<set $activeSlave.anus = 0>>
@@ -1243,7 +1243,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You won her at a shotgun match against other arcology owners.">>
 	<<set $activeSlave.vagina = 1>>
 	<<set $activeSlave.skill.vaginal = 15>>
@@ -1293,7 +1293,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<set $activeSlaveOneTimeMaxAge = 24>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You won her at a shotgun match against other arcology owners.">>
 	<<set $activeSlave.skill.vaginal = 15>>
 	<<set $activeSlave.skill.oral = 15>>
@@ -1343,7 +1343,7 @@ A screen opposite your desk springs to life, <<if $assistant == 0>>showing your
 	<<run newSlave($activeSlave)>> /* skip New Slave Intro */
 	<</replace>>
 <</link>>
-<<= IncreasePCSkills('warfare',  2)>>
+<<= IncreasePCSkills('warfare', 2)>>
 
 <<case "aid invitation">>
 
diff --git a/src/uncategorized/headGirlSuite.tw b/src/uncategorized/headGirlSuite.tw
index 474c4d5e2a49bc6f9e7888120cf185c477b4b2e2..8a42b0aac0057103c5a91c9d9fe6502d1343a9c4 100644
--- a/src/uncategorized/headGirlSuite.tw
+++ b/src/uncategorized/headGirlSuite.tw
@@ -57,7 +57,7 @@
 	<div class="content">
 		<<if $HGSuiteSlaves > 0>>
 			<<headgirlSuiteAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<</if>>
@@ -69,7 +69,7 @@
 		<<if ($slaves.length > $HGSuiteSlaves) && ($HGSuiteSlaves < 1)>>
 			<<assignmentFilter>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<<else>>
 			''Head Girl already has a girl.''
diff --git a/src/uncategorized/hgApplication.tw b/src/uncategorized/hgApplication.tw
index 197fa73b64e2095e19a195689bbf35d8f9a4d71e..ca84ef0b93fb21ac2c28b0e2e6a86170e69f9a53 100644
--- a/src/uncategorized/hgApplication.tw
+++ b/src/uncategorized/hgApplication.tw
@@ -232,68 +232,68 @@ $He punishes $activeSlave.slaveName whenever $he sees _him2 breaking the rules y
 <<set $activeSlave.training = 0>>
 <<if ($HeadGirl.fetish == "cumslut") && ($HeadGirl.fetishStrength > 60)>>
 	In spare moments $he teaches $activeSlave.slaveName how to suck cocks, cunts, and assholes. $His enthusiasm for oral sex is infectious. $activeSlave.slaveName's @@.green;oral skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Oral($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.dick > 0) && canPenetrate($HeadGirl)>>
 	In spare moments $he teaches $activeSlave.slaveName how to suck cocks, cunts, and assholes. Your Head Girl uses $his penis as an effective teaching tool. $activeSlave.slaveName's @@.green;oral skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Oral($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.clit > 2)>>
 	In spare moments $he teaches $activeSlave.slaveName how to suck cocks, cunts, and assholes. Your Head Girl uses $his pseudophallus-sized clit as an effective teaching tool. $activeSlave.slaveName's @@.green;oral skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Oral($activeSlave, random(5,10))>>
 <<else>>
 	In spare moments $he teaches $activeSlave.slaveName how to suck cocks, cunts, and assholes. $activeSlave.slaveName's @@.green;oral skills have improved.@@
 <</if>>
-<<set $skillIncrease = Math.ceil(_effectiveness/10)>><<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+<<= SkillIncrease.Oral($activeSlave, Math.ceil(_effectiveness/10))>>
 
 <<elseif $HGtraining == "anal skill">>
 
 <<set $activeSlave.training = 0>>
 <<if ($HeadGirl.fetish == "buttslut") && ($HeadGirl.fetishStrength > 60)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take it up the ass. Your Head Girl's enthusiasm for backdoor loving is infectious. $activeSlave.slaveName's @@.green;anal skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Anal($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.dick > 0) && canPenetrate($HeadGirl)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a dick up the butt. Your Head Girl uses $his penis as an effective teaching tool. $activeSlave.slaveName's @@.green;anal skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Anal($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.clit > 2)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a phallus up the butt. Your Head Girl uses $his pseudophallus-sized clit as an effective teaching tool. $activeSlave.slaveName's @@.green;anal skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Anal($activeSlave, random(5,10))>>
 <<else>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a dick up the butt. $activeSlave.slaveName's @@.green;anal skills have improved.@@
 <</if>>
-<<set $skillIncrease = Math.ceil(_effectiveness/10)>><<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+<<= SkillIncrease.Anal($activeSlave, Math.ceil(_effectiveness/10))>>
 
 <<elseif $HGtraining == "fuck skill">>
 
 <<set $activeSlave.training = 0>>
 <<if ($HeadGirl.energy > 95)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a dick. Your Head Girl's enthusiasm for sex is infectious. $activeSlave.slaveName's @@.green;vanilla sex skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Vaginal($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.dick > 0) && canPenetrate($HeadGirl)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a dick. Your Head Girl uses $his penis as an effective teaching tool. $activeSlave.slaveName's @@.green;vanilla sex skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Vaginal($activeSlave, random(5,10))>>
 <<elseif ($HeadGirl.clit > 2)>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a phallus. Your Head Girl uses $his pseudophallus-sized clit as an effective teaching tool. $activeSlave.slaveName's @@.green;vanilla sex skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Vaginal($activeSlave, random(5,10))>>
 <<else>>
 	In spare moments $he teaches $activeSlave.slaveName how to take a dick. $activeSlave.slaveName's @@.green;vanilla sex skills have improved.@@
 <</if>>
-<<set $skillIncrease = Math.ceil(_effectiveness/10)>><<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+<<= SkillIncrease.Vaginal($activeSlave, Math.ceil(_effectiveness/10))>>
 
 <<elseif $HGtraining == "whore skill">>
 
 <<set $activeSlave.training = 0>>
 In spare moments $he teaches $activeSlave.slaveName how to prostitute _himself2. $activeSlave.slaveName's @@.green;whoring skills have improved.@@
-<<set $skillIncrease = Math.ceil(_effectiveness/10)>><<= SkillIncrease.Whore($activeSlave, $skillIncrease)>>
+<<= SkillIncrease.Whore($activeSlave, Math.ceil(_effectiveness/10))>>
 
 <<elseif $HGtraining == "entertain skill">>
 
 <<set $activeSlave.training = 0>>
 <<if ($HeadGirl.fetish == "humiliation") && ($HeadGirl.fetishStrength > 60)>>
 	In spare moments $he teaches $activeSlave.slaveName how to entertain. Your Head Girl's enthusiasm for public display is infectious. $activeSlave.slaveName's @@.green;entertainment skills have improved.@@
-	<<set $skillIncrease = random(5,10)>><<= SkillIncrease.Entertain($activeSlave, $skillIncrease)>>
+	<<= SkillIncrease.Entertain($activeSlave, random(5,10))>>
 <<else>>
 	In spare moments $he teaches $activeSlave.slaveName how to entertain. $activeSlave.slaveName's @@.green;entertainment skills have improved.@@
 <</if>>
-<<set $skillIncrease = Math.ceil(_effectiveness/10)>><<= SkillIncrease.Entertain($activeSlave, $skillIncrease)>>
+<<= SkillIncrease.Entertain($activeSlave, Math.ceil(_effectiveness/10))>>
 
 <</if>>
 <</if>>
diff --git a/src/uncategorized/householdLiquidator.tw b/src/uncategorized/householdLiquidator.tw
index cf921fe671dd4e39e618b9eb676250c6b9b520d1..506d5ca986fff1c67a04189ab7e0fe5bbf1c7698 100644
--- a/src/uncategorized/householdLiquidator.tw
+++ b/src/uncategorized/householdLiquidator.tw
@@ -53,7 +53,7 @@ The household liquidator is offering a mother and her daughter for sale. As usua
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a daughter who can be a slave. %/
 /% End younger mothers submod. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You bought her from the household liquidator.">>
 
 <<set $activeSlave.devotion = random(-75,-25)>>
diff --git a/src/uncategorized/jeSlaveDispute.tw b/src/uncategorized/jeSlaveDispute.tw
index 221200bddd9e15c9c4ce02a86ed50c49354d48b3..344f3bb43d58e90ac0f9b7d533526f1db507de47 100644
--- a/src/uncategorized/jeSlaveDispute.tw
+++ b/src/uncategorized/jeSlaveDispute.tw
@@ -9,7 +9,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She sold herself into slavery to buy medical care for her daughter.">>
 	<<set $activeSlave.devotion = random(25,30)>>
 	<<set $activeSlave.trust = $activeSlave.devotion-20>>
@@ -27,7 +27,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 24>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She was raised to be a mother.">>
 	<<set $activeSlave.career = "a breeder">>
 	<<set $activeSlave.devotion = random(10,25)>>
@@ -51,7 +51,7 @@
 <<case "slave training">>
 	<<set $contractCost = 10000>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought out a deal involving her training to be an expert gelded sex slave.">>
 	<<set $activeSlave.devotion = random(30,40)>>
 	<<set $activeSlave.trust = $activeSlave.devotion>>
diff --git a/src/uncategorized/labReport.tw b/src/uncategorized/labReport.tw
index 712f2635332c7054598c9745e233ae7deb0ec58d..0763ea7577f6558b381a51c54c806404658ce0c3 100644
--- a/src/uncategorized/labReport.tw
+++ b/src/uncategorized/labReport.tw
@@ -2,85 +2,42 @@
 
 ''Lab Report''<hr style="margin:0">
 <br>
-<<if ($researchLab.hired + $researchLab.menials) != 0>>
-	<<if $researchLab.research == "none" && $researchLab.manufacture == "none">>
-		Since the lab is currently not working on any projects it takes contract work and earns you @@.yellowgreen;<<print cashFormat((($researchLab.hired * 3 + $researchLab.menials) * $researchLab.aiModule * 20))>>.@@
-		<<set _cashX = (($researchLab.hired * 3 + $researchLab.menials) * $researchLab.aiModule * 20)>>
+<<if ($researchLab.hired + $researchLab.menials) > 0>>
+	<<if $researchLab.tasks.length == 0>>
+		Since the lab is currently not working on any projects it takes contract work and earns you @@.yellowgreen;<<= cashFormat($researchLab.speed * 20)>>.@@
+		<<set _cashX = ($researchLab.speed * 90)>>
 		<<run cashX(_cashX, "lab")>>
-	<<elseif $researchLab.research != "none">>
-		<<set $researchLab.productionTime -= (($researchLab.hired * 3) + ($researchLab.menials) * ($researchLab.aiModule))>>
-		<<if $researchLab.productionTime <= 0>>
-			Your lab staff have @@.green;completed@@ their $researchLab.research research project, and
-			<<switch $researchLab.research>>
-			<<case "Basic prosthetics interface">>
-				<<set $researchLab.basicPLimbInterface = 1>>
-			<<case "Advanced prosthetics interface">>
-				<<set $researchLab.advPLimbInterface = 1>>
-			<<case "Basic prosthetic limbs">>
-				<<set $researchLab.basicPLimb = 1>>
-			<<case "Advanced sex limbs">>
-				<<set $researchLab.advSexPLimb = 1>>
-			<<case "Advanced beauty limbs">>
-				<<set $researchLab.advGracePLimb = 1>>
-			<<case "Advanced combat limbs">>
-				<<set $researchLab.advCombatPLimb = 1>>
-			<<case "Cybernetic limbs">>
-				<<set $researchLab.cyberneticPLimb = 1>>
-			<<case "Ocular implants">>
-				<<set $researchLab.ocularImplant = 1>>
-			<<case "Cochlear implants">>
-				<<set $researchLab.cochlearImplant = 1>>
-			<<case "Electrolarynx">>
-				<<set $researchLab.electrolarynx = 1>>
-			/*<<case "Erectile implant">>
-				<<set $researchLab.erectileImplant = 1>>*/
-			<</switch>>
-			they are awaiting your next instruction.
-			<<set $researchLab.productionTime = 0, $researchLab.research = "none">>
-		<<else>>
-			Your lab staff are currently researching @@.yellow;$researchLab.research.@@
-		<</if>>
-		<br><br> <<= ResearchLabStockPile()>>
-	<<elseif $researchLab.manufacture != "none">>
-		<<set $researchLab.productionTime -= (($researchLab.hired * 3) + ($researchLab.menials) * ($researchLab.aiModule))>>
-		<<if $researchLab.productionTime <= 0>>
-			Your lab staff have @@.green;completed@@ their $researchLab.manufacture project, and
-			<<switch $researchLab.manufacture>>
-			<<case "Basic prosthetics interface">>
-				<<set $stockpile.basicPLimbInterface += 1, $researchLab.productionTime = 50>>
-			<<case "Advanced prosthetics interface">>
-				<<set $stockpile.advPLimbInterface += 1, $researchLab.productionTime = 80>>
-			<<case "Basic prosthetic limbs">>
-				<<set $stockpile.basicPLimb += 1, $researchLab.productionTime = 20>>
-			<<case "Advanced sex limbs">>
-				<<set $stockpile.advSexPLimb += 1, $researchLab.productionTime = 100>>
-			<<case "Advanced beauty limbs">>
-				<<set $stockpile.advGracePLimb += 1, $researchLab.productionTime = 100>>
-			<<case "Advanced combat limbs">>
-				<<set $stockpile.advCombatPLimb += 1, $researchLab.productionTime = 100>>
-			<<case "Cybernetic limbs">>
-				<<set $stockpile.cyberneticPLimb += 1, $researchLab.productionTime = 150>>
-			<<case "Ocular implants">>
-				<<set $stockpile.ocularImplant += 1, $researchLab.productionTime = 80>>
-			<<case "Cochlear implants">>
-				<<set $stockpile.cochlearImplant += 1, $researchLab.productionTime = 60>>
-			<<case "Electrolarynx">>
-				<<set $stockpile.electrolarynx += 1, $researchLab.productionTime = 100>>
-			/*<<case "Erectile implant">>
-				<<set $stockpile.erectileImplant += 1, $researchLab.productionTime = 50>>*/
-			<</switch>>
-			<span id="haltproduction">
-				they are starting work on another unit.
-				<<link "Halt production">>
-					<<set $researchLab.productionTime = 0, $researchLab.manufacture = "none">>
-					<<replace "#haltproduction">>
-						they are awaiting your next instruction.
-					<</replace>>
-				<</link>>
-			</span>
-		<<else>>
-			Your lab staff are currently working on @@.yellow;$researchLab.manufacture.@@
-		<</if>>
-		<br><br> <<= ResearchLabStockPile()>>
+	<<else>>
+		<<set _work = $researchLab.speed, _task = $researchLab.tasks[0]>>
+		/*<<for _i = 0; _i < $researchLab.tasks.length && _work > 0; _i++>>*/
+		<<for _work > 0>>
+			<<if _work < _task.workLeft>>
+				<<set _task.workLeft -= _work, _work = 0>>
+				The lab continues <<if _task.type == "research">>research<<else>>work<</if>> on @@.yellow;<<= addA(setup.prosthetics[_task.id].name)>>.@@ It will take approximately <<= (Math.floor(_task.workLeft / $researchLab.speed) + 1)>> week(s) to complete.
+			<<else>>
+				<<set _work -= _task.workLeft>>
+				Your lab staff have @@.green;completed@@ their
+				<<switch _task.type>>
+				<<case "research">>
+					<<= setup.prosthetics[_task.id].name>> research project.
+					<<set $prosthetics[_task.id].research = 1>>
+				<<case "craft">>
+					<<= setup.prosthetics[_task.id].name>> construction project.
+					<<set $prosthetics[_task.id].amount += 1>>
+				<<case "craftFit">>
+					<<set _i = $slaves.findIndex(function(s) {return s.ID == _task.slaveID}), $slaves[_i].readyProsthetics.push({id: _task.id})>>
+					project to contruct <<= addA(setup.prosthetics[_task.id].name)>> for <<= SlaveFullName($slaves[_i])>>.
+				<</switch>>
+				<<set $researchLab.tasks.shift(), _task = $researchLab.tasks[0]>>
+				<<if ndef _task>>
+					<<set _cashX = (_work * 90), _work = 0>>
+					<br>Your lab has @@.green;finished all projects.@@ The remaining time is used for contract work earning you @@.yellowgreen;<<= cashFormat(_cashX)>>.@@
+					<<run cashX(_cashX, "lab")>>
+				<</if>>
+			<</if>>
+			<br>
+		<</for>>
 	<</if>>
+<<elseif $researchLab.tasks.length > 0>>
+	//Without researchers your tasks will never be finished.//
 <</if>>
diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw
index 43657866041973194fc8f487ecbea69cbae59dba..fda0d00c63ff99db3d458208eabc122a0bb8f8b4 100644
--- a/src/uncategorized/main.tw
+++ b/src/uncategorized/main.tw
@@ -1,6 +1,6 @@
 :: Main [nobr]
 
-<<unset $Flag>>
+<<unset $SlaveSummaryFiler>>
 <<resetAssignmentFilter>>
 <<if $releaseID >= 1000 || $ver.includes("0.9") || $ver.includes("0.8") || $ver.includes("0.7") || $ver.includes("0.6")>>
 	<<if $releaseID >= 1031>>
@@ -49,10 +49,10 @@
 /* end extra sanity checks and repair */
 
 <<set _duplicateSlaves = _($slaves).countBy(s => s.ID).pickBy(v => v > 1).keys().map(v => Number(v)).value()>>
-<<foreach _i of _duplicateSlaves>>
+<<for _i range _duplicateSlaves>>
 	<br><br>@@.red;Duplicate slave ID _i at indices
 	<<= _($slaves).map((s, idx) => ({ID: s.ID, idx: idx, name: s.slaveName, assignment: s.assignment})).filter(s => s.ID === _i).map(s => s.idx + ' - ' + s.name + ' (' + s.assignment + ')').join(', ')>>@@
-<</foreach>>
+<</for>>
 <<set _visibleSlaves = $slaves.filter(s => s.assignmentVisible == 1 && (s.assignment != "be your Head Girl" || $HGSuite != 1) && (s.assignment != "guard you" || $dojo <= 1)),
 	$slavesVisible = _visibleSlaves.length,
 	$dormitoryPopulation = _visibleSlaves.filter(s => s.livingRules != "luxurious").length,
diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw
index 7d29124cc361317b43b0da8130fc2b8ebf9145b2..b03e9aa161896591af27202ee80acce701af63c7 100644
--- a/src/uncategorized/manageArcology.tw
+++ b/src/uncategorized/manageArcology.tw
@@ -128,7 +128,7 @@ __Construction__
 		<br>
 		[[Set up the riot control center|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $riotCenter = 1, $PC.engineering += 1]]
 		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
-		<<if $PC.engineering < 100>>  <<= IncreasePCSkills('engineering', 0.1)>> <</if>>
+		<<if $PC.engineering < 100>> <<= IncreasePCSkills('engineering', 0.1)>> <</if>>
 		<br>//Building specialized in the management and suppression of rebellions.//
 	<<elseif $rebellionsEnabled == 1>>
 		<br>
diff --git a/src/uncategorized/managePenthouse.tw b/src/uncategorized/managePenthouse.tw
index 5bf7437470c1b40c0fb97ba99b9032fdbdf2bdb7..897242f560b7303a8d4b35f53d514a6aa3e3d9ec 100644
--- a/src/uncategorized/managePenthouse.tw
+++ b/src/uncategorized/managePenthouse.tw
@@ -132,16 +132,6 @@ __Penthouse Facilities__
 	There is a small but handsome suite next to yours reserved for the Head Girl.
 <</if>>
 
-<<if $cyberMod == 1>>
-	<br>
-	<<if $researchLab.built == "true">>
-		Your penthouse is now equipped with a research lab.
-	<<else>>
-		[[Clear out one of the floors and install research equipment|Manage Penthouse][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $researchLab.built = "true", $researchLab.maxSpace = 5, $PC.engineering += 1]]
-		//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
-	<</if>>
-<</if>>
-
 <br><br>
 
 __Penthouse Upgrades__
@@ -349,37 +339,45 @@ __Penthouse Upgrades__
 
 <br>
 
-<<if $cyberMod == 0>>
-	<<switch $prostheticsUpgrade>>
-	<<case 1>>
-	There is a facility to construct mechanical prosthetic limbs for amputated slaves.
+<<switch $prostheticsUpgrade>>
+<<case 0>>
+	<<if ($rep > 8000)>>
+		[[Install basic equipment for attaching and maintaince of prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 1, $PC.engineering += 1]]
+		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
+	<<else>>
+		//You lack the reputation to buy basic equipment for attaching and maintaince of prosthetics.//
+	<</if>>
+<<case 1>>
+	You have basic equipment for attaching and maintaince of prosthetics.
 	<<if ($rep > 12000)>>
-		[[Research advanced prototype prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 2]]
+		[[Buy a contract for advanced prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 2]]
 		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
 	<<else>>
-		//You lack the reputation to research and produce prototype prosthetics.//
+		//You lack the reputation to get a contract for advanced prosthetics.//
 	<</if>>
-	<<case 2>>
-	There is a prosthetics facility upgraded to use advanced materials and designs.
+<<case 2>>
+	You have basic equipment for attaching and maintaince of prosthetics and a contract to guarantee the availability of advanced prosthetics.
 	<<if ($rep > 16000)>>
-		[[Research high-tech cybernetic limbs|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 3]]
+		[[Buy a contract for high-tech prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 3]]
 		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
 	<<else>>
-		//You lack the reputation to research and produce prototype cybernetic limbs.//
+		//You lack the reputation to get a contract for high-tech prosthetics.//
 	<</if>>
-	<<case 3>>
-	There is a high-tech facility to build prosthetics and state-of-the-art cybernetic replacement limbs.
-	<<default>>
-	<<if ($rep > 8000)>>
-		[[Construct a mechanical prosthetics facility|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 1, $PC.engineering += 1]]
-		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
+<<case 3>>
+	You have basic equipment for attaching and maintaince of prosthetics and a contract to guarantee the availability of high-tech prosthetics.
+<</switch>>
+<br>
+<<if $prostheticsUpgrade > 0>>
+	<<if $researchLab.level > 0>>
+		Your penthouse is equipped with an advanced prosthetic lab.
 	<<else>>
-		//You lack the reputation to construct a prosthetics facility.//
+		[[Clear out one of the floors and install equipment to construct prosthetics yourself|Manage Penthouse][cashX(forceNeg(Math.trunc(150000*$upgradeMultiplierArcology)), "capEx"), $researchLab.level = 1, $researchLab.maxSpace = 5, $PC.engineering += 1]]
+		//Costs <<print cashFormat(Math.trunc(150000*$upgradeMultiplierArcology))>>//<br>
+		//Buying the equipment to construct prosthetics yourself is expensive but if you want to construct a lot prosthetics it will pay out in the long run.//
 	<</if>>
-	<</switch>>
 <</if>>
 
-<br>
+<br><br>
 
 <<if $surgeryUpgrade == 0>>
 <<if $rep > 10000>>
diff --git a/src/uncategorized/masterSuite.tw b/src/uncategorized/masterSuite.tw
index 12689c1814ba63bf8b9aa180fea42ad4fda791db..0478aadd359f2820bd83aef6233d46b6102b2247 100644
--- a/src/uncategorized/masterSuite.tw
+++ b/src/uncategorized/masterSuite.tw
@@ -346,7 +346,7 @@ $masterSuiteNameCaps is furnished
 
 <br><br>
 <<if $Concubine != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as your Concubine. [[Appoint one|Concubine Select]]
@@ -365,7 +365,7 @@ $masterSuiteNameCaps is furnished
 	<div class="content">
 		<<if $masterSuiteSlaves > 0>>
 			<<suiteAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -380,7 +380,7 @@ $masterSuiteNameCaps is furnished
 			''$masterSuiteNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $masterSuiteSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/matchmaking.tw b/src/uncategorized/matchmaking.tw
index dd884f98f2f89e5d5ab15c90e087add69e27bc40..6b9224a3e70e96d5bf9aa64f1a4d9b1a801784ff 100644
--- a/src/uncategorized/matchmaking.tw
+++ b/src/uncategorized/matchmaking.tw
@@ -381,7 +381,7 @@ Despite $his devotion and trust, $he is still a slave, and probably knows that $
 <<if $seeImages == 1>><br style="clear:both"><</if>>
 
 <br><br>__Put $him with another worshipful <<if $eventSlave.relationship == -2>>emotionally bonded slave<<else>>emotional slut<</if>>:__
-<<set $Flag = 1>>
+<<set $SlaveSummaryFiler = "occupying">>
 <<include "Slave Summary">>
 
 </span>
diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw
index 555f4b67c64ca30683cf76c4d801f6d3e8666a73..56b4ec893a0cfd9a151f254adcdefd077fdfdeb7 100644
--- a/src/uncategorized/multiImplant.tw
+++ b/src/uncategorized/multiImplant.tw
@@ -1,6 +1,6 @@
 :: Multiple Organ Implant [nobr]
 
-You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized remote surgery<<else>>remote surgery<</if>> and start having the slaves with <<if ($completedOrgans.length > 0) && ($limbsCompleted > 0)>>organs or limbs <<elseif ($completedOrgans.length > 1)>>organs <<elseif ($limbsCompleted > 1)>>sets of limbs <</if>>that are ready be sent down.
+You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized remote surgery<<else>>remote surgery<</if>> and start having the slaves with <<if ($completedOrgans.length > 0) && ($adjustProstheticsCompleted > 0)>>organs or prosthetics <<elseif ($completedOrgans.length > 1)>>organs <<elseif ($adjustProstheticsCompleted > 1)>>prosthetics <</if>>that are ready be sent down.
 
 /* builds a list for each slave and adds the appropriate organs to it */
 <<for _i = 0; _i < $slaves.length; _i++>>
@@ -982,73 +982,136 @@ You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized
 		<</if>>
 	<</if>>
 	/* finished checking _slaveOrgans */
-	/* limbs */
-	<<if $activeSlave.amp != 0>>
-		<<for _l = 0; _l < $limbs.length; _l++>>
-			<<if ($limbs[_l].ID == $activeSlave.ID) && ($limbs[_l].weeksToCompletion <= 0)>>
-				<<if $activeSlave.PLimb != 0>>
-					<<if $activeSlave.amp < 0>>
-						<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-						<<set _oldLimbs.type = $activeSlave.amp, _oldLimbs.armsTat = $activeSlave.armsTat, _oldLimbs.legsTat = $activeSlave.legsTat>>
-						<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-					<</if>>
 
-					<<switch $limbs[_l].type>>
-					<<case "simple">>
-						<<set $activeSlave.amp = -1>>
-						<<set $surgeryType = "basicPLimbs">>
-					<<case "sex">>
-						<<set $activeSlave.amp = -2>>
-						<<set $surgeryType = "sexPLimbs">>
-					<<case "beauty">>
-						<<set $activeSlave.amp = -3>>
-						<<set $surgeryType = "beautyPLimbs">>
-					<<case "combat">>
-						<<set $activeSlave.amp = -4>>
-						<<set $surgeryType = "combatPLimbs">>
-					<<case "cyber">>
-						<<set $activeSlave.amp = -5>>
-						<<set $surgeryType = "cyberPLimbs">>
-					<</switch>>
-					<br><hr>
-					<<include "Surgery Degradation">>
-					<<set $limbs.deleteAt(_l)>>
-					<<set $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>>
+	/* start prosthetics */
+	<<if $adjustProstheticsCompleted > 0>>
+	<<for _k = 0; _k < $adjustProsthetics.length; _k++>>
+	<<set _p = $adjustProsthetics[_k]>>
+	<<if _p.slaveID == $activeSlave.ID && _p.workLeft <= 0>>
+		<<set $adjustProsthetics.splice(_k, 1), _k-->>
+		<<set $activeSlave.readyProsthetics.push({id: _p.id})>>
+		<br><hr>
+		<<if $activeSlave.health < -40>>
+			@@.red;Slave unhealthy: Skipping Slave@@
+			<<continue>>/* no break so that all prosthetics will be checked */
+		<</if>>
+		<<switch _p.id>>
+		<<case "ocular">>
+			<<if $activeSlave.eyes < -1>>
+				<<set $activeSlave.eyesImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "ocular implant">>
+				<<include "Surgery Degradation">>
+			<<else>>
+				//Since $he has working eyes the <<= setup.prosthetics.ocular.name>> will be put into storage.//
+			<</if>>
+		<<case "cochlear">>
+			<<if $activeSlave.hears != 0>>
+				<<set $activeSlave.earImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "cochlear implant">>
+				<<include "Surgery Degradation">>
+			<<else>>
+				//Since $he has working ears the <<= setup.prosthetics.cochlear.name>> will be put into storage.//
+			<</if>>
+		<<case "electrolarynx">>
+			<<if $activeSlave.voice <= 0>>
+				<<set $activeSlave.electrolarynx = 1, $activeSlave.voice = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "electrolarynx">>
+				<<include "Surgery Degradation">>
+			<<else>>
+				//Since $he has a voice the <<= setup.prosthetics.electrolarynx.name>> will be put into storage.//
+			<</if>>
+		<<case "interfaceP1">>
+			<<if $activeSlave.amp == 0>>
+				//Since $he has healthy limbs the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.//
+			<<elseif $activeSlave.PLimb == 2>>
+				//Since $he already has <<= addA(setup.prosthetics.interfaceP2.name)>> installed the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.//
+			<<else>>
+				<<set $activeSlave.PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "PLimb interface1">>
+				<<include "Surgery Degradation">>
+			<</if>>
+		<<case "interfaceP2">>
+			<<if $activeSlave.amp == 0>>
+				//Since $he has healthy limbs the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.//
+			<<elseif $activeSlave.PLimb == 1>>
+				<<set $activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 5, $surgeryType = "PLimb interface3">>
+				<<include "Surgery Degradation">>
+			<<else>>
+				<<set $activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "PLimb interface2">>
+				<<include "Surgery Degradation">>
+			<</if>>
+		<<case "basicL" "sexL" "beautyL" "combatL" "cyberneticL">>
+			<<if $activeSlave.fuckdoll != 0>>
+				//Since a fuckdoll can't use prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
+			<<elseif $activeSlave.amp == 0>>
+				//Since $he must be an amputee to attach prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
+			<<elseif $activeSlave.PLimb == 0>>
+				//Since $he must have a prosthetic interface installed to attach prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
+			<<else>>
+				<<if _p.id == "basicL">>
+					<<if $activeSlave.amp > 0>>
+						<<set $activeSlave.amp = -1, $prostheticsConfig = "basicPLimbs">>
+						<<include "Prosthetics Config">>
+					<<else>>
+						//Since $he already has more advanced prosthetic limbs attached the <<= setup.prosthetics.basicL.name>> will be put into storage.//
+					<</if>>
+				<<elseif _p.id == "sexL">>
+					<<if $activeSlave.amp >= -1>>
+						<<set $activeSlave.amp = -2, $prostheticsConfig = "sexPLimbs">>
+						<<include "Prosthetics Config">>
+					<<else>>
+						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.sexL.name>> will be put into storage.//
+					<</if>>
+				<<elseif _p.id == "beautyL">>
+					<<if $activeSlave.amp >= -1>>
+						<<set $activeSlave.amp = -3, $prostheticsConfig = "beautyPLimbs">>
+						<<include "Prosthetics Config">>
+					<<else>>
+						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.beautyL.name>> will be put into storage.//
+					<</if>>
+				<<elseif _p.id == "combatL">>
+					<<if $activeSlave.amp >= -1>>
+						<<set $activeSlave.amp = -4, $prostheticsConfig = "combatPLimbs">>
+						<<include "Prosthetics Config">>
+					<<else>>
+						//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.combatL.name>> will be put into storage.//
+					<</if>>
 				<<else>>
-					<br><hr>
-					@@.red;Could not install prosthetic limbs on $activeSlave.slaveName: $he lacks a prosthetic interface.@@ They have been moved into storage for later installation.
-					<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-					<<switch $limbs[_l].type>>
-					<<case "simple">>
-						<<set _oldLimbs.type = -1>>
-					<<case "sex">>
-						<<set _oldLimbs.type = -2>>
-					<<case "beauty">>
-						<<set _oldLimbs.type = -3>>
-					<<case "combat">>
-						<<set _oldLimbs.type = -4>>
-					<<case "cyber">>
-						<<set _oldLimbs.type = -5>>
-					<</switch>>
-					<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-					<<set $limbs.deleteAt(_l)>>
+					<<if $activeSlave.PLimb == 2>>
+						<<set $activeSlave.amp = -5, $prostheticsConfig = "cyberPLimbs">>
+						<<include "Prosthetics Config">>
+					<<else>>
+						//Since $he must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= setup.prosthetics.cyberneticL.name>> will be put into storage.//
+					<</if>>
 				<</if>>
-				<<break>>
 			<</if>>
-		<</for>>
+		<<case "interfaceTail">>
+			<<set $activeSlave.PTail = 1, $activeSlave.tail = "none", $activeSlave.tailColor = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10, $surgeryType = "tailInterface">>
+			<<include "Surgery Degradation">>
+		<<case "modT" "sexT" "combatT">>
+			<<if $activeSlave.PTail == 0>>
+				//Since $he must have <<= addA(setup.prosthetics.interfaceTail.name)>> installed to attach tails the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
+			<<elseif $activeSlave.tail != "none">>
+				//Since $he currently has a tail attached the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
+			<<elseif _p.id == "modT">>
+				//Since installing <<= addA(setup.prosthetics.modT.name)>> is complicated it can't be automated.//
+				/*Reason: there are different designs player can choose from.*/
+			<<elseif _p.id == "combatT">>
+				<<set $prostheticsConfig = "attachTail", $activeSlave.tail = "combat", $activeSlave.tailColor = "jet black">>
+				<<include "Prosthetics Config">>
+			<<elseif _p.id == "sexT">>
+				<<set $prostheticsConfig = "attachTail", $activeSlave.tail = "sex", $activeSlave.tailColor = "pink">>
+				<<include "Prosthetics Config">>
+			<</if>>
+		<<default>>
+			//Since there is no automated procedure to implant/attach <<= setup.prosthetics[_p.id].name>> it will be put into storage.//
+		<</switch>>
+		<br>
+	<</if>>
+	<</for>>
 	<</if>>
+	/* end prosthetics */
 	/* updates the interrogated slave */
 	<<set $slaves[_i] = $activeSlave>>
 <</for>> /* end of the $slaves loop */
+<<set $adjustProstheticsCompleted = 0>>
 
 /* This needs to be down here to over-ride any Surgery Degradation calls */
 <<set $nextButton = "Continue">>
 <<set $nextLink = "Main">>
-
-/* Clean-up */
-<<set $limbsCompleted = 0>>
-<<for _i = 0; _i < $limbs.length; _i++>>
-	<<if $limbs[_i].weeksToCompletion <= 0>>
-		<<set $limbsCompleted++>>
-	<</if>>
-<</for>>
diff --git a/src/uncategorized/newGamePlus.tw b/src/uncategorized/newGamePlus.tw
index 3eb8bf2e8ce3a54319bb5e9242391a2640334fd0..179ce4b766a520e77c960b3196363fe3bd4524e3 100644
--- a/src/uncategorized/newGamePlus.tw
+++ b/src/uncategorized/newGamePlus.tw
@@ -1,6 +1,6 @@
 :: New Game Plus [nobr]
 
-<<set $ui = "start">> <<unset $Flag>>
+<<set $ui = "start">> <<unset $SlaveSummaryFiler>>
 
 <<if ndef $slavesToImport>><<set $slavesToImport = 0>><</if>>
 <<if ndef $slavesToImportMax>><<set $slavesToImportMax = 5>><</if>>
@@ -70,7 +70,7 @@ Select up to $slavesToImportMax slaves to be imported into a new game and then c
 			<<if $slavesToImport >= $slavesToImportMax>>
 				//Current slave import capacity exceded.//
 			<</if>>
-			<<set $Flag = 1>> <<include "Slave Summary">>
+			<<set $SlaveSummaryFiler = "occupying">> <<include "Slave Summary">>
 		<</if>>
 	</div>
 </div>
@@ -81,7 +81,7 @@ Select up to $slavesToImportMax slaves to be imported into a new game and then c
 		<<else>>
 			<<if $slaves.length > $slavesToImport>>
 				''These slaves are available to be imported into the new game:''
-				<<set $Flag = 0>> <<include "Slave Summary">>
+				<<set $SlaveSummaryFiler = "assignable">> <<include "Slave Summary">>
 			<</if>>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/newSlaveIntro.tw b/src/uncategorized/newSlaveIntro.tw
index 48b09ffb105bc480f6739dbdb7ecdb9a76b1bc14..7b5f22f7ebecfc3241d4a14959bd89bed679ba41 100644
--- a/src/uncategorized/newSlaveIntro.tw
+++ b/src/uncategorized/newSlaveIntro.tw
@@ -10,6 +10,7 @@
 
 <<set $desc = SlaveTitle($activeSlave)>>
 <<run Enunciate($activeSlave)>>
+<<setPlayerPronouns>>
 
 <<if $specialSlave == 1>>
 	<<set $i = $heroSlaves.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
@@ -32,7 +33,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <<elseif canSmell($activeSlave) && $activeSlave.career == "a breeding bull" && isPlayerFertile($PC)>>
 	sniffing the air and staring intently at your crotch.
 <<elseif $activeSlave.origin == "She submitted to enslavement to escape the hard life of an old world whore.">>
-	wondering what one of your working girls can expect.
+	wondering what one of your working <<= $girl>>s can expect.
 <<elseif ($activeSlave.origin == "She submitted to enslavement to get access to modern prenatal care.") || ($activeSlave.origin == "She sold herself into slavery out of fear that life on the streets was endangering her pregnancy.")>>
 	hoping you'll give $him modern medicine right away.
 <<elseif $activeSlave.origin == "She submitted to enslavement as her only way to obtain surgery to transform her into a woman.">>
@@ -177,21 +178,15 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <<if ($activeSlave.devotion >= -20)>>
 	<<if ($activeSlave.actualAge > 35)>>
 		<<if ($PC.visualAge < 35)>>
-			<<if ($activeSlave.behavioralFlaw != "hates men") && ($PC.title == 1)>>
-				$He tries to conceal $his surprise at your age, and keeps glancing at $his own naked body and then back at you, obviously wondering at such a @@.hotpink;gorgeous young man's@@ interest in an old slave like $him.
-				<<set $activeSlave.devotion += 4>>
-			<<elseif ($activeSlave.behavioralFlaw != "hates women") && ($PC.title == 0)>>
-				$He tries to conceal $his surprise at your age, and keeps glancing at $his own naked body and then back at you, obviously wondering at such a @@.hotpink;gorgeous young girl's@@ interest in an old slave like $him.
+			<<if (($activeSlave.behavioralFlaw != "hates men") && ($PC.title == 1)) || (($activeSlave.behavioralFlaw != "hates women") && ($PC.title == 0))>>
+				$He tries to conceal $his surprise at your age, and keeps glancing at $his own naked body and then back at you, obviously wondering at such a @@.hotpink;gorgeous young _womanP's@@ interest in an old slave like $him.
 				<<set $activeSlave.devotion += 4>>
 			<</if>>
 		<</if>>
 	<<elseif ($activeSlave.actualAge < 25)>>
 		<<if ($PC.visualAge >= 50)>>
-			<<if ($activeSlave.behavioralFlaw != "hates men") && ($PC.title == 1)>>
-				$He keeps stealing glances at your face, probably wrestling with $his feelings about your age. Eventually $he seems to relax and accept it, with a certain @@.hotpink;obvious thrill@@ at $his own willingness towards an older man.
-				<<set $activeSlave.devotion += 4>>
-			<<elseif ($activeSlave.behavioralFlaw != "hates women") && ($PC.title == 0)>>
-				$He keeps stealing glances at your face, probably wrestling with $his feelings about your age. Eventually $he seems to relax and accept it, with a certain @@.hotpink;obvious thrill@@ at $his own willingness towards an older lady.
+			<<if (($activeSlave.behavioralFlaw != "hates men") && ($PC.title == 1)) || (($activeSlave.behavioralFlaw != "hates women") && ($PC.title == 0))>>
+				$He keeps stealing glances at your face, probably wrestling with $his feelings about your age. Eventually $he seems to relax and accept it, with a certain @@.hotpink;obvious thrill@@ at $his own willingness towards an older <<if $PC.title == 1>>man<<else>>lady<</if>>.
 				<<set $activeSlave.devotion += 4>>
 			<</if>>
 		<</if>>
@@ -433,22 +428,22 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 			<</if>>
 		<</if>>
 		<<if _understands < 1>>
-			$He has heard that you like little girls and is @@.mediumaquamarine;reassured@@ because $he misunderstands what this means.
+			$He has heard that you like little <<= $girl>>s and is @@.mediumaquamarine;reassured@@ because $he misunderstands what this means.
 			<<set $activeSlave.trust += 2>>
 		<<elseif ($activeSlave.sexualQuirk == "perverted")>>
-			$He has heard that you like little girls and @@.mediumaquamarine;hopes@@ that matching your taste means $he will be treated well.
+			$He has heard that you like little <<= $girl>>s and @@.mediumaquamarine;hopes@@ that matching your taste means $he will be treated well.
 			<<set $activeSlave.trust += 2>>
 		<<elseif ($activeSlave.sexualQuirk == "size queen") && $PC.dick == 1>>
-			$He has heard that you like little girls and @@.hotpink;bites $his lip@@ at the thought of how big your dick will be inside $him.
+			$He has heard that you like little <<= $girl>>s and @@.hotpink;bites $his lip@@ at the thought of how big your dick will be inside $him.
 			<<set $activeSlave.devotion += 2>>
 		<<elseif ($activeSlave.sexualFlaw == "repressed") || ($activeSlave.sexualFlaw == "shamefast") || ($activeSlave.behavioralFlaw == "devout")>>
-			$He has heard that you like little girls and is @@.gold;terrified@@ because $he understands exactly what that means.
+			$He has heard that you like little <<= $girl>>s and is @@.gold;terrified@@ because $he understands exactly what that means.
 			<<set $activeSlave.trust -= 5>>
 		<<elseif ($activeSlave.sexualFlaw == "hates oral") || ($activeSlave.sexualFlaw == "hates anal") || ($activeSlave.sexualFlaw == "hates penetration") || (isSexuallyPure($activeSlave) && (50 >= random(1, 100)))>>
-			$He has heard that you like little girls and @@.gold;fears@@ what you might do to $him.
+			$He has heard that you like little <<= $girl>>s and @@.gold;fears@@ what you might do to $him.
 			<<set $activeSlave.trust -= 4>>
 		<<else>>
-			$He has heard that you like little girls and @@.mediumaquamarine;hopes@@ that matching your taste means $he will be treated well.
+			$He has heard that you like little <<= $girl>>s and @@.mediumaquamarine;hopes@@ that matching your taste means $he will be treated well.
 			<<set $activeSlave.trust += 2>>
 		<</if>>
 		/% end is a child block %/
@@ -586,7 +581,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Brand $him to introduce $him to life as a slave whore">>
 		<<replace "#introResult">>
-			You tell $him you'll be marking $him as one of your working girls. $He looks resigned as $he follows you to the body modification studio, and lets you strap $him down with $his $brandTarget bare. $He understands what's coming. You've got $him positioned just right<<if canDoAnal($activeSlave)>>, so your cock slides up $his experienced asshole easily<</if>>. You bring the brand in close so $he can feel the radiated heat, which breaks through even $his jaded exterior and makes $him tighten with fear. When you're close, you apply the brand<<if canDoAnal($activeSlave)>>, making the poor whore cinch $his sphincter down hard in agony, bringing you to climax<</if>>. $He knows you know how to @@.gold;apply pain,@@ now, and $he @@.mediumorchid;learns to dislike you@@ even as $his @@.red;wound@@ heals.
+			You tell $him you'll be marking $him as one of your working <<= $girl>>s. $He looks resigned as $he follows you to the body modification studio, and lets you strap $him down with $his $brandTarget bare. $He understands what's coming. You've got $him positioned just right<<if canDoAnal($activeSlave)>>, so your cock slides up $his experienced asshole easily<</if>>. You bring the brand in close so $he can feel the radiated heat, which breaks through even $his jaded exterior and makes $him tighten with fear. When you're close, you apply the brand<<if canDoAnal($activeSlave)>>, making the poor whore cinch $his sphincter down hard in agony, bringing you to climax<</if>>. $He knows you know how to @@.gold;apply pain,@@ now, and $he @@.mediumorchid;learns to dislike you@@ even as $his @@.red;wound@@ heals.
 		<</replace>>
 		<<set $activeSlave.brand = $brandDesign>>
 		<<set $activeSlave.brandLocation = $brandTarget>>
@@ -842,7 +837,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Clean up $his whorish appearance">>
 		<<replace "#introResult">>
-			$He's totally unsurprised when you send $him to the salon for a makeover. It takes several days of work before $he's brought back in for another inspection; when $he arrives, you wordlessly point $him to a full length mirror. $He <<if canSee($activeSlave)>>sees $himself<<else>> <<if $activeSlave.amp != 1>>tenderly uses $his hands and finds $himself<<else>> stoically waits while you vividly describe $his new appearance. One<</if>> <</if>> without tattoos, a hooker's haircut and piercings, a conventionally pretty $girl with subtle implants and a clean appearance. $He gasps <<if $activeSlave.amp != 0>>and covers $his mouth with a hand <<else>> but quickly closes $his mouth<</if>>, and then suddenly bursts into tears. "Thank you, <<Master>>," $he sobs. "I never would have thought." <<if $activeSlave.amp != 1>> $He reaches out to touch $his reflection.<</if>> "I <<if canSee($activeSlave)>> look <<else>> would look<</if>> like a nice $girl." $He is @@.hotpink;grateful to you@@ for <<if canSee($activeSlave)>>showing $him<<else>> <<if $activeSlave.amp != 1>> letting $him feel <<else>> detailing <</if>> <</if>> this new side of $himself, and has @@.mediumaquamarine;begun to trust@@ that being your slave will be less degrading than being a free prostitute.
+			$He's totally unsurprised when you send $him to the salon for a makeover. It takes several days of work before $he's brought back in for another inspection; when $he arrives, you wordlessly point $him to a full length mirror. $He <<if canSee($activeSlave)>>sees $himself<<else>><<if $activeSlave.amp != 1>>tenderly uses $his hands and finds $himself<<else>>stoically waits while you vividly describe $his new appearance. One<</if>><</if>> without tattoos, a hooker's haircut and piercings, a conventionally pretty $girl with subtle implants and a clean appearance. $He gasps <<if $activeSlave.amp != 0>>and covers $his mouth with a hand<<else>>but quickly closes $his mouth<</if>>, and then suddenly bursts into tears. "Thank you, <<Master>>," $he sobs. "I never would have thought."<<if $activeSlave.amp != 1>>$He reaches out to touch $his reflection. <<else>>$He pauses for just a moment. <</if>>I <<if canSee($activeSlave)>>look<<else>>feel<</if>> like a nice $girl." $He is @@.hotpink;grateful to you@@ for <<if canSee($activeSlave)>>showing $him<<else>><<if $activeSlave.amp != 1>>letting $him feel<<else>>detailing<</if>><</if>> this new side of $himself, and has @@.mediumaquamarine;begun to trust@@ that being your slave will be less degrading than being a free prostitute.
 		<</replace>>
 		<<set $activeSlave.trust += 4>>
 		<<set $activeSlave.devotion += 4>>
@@ -1015,7 +1010,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<</link>>
 <</if>>
 
- | <<link "Brand $him">>
+| <<link "Brand $him">>
 	<<replace "#introResult">>
 		You drag $him to the body modification studio and strap $him down with $his $brandTarget clear and defenseless. $He doesn't understand what's coming for a while, even as disinfectant is applied to $his $brandTarget. $He can't see the approaching brand, <<if !canSee($activeSlave)>>of course, <</if>>but eventually $he feels the radiated heat on $his skin and manages to get one inarticulate, wordless noise of terror out before the dreadful sizzling noise and the sweet smell of burning flesh. If $he didn't know $he was a slave before, @@.mediumorchid;$he does now,@@ and $he's got the @@.gold;agonizing@@ @@.red;injury@@ to prove it.
 		<<if ($arcologies[0].FSSubjugationistRace == $activeSlave.race) && ($arcologies[0].FSSubjugationist > 0)>>
@@ -1166,7 +1161,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Clip $his Achilles tendons">>
 		<<replace "#introResult">>
-			You drag $him to the remote surgery and strap $him face-down with $his legs bare. $He doesn't understand what's coming for a while, even as $his lower legs are carefully cleaned and disinfected. $He can't see the approaching surgical manipulators, but eventually $he feels a tugging at $his lower legs even through the local anesthetic. $He gets one squeal of protest out before the surgery begins to apply healing agents. $He now requires special heels to walk, and will @@.mediumorchid;remember $his status@@ with every @@.red;painful@@ step $he takes. $He's barefoot, crawling, and @@.gold;frightened@@ for now, until you decide to give $him heels — if you ever do.
+			You drag $him to the remote surgery and strap $him face-down with $his legs bare. $He doesn't understand what's coming for a while, even as $his lower legs are carefully cleaned and disinfected. $He can't see the approaching surgical manipulators, <<if !canSee($activeSlave)>>of course, <</if>>but eventually $he feels a tugging at $his lower legs even through the local anesthetic. $He gets one squeal of protest out before the surgery begins to apply healing agents. $He now requires special heels to walk, and will @@.mediumorchid;remember $his status@@ with every @@.red;painful@@ step $he takes. $He's barefoot, crawling, and @@.gold;frightened@@ for now, until you decide to give $him heels — if you ever do.
 		<</replace>>
 		<<set $activeSlave.heels = 1>>
 		<<set $activeSlave.devotion -= 5>>
@@ -1175,7 +1170,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<</link>>
 <</if>>
 
-<<if $activeSlave.lactation !== 2 && $activeSlave.indentureRestrictions <= 0>>
+<<if $activeSlave.lactation != 2 && $activeSlave.indentureRestrictions <= 0>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Implant $him with slow release lactation drugs">>
 		<<replace "#introResult">>
@@ -1297,107 +1292,98 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <</if>>
 
 <<if $seePreg != 0>>
-<<if isFertile($activeSlave) && $activeSlave.womb.length == 0 && $PC.dick == 1 && $activeSlave.ballType == "human">>
-	| <<link "Impregnate $him">>
-	<<replace "#introResult">>
-		You perform a careful medical examination to verify fertility, and then <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>lay the obedient $desc across your desk<<else>>restrain the resistant $desc in your office with $his ass in the air<</if>> and gently slide your hard cock <<if $activeSlave.mpreg == 1>>up $his butt<<else>>inside $his womanhood<</if>>. You take $him with care, enjoying $his body <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>and doing your best to give $him pleasure, too<<else>>without hurting $him<</if>>. You empty your balls inside $him, thrusting in as far as you can go as you climax. When $he feels the hot liquid jet into $him,
-		<<if $activeSlave.devotion > 20>>
-			<<if $activeSlave.fetish == "pregnancy">>
-				<<if $activeSlave.fetishKnown == 0>>
-					$he gasps with unaccustomed pleasure, and climaxes so strongly that $he cries a little from the pain in $his flexing abs. @@.green;$He's an impregnation fetishist!@@
-					<<set $activeSlave.fetishKnown = 1>>
+	<<if isFertile($activeSlave) && $activeSlave.womb.length == 0 && $PC.dick == 1 && $activeSlave.ballType == "human">>
+		| <<link "Impregnate $him">>
+		<<replace "#introResult">>
+			You perform a careful medical examination to verify fertility, and then <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>lay the obedient $desc across your desk<<else>>restrain the resistant $desc in your office with $his ass in the air<</if>> and gently slide your hard cock <<if $activeSlave.mpreg == 1>>up $his butt<<else>>inside $his womanhood<</if>>. You take $him with care, enjoying $his body <<if ($activeSlave.devotion > 20) || ($activeSlave.trust < -20)>>and doing your best to give $him pleasure, too<<else>>without hurting $him<</if>>. You empty your balls inside $him, thrusting in as far as you can go as you climax. When $he feels the hot liquid jet into $him,
+			<<if $activeSlave.devotion > 20>>
+				<<if $activeSlave.fetish == "pregnancy">>
+					<<if $activeSlave.fetishKnown == 0>>
+						$he gasps with unaccustomed pleasure, and climaxes so strongly that $he cries a little from the pain in $his flexing abs. @@.green;$He's an impregnation fetishist!@@
+						<<set $activeSlave.fetishKnown = 1>>
+					<<else>>
+						$he climaxes, $his impregnation fetish displayed cutely on $his face.
+					<</if>>
+					As you let $him go, $he feels your cum dripping out of $him, and $he @@.hotpink;feels like your property.@@
+					<<set $activeSlave.devotion += 5>>
 				<<else>>
-					$he climaxes, $his impregnation fetish displayed cutely on $his face.
+					$he gasps and does $his best to relax, accepting the flow. <<if $activeSlave.fetishKnown == 0>>It seems $he<<else>>$He<</if>> isn't an impregnation fetishist, but $he is @@.hotpink;willing to submit@@ to have $his body used as your receptacle.
+					<<set $activeSlave.devotion += 4>>
 				<</if>>
-				As you let $him go, $he feels your cum dripping out of $him, and $he @@.hotpink;feels like your property.@@
-				<<set $activeSlave.devotion += 5>>
 			<<else>>
-				$he gasps and does $his best to relax, accepting the flow. <<if $activeSlave.fetishKnown == 0>>It seems $he<<else>>$He<</if>> isn't an impregnation fetishist, but $he is @@.hotpink;willing to submit@@ to have $his body used as your receptacle.
-				<<set $activeSlave.devotion += 4>>
-			<</if>>
-		<<else>>
-			<<if $activeSlave.fetish == "pregnancy">>
-				<<if $activeSlave.fetishKnown == 0>>
-					$he shudders with a sensation of perverted pleasure, and climaxes despite all $his feelings about the situation. @@.green;$He's an impregnation fetishist!@@
-					<<set $activeSlave.fetishKnown = 1>>
+				<<if $activeSlave.fetish == "pregnancy">>
+					<<if $activeSlave.fetishKnown == 0>>
+						$he shudders with a sensation of perverted pleasure, and climaxes despite all $his feelings about the situation. @@.green;$He's an impregnation fetishist!@@
+						<<set $activeSlave.fetishKnown = 1>>
+					<<else>>
+						$he climaxes, $his impregnation fetish forcing $him to feel pleasure $his mind would prefer to reject.
+					<</if>>
+					As you let $him go, $he cries openly, your cum dripping out of $him, and $he @@.hotpink;feels like your property.@@
+					<<set $activeSlave.devotion += 4>>
 				<<else>>
-					$he climaxes, $his impregnation fetish forcing $him to feel pleasure $his mind would prefer to reject.
+					$he groans and struggles a little, disgusted to be filled by your fluids so immediately. <<if $activeSlave.fetishKnown == 0>>It seems $he<<else>>$He<</if>> isn't an impregnation fetishist, and is @@.gold;afraid@@ that $he'll be treated as nothing more than your receptacle.
+					<<set $activeSlave.trust -= 4>>
 				<</if>>
-				As you let $him go, $he cries openly, your cum dripping out of $him, and $he @@.hotpink;feels like your property.@@
-				<<set $activeSlave.devotion += 4>>
+			<</if>>
+			<br><br>
+			Whenever you feel able, you drain your balls into $his <<if $activeSlave.mpreg == 1>>ass<<else>>cunt<</if>>, only releasing $him for other duties when scans verify a fertilized ovum.
+			<<if $activeSlave.intelligence+$activeSlave.intelligenceImplant < -50>>
+				$He didn't properly understand the scans, so $he just thought it was bound, forced sex; $he won't realize what happened for some weeks at least.
+			<<elseif $activeSlave.fetish == "pregnancy">>
+				$He is thrilled to imagine $he might be pregnant.
 			<<else>>
-				$he groans and struggles a little, disgusted to be filled by your fluids so immediately. <<if $activeSlave.fetishKnown == 0>>It seems $he<<else>>$He<</if>> isn't an impregnation fetishist, and is @@.gold;afraid@@ that $he'll be treated as nothing more than your receptacle.
-				<<set $activeSlave.trust -= 4>>
+				$He wasn't sure what this was all about, but $he has $his suspicions.
 			<</if>>
-		<</if>>
-		<br><br>
-		Whenever you feel able, you drain your balls into $his <<if $activeSlave.mpreg == 1>>ass<<else>>cunt<</if>>, only releasing $him for other duties when scans verify a fertilized ovum.
-		<<if $activeSlave.intelligence+$activeSlave.intelligenceImplant < -50>>
-			$He didn't properly understand the scans, so $he just thought it was bound, forced sex; $he won't realize what happened for some weeks at least.
-		<<elseif $activeSlave.fetish == "pregnancy">>
-			$He is thrilled to imagine $he might be pregnant.
-		<<else>>
-			$He wasn't sure what this was all about, but $he has $his suspicions.
-		<</if>>
 
 
-		<<if $activeSlave.mpreg == 1>>
-			<<= AnalVCheck()>>
-		<<else>>
-			<<= VaginalVCheck()>>
-		<</if>>
-		<<if $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1>>
-			The Societal Elite @@.green;disapprove@@ of this breach of eugenics.
-			<<set $failedElite += 5>>
-		<<elseif $arcologies[0].FSGenderFundamentalist != "unset" && $activeSlave.mpreg == 0>>
-			Society @@.green;approves@@ of your promptly putting a new slave in $him; this advances the idea that all slaves should bear their masters' babies.
-			<<= FSChange("GenderFundamentalist", 2)>>
-		<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
-			Society @@.red;is disgusted@@ by you promptly knocking up $his ass; babies come from women, not men.
-			<<= FSChange("GenderFundamentalist", -2)>>
-		<</if>>
-	<</replace>>
-	<<set $activeSlave.preg = 1>>
-	<<set $activeSlave.pregType = setPregType($activeSlave)>>
-	<<set $activeSlave.pregWeek = 1>>
-	<<set $activeSlave.pregKnown = 1>>
-	<<set $activeSlave.pregSource = -1>>
-	<<set WombImpregnate($activeSlave, $activeSlave.pregType, -1, 1)>>
-	<</link>>
-<</if>>
-<</if>>
-
-<<if ($activeSlave.devotion < -10) && ($activeSlave.vagina == 0)>>
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	<<link "Tie $him up and take $his virginity">>
-		<<replace "#introResult">>
-			<<if $activeSlave.amp == 1>>
-				You secure $his struggling, screeching body to the couch next to your desk with $his vagina exposed.
+			<<if $activeSlave.mpreg == 1>>
+				<<= AnalVCheck()>>
 			<<else>>
-				You cuff $his wrists and ankles and secure $his struggling, screeching body to the couch next to your desk with $his legs spread.
+				<<= VaginalVCheck()>>
+			<</if>>
+			<<if $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1>>
+				The Societal Elite @@.green;disapprove@@ of this breach of eugenics.
+				<<set $failedElite += 5>>
+			<<elseif $arcologies[0].FSGenderFundamentalist != "unset" && $activeSlave.mpreg == 0>>
+				Society @@.green;approves@@ of your promptly putting a new slave in $him; this advances the idea that all slaves should bear their masters' babies.
+				<<= FSChange("GenderFundamentalist", 2)>>
+			<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
+				Society @@.red;is disgusted@@ by you promptly knocking up $his ass; babies come from women, not men.
+				<<= FSChange("GenderFundamentalist", -2)>>
 			<</if>>
-			$He wriggles and protests as you take $his virginity. $He's certainly entered your service in a way that colors $his impression of you @@.mediumorchid;with hatred@@ and @@.gold;fear.@@ @@.lime;$His tight little pussy has been broken in.@@
 		<</replace>>
-		<<set $activeSlave.devotion -= 5>>
-		<<set $activeSlave.trust -= 10>>
-		<<set $activeSlave.vagina = 1>>
-		<<= VaginalVCheck()>>
-	<</link>>
-<<elseif ($activeSlave.vagina == 0)>>
+		<<set $activeSlave.preg = 1>>
+		<<set $activeSlave.pregType = setPregType($activeSlave)>>
+		<<set $activeSlave.pregWeek = 1>>
+		<<set $activeSlave.pregKnown = 1>>
+		<<set $activeSlave.pregSource = -1>>
+		<<set WombImpregnate($activeSlave, $activeSlave.pregType, -1, 1)>>
+		<</link>>
+	<</if>>
+<</if>>
+
+<<if ($activeSlave.vagina == 0)>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Tie $him up and take $his virginity">>
 		<<replace "#introResult">>
-			<<if $activeSlave.amp == 1>>
-				You secure $his unresisting body to the couch next to your desk with $his vagina exposed.
+			<<if ($activeSlave.devotion < -10)>>
+				<<if $activeSlave.amp == 1>>
+					You secure $his struggling, screeching body to the couch next to your desk with $his vagina exposed.
+				<<else>>
+					You cuff $his wrists and ankles and secure $his struggling, screeching body to the couch next to your desk with $his legs spread.
+				<</if>>
+				$He wriggles and protests as you take $his virginity. $He's certainly entered your service in a way that colors $his impression of you @@.mediumorchid;with hatred@@ and @@.gold;fear.@@ @@.lime;$His tight little pussy has been broken in.@@
+				<<set $activeSlave.devotion -= 5>>
 			<<else>>
-				You cuff $his wrists and ankles and secure $his unresisting body to the couch next to your desk with $his legs spread.
+				<<if $activeSlave.amp == 1>>
+					You secure $his unresisting body to the couch next to your desk with $his vagina exposed.
+				<<else>>
+					You cuff $his wrists and ankles and secure $his unresisting body to the couch next to your desk with $his legs spread.
+				<</if>>
+				$He writhes and moans as you enter $his virgin pussy. You might not have even had to restrain $him for this, but being tied up and deflowered sends $him a message. $He's certainly entered your service in a way that colors $his impression of you @@.hotpink;with pain@@ and @@.gold;fear.@@ @@.lime;$His tight little pussy has been broken in.@@
+				<<set $activeSlave.devotion += 5>>
 			<</if>>
-			$He writhes and moans as you enter $his virgin pussy. You might not have even had to restrain $him for this, but being tied up and deflowered sends $him a message. $He's certainly entered your service in a way that colors $his impression of you @@.hotpink;with pain@@ and @@.gold;fear.@@ @@.lime;$His tight little pussy has been broken in.@@
 		<</replace>>
-		<<set $activeSlave.devotion += 5>>
-		<<set $activeSlave.trust -= 10>>
-		<<set $activeSlave.vagina = 1>>
-		<<= VaginalVCheck()>>
 	<</link>>
 <</if>>
 
@@ -1543,7 +1529,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 				<<else>>
 					$His breast fixation makes this teasing quite pleasurable for $him, almost as good as a handjob. Before long, an orgasm convulses $his entire body, jiggling the feminine flesh under your hand delightfully.
 				<</if>>
-				When you tell $him to go, $he carefully rolls off your desk in such a way that, @@.hotpink;$his nipples graze your cheek.@@
+				When you tell $him to go, $he carefully rolls off your desk in such a way that @@.hotpink;$his nipples graze your cheek.@@
 				<<set $activeSlave.devotion += 5>>
 			<<else>>
 				$He accepts being treated as a desktop stress relief toy. $He's no breast fetishist, but $he's @@.hotpink;willing to be used@@ as a sex object.
@@ -1568,25 +1554,24 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 <</link>>
 
 <<if $PC.vagina == 1 && $activeSlave.dick > 0 && canAchieveErection($activeSlave)>>
-	<<setPlayerPronouns>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Dominate $his penis and demonstrate $his place">>
 		<<replace "#introResult">>
 			As you inspect $him, you take note of $his fully functional <<if $activeSlave.dick == 1>>tiny dick<<elseif $activeSlave.dick == 2>>cute dick<<elseif $activeSlave.dick == 3>>dick<<elseif $activeSlave.dick == 4>>big dick<<elseif $activeSlave.dick == 5>>impressive dick<<elseif $activeSlave.dick == 6>>huge dick<</if>>. You roughly push $him up against a wall and begin fondling $his penis, grinning at the look of panic growing on $his face.
-		<<if $activeSlave.dick == 1>>
-		You scoff at $him as $his micropenis barely fills your palm.
-		<<elseif $activeSlave.dick == 2>>
-		You laugh at $him as $his small penis fills your palm.
-		<<elseif $activeSlave.dick == 3>>
-		You nod at $him as $his penis fills your hand.
-		<<elseif $activeSlave.dick == 4>>
-		You smirk at $him as $his big penis fills your hand.
-		<<elseif $activeSlave.dick == 5>>
-		You smile widely at $him, a dangerous look in your eyes, as you bring another hand to $his impressive dick.
-		<<elseif $activeSlave.dick == 6>>
-		You grin sadistically at $him as $his massive dick fills both of your hands.
-		<</if>>
-		As $he begins to moan with lust, you grip down tightly and force $him to the floor. You straddle $him and lower your dripping pussy onto $his face<<if $PC.dick == 1>>, your erect cock coming to rest on $his forehead<</if>>. You continue stroking your toy's rod as $he eagerly begins eating you out. As $his cock begins to throb, anticipating $his upcoming orgasm, you quickly bind the base of $his penis, denying $his release. You grind your cunt into $his face, telling $him that YOU are the one who'll be orgasming here, not $him. Only once you have initiated the new slave by soaking $his face in your cum do you release $his dick and lean back to avoid the coming blast. A few strokes later and your hand is coated in $his cum. You turn around and order the exhausted $girl to clean $his cum off your hand<<if $PC.dick == 1>> and to finish off $his twitching dick<</if>>; $he @@.hotpink;complies meekly,@@ knowing you are the @@.gold;dominant force@@ in $his life now.
+			<<if $activeSlave.dick == 1>>
+				You scoff at $him as $his micropenis barely fills your palm.
+			<<elseif $activeSlave.dick == 2>>
+				You laugh at $him as $his small penis fills your palm.
+			<<elseif $activeSlave.dick == 3>>
+				You nod at $him as $his penis fills your hand.
+			<<elseif $activeSlave.dick == 4>>
+				You smirk at $him as $his big penis fills your hand.
+			<<elseif $activeSlave.dick == 5>>
+				You smile widely at $him, a dangerous look in your eyes, as you bring another hand to $his impressive dick.
+			<<elseif $activeSlave.dick == 6>>
+				You grin sadistically at $him as $his massive dick fills both of your hands.
+			<</if>>
+			As $he begins to moan with lust, you grip down tightly and force $him to the floor. You straddle $him and lower your dripping pussy onto $his face<<if $PC.dick == 1>>, your erect cock coming to rest on $his forehead<</if>>. You continue stroking your toy's rod as $he eagerly begins eating you out. As $his cock begins to throb, anticipating $his upcoming orgasm, you quickly bind the base of $his penis, denying $his release. You grind your cunt into $his face, telling $him that YOU are the one who'll be orgasming here, not $him. Only once you have initiated the new slave by soaking $his face in your cum do you release $his dick and lean back to avoid the coming blast. A few strokes later and your hand is coated in $his cum. You turn around and order the exhausted $girl to clean $his cum off your hand<<if $PC.dick == 1>> and to finish off $his twitching dick<</if>>; $he @@.hotpink;complies meekly,@@ knowing you are the @@.gold;dominant force@@ in $his life now.
 		<</replace>>
 		<<set $activeSlave.devotion += 5>>
 		<<set $activeSlave.trust -= 3>>
@@ -1599,7 +1584,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 		<<replace "#introResult">>
 			You aggressively approach $activeSlave.slaveName, forcing your pregnancy directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to be pushed to the ground. Standing over $him, staring $him down as $he peeks around your firm globe of a middle, you order $him to worship your pregnancy.
 			<<if $activeSlave.fetish == "pregnancy">>
-				$He complies eagerly. $He begins with sucking your popped navel before running $his tongue across the taut, smooth surface of your pregnancy. Once $he has finished with your belly, $he lowers $himself under it to begin work on your needy pussy. Before long, $his overzealous efforts have you quaking in pleasure, rousing your child. Once $he finishes you off, $he returns to rubbing your belly, soothing your rowdy child and @@.hotpink;solidifying $his place@@ beneath you.
+				$He complies eagerly. $He begins with sucking your popped navel before running $his tongue across the taut, smooth surface of your pregnancy. Once $he has finished with your belly, $he lowers $himself under it to begin work on your needy pussy. Before long, $his overzealous efforts have you quaking in pleasure, rousing your child<<if $PC.pregType > 1>>ren<</if>>. Once $he finishes you off, $he returns to rubbing your belly, soothing your rowdy child<<if $PC.pregType > 1>>ren<</if>> and @@.hotpink;solidifying $his place@@ beneath you.
 				<<set $activeSlave.devotion += 15>>
 			<<else>>
 				$He shifts $his gaze between your middle and your face, not sure what to do. Losing patience, you toss a tube of cream at $him. $He shakily massages it onto your stretched skin, missing spots, much to your pleasure. With reason, you force $him onto $his back, turn around, and plant your needy cunt directly onto $his face. Struggling to breath under your weight, $he begins eating you out in desperation. After coaxing $him to massage your belly as $he does, you quickly climax across $his face and gently lift yourself off the coughing $girl. $He now @@.hotpink;understands $his place in life@@ and is @@.gold;terrified@@ about what $he will have to do if $he wants to survive.
@@ -1615,10 +1600,10 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 			<<replace "#introResult">>
 				You aggressively approach $activeSlave.slaveName, forcing your pregnancy directly into $his <<if $activeSlave.height > 175>>stomach<<elseif $activeSlave.height < 155>>face<<else>>chest<</if>> until $he has no choice but to be pushed to the ground. You quickly straddle $his face, forcing your oozing cunt over $his mouth as you eagerly stroke $his cock to full length.
 				<<if $activeSlave.fetish == "pregnancy">>
-					$He groans with disappointment as your pregnant pussy leaves $his reach, though $his displeasure is short lived as you greedily take $his entire dick into your aching snatch. You ride $him mercilessly, frequently smacking $him with your heavy belly. $He loves every minute of it, especially when $he feels your body tense up as $he lets loose $his load deep into you. Where most slaves would be begging for mercy, $he @@.hotpink;eagerly complies@@ as you adjust yourself and begin round two. You don't know what came over you, but when you wake up, you find $he's resting peacefully under your gravid mass. <<if $activeSlave.fetishKnown == 0>>It seems $he likes @@.green;being a pregnant _womanP's plaything.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a pregnancy fetish and the look on $his face confirms it.<</if>> A kick from within startles you from your thoughts; it would appear your child agrees that you'll have to have another ride sometime.
+					$He groans with disappointment as your pregnant pussy leaves $his reach, though $his displeasure is short lived as you greedily take $his entire dick into your aching snatch. You ride $him mercilessly, frequently smacking $him with your heavy belly. $He loves every minute of it, especially when $he feels your body tense up as $he lets loose $his load deep into you. Where most slaves would be begging for mercy, $he @@.hotpink;eagerly complies@@ as you adjust yourself and begin round two. You don't know what came over you, but when you wake up, you find $he's resting peacefully under your gravid mass. <<if $activeSlave.fetishKnown == 0>>It seems $he likes @@.green;being a pregnant _womanP's plaything.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a pregnancy fetish and the look on $his face confirms it.<</if>> A kick from within startles you from your thoughts; it would appear your child<<if $PC.pregType > 1>>ren<</if>> agree<<if $PC.pregType == 1>>s<</if>> that you'll have to have another ride sometime.
 					<<set $activeSlave.devotion += 15>>
 				<<else>>
-					$He coughs as your pregnant pussy vacates $his face, though $his relief is short lived as you greedily slam yourself down onto $his waiting dick. You ride $him mercilessly, frequently smacking $him with your heavy belly. $He hates every minute of it, choosing to alternate between begging you to stop and just openly weeping. You cum hard as you watch the look on $his face as $he unwillingly cums deep inside you. $He cries out in protest as you continue raping $him, but you don't care. All that matters is your satisfaction. You are eventually awoken by desperate struggle to escape from beneath your gravid mass; $he quickly regrets $his choices as you remount $him for one last go. $He now @@.hotpink;better understands $his place as a toy@@ and is @@.gold;terrified@@ of your insatiable lust.
+					$He coughs as your pregnant pussy vacates $his face, though $his relief is short lived as you greedily slam yourself down onto $his waiting dick. You ride $him mercilessly, frequently smacking $him with your heavy belly. $He hates every minute of it, choosing to alternate between begging you to stop and just openly weeping. You cum hard as you watch the look on $his face as $he unwillingly cums deep inside you. $He cries out in protest as you continue raping $him, but you don't care. All that matters is your satisfaction. This continues until you pass out from orgasmic exhaustion with $him still inside you. You are eventually awoken by $his desperate struggle to escape from beneath your gravid mass; $he quickly regrets $his choices as you remount $him for one last go. $He now @@.hotpink;better understands $his place as a toy@@ and is @@.gold;terrified@@ of your insatiable lust.
 					<<set $activeSlave.devotion += 5, $activeSlave.trust -= 15>>
 				<</if>>
 				<<set $activeSlave.counter.penetrative += 5, $penetrativeTotal += 5>>
@@ -1649,10 +1634,10 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 				<</if>>
 				$He tries to squirm away from the moist spot growing under $his cheek, but you reveal your nipple and carefully direct $his mouth over it.
 				<<if $activeSlave.fetish == "pregnancy">>
-					Slowly $he begins to suckle from your swollen breast. You gently brush $his head as you try to hold back your pleasure, a wasted effort as a hand sneaks its way to your <<if $PC.dick == 1>>growing erection and enthusiastically begins pumping away. You clutch your pervy $girl closer to you as $he caresses your pregnancy with one hand and gets you off with the other<<else>>wet pussy and enthusiastically begins rubbing your clit. You clutch your pervy $girl closer to you as $he caresses your pregnancy with one hand and gets you off with the other<</if>>. Before long you find yourself bucking your hips with lust, a queue for you to release $him from your nipple so $he may slide down your gravid dome of a belly to finish you off. Happy to serve $his pregnant <<= WrittenMaster($activeSlave)>>, $he returns to your chest, happy to relieve you of the pressure building in your neglected breast. <<if $activeSlave.fetishKnown == 0>>Judging by that show, @@.green;$he savors getting to be with a pregnant _womanP.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a pregnancy fetish and $his eagerness to serve a pregnant _womanP proves that.<</if>> A kick from within startles you from your thoughts; as you reach to soothe your child, you find your new slave @@.mediumaquamarine;already doting on it.@@ $He's already starting to @@.hotpink;show understanding of $his place.@@
+					Slowly $he begins to suckle from your swollen breast. You gently brush $his head as you try to hold back your pleasure, a wasted effort as a hand sneaks its way to your <<if $PC.dick == 1>>growing erection and enthusiastically begins pumping away. You clutch your pervy $girl closer to you as $he caresses your pregnancy with one hand and gets you off with the other<<else>>wet pussy and enthusiastically begins rubbing your clit. You clutch your pervy $girl closer to you as $he caresses your pregnancy with one hand and gets you off with the other<</if>>. Before long you find yourself bucking your hips with lust, a queue for you to release $him from your nipple so $he may slide down your gravid dome of a belly to finish you off. Happy to serve $his pregnant <<= WrittenMaster($activeSlave)>>, $he returns to your chest, happy to relieve you of the pressure building in your neglected breast. <<if $activeSlave.fetishKnown == 0>>Judging by that show, @@.green;$he savors getting to be with a pregnant _womanP.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a pregnancy fetish and $his eagerness to serve a pregnant _womanP proves that.<</if>> A kick from within startles you from your thoughts; as you reach to soothe your child<<if $PC.pregType > 1>>ren<</if>>, you find your new slave @@.mediumaquamarine;already doting on them.@@ $He's already starting to @@.hotpink;show understanding of $his place.@@
 					<<set $activeSlave.devotion += 15, $activeSlave.trust += 15>>
 				<<elseif $activeSlave.fetish == "boobs">>
-					Eagerly $he begins to suckle from your swollen breast. You gently brush $his head as you try to hold back your pleasure, a wasted effort as a hand sneaks its way to your neglected breast. $He massages it, careful not to encourage your lactation too much, as $he greedily sucks you dry. $He wastes no time in swapping to your other nipple, shifting $his ministrations to the one the just left. By the time your reserves are tapped out, both you and $he are quite content. You permit $him to rest against your chest for a little before you send $him on $his way. <<if $activeSlave.fetishKnown == 0>>Judging by $his enthusiasm, @@.green;$he savors getting $his mouth close to a pair of boobs.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a breast fetishist and $his eagerness to lighten a lactating _womanP proves that.<</if>> A kick from within startles you from your thoughts; you pat your gravid middle, reassuring your child that you'll make sure to save some milk for them. $He's already starting to @@.hotpink;show understanding of $his place@@ and even @@.mediumaquamarine;beginning to build trust@@ with you.
+					Eagerly $he begins to suckle from your swollen breast. You gently brush $his head as you try to hold back your pleasure, a wasted effort as a hand sneaks its way to your neglected breast. $He massages it, careful not to encourage your lactation too much, as $he greedily sucks you dry. $He wastes no time in swapping to your other nipple, shifting $his ministrations to the one the just left. By the time your reserves are tapped out, both you and $he are quite content. You permit $him to rest against your chest for a little before you send $him on $his way. <<if $activeSlave.fetishKnown == 0>>Judging by $his enthusiasm, @@.green;$he savors getting $his mouth close to a pair of boobs.@@<<set $activeSlave.fetishKnown = 1>><<else>>You knew $he had a breast fetishist and $his eagerness to lighten a lactating _womanP proves that.<</if>> A kick from within startles you from your thoughts; you pat your gravid middle, reassuring your child<<if $PC.pregType > 1>>ren<</if>> that you'll make sure to save some milk for them. $He's already starting to @@.hotpink;show understanding of $his place@@ and even @@.mediumaquamarine;beginning to build trust@@ with you.
 					<<set $activeSlave.devotion += 15, $activeSlave.trust += 15>>
 				<<else>>
 					Reluctantly $he begins to suckle from your swollen breast. You gently brush $his head as you try to hold back your pleasure, but it is too much. As $he drinks deeper, you begin moaning with relief. At first $he tenses at <<if canHear($activeSlave)>>the sound<<else>>your body's shuddering<</if>>, fearing punishment, but soon realizes you have no intent on @@.mediumaquamarine;harming $him.@@ $He allows you to dote over $him as if $he were your child, carefully moving to your other breast once the first runs dry. As $he drinks, $he begins to massage your taut middle, $his touch soft and gentle. When you both finish, you push $him to $his feet and send $him on $his way. @@.hotpink;$He stays and offers a hand to help you to your feet.@@ You are surprised by this display; it might be obedience, but $he also may view you in your gravid state as someone weak. As $he helps you back to your desk, $he shoulders all of your weight. It would appear $he is putting you first, for now.
@@ -1681,7 +1666,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<</link>>
 <</if>>
 
-<<if ($activeSlave.accent >= 3) && ($activeSlave.anus < 2) && ($activeSlave.intelligence+$activeSlave.intelligenceImplant <= 50) && ($activeSlave.devotion < 10) && ($activeSlave.amp != 1)>>
+<<if ($activeSlave.accent >= 3) && ($activeSlave.anus < 2) && ($activeSlave.intelligence+$activeSlave.intelligenceImplant <= 50) && ($activeSlave.devotion < 10) && ($activeSlave.amp != 1) && (canSee($activeSlave))>>
 	<br>&nbsp;&nbsp;&nbsp;&nbsp;
 	<<link "Force understanding of $his situation past the language barrier">>
 		<<replace "#introResult">>
@@ -1708,7 +1693,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 			<<else>>
 				takes a bite. $He gasps in surprise at the taste before greedily shoving the entire thing into $his mouth and reaching for another.
 			<</if>>
-			In minutes, $he's managed to devour every last cookie on the plate. Before $he can even pout that they're all gone, you place another pair of plates under $his nose. $He promptly rushes for them,
+			In minutes, $he's managed to devour every last cookie on the plate. Before $he can even pout that they're all gone, you place another pair of plates <<if canSmell($activeSlave)>>under $his nose<<else>>in front of $him<</if>>. $He promptly rushes for them,
 			<<if $activeSlave.behavioralFlaw == "gluttonous">>
 				paying no mind to $his bloated belly bumping into your desk, and resumes stuffing $himself.
 			<<elseif $activeSlave.behavioralFlaw == "anorexic">>
@@ -1853,7 +1838,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 			<<set $analTotal += 1>>
 		<</if>>
 		with no room to spare.
-		Your choices attach to long tubes, and with a fiendish smile you turn a valve. The lines run white with a mixture of fluids from your slaves, and your slave begins to fill.
+		Your choices attach to long tubes, and with a fiendish smile you turn a valve. The lines run white with a mixture of fluids from your other slaves, and your newest slave begins to fill.
 		<<if $activeSlave.devotion > 20>>
 			<<if $activeSlave.fetish == "cumslut">>
 				<<if $activeSlave.fetishKnown == 0>>
@@ -1950,7 +1935,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 				<<set $activeSlave.counter.anal += 10, $analTotal += 10>>
 				<<= assignJob($activeSlave, "dairy")>>
 				<<replace "#introResult">>
-					Making use of <<if ($activeSlave.trust < -20) || ($activeSlave.devotion > 20)>>$his obedience<<else>>the compliance systems<</if>>, you restrain $him on one of the chairs in your office in an approximation of the position $he'll occupy in $dairyName. Then you put a mask on $him, like the ones the machines there feature, and turn it on, watching the slave squirm against $his restraints under the sudden bombardment of garish hardcore porn. Finally, you add a dildo gag, both to mimic the dildo that will feed $him, and to keep your office reasonably quiet. Then, for the rest of the day, you use $his vulnerable <<if $activeSlave.vagina > -1>>holes<<else>>asshole<</if>> as an outlet for your sexual energy. You are not gentle; in fact, the point of the whole exercise is to gape $him. By the evening $he's been fucked so hard that $he's stopped jerking against the chair when you pound <<if $PC.dick == 1>>your huge cock<<else>>a huge strap-on<</if>> in and out of $him, so you're obliged to get creative, sliding fingers in alongside <<if $PC.dick == 1>>yourself<<else>>it<</if>> to really blow $him out. Once that gets too easy, you start adding dildos for double penetration. By the night $he's properly prepared to take $dairyName's giant phalli, and you're bored, so you consign $him to $his fate. $He might have some opinion on how $he's spent $his day, but it's unlikely $he'll remember it by tomorrow, what with the forearm-sized dildos sliding in and out of $his<<if $activeSlave.vagina > -1>> cunt,<</if>> throat, and asshole.
+					Making use of <<if ($activeSlave.trust < -20) || ($activeSlave.devotion > 20)>>$his obedience<<else>>the compliance systems<</if>>, you restrain $him on one of the chairs in your office in an approximation of the position $he'll occupy in $dairyName. Then you put a mask on $him, like the ones the machines there feature, and turn it on, watching the slave squirm against $his restraints under the sudden bombardment of garish hardcore porn. Finally, you add a dildo gag, both to mimic the dildo that will feed $him, and to keep your office reasonably quiet. Then, for the rest of the day, you use $his vulnerable <<if $activeSlave.vagina > -1>>holes<<else>>asshole<</if>> as an outlet for your sexual energy. You are not gentle; in fact, the point of the whole exercise is to gape $him. By the evening $he's been fucked so hard that $he's stopped jerking against the chair when you pound <<if $PC.dick == 1>>your huge cock<<else>>a huge strap-on<</if>> in and out of $him, so you're obliged to get creative, sliding fingers in alongside <<if $PC.dick == 1>>yourself<<else>>it<</if>> to really blow $him out. Once that gets too easy, you start adding dildos for double penetration. By the night $he's properly prepared to take $dairyName's giant phalli, and you're bored, so you consign $him to $his fate. $He might have some opinion on how $he's spent $his day, but it's unlikely $he'll remember it by tomorrow, what with the forearm-sized dildos sliding in and out of $his throat<<if $activeSlave.vagina > -1>>, cunt,<</if>> and asshole.
 				<</replace>>
 			<</link>>
 		<</if>>
@@ -1968,15 +1953,15 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 			<<if $activeSlave.devotion > 20>>
 				<<if $activeSlave.fetish == "cumslut">>
 					<<if $activeSlave.fetishKnown == 0>>
-						Stunningly, once $he gets over the impact of the wave of fresh semen, $he seems genuinely eager to hold as much of the fluid as $he can, stretching contentedly till $his reasonable limit. @@.green;$He's a cum fetishist!@@
+						Stunningly, once $he gets over the impact of the wave of fresh semen, $he seems genuinely eager to hold as much of the fluid as $he can, stretching contentedly to $his reasonable limit. @@.green;$He's a cum fetishist!@@
 						<<set $activeSlave.fetishKnown = 1>>
 					<<else>>
-						$His belly steadily swells from a few months of apparent pregnancy, to "spent too much time at the buffet", till it finally stops wobbling, grows taut and forces $his belly button into an outie. Your cow groans not only with the weight and mounting pressure, but with guilt as well. Before long, $he reaches a quivering orgasm.
+						$His belly steadily swells from a few months of apparent pregnancy, to "spent too much time at the buffet", until it finally stops wobbling, grows taut and forces $his belly button into an outie. Your cow groans not only with the weight and mounting pressure, but with guilt as well. Before long, $he reaches a quivering orgasm.
 					<</if>>
 					You stroke $his gurgling stomach slowly, before turning off the valve, unfastening $his binds and leaving your @@.hotpink;very pleased@@ cum balloon to savor $his meal. You'll make sure to set aside enough cum from your cumslaves for $him to drink $himself stupid with, and, glancing over your shoulder, find $him eagerly masturbating to $his cum filled gut. $He'll probably intend to keep $himself filled to the brim, which is fine by you.
 					<<set $activeSlave.devotion += 5>>
 				<<else>>
-					<<if $activeSlave.eyes == -2>>$His face swells<<else>>$His eyes swell<</if>> with horror, but $he does not flinch or make a sound. $His belly also swells, from a few months of apparent pregnancy, to "spent too much time at the buffet", till it finally stops wobbling, grows taut and forces $his belly button into an outie. Satisfied, you shut off the valve, deciding to leave $him to consider $his cum filled middle. Time passes. $His<<if $activeSlave.eyes == -2>> blind face is distant<<else>> eyes are glazed over<</if>> but $he tolerates you slowly stroking $his stomach @@.hotpink;without apparent resentment.@@ You'll make sure to keep $him like this for the time being.
+					<<if $activeSlave.eyes == -2>>$His face swells<<else>>$His eyes swell<</if>> with horror, but $he does not flinch or make a sound. $His belly also swells, from a few months of apparent pregnancy, to "spent too much time at the buffet", till it finally stops wobbling, grows taut and forces $his belly button into an outie. Satisfied, you shut off the valve, deciding to leave $him to consider $his cum filled middle. Time passes. $His<<if $activeSlave.eyes == -2>> blind face is distant<<else>> eyes are glazed over<</if>>, but $he tolerates you slowly stroking $his stomach @@.hotpink;without apparent resentment.@@ You'll make sure to keep $him like this for the time being.
 					<<set $activeSlave.devotion += 4>>
 				<</if>>
 			<<else>>
@@ -1990,7 +1975,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 					Time passes, marked only by the slowing growth of $his waistline and the gurgling deep within $him. However, $he @@.hotpink;submits@@ to an uncomfortable groping of $his fluid distended stomach, which is pleasingly taut from $his massive cum meal. You decide to make it abundantly clear that if a single drop of cum leaves $his gullet, $he's getting the hose again, impressing on $him still more that $his fate is out of $his control.
 					<<set $activeSlave.devotion += 4>>
 				<<else>>
-					$He gasps in horror, and starts to struggle frantically against $his bonds, <<if $activeSlave.voice != 0>>struggling to scream in panic.<<else>>$his whole body begging to scream.<</if>> However, as the fluid reaches $him $he seems to despair and resigns $himself to $his fate. As $his belly swells, you find yourself comparing $him first to a binge eater, then some of the chubbier citizens you've seen, a large pregnancy, and finally a water balloon ready to burst. You stop the flow, and rest a hand on $his heaving stomach. $His @@.gold;terrified@@ breathing and distant expression are clearly due to the pain, not lust, but it's also now quite clear to $him who is in charge here. You have little intent on letting $his stomach empty and will be setting aside enough cum to keep $him bloated into submission.
+					$He gasps in horror, and starts to struggle frantically against $his bonds, <<if $activeSlave.voice != 0>>struggling to scream in panic.<<else>>$his whole body begging to scream.<</if>> However, as the fluid reaches $him, $he seems to despair and resigns $himself to $his fate. As $his belly swells, you find yourself comparing $him first to a binge eater, then some of the chubbier citizens you've seen, a large pregnancy, and finally a water balloon ready to burst. You stop the flow, and rest a hand on $his heaving stomach. $His @@.gold;terrified@@ breathing and distant expression are clearly due to the pain, not lust, but it's also now quite clear to $him who is in charge here. You have little intent on letting $his stomach empty and will be setting aside enough cum to keep $him bloated into submission.
 					<<set $activeSlave.trust -= 4>>
 				<</if>>
 			<</if>>
@@ -1999,6 +1984,25 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 		<</replace>>
 	<</link>>
 	<</if>>
+	<<if (($milkPipeline > 88 && $milkPipeline != 0) || $arcologies[0].FSPastoralistLaw == 1) && $activeSlave.preg < 1 && $activeSlave.inflation == 0 && $activeSlave.bellyImplant <= 0>>
+	<br>&nbsp;&nbsp;&nbsp;&nbsp;
+	<<link "Give $him all the milk $he can drink">>
+		<<replace "#introResult">>
+			You securely restrain your new slave; for both $his own safety and so $he can't object to $his meal. You reassure $him and order $him to close $his eyes and open wide for a treat.<<if $activeSlave.eyes == -2>> Blind as $he is,<<else>> Since $his eyes are contentedly closed,<</if>> $he doesn't see you reach for one of the phallus-tipped feeding tubes located throughout your penthouse. Before $he knows what's happening, you've forced the cocktube firmly into $his gaping maw and anchored it to $his head, causing $his entire body to tense up <<if $activeSlave.devotion <= 20>>in panic <</if>>once more.
+			<br><br>
+			You pause to examine the tap, making sure it is set to milk, before releasing the valve and unleashing a steady flow. The feeder bucks against $his face as creamy, white liquid rushes downward towards the helpless slave.
+			<<if $activeSlave.behavioralFlaw == "gluttonous">>
+				<<if $activeSlave.eyes == -2>>$His face swells<<else>>$His eyes swell<</if>> with horror, but $he does not flinch or make a sound. $His belly also swells, from a few months of apparent pregnancy, to "spent too much time at the buffet", till it finally stops wobbling, grows taut and forces $his belly button into an outie. Satisfied, you shut off the valve, deciding to leave $him to consider $his milk filled middle. Time passes. $His<<if $activeSlave.eyes == -2>> blind face is distant<<else>> eyes are glazed over<</if>>, but $he tolerates you slowly stroking $his stomach @@.hotpink;without apparent resentment.@@ You'll make sure to keep $him like this for the time being.
+				<<set $activeSlave.devotion += 5>>
+			<<else>>
+				$He gasps in horror, and starts to struggle frantically against $his bonds, <<if $activeSlave.voice != 0>>struggling to scream in panic.<<else>>$his whole body begging to scream.<</if>> However, as the fluid reaches $him, $he seems to despair and resigns $himself to $his fate. As $his belly swells, you find yourself comparing $him first to a binge eater, then some of the chubbier citizens you've seen, a large pregnancy, and finally a water balloon ready to burst. You stop the flow, and rest a hand on $his heaving stomach. $His @@.gold;terrified@@ breathing and distant expression are clearly due to the pain, not lust, but it's also now quite clear to $him who is in charge here. You have little intent on letting $his stomach empty and will be setting aside enough milk to keep $him bloated into submission.
+				<<set $activeSlave.trust -= 3>>
+			<</if>>
+			<<set $activeSlave.inflation = 3, $activeSlave.inflationType = "milk", $activeSlave.inflationMethod = 1>>
+			<<run SetBellySize($activeSlave)>>
+		<</replace>>
+	<</link>>
+	<</if>>
 <</if>>
 
 <<if ($arcade > 0) && ($seeExtreme == 1)>>
@@ -2007,7 +2011,7 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 	<<link "Threaten $him with the Arcade">>
 		<<setNonlocalPronouns $seeDicks>>
 		<<replace "#introResult">>
-			You tell $him that it's in $his interests to be a good $girl. $He does not react immediately, perhaps wondering if you think such a trite statement will have a real impact, but then you point at a wallscreen behind $him. $He turns, and beholds a live feed from $arcadeName. $He gazes at the row of butts sticking out of the wall at dick height, not quite realizing what $he's seeing. Then $he notices that there are citizens pumping away in front of two of the butts, and $he understands. As $he watches, terrified, first one citizen and then the other finishes and steps away. The first arcade inmate's <<if $seeDicks != 100>>pussy<<else>>butt<</if>> is left looking sore until $arcadeName's systems cover _himU for a quick cleaning, and the second inmate's asshole <<if $seeDicks != 0>>has obviously seen severe use, since the poor _girlU doesn't have a pussy to spread the load<<else>>is loose enough that the machines have to clean up the cum it drools onto the floor<</if>>. $activeSlave.slaveName lets out a huge sob and turns to you, @@.gold;fear suffusing $him@@ as $he promises to @@.hotpink;be a good $girl.@@
+			You tell $him that it's in $his best interests to be a good $girl. $He does not react immediately, perhaps wondering if you think such a trite statement will have a real impact, but then you point at a wallscreen behind $him. $He turns, and beholds a live feed from $arcadeName. $He gazes at the row of butts sticking out of the wall at dick height, not quite realizing what $he's seeing. Then $he notices that there are citizens pumping away in front of two of the butts, and $he understands. As $he watches, terrified, first one citizen and then the other finishes and steps away. The first arcade inmate's <<if $seeDicks != 100>>pussy<<else>>butt<</if>> is left looking sore until $arcadeName's systems cover _himU for a quick cleaning, and the second inmate's asshole <<if $seeDicks != 0>>has obviously seen severe use, since the poor _girlU doesn't have a pussy to spread the load<<else>>is loose enough that the machines have to clean up the cum it drools onto the floor<</if>>. $activeSlave.slaveName lets out a huge sob and turns to you, @@.gold;fear suffusing $him@@ as $he promises to @@.hotpink;be a good $girl.@@
 		<</replace>>
 		<<set $activeSlave.devotion += 10>>
 		<<set $activeSlave.trust -= 10>>
@@ -2030,5 +2034,5 @@ The legalities completed, ''__@@.pink;<<= SlaveFullName($activeSlave)>>@@__'' <<
 
 <</if>>
 
-<<= IncreasePCSkills('trading',  0.1)>>
+<<= IncreasePCSkills('trading', 0.1)>>
 <<if $PC.slaving < 100 && random($PC.slaving,100) > 50>> <<= IncreasePCSkills('slaving', 0.5)>> <<else>> <<= IncreasePCSkills('slaving', 0.1)>> <</if>>
diff --git a/src/uncategorized/nextWeek.tw b/src/uncategorized/nextWeek.tw
index 7de3d2e89ad0bb082f22638c26357f4efd3f2a7a..d0883332485a18eb327b1e9a417bca75072a0c77 100644
--- a/src/uncategorized/nextWeek.tw
+++ b/src/uncategorized/nextWeek.tw
@@ -109,12 +109,12 @@
 		<<run delete $slaves[_i].curBabies>>
 	<</if>>
 	<<if $seeAge != 0>>
-	<<set $slaves[_i].birthWeek++>>
+		<<set $slaves[_i].birthWeek++>>
 		<<if $slaves[_i].birthWeek >= 52>>
 			<<set $slaves[_i].birthWeek = 0>>
 			<<if $seeAge == 1>>
 				<<set $slaves[_i].physicalAge += 1, $slaves[_i].actualAge += 1>>
-				/* Note Induced NCS completely takes over visual aging, so the increment from pre-existing code simply is trapped behind a !NCS test. Additionally, because of the neotony aspects of NCS, ovaries don't age quite as fast. */
+				/* Note Induced NCS completely takes over visual aging, so the increment from pre-existing code simply is trapped behind a !NCS test. Additionally, because of the neoteny aspects of NCS, ovaries don't age quite as fast. */
 				<<if $slaves[_i].geneMods.NCS == 0>>
 					<<set $slaves[_i].visualAge += 1>>
 					/* (prev comment) Hopefully this works. It is intended, over a slave's lifetime, to cause her menopause to shift. */
@@ -173,11 +173,20 @@
 	<<elseif $slaves[_i].rivalry < 0>>
 		<<set $slaves[_i].rivalryTarget = 0, $slaves[_i].rivalry = 0>>
 	<</if>>
-	<<if $slaves[_i].vagina < 0 && ($slaves[_i].vaginalAccessory != "none" || $slaves[_i].chastityVagina != 0)>>
-		<<set $slaves[_i].vaginalAccessory = "none", $slaves[_i].chastityVagina = 0>>
+	<<if $slaves[_i].vagina < 0>>
+		<<set $slaves[_i].vaginalAccessory = "none", $slaves[_i].chastityVagina = 0, $slaves[_i].vaginaPiercing = 0, $slaves[_i].clit = 0, $slaves[_i].clitPiercing = 0>>
 	<</if>>
-	<<if $slaves[_i].dick == 0 && ($slaves[_i].dickAccessory != "none" || $slaves[_i].chastityPenis != 0)>>
-		<<set $slaves[_i].dickAccessory = "none", $slaves[_i].chastityPenis = 0>>
+	<<if $slaves[_i].dick == 0>>
+		<<set $slaves[_i].dickAccessory = "none", $slaves[_i].chastityPenis = 0, $slaves[_i].dickTat = 0, $slaves[_i].dickPiercing = 0>>
+	<</if>>
+	<<if $slaves[_i].amp == 1>>
+		<<set $activeSlave.missingArms = 3, $activeSlave.missingLegs = 3>>
+	<</if>>
+	<<if $slaves[_i].missingArms == 3>>
+		<<set $slaves[_i].armsTat = 0, $slaves[_i].nails = 0>>
+	<</if>>
+	<<if $slaves[_i].missingLegs == 3>>
+		<<set $slaves[_i].heels = 0, $slaves[_i].shoes = "none", $slaves[_i].legsAccessory = "none", $slaves[_i].legsTat = 0>>
 	<</if>>
 	/% Fix some possible floating point rounding errors, and bring precision to one decimal place. %/
 	<<run SlaveStatClamp($slaves[_i])>>
diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw
index 908506227dc97ce50d5d5ed8042941afea63d3cc..1b5b3321414b2acd67b8b9d5e7560d9deb8a3b45 100644
--- a/src/uncategorized/nonRandomEvent.tw
+++ b/src/uncategorized/nonRandomEvent.tw
@@ -21,7 +21,7 @@
 	<<set $Event = "assistant">>
 	<<goto "Assistant Events">>
 <<elseif (_effectiveWeek == 12) && $PC.vagina > 0 && $raped == -1 && $arcologyUpgrade.drones != 1 && $Bodyguard == 0 && $PC.career != "arcology owner">>
-		<<goto "P raped">>
+	<<goto "P raped">>
 <<elseif (_effectiveWeek == 14) && $badC != 1>>
 	<<set _valid = $slaves.find(function(s) { return s.curatives > 1 || s.inflationType == "curative"; })>>
 	<<if def _valid>>
@@ -46,7 +46,7 @@
 <<elseif (_effectiveWeek == 31) && ($mercenaries == 0)>>
 	<<goto "P mercenaries">>
 <<elseif (_effectiveWeek == 35) && ($mercenaries > 0)>>
-		<<goto "P snatch and grab">>
+	<<goto "P snatch and grab">>
 <<elseif (_effectiveWeek == 43)>>
 	<<goto "P invasion">>
 <<elseif (_effectiveWeek == 44) && ($mercenaries > 0) && $mercRomeo != 1>>
@@ -59,7 +59,7 @@
 		<<goto "Nonrandom Event">>
 	<</if>>
 <<elseif (_effectiveWeek == 46) && ($mercenaries > 0)>>
-		<<goto "P raid invitation">>
+	<<goto "P raid invitation">>
 <<elseif (_effectiveWeek == 48) && ($cheatMode == 1)>>
 	<<set $foodCrisis = 1>>
 	<<goto "P food crisis">>
@@ -83,22 +83,22 @@
 	<<set $hackerSupport = 0>>
 	<<goto "P underground railroad">>
 <<elseif (_effectiveWeek == 58) && ($traitor == 0)>>
-		<<goto "P bombing">>
+	<<goto "P bombing">>
 <<elseif (_effectiveWeek == 60) && ($rations > 0)>>
 	<<set $foodCrisis = 3>>
 	<<goto "P food crisis">>
 <<elseif (_effectiveWeek == 61) && ($traitor != 0)>>
-		<<goto "P traitor message">>
+	<<goto "P traitor message">>
 <<elseif (_effectiveWeek == 62) && ($mercenaries < 3)>>
-		<<goto "P defense fears">>
+	<<goto "P defense fears">>
 <<elseif (_effectiveWeek == 65) && ($mercenaries >= 3)>>
-		<<goto "P citizens and civilians">>
+	<<goto "P citizens and civilians">>
 <<elseif (_effectiveWeek == 67) && ($traitor != 0)>>
-		<<goto "P collaboration choice">>
+	<<goto "P collaboration choice">>
 <<elseif (_effectiveWeek == 69)>>
 	<<goto "P hacker support">>
 <<elseif (_effectiveWeek == 70) && ($collaboration == 1)>>
-		<<goto "P coup collaboration">>
+	<<goto "P coup collaboration">>
 <<elseif (_effectiveWeek == 71)>>
 	<<if $mercenaries + $personalArms + $hackerSupport < 5>>
 		<<goto "P coup loss">>
diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw
index 246adc0f87e96a3f2dc60b02dbce0fbfb01b8773..826dfcdf6972bc1b028972e32ec8569123c53fb4 100644
--- a/src/uncategorized/options.tw
+++ b/src/uncategorized/options.tw
@@ -501,14 +501,6 @@ Assignment performance vignettes on the end week report are
 
 <br>
 
-<<if ($cyberMod == 0)>>
-	Cybernetics Mod is currently @@.red;DISABLED.@@ [[Enable|Options][$cyberMod = 1]]
-<<else>>
-	Cybernetics Mod is currently @@.cyan;ENABLED.@@ [[Disable|Options][$cyberMod = 0]]
-<</if>>
-
-<br>
-
 <<if $secExp == 0>>
 	The Security Expansion mod is @@.red;DISABLED.@@
 	<<link "Enable">>
diff --git a/src/uncategorized/pCoupAttempt.tw b/src/uncategorized/pCoupAttempt.tw
index 295f97d5916ce1e3fbd637f719da80cdcb221161..47a5680d037b6c172c158cd48f3617324124a89d 100644
--- a/src/uncategorized/pCoupAttempt.tw
+++ b/src/uncategorized/pCoupAttempt.tw
@@ -71,7 +71,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 			<<set $activeSlaveOneTimeMinAge = 16>>
 			<<set $activeSlaveOneTimeMaxAge = 32>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 			<<set $activeSlave.weight = random(-20,30)>>
 			<<set $activeSlave.muscles = random(20,80)>>
 			<<set $activeSlave.waist = random(10,80)>>
@@ -79,7 +79,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 			<<set $activeSlaveOneTimeMinAge = 16>>
 			<<set $activeSlaveOneTimeMaxAge = 32>>
 			<<set $oneTimeDisableDisability = 1>>
-			<<include "Generate XX Slave">>
+			<<set $activeSlave = GenerateNewSlave("XX")>>
 			<<set $activeSlave.weight = random(-50,30)>>
 			<<set $activeSlave.muscles = random(0,80)>>
 			<<set $activeSlave.waist = random(-20,20)>>
@@ -108,7 +108,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 		<<set $activeSlaveOneTimeMinAge = 16>>
 		<<set $activeSlaveOneTimeMaxAge = 32>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.origin = "She is an enslaved Daughter of Liberty.">>
 		<<set $activeSlave.weight = random(-20,30)>>
 		<<set $activeSlave.muscles = random(20,80)>>
@@ -126,7 +126,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 		<<set $activeSlaveOneTimeMinAge = 16>>
 		<<set $activeSlaveOneTimeMaxAge = 32>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She is an enslaved Daughter of Liberty.">>
 		<<set $activeSlave.weight = random(-50,30)>>
 		<<set $activeSlave.muscles = random(0,80)>>
@@ -157,7 +157,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 		<<set $activeSlaveOneTimeMinAge = 16>>
 		<<set $activeSlaveOneTimeMaxAge = 32>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.origin = "She is an enslaved Daughter of Liberty.">>
 		<<set $activeSlave.weight = random(-20,30)>>
 		<<set $activeSlave.muscles = random(20,80)>>
@@ -175,7 +175,7 @@ You are awakened in the middle of the night by a jolt that shakes the entire arc
 		<<set $activeSlaveOneTimeMinAge = 16>>
 		<<set $activeSlaveOneTimeMaxAge = 32>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She is an enslaved Daughter of Liberty.">>
 		<<set $activeSlave.weight = random(-50,30)>>
 		<<set $activeSlave.muscles = random(0,80)>>
diff --git a/src/uncategorized/pInvasion.tw b/src/uncategorized/pInvasion.tw
index e78f276641daa280640b44e3e603e210ad902aca..ece9b5931320b61ac206e52ae66e3cdd68329946 100644
--- a/src/uncategorized/pInvasion.tw
+++ b/src/uncategorized/pInvasion.tw
@@ -97,10 +97,10 @@ The loose militia lately organized by the arcology owners has been called out to
 <<for _i = 0; _i < 3; _i++>>
 	<<if (random(0,99) < $seeDicks)>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<else>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 	<</if>>
 	<<set $activeSlave.origin = "She is an enslaved prisoner of war.">>
 	<<set _newSlaves.push($activeSlave)>>
diff --git a/src/uncategorized/pRaidResult.tw b/src/uncategorized/pRaidResult.tw
index 5cd7d036ecc16ee63bb713c5de97f941522cef57..48d76ba24c9a74a5c6b4a4b21fa4cbd2410adef2 100644
--- a/src/uncategorized/pRaidResult.tw
+++ b/src/uncategorized/pRaidResult.tw
@@ -15,11 +15,11 @@ Out ahead of the main body of refugees there is a small knot moving quickly and
 	<<run repX(2500, "event")>>
 	<<for _prr = 0; _prr < 3; _prr++>>
 		<<if ($seeDicks > 0)>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.origin = "She is an enslaved refugee who participated in the defeated attack on your arcology.">>
 		<<set _newSlaves.push($activeSlave)>>
 		<<else>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She is an enslaved refugee who participated in the defeated attack on your arcology.">>
 		<<set _newSlaves.push($activeSlave)>>
 		<</if>>
diff --git a/src/uncategorized/pRivalryCapture.tw b/src/uncategorized/pRivalryCapture.tw
index 2ad6402d52c62c876b13bc1dbb030b8b14a2bb0d..8fd102042c293bcb329ed7f275b689b95893c07a 100644
--- a/src/uncategorized/pRivalryCapture.tw
+++ b/src/uncategorized/pRivalryCapture.tw
@@ -29,7 +29,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceImplant = 15>>
 	<<set $activeSlave.faceShape = "androgynous">>
@@ -65,7 +65,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.chem = 3000>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceShape = "masculine">>
@@ -100,7 +100,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 18>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceShape = "androgynous">>
 	<<set $activeSlave.muscles = 0>>
@@ -133,7 +133,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.face = 55>>
 	<<set $activeSlave.faceImplant = 0>>
 	<<set $activeSlave.faceShape = "masculine">>
@@ -164,7 +164,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.face = 55>>
 	<<set $activeSlave.faceImplant = 0>>
 	<<set $activeSlave.faceShape = "masculine">>
@@ -195,7 +195,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.face = 55>>
 	<<set $activeSlave.faceImplant = 0>>
 	<<set $activeSlave.faceShape = "androgynous">>
@@ -236,7 +236,7 @@
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.pubertyXX = 1>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceImplant = 0>>
@@ -285,7 +285,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 12>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceImplant = 0>>
 	<<set $activeSlave.faceShape = "cute">>
@@ -317,7 +317,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.face = 55>>
 	<<set $activeSlave.faceImplant = 0>>
 	<<set $activeSlave.faceShape = "cute">>
@@ -350,7 +350,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceImplant = 65>>
 	<<set $activeSlave.faceShape = "sensual">>
@@ -384,7 +384,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<if setup.filterRacesLowercase.includes($rivalRace)>><<set $fixedRace = $rivalRace>><</if>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.face = 100>>
 	<<set $activeSlave.faceImplant = 15>>
 	<<set $activeSlave.muscles = 0>>
diff --git a/src/uncategorized/pRivalryHostage.tw b/src/uncategorized/pRivalryHostage.tw
index ad6e835abd4b555d6b2c01b99fe7d6f4cfebe6ca..c868025402c3bea1ae086eff81dc8700484855b5 100644
--- a/src/uncategorized/pRivalryHostage.tw
+++ b/src/uncategorized/pRivalryHostage.tw
@@ -11,7 +11,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You were acquainted with her before you were an arcology owner; your rival tried to use her to manipulate you, but you rescued her.">>
 <<set $activeSlave.height += random(-5,5)>>
 <<set $activeSlave.boobs = 400>>
diff --git a/src/uncategorized/pSlaveMedic.tw b/src/uncategorized/pSlaveMedic.tw
index 897cda1264f642b4842b29dc8b9f4f518ebd071c..7a3960e1ab250be912315254e400bdae3237d9d2 100644
--- a/src/uncategorized/pSlaveMedic.tw
+++ b/src/uncategorized/pSlaveMedic.tw
@@ -9,7 +9,7 @@
 <<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was captured while caring for those injured in a failed attack on the Free City.">>
 <<set $activeSlave.career = "a nurse">>
 <<set $activeSlave.custom.desc = "She has a faint air of fatigue about her, and strength too: that of a survivor.">>
@@ -53,7 +53,7 @@
 
 <<set $activeSlaveOneTimeMinAge = 25>>
 <<set $activeSlaveOneTimeMaxAge = 42>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was captured while caring for those injured in a failed attack on the Free City.">>
 <<set $activeSlave.career = "a nurse">>
 <<set $activeSlave.custom.desc = "She has a faint air of fatigue about her, and strength too: that of a survivor.">>
diff --git a/src/uncategorized/pSnatchAndGrabResult.tw b/src/uncategorized/pSnatchAndGrabResult.tw
index 96159594924d88af8f014a3ce57bde2d495eabfb..3298a862413cc83f4d4ced0ecdf9873e1736bae7 100644
--- a/src/uncategorized/pSnatchAndGrabResult.tw
+++ b/src/uncategorized/pSnatchAndGrabResult.tw
@@ -6,7 +6,7 @@
 
 <<set $activeSlaveOneTimeMaxAge = $minimumSlaveAge>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She is your share of a raid on an illegal laboratory by your mercenaries.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = 100>>
@@ -70,7 +70,7 @@
 
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She is your share of a raid on an illegal laboratory by your mercenaries.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = 100>>
diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw
index 388528fb9a0c1d2c71b45e865c757f682c36a225..e4b0c14a9bb8c58b9eb696ec4d2a3ac55f7ea48e 100644
--- a/src/uncategorized/persBusiness.tw
+++ b/src/uncategorized/persBusiness.tw
@@ -49,7 +49,7 @@
 	<<set _income = random(2000,4500)>>
 	<<if $PC.belly >= 1500>>
 		<<if $arcologies[0].FSRepopulationFocus != "unset">>
-			You focus on finding "dates" this week and earn @@.yellowgreen;<<print cashFormat(Math.trunc((_income*($rep/500))+($PC.belly)))>>@@ for your body, much more than usual; you guess your pregnancy focused population wants your baby rounded body more than ever. However, doing such things @@.red;damages your reputation.@@
+			You focus on finding "dates" this week and earn @@.yellowgreen;<<print cashFormat(Math.trunc((_income*($rep/500))+($PC.belly)))>>@@ for your body, much more than usual; you guess your pregnancy-focused population wants your baby-rounded body more than ever. However, doing such things @@.red;damages your reputation.@@
 			<<run cashX(Math.trunc((_income*($rep/500))+($PC.belly)), "personalBusiness")>>
 			<<run repX(($rep*.95) - $rep, "personalBusiness")>>
 		<<elseif $arcologies[0].FSRepopulationFocusPregPolicy == 1>>
@@ -648,7 +648,7 @@
 		been negatively affected.
 	<</if>>
 	<<if $PC.hacking < 100>>
-		<<= IncreasePCSkills('hacking',  0.5)>>
+		<<= IncreasePCSkills('hacking', 0.5)>>
 	<</if>>
 	<<run cashX(_windfall, "personalBusiness")>>
 
@@ -756,7 +756,7 @@
 	<<if $arcRepairTime > 0>>
 		The recent rebellion left the arcology wounded and it falls to its owner to fix it. It will still take <<if $arcRepairTime > 1>>$arcRepairTime weeks<<else>>a week<</if>> to finish repair works.
 		<<run cashX(-5000, "personalBusiness")>>
-		<<set $arcRepairTime--, IncreasePCSkills('engineering',  0.1)>>
+		<<set $arcRepairTime--, IncreasePCSkills('engineering', 0.1)>>
 	<</if>>
 <</if>>
 
@@ -766,15 +766,15 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@
 		<<if $weatherToday.severity-$weatherCladding > 2>>
 			<<set $weatherAwareness = 1>>
 			<<if $weatherCladding == 1>>
-				<<set _weatherRepairCost = Math.trunc((($weatherToday.severity-3)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering',  0.1)>>
+				<<set _weatherRepairCost = Math.trunc((($weatherToday.severity-3)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering', 0.1)>>
 				$arcologies[0].name's hardened exterior only partially resisted the extreme weather this week, and it requires repairs costing @@.yellow;<<print cashFormat(_weatherRepairCost)>>.@@ Your citizens are @@.green;grateful@@ to you for upgrading $arcologies[0].name to provide a safe haven from the terrible climate.
 				<<run repX(500, "architecture")>>
 			<<elseif $weatherCladding == 2>>
-				<<set _weatherRepairCost to Math.trunc((($weatherToday.severity-4)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering',  0.1)>>
+				<<set _weatherRepairCost to Math.trunc((($weatherToday.severity-4)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering', 0.1)>>
 				$arcologies[0].name's hardened exterior only partially resisted the extreme weather this week, and it requires repairs costing @@.yellow;<<print cashFormat(_weatherRepairCost)>>.@@ Your citizens are @@.green;grateful@@ to you for upgrading $arcologies[0].name to provide a safe haven from the terrible climate.
 				<<run repX(500, "architecture")>>
 			<<else>>
-				<<set _weatherRepairCost = Math.trunc((($weatherToday.severity-2)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering',  0.1)>>
+				<<set _weatherRepairCost = Math.trunc((($weatherToday.severity-2)*($arcologies[0].prosperity*random(50,100)))+random(1,100)), IncreasePCSkills('engineering', 0.1)>>
 				Severe weather damaged the arcology this week, requiring repairs costing @@.yellow;<<print cashFormat(_weatherRepairCost)>>.@@ Your citizens are @@.red;unhappy@@ that the arcology has proven vulnerable to the terrible climate.
 				<<run repX(-50, "architecture")>>
 			<</if>>
@@ -787,16 +787,16 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@
 					<<set $failedElite += 100>>
 				<</if>>
 				<<if $arcologies[0].prosperity > 50>>
-					<<set $arcologies[0].prosperity -= random(5,10), IncreasePCSkills('engineering',  0.1)>>
+					<<set $arcologies[0].prosperity -= random(5,10), IncreasePCSkills('engineering', 0.1)>>
 				<</if>>
 				<<run cashX(forceNeg(Math.trunc(_weatherRepairCost/4)), "weather")>>
 			<<else>>
 				Since you lack the resources to effect prompt repairs yourself, prominent citizens step in to repair their own parts of the arcology. This is @@.red;terrible for your reputation,@@ and it also @@.red;severely reduces the arcology's prosperity.@@
 				<<if $arcologies[0].prosperity > 50>>
-					<<set $arcologies[0].prosperity -= random(5,10), IncreasePCSkills('engineering',  0.1)>>
+					<<set $arcologies[0].prosperity -= random(5,10), IncreasePCSkills('engineering', 0.1)>>
 				<</if>>
 				<<run repX((Math.trunc($rep*0.9)) - $rep, "weather")>>
-				<<= IncreasePCSkills('engineering',  0.1)>>
+				<<= IncreasePCSkills('engineering', 0.1)>>
 				<<run cashX(forceNeg(Math.trunc(_weatherRepairCost/4)), "weather")>>
 			<</if>>
 		<<elseif $weatherToday.severity-$weatherCladding <= 2>>
diff --git a/src/uncategorized/pit.tw b/src/uncategorized/pit.tw
index ca941710bea2e80d80d3a1bdbb2ff10f9042612e..e8a3332ad6807ea6af78a10f5f55d6b8c9dd15bc 100644
--- a/src/uncategorized/pit.tw
+++ b/src/uncategorized/pit.tw
@@ -343,7 +343,7 @@ $pitNameCaps is clean and ready,
 <div id="remove" class="tabcontent">
 	<div class="content">
 		<<if _DL > 0>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 		<<else>>
 			<br><br>//$pitNameCaps is empty for the moment//
@@ -354,7 +354,7 @@ $pitNameCaps is clean and ready,
 <div id="assign" class="tabcontent">
 	<div class="content">
 		<<if (_SL > _DL)>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/policies.tw b/src/uncategorized/policies.tw
index 3d8f5ce02ff58388ddd072f603656ce93b30dcdd..44505bc27a0de5433887d8f0e392b9f802f52567 100644
--- a/src/uncategorized/policies.tw
+++ b/src/uncategorized/policies.tw
@@ -357,7 +357,7 @@
 	<</if>>
 
 	<<if $publicFuckdolls == 1>>
-		<br>''Free Fuckdolls:'' you are providing fuckdolls free of charge, such generosity increases your standing. 
+		<br>''Free Fuckdolls:'' you are providing Fuckdolls free of charge, such generosity increases your standing.
 		[[Repeal|Policies][$publicFuckdolls = 0]]
 	<</if>>
 
@@ -1150,9 +1150,9 @@
 	<</if>>
 
 	<<if $publicFuckdolls == 0>>
-		<br>''Free Fuckdolls:'' you will no longer charge money for restrained slave holes in your arcology, ranging from fuckdolls to the arcade.
+		<br>''Free Fuckdolls:'' you will no longer charge money for restrained slave holes in your arcology, ranging from Fuckdolls to the arcade.
 		[[Implement|Policies][$publicFuckdolls = 1]]
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Slaves assigned to these jobs will stop making money, fuckdolls will start costing money//
+		<br>&nbsp;&nbsp;&nbsp;&nbsp;//Slaves assigned to these jobs will stop making money, while Fuckdolls will start costing money//
 	<</if>>
 
 	<br><br>__Education Policy__
diff --git a/src/uncategorized/prestigiousSlave.tw b/src/uncategorized/prestigiousSlave.tw
index 25288a633fd4831c244a4e17c70cdc055ba1524e..f11272b6b0abaec2c45040cd4515244c86d7d0a0 100644
--- a/src/uncategorized/prestigiousSlave.tw
+++ b/src/uncategorized/prestigiousSlave.tw
@@ -45,7 +45,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = Math.min(24, $minimumSlaveAge + 6)>>
 	<<set $activeSlaveOneTimeMaxAge = 40>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a noted adult film star, and was sold into slavery by her unscrupulous managers.">>
@@ -88,7 +88,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = Math.min(19, Math.max($fertilityAge, $minimumSlaveAge) + 1)>>
 	<<set $activeSlaveOneTimeMaxAge = 22>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once the young trophy wife of a powerful man in the old world, but he sold her into slavery in revenge for her infidelity.">>
@@ -127,7 +127,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 21>>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once expected to become a major sports star, but flamed out due to injury and was recently enslaved due to debt.">>
@@ -161,7 +161,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "young model">>
 	<<set $activeSlaveOneTimeMaxAge = 21>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a rising young model, but apparently someone decided to take a shortcut in cashing in on her great beauty.">>
@@ -190,7 +190,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "albino">>
 	<<set $activeSlaveOneTimeMaxAge = 18>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She is a natural albino, and was quickly enslaved due to the great demand for physically unusual specimens.">>
@@ -214,7 +214,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMaxAge = 35>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% 15 years a slave. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She is one of the longest legally-enslaved persons in the world, having been a slave for 15 years. She has spent almost all that time working as a slave prostitute, and has been heavily modified to keep her productive.">>
@@ -266,7 +266,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 24>>
 	<<set $activeSlaveOneTimeMaxAge = 28>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She was once a B-list actress, but fell on hard times and drug addiction and was recently enslaved due to debt.">>
@@ -303,7 +303,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 38>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She was once a rising old world politician, but was forced to flee from the increasingly dangerous politics common in a stressed world, and was subsequently enslaved.">>
@@ -334,7 +334,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "princess">>
 	<<set $activeSlaveOneTimeMaxAge = 18>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 3>>
 	<<set $activeSlave.prestigeDesc = "She was born a daughter of royalty, but her family was overthrown when she was still young. She is a graduate cum laude of the world's most renowned slave school.">>
@@ -366,7 +366,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 28>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 3>>
 	<<set $activeSlave.prestigeDesc = "She was once an arcology owner like you, but lost a Free Cities power struggle and was enslaved. An object lesson in the need to stay vigilant.">>
@@ -425,7 +425,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "streamer">>
 	<<set $activeSlaveOneTimeMaxAge = 28>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a popular creator on a live streaming service, but donations dropped off after getting caught up in some controversy.">>
@@ -456,7 +456,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMaxAge = 40>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Enslaved as an adult. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She is a natural-born hermaphrodite. She was enslaved as an adult and subjected to treatment to upgrade both her halves to full functionality.">>
@@ -489,7 +489,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "d young herm">>
 	<<set $activeSlaveOneTimeMaxAge = 19>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She is a natural-born hermaphrodite. She received treatment to ensure both her halves would be fully functional from an early age.">>
@@ -527,7 +527,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 24>>
 	<<set $activeSlaveOneTimeMaxAge = 40>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a noted adult film star, and was sold into slavery by her unscrupulous managers.">>
@@ -572,7 +572,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 19>>
 	<<set $activeSlaveOneTimeMaxAge = 22>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once the young trophy husband of a powerful woman in the old world, but she sold her into slavery in revenge for her infidelities.">>
@@ -601,7 +601,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 21>>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once expected to become a major sports star, but flamed out due to injury and was recently enslaved due to debt.">>
@@ -633,7 +633,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "d young model">>
 	<<set $activeSlaveOneTimeMaxAge = 21>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a rising young model, but apparently someone decided to take a shortcut in cashing in on her great beauty.">>
@@ -664,7 +664,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "d albino">>
 	<<set $activeSlaveOneTimeMaxAge = 18>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She is a natural albino, and was quickly enslaved due to the great demand for physically unusual specimens.">>
@@ -686,7 +686,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMaxAge = 35>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% 15 years a slave. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She is one of the longest legally-enslaved persons in the world, having been a slave for 15 years. She has spent almost all that time working as a slave prostitute, and has been heavily modified to keep her productive.">>
@@ -740,7 +740,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 24>>
 	<<set $activeSlaveOneTimeMaxAge = 28>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She was once a B-list actress, but fell on hard times and drug addiction and was recently enslaved due to debt.">>
@@ -775,7 +775,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 38>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She was once a rising old world politician, but was forced to flee from the increasingly dangerous politics common in a stressed world, and was subsequently enslaved.">>
@@ -802,7 +802,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMaxAge = 18>>
 	<<set $oneTimeDisableDisability = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 3>>
 	<<set $activeSlave.prestigeDesc = "She was born a child of royalty, but her family was overthrown when she was still young. She is a graduate cum laude of the world's most renowned slave school.">>
@@ -837,7 +837,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 	<<set $activeSlaveOneTimeMinAge = 28>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 3>>
 	<<set $activeSlave.prestigeDesc = "She was once an arcology owner like you, but lost a Free Cities power struggle and was enslaved. An object lesson in the need to stay vigilant.">>
@@ -886,7 +886,7 @@ You check to see if any especially prestigious slaves are on auction. <<if $pres
 <<case "d streamer">>
 	<<set $activeSlaveOneTimeMaxAge = 28>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her at auction.">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was once a popular creator on a live streaming service, but donations dropped off after getting caught up in some controversy.">>
diff --git a/src/uncategorized/ptWorkaround.tw b/src/uncategorized/ptWorkaround.tw
index a1082be69c6c444a93c1158bee78f79d81a42bf8..d7bad0c4257b1d8e2253a3cefa811e984eab0cd2 100644
--- a/src/uncategorized/ptWorkaround.tw
+++ b/src/uncategorized/ptWorkaround.tw
@@ -329,7 +329,6 @@
 		You are well-versed in sexual techniques and how to employ them, giving you an edge in teaching $him.
 		<<set _trainingEfficiency += 10>>
 	<</if>>
-	<<set $skillIncrease = _trainingEfficiency>>
 	<<if $activeSlave.devotion > 50>>
 		$He's devoted to you, making sexual training much easier.
 	<<elseif $activeSlave.devotion > 20>>
@@ -344,43 +343,43 @@
 	<</if>>
 	<<if $activeSlave.skill.oral <= 10>>
 		Since $he's orally unskilled, you start with $his mouth. $He <<if $PC.dick == 1>>sucks your dick<<else>>eats you out<</if>>, of course, but $his training is more creative than just that. You give $him delicious hard candies to suck and feed $him phallic fruits and vegetables that $he must deepthroat before $he can eat. As $his skill improves, $he wears a gag with an inward-facing dildo, which is swapped out for a bigger size every so often. You only let $him orgasm when $he's sucking, and before long $he's associating giving someone oral pleasure with experiencing pleasure $himself. @@.lime;$His oral skills have improved.@@
-		<<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Oral($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.vaginal <= 10) && ($activeSlave.vagina > 0) && canDoVaginal($activeSlave)>>
 		Since $he's vaginally unskilled, and not a virgin, you start with $his pussy. @@.lime;$His vaginal skills have improved.@@
-		<<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Vaginal($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.anal <= 10) && ($activeSlave.anus > 0) && canDoAnal($activeSlave)>>
 		Since $he's anally unskilled, and not an anal virgin, you start with $his ass. @@.lime;$His anal skills have improved.@@
-		<<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Anal($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.oral <= 30>>
 		Since $he's sexually experienced, you work with $him on the finer points of oral sex. @@.lime;$His oral skills have improved.@@
-		<<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Oral($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.vaginal <= 30) && ($activeSlave.vagina > 0) && canDoVaginal($activeSlave)>>
 		Since $he's sexually experienced, you work with $him on the finer points of penetrative sex. $He can already fuck pretty well, but $his muscular control could be improved. $He works $his Kegel muscles all week, using fingers, dildos, and your <<if $PC.dick == 0>>strap-on<<else>>cock<</if>> as training tools. $He becomes expert enough that $he is able to make you cum without any thrusting at all by you or any riding by $him; $he just flexes $his muscles enough to <<if $PC.dick == 0>>grind the fake phallus back against your cunt<<else>>stimulate you<</if>>. @@.lime;$His vaginal skills have improved.@@
-		<<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Vaginal($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.anal <= 30) && ($activeSlave.anus > 0) && canDoAnal($activeSlave)>>
 		Since $he's anally experienced, you work with $him on the finer points of penetrative sex. $He can already take it up $his ass, but $his muscular control could be improved. $He works $his Kegel muscles and anal sphincter all week, using fingers, dildos, and your <<if $PC.dick == 0>>strap-on<<else>>cock<</if>> as training tools. $He becomes expert enough that $he is able to make you cum without any thrusting at all by you or any riding by $him; $he just flexes $his muscles enough to <<if $PC.dick == 0>>squeeze the fake phallus<<else>>stimulate you<</if>>. @@.lime;$His anal skills have improved.@@
-		<<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Anal($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.oral < 100>>
 		$He is already a skilled oral whore, but $his skills can be polished further. You train $him in the basics of <<if $seePee == 1>>urine play, <</if>>massage, pet play, needle play, and many other niche skills. You also expand $his oral endurance, enabling $him to deepthroat for extended periods. @@.lime;$His oral skills have improved.@@
-		<<= SkillIncrease.Oral($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Oral($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.vaginal < 100) && ($activeSlave.vagina > 0) && canDoVaginal($activeSlave)>>
 		$He is already a skilled pussy slut, but $his skills can be polished further. You train $him in the basics of <<if $seePee == 1>>urine play, <</if>>massage, pet play, needle play, and many other niche skills. You also work with $him to develop a personal regimen of vaginal muscle exercises. This will enable $him to squeeze and massage dicks with $his practiced vaginal walls. @@.lime;$His vaginal skills have improved.@@
-		<<= SkillIncrease.Vaginal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Vaginal($activeSlave, _trainingEfficiency)>>
 	<<elseif ($activeSlave.skill.anal < 100) && ($activeSlave.anus > 0) && canDoAnal($activeSlave)>>
 		$He is already a skilled anal bitch, but $his skills can be polished further. You train $him in the basics of <<if $seePee == 1>>urine play, <</if>>massage, pet play, needle play, and many other niche skills. You also expand $his knowledge of sexual positions. $He learns to balance $himself on tiptoe for the challenge of standing anal sex without support. @@.lime;$His sexual skills have improved.@@
-		<<= SkillIncrease.Anal($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Anal($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.whoring <= 10>>
 		Since $he's dangerously naïve about selling sex, you teach $him the basics of self protection and business. @@.lime;$His prostitution skills have improved.@@
-		<<= SkillIncrease.Whore($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Whore($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.entertainment <= 10>>
 		Since $he's rough and unskilled at entertainment, you teach $him the basics of polite conversation, music, and dance. @@.lime;$His entertainment skills have improved.@@
-		<<= SkillIncrease.Entertain($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Entertain($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.whoring <= 30>>
 		Since $he has only basic entertainment skills, you teach $him to steer clients to more lucrative sex acts. @@.lime;$His prostitution skills have improved.@@
-		<<= SkillIncrease.Whore($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Whore($activeSlave, _trainingEfficiency)>>
 	<<elseif $activeSlave.skill.entertainment <= 30>>
 		Since $he has only basic entertainment skills, you teach $him more about poise and Free Cities etiquette. @@.lime;$His entertainment skills have improved.@@
-		<<= SkillIncrease.Entertain($activeSlave, $skillIncrease)>>
+		<<= SkillIncrease.Entertain($activeSlave, _trainingEfficiency)>>
 	<<else>>
 		$He's learned everything you can teach, and is now a masterful
 		<<if ($activeSlave.skill.vaginal >= 100)>>
diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw
index 1efa81b1b0721135ea77293682c4cdc45b3085d2..f9042f49b12961a8fb96b4b2ca1fdce7ae39adf8 100644
--- a/src/uncategorized/randomNonindividualEvent.tw
+++ b/src/uncategorized/randomNonindividualEvent.tw
@@ -615,7 +615,7 @@
 		<</if>>
 		<<if $arcologyUpgrade.drones == 1>>
 			<<set _recruitEvents.push("RE malefactor")>>
-			<<set $malefactor = ["liberator", "whore", "businesswoman", "addict"]>>
+			<<set $malefactor = ["addict", "businesswoman", "liberator", "whore"]>>
 			<<if $seePreg != 0>>
 				<<set $malefactor.push("anchorBaby")>>
 				<<if $arcologies[0].FSRepopulationFocus < 50>>
@@ -631,6 +631,9 @@
 			<<if $arcologies[0].FSPaternalist < 50>>
 				<<set $malefactor.push("escapee")>>
 			<</if>>
+			<<if $arcologies[0].FSSupremacistLawME + $arcologies[0].FSSubjugationistLawME > 0>>
+				<<set $malefactor.push("passfail")>>
+			<</if>>
 			<<set $malefactor = $malefactor.random()>>
 			<<if ($rep/150) > random(1,100)>>
 				<<set _recruitEvents.push("RE malefactor")>>
@@ -868,10 +871,10 @@
 			<<set _recruitEvents.push("RE FS acquisition")>>
 		<</if>>
 		<<if $seePreg != 0>>
-		<<if $arcologies[0].FSPastoralist > random(1,100)>>
-			<<set $FSAcquisitionEvents.push("Pastoralist")>>
-			<<set _recruitEvents.push("RE FS acquisition")>>
-		<</if>>
+			<<if $arcologies[0].FSPastoralist > random(1,100)>>
+				<<set $FSAcquisitionEvents.push("Pastoralist")>>
+				<<set _recruitEvents.push("RE FS acquisition")>>
+			<</if>>
 		<</if>>
 		<<if $arcologies[0].FSPhysicalIdealist > random(1,100)>>
 			<<set $FSAcquisitionEvents.push("Physical Idealist")>>
@@ -898,10 +901,10 @@
 			<<set _recruitEvents.push("RE FS acquisition")>>
 		<</if>>
 		<<if $seePreg != 0>>
-		<<if $arcologies[0].FSGenderFundamentalist > random(1,100)>>
-			<<set $FSAcquisitionEvents.push("Gender Fundamentalist Two")>>
-			<<set _recruitEvents.push("RE FS acquisition")>>
-		<</if>>
+			<<if $arcologies[0].FSGenderFundamentalist > random(1,100)>>
+				<<set $FSAcquisitionEvents.push("Gender Fundamentalist Two")>>
+				<<set _recruitEvents.push("RE FS acquisition")>>
+			<</if>>
 		<</if>>
 		<<if $arcologies[0].FSPaternalist > random(1,100)>>
 			<<set $FSAcquisitionEvents.push("Paternalist Two")>>
diff --git a/src/uncategorized/reAWOL.tw b/src/uncategorized/reAWOL.tw
index 19c3425334a9619799d462d8c6e4c4e69eaa0241..62391c396ffaffbc99d6ef762865479b8c10ff36 100644
--- a/src/uncategorized/reAWOL.tw
+++ b/src/uncategorized/reAWOL.tw
@@ -17,9 +17,9 @@
 	<<set $fixedRace = _races.random()>>
 <</if>>
 <<if $seeDicks != 100>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 <<else>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 <</if>>
 <<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for dereliction of her duty to you as a mercenary and for theft.">>
 <<set $activeSlave.career = "a soldier">>
diff --git a/src/uncategorized/reCitizenHookup.tw b/src/uncategorized/reCitizenHookup.tw
index fd0e65265b1b7dab9657bb2b9d503e873aafd35e..141373aec7e774bdd3aaf4dbcacf4ad937d65406 100644
--- a/src/uncategorized/reCitizenHookup.tw
+++ b/src/uncategorized/reCitizenHookup.tw
@@ -262,7 +262,8 @@ She's clearly attracted to you; even the most consummate actress would have diff
 	<</switch>>
 	Citizens like her often appreciate a good hard fuck, since regular submission to a pounding from sex slaves would be a scandal. There's little opprobrium waiting for you if it's known you had her, though, and she's deliciously eager as you press her down onto the bed<<if $PC.dick == 0>> and pull on your usual harness<</if>>. She ruts herself hard back against you as you thrust into her, moaning, and after a short while she begs for it even harder, so you flip her over and mount her like a bitch, making her scream.
 	<<if $Concubine != 0 && $Concubine.intelligence > 1>>
-		The view of your conquest's rutting back is nice, of course, but after enjoying it for a few moments you pull $Concubine.slaveName in and kiss your favorite deeply, playing with her as you fuck.
+		<<setLocalPronouns $Concubine>>
+		The view of your conquest's rutting back is nice, of course, but after enjoying it for a few moments you pull $Concubine.slaveName in and kiss your favorite deeply, playing with $him as you fuck.
 	<</if>>
 	When your guest is finally spent, she showers, dresses, and leaves discreetly, offering you a proper thank you. This is the kind of thing that @@.green;builds a lasting reputation@@ in the Free Cities.
 	<<run repX(5000, "event")>>
diff --git a/src/uncategorized/reDevotedMotherDaughter.tw b/src/uncategorized/reDevotedMotherDaughter.tw
index 3a668017f66130aa55ff2973ea653a3cd5e0f584..030e72642fc74a86e1b722529a7a17310e6f2a4c 100644
--- a/src/uncategorized/reDevotedMotherDaughter.tw
+++ b/src/uncategorized/reDevotedMotherDaughter.tw
@@ -33,7 +33,7 @@ $slaves[$i].slaveName and $his daughter $slaves[$j].slaveName are both good slav
 <span id="result">
 <br><<link "Spend the night sharing your bed with them, and each of them with the other">>
 	<<replace "#result">>
-	Neither of them bats an eye when you announce you're turning in early and that they'll be joining you. Since they're already naked, they get into your big soft bed before you and lie facing each other, with enough room in between them for you to take a central position. They clearly assume you'll start with one of them on each side of you, so they're quite surprised when you slide in behind $slaves[$i].slaveName instead. $slaves[$j].slaveName snuggles up to _his2 mother happily enough, however. You extend the foreplay to hours, eventually bringing both of them to such a state of naked arousal that they begin grinding against each other as much as they do you. They get the idea, and things turn into a sort of unspoken mutual one-upmanship between them. What starts with $slaves[$j].slaveName clearly feeling very daring as _he2 sucks _his2 mother's nipple ends with $slaves[$i].slaveName lying on $his back getting fucked by you while $he orally pleasures $slaves[$j].slaveName. You're face to face with $slaves[$j].slaveName and _he2 groans happily into your mouth as $slaves[$i].slaveName moans into _his2 fuckhole.
+	Neither of them bats an eye when you announce you're turning in early and that they'll be joining you. Since they're already naked, they get into your big soft bed before you and lie facing each other, with enough room in between them for you to take a central position. They clearly assume you'll start with one of them on each side of you, so they're quite surprised when you slide in behind $slaves[$i].slaveName instead. $slaves[$j].slaveName snuggles up to _his2 mother happily enough, however. You extend the foreplay for hours, eventually bringing both of them to such a state of naked arousal that they begin grinding against each other as much as they do you. They get the idea, and things turn into a sort of unspoken mutual one-upmanship between them. What starts with $slaves[$j].slaveName clearly feeling very daring as _he2 sucks _his2 mother's nipple ends with $slaves[$i].slaveName lying on $his back getting fucked by you while $he orally pleasures $slaves[$j].slaveName. You're face to face with $slaves[$j].slaveName and _he2 groans happily into your mouth as $slaves[$i].slaveName moans into _his2 fuckhole.
 	@@.mediumaquamarine;They have both become more trusting of you.@@
 
 	<<set $slaves[$i].trust += 4, $slaves[$j].trust += 4, $slaves[$i].counter.oral += 1, $slaves[$j].counter.oral += 1, $oralTotal += 2>>
diff --git a/src/uncategorized/reFSAcquisition.tw b/src/uncategorized/reFSAcquisition.tw
index e77a43c3411b3b115c1c52a9190b6443cae4777c..ea558d7caaff6cbe5aab42b46b9904913a97198b 100644
--- a/src/uncategorized/reFSAcquisition.tw
+++ b/src/uncategorized/reFSAcquisition.tw
@@ -30,7 +30,7 @@
 	<<set $activeSlaveOneTimeMinAge = random(14,16)>>
 <</if>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself for voluntary enslavement, choosing you as her new owner because you treat lactating girls well.">>
 <<set $activeSlave.health = random(-20,20)>>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -54,7 +54,7 @@
 <<set $activeSlaveOneTimeMaxAge = 42>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself for voluntary enslavement, hoping to become a valuable source of milk for you.">>
 <<set $activeSlave.age = random(32,$retirementAge-2)>>
 <<set $activeSlave.health = random(-20,20)>>
@@ -137,7 +137,7 @@
 
 <<set $contractCost = 1000>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered herself for voluntary enslavement to escape life in an area that disapproved of her sexual tendencies.">>
 <<set $activeSlave.health = random(-20,20)>>
 <<set $activeSlave.devotion = random(15,20)>>
@@ -154,7 +154,7 @@
 <<set $activeSlaveOneTimeMaxAge = 42>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered herself for voluntary enslavement after a lifetime as an outcast due to her sexual tendencies.">>
 <<set $activeSlave.health = random(-20,20)>>
 <<set $activeSlave.devotion = random(15,20)>>
@@ -171,7 +171,7 @@
 <<set $activeSlaveOneTimeMaxAge = 19>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough = be pregnant. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was sold to you as a way of disposing of an inconveniently pregnant young woman.">>
 <<set $activeSlave.career = setup.youngCareers.random()>>
 <<set $activeSlave.health = random(-20,20)>>
@@ -195,7 +195,7 @@
 <<set $oneTimeDisableDisability = 1>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was raped and impregnated, then sold to you as a way of disposing of an inconveniently pregnant mother.">>
 <<set $activeSlave.health = random(-20,20)>>
 <<set $activeSlave.devotion = random(-45,-25)>>
@@ -248,7 +248,7 @@
 <<set $activeSlaveOneTimeMinAge = 11>>
 <<set $activeSlaveOneTimeMaxAge = 42>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was sold to you by an anonymous person who wanted her to suffer.">>
 <<set $activeSlave.boobsImplant += random(4,6)*200>>
 <<set $activeSlave.boobs += $activeSlave.boobsImplant>>
@@ -289,7 +289,7 @@
 <<set $activeSlaveOneTimeMaxAge = 42>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was sold to you by an anonymous slave breaking group.">>
 <<set $activeSlave.age = random(32,$retirementAge-2)>>
 <<set $activeSlave.boobsImplant += random(3,6)*200>>
@@ -768,7 +768,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 30>>
 <</if>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself to you in the hopes that her body would help keep humanity alive.">>
 <<set $activeSlave.career = setup.youngCareers.random()>>
 <<set $activeSlave.health = random(40,60)>>
@@ -794,7 +794,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 30>>
 <</if>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself to you in the hope of someday bearing children.">>
 <<set $activeSlave.health = random(40,60)>>
 <<set $activeSlave.devotion = random(25,35)>>
@@ -817,7 +817,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She thought she was important; she was not.">>
 <<set $activeSlave.career = "a student from a private school">>
 <<set $activeSlave.intelligence = random(16,95)>>
@@ -860,7 +860,7 @@
 <<set $activeSlaveOneTimeMinAge = 22>>
 <<set $activeSlaveOneTimeMaxAge = 28>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself to you for enslavement because she was swept up in the romanticism of a revival of Rome.">>
 <<set $activeSlave.devotion = random(-15,-5)>>
 <<set $activeSlave.trust = random(5,15)>>
@@ -886,7 +886,7 @@
 <<set $activeSlaveOneTimeMinAge = 22>>
 <<set $activeSlaveOneTimeMaxAge = 28>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself to you for enslavement because she needs to feel a higher call.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
diff --git a/src/uncategorized/reFSEgyptianRevivalistAcquisition.tw b/src/uncategorized/reFSEgyptianRevivalistAcquisition.tw
index 8cf13e2443342c041c638a5324dc78f37c7e1761..dadc7966e92829ebd60f81b3840be4ccb3faec3e 100644
--- a/src/uncategorized/reFSEgyptianRevivalistAcquisition.tw
+++ b/src/uncategorized/reFSEgyptianRevivalistAcquisition.tw
@@ -46,7 +46,7 @@ This call is coming from a public kiosk, which is usually an indication that the
 <br><br>
 <span id="result">
 <<if $cash >= $contractCost>>
-[[Enslave the pair|RE FSEgyptianRevivalist acquisition workaround][$sibling = $activeSlave]]/*Billing will happen past the link based on $contractCost*/
+	[[Enslave the pair|RE FSEgyptianRevivalist acquisition workaround][$sibling = $activeSlave]]/*Billing will happen past the link based on $contractCost*/
 <<else>>
 	//You lack the necessary funds to enslave them.//
 <</if>>
diff --git a/src/uncategorized/reFullBed.tw b/src/uncategorized/reFullBed.tw
index 9842b04ea02f78107a00b80672da3249999e380f..5902b056c5be8766366cc5e3699ec33bfa851a66 100644
--- a/src/uncategorized/reFullBed.tw
+++ b/src/uncategorized/reFullBed.tw
@@ -21,7 +21,7 @@
 <<setLocalPronouns $slaves[_bedSlaveOne]>>
 <<setLocalPronouns $slaves[_bedSlaveTwo] 2>>
 
-You have the luxury of being attended to by a coterie of devoted sex slaves. Tonight, $slaves[_bedSlaveTwo].slaveName and $slaves[_bedSlaveOne].slaveName are with you when it's time for bed, so they strip naked and climb under the sheets with you, one on either side. Each snuggles in under one of your arms so she can rest her head on your shoulder, a hand on your chest, her breasts against your flank, <<if $slaves[_bedSlaveTwo].belly > 5000 && $slaves[_bedSlaveOne].belly > 5000>>her swollen belly against yours, <</if>>and the warmth between her legs against your hip.
+You have the luxury of being attended to by a coterie of devoted sex slaves. Tonight, $slaves[_bedSlaveTwo].slaveName and $slaves[_bedSlaveOne].slaveName are with you when it's time for bed, so they strip naked and climb under the sheets with you, one on either side. They snuggle in under both of your arms so that each can rest their head on your shoulder, a hand on your chest, <<if $slaves[_bedSlaveTwo].boobs > 300 && $slaves[_bedSlaveOne].boobs > 300>>their breasts against your flank, <</if>><<if $slaves[_bedSlaveTwo].belly > 5000 && $slaves[_bedSlaveOne].belly > 5000>>their swollen belly against yours, <</if>>and the warmth between their legs against your hip.
 
 <br><br>
 
@@ -32,7 +32,7 @@ Today was an unusually relaxing day, and you aren't particularly tired.
 <span id="result">
 <<link "Take a slave in each hand">>
 	<<replace "#result">>
-		With your arms each around a slave, you begin to run your hands across their bodies. They snuggle closer to you, their nipples growing hard and their hips grinding against you. As your grasp runs lower and lower, cupping and massaging their buttocks, they begin to kiss the chest against which their adoring faces are pressed, and reach down <<if $PC.dick == 0>>to your pussy<<else>><<if $PC.vagina == 1>>towards your cock and cunt<<else>>for your member<</if>><</if>>. The more manually skilled begins to give you a gentle stroke, while the other softly massages your <<if ($PC.dick == 0)>>mons<<else>>testicles<</if>>. They stiffen in unison when you hook two fingers up each asshole, but immediately relax and begin to work you harder. They orgasm one after the other, their butts clenching against your intruding fingers, and then eagerly clean you with their mouths when you climax yourself. They have become @@.hotpink;still more devoted to you.@@
+		With each of your arms around a slave, you begin to run your hands across their bodies. They snuggle closer to you, their nipples growing hard and their hips grinding against you. As your grasp runs lower and lower, cupping and massaging their buttocks, they begin to kiss the chest against which their adoring faces are pressed, and reach down <<if $PC.dick == 0>>to your pussy<<else>><<if $PC.vagina == 1>>towards your cock and cunt<<else>>for your member<</if>><</if>>. The more manually skilled begins to give you a gentle stroke, while the other softly massages your <<if ($PC.dick == 0)>>mons<<else>>testicles<</if>>. They stiffen in unison when you hook two fingers up each asshole, but immediately relax and begin to work you harder. They orgasm one after the other, their butts clenching against your intruding fingers, and then eagerly clean you with their mouths when you climax yourself. They have become @@.hotpink;still more devoted to you.@@
 		<<set $slaves[_bedSlaveOne].devotion += 4, $slaves[_bedSlaveTwo].devotion += 4>>
 		<<set $slaves[_bedSlaveOne].counter.anal++, $slaves[_bedSlaveTwo].counter.anal++>>
 		<<set $analTotal += 2>>
@@ -102,7 +102,7 @@ Today was an unusually relaxing day, and you aren't particularly tired.
 <</if>>
 <br><<link "Pull up the sheets and wrestle">>
 	<<replace "#result">>
-		Without warning, you jerk the sheets all the way up and pin them at the head of the bed. They giggle as you seize first the one and then the other, groping and tickling. $slaves[_bedSlaveTwo].slaveName and $slaves[_bedSlaveOne].slaveName catch the spirit of fun, and rove around in the soft darkness under the sheets. You're <<if $PC.dick == 1>>rock hard<<if $PC.vagina == 1>> and <</if>><</if>><<if $PC.vagina == 1>>soaking wet<</if>> in no time, wrestling with two naked slaves, and begin to fuck the first one you can grab and hold. <<if ($slaves[_bedSlaveOne].amp != 1) && ($slaves[_bedSlaveTwo].amp != 1)>>When you <<if ($PC.dick == 0)>>finish with her<<else>>come inside her<</if>>, you release her and she slides out of bed to wash; by the time she gets back under the sheets, clean and fresh, you're on the point of filling the other.<<else>>When you <<if ($PC.dick == 0)>>finish with her<<else>>come inside her<</if>>, you carry her limbless, helpless body out of bed to wash her, and then return to the bed to fuck the other.<</if>> You switch off with the two of them, fucking them in turn, until everyone falls asleep in an exhausted pile. They have become @@.mediumaquamarine;still more trusting of you.@@
+		Without warning, you jerk the sheets all the way up and pin them at the head of the bed. They giggle as you seize first the one and then the other, groping and tickling. $slaves[_bedSlaveTwo].slaveName and $slaves[_bedSlaveOne].slaveName catch the spirit of fun, and rove around in the soft darkness under the sheets. You're <<if $PC.dick == 1>>rock hard<<if $PC.vagina == 1>> and <</if>><</if>><<if $PC.vagina == 1>>soaking wet<</if>> in no time, wrestling with two naked slaves, and begin to fuck the first one you can grab and hold. <<if ($slaves[_bedSlaveOne].amp != 1) && ($slaves[_bedSlaveTwo].amp != 1)>>When you <<if ($PC.dick == 0)>>finish with $him<<else>>come inside $him<</if>>, you release $him and $he slides out of bed to wash; by the time $he gets back under the sheets, clean and fresh, you're on the point of fucking the other.<<else>>When you <<if ($PC.dick == 0)>>finish with $him<<else>>come inside $him<</if>>, you carry $his limbless, helpless body out of bed to wash $him, and then return to the bed to fuck the other.<</if>> You switch off with the two of them, fucking them in turn, until everyone falls asleep in an exhausted pile. They have become @@.mediumaquamarine;still more trusting of you.@@
 		<<set $slaves[_bedSlaveOne].trust += 4, $slaves[_bedSlaveTwo].trust += 4>>
 		<<if canDoVaginal(_bedSlaveOne)>>
 			<<set $slaves[_bedSlaveOne].counter.vaginal += 2>>
diff --git a/src/uncategorized/reMalefactor.tw b/src/uncategorized/reMalefactor.tw
index 02f4abca2f1c3c82cecc02d7cd5250cbca292586..7e5748627ca768014833e7451364ca084750902f 100644
--- a/src/uncategorized/reMalefactor.tw
+++ b/src/uncategorized/reMalefactor.tw
@@ -68,7 +68,7 @@
 <<set $activeSlaveOneTimeMinAge = $fertilityAge>>
 <<set $activeSlaveOneTimeMaxAge = 42>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for smuggling slaves within her body.">>
 <<set $activeSlave.career = setup.uneducatedCareers.random()>>
 <<set $activeSlave.devotion = random(-75,-50)>>
@@ -139,12 +139,12 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for fraud and theft.">>
 <<set $activeSlave.career = "a criminal businesswoman">>
 <<set $activeSlave.devotion = random(-75,-60)>>
 <<set $activeSlave.trust = random(-15,0)>>
-	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
+<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
 <<set $activeSlave.vagina = 2>>
 <<set $activeSlave.preg = -1>>
 <<set $activeSlave.skill.vaginal = 15>>
@@ -173,7 +173,7 @@
 <<set $activeSlave.career = "a prostitute">>
 <<set $activeSlave.devotion = random(-75,-60)>>
 <<set $activeSlave.trust = random(-15,0)>>
-	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
+<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
 <<set $activeSlave.health = random(-40,-20)>>
 <<set $activeSlave.anus = 2>>
 <<if $activeSlave.dick == 0>>
@@ -211,11 +211,11 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for rape of a free woman.">>
 <<set $activeSlave.devotion = random(-75,-60)>>
 <<set $activeSlave.trust = random(-15,0)>>
-	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
+<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
 <<set $activeSlave.health = random(0,20)>>
 <<set $activeSlave.anus = 0>>
 <<set $activeSlave.balls = random(2,4)>>
@@ -238,7 +238,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You sentenced her to enslavement for smuggling drugs into the arcology.">>
 <<set $activeSlave.career = "a drug mule">>
 <<set $activeSlave.devotion = random(-50,-20)>>
@@ -266,12 +266,12 @@
 <<set $activeSlaveOneTimeMinAge = random(12,28)>>
 <<set $activeSlaveOneTimeMaxAge = 43>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for attempted theft of a slave.">>
 <<set $activeSlave.career = "an antislavery activist">>
 <<set $activeSlave.devotion = random(-75,-60)>>
 <<set $activeSlave.trust = random(-15,0)>>
-	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
+<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
 <<set $activeSlave.muscles = 50>>
 <<set $activeSlave.weight = random(-20,30)>>
 <<set $activeSlave.waist = random(-10,10)>>
@@ -287,6 +287,37 @@
 <<set $activeSlave.hStyle = "shaved into a mohawk">>
 <<set $activeSlave.custom.tattoo = "$He seems to have had slave tattoos at one time, but has had them cheaply removed.">>
 
+<<case "passfail">>
+
+<<set $oneTimeDisableDisability = 1>>
+<<if $arcologies[0].FSSubjugationistLawME == 1>>
+	<<set _realRace = $arcologies[0].FSSubjugationistRace>>
+<<elseif $arcologies[0].FSSupremacistLawME == 1>>
+	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSupremacistRace)>>
+	<<set _realRace = _races.random()>>
+<</if>>
+<<set $fixedRace = _realRace>>
+<<set $activeSlave = GenerateNewSlave()>>
+<<set $activeSlave.origin = "You sentenced her to enslavement as a punishment for defying local racial segregation laws.">>
+<<set $activeSlave.career = setup.educatedCareers.random()>>
+<<set $activeSlave.devotion = random(-75,-50)>>
+<<set $activeSlave.trust = random(-75,-50)>>
+<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
+<<set $activeSlave.health = random(-40,-20)>>
+<<set $activeSlave.intelligence = random(51,95)>>
+<<set $activeSlave.intelligenceImplant = 15>>
+<<if $arcologies[0].FSSupremacistLawME == 1>>
+	<<set _fakeRace = $arcologies[0].FSSupremacistRace>>
+<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
+	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
+	<<set _fakeRace = _races.random()>>
+<</if>>
+<<set $activeSlave.race = _fakeRace>>
+<<set $activeSlave.skin = randomRaceSkin(_fakeRace)>>
+<<set $activeSlave.eyeColor = randomRaceEye(_fakeRace)>>
+<<set $activeSlave.hColor = randomRaceHair(_fakeRace)>>
+<<set $activeSlave.override_Race = 1, $activeSlave.override_Skin = 1, $activeSlave.override_H_Color = 1, $activeSlave.override_Eye_Color = 1>>
+
 <</switch>>
 
 <<setLocalPronouns $activeSlave>>
@@ -311,7 +342,7 @@
 
 <<case "businesswoman">>
 
-<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> alerts you that a criminal has been detected by your security systems and detained by the drones. Crime is extremely uncommon in your arcology, since nothing can escape the notice of the omnipresent monitoring systems. Nevertheless, it seems one of your tenants, a hitherto well-respected businesswoman, has left the straight and narrow. It seems $his business affairs took a decisive turn for the worse, so $he attempted to drain $his clients' funds and leave your arcology before anyone was the wiser. Unfortunately for $him, your security drones, controlled by $assistantName, were very much the wiser. <<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> has with machine efficiency compiled the completest proofs of corporate malfeasance you have ever seen. Your wretched tenant signed a contract with you that included provisions forbidding theft. $He is entirely at your mercy.
+<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> alerts you that a criminal has been detected by your security systems and detained by the drones. Crime is extremely uncommon in your arcology, since nothing can escape the notice of the omnipresent monitoring systems. Nevertheless, it seems one of your tenants, a hitherto well-respected business<<= $woman>>, has left the straight and narrow. It seems $his business affairs took a decisive turn for the worse, so $he attempted to drain $his clients' funds and leave your arcology before anyone was the wiser. Unfortunately for $him, your security drones, controlled by $assistantName, were very much the wiser. <<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> has with machine efficiency compiled the completest proofs of corporate malfeasance you have ever seen. Your wretched tenant signed a contract with you that included provisions forbidding theft. $He is entirely at your mercy.
 
 <<case "whore">>
 
@@ -334,7 +365,11 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 <<case "liberator">>
 
 <<setNonlocalPronouns $seeDicks>>
-<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> alerts you that a criminal has been detected by your security systems and detained by the drones. Crime is extremely uncommon in your arcology, but this is a special case. A well-muscled, well-armed $woman was caught attempting to smuggle a slave owned by one of your tenants out of the arcology. Though the slave surrendered immediately (and will be dealt with by _hisU owner), the would-be liberatrix was caught by your security drones. $He destroyed two of them and caused @@.red;other minor damage@@<<run cashX(-1000, "event", $activeSlave)>> that will require a small sum to repair, but was eventually subdued. The drones had to expend a great deal of nonlethal ordnance to bring $him down and keep $him down, but $he is now entirely at your mercy.
+<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> alerts you that a criminal has been detected by your security systems and detained by the drones. Crime is extremely uncommon in your arcology, but this is a special case. A well-muscled, well-armed $woman was caught attempting to smuggle a slave owned by one of your tenants out of the arcology. Though the slave surrendered immediately (and will be dealt with by _hisU owner), the would-be liberatrix was caught by your security drones. $He destroyed two of them and caused @@.red;other minor damage@@<<run cashX(forceNeg(1000), "event", $activeSlave)>> that will require a small sum to repair, but was eventually subdued. The drones had to expend a great deal of nonlethal ordnance to bring $him down and keep $him down, but $he is now entirely at your mercy.
+
+<<case "passfail">>
+
+<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> alerts you that a criminal has been detected by your security systems and detained by the drones. Crime is extremely uncommon in your arcology, since nothing can escape the notice of the omnipresent monitoring systems. Nevertheless, it seems one of your tenants, a rather ordinary white collar worker, has been severely wounded in a freak industrial accident, to the point that a blood transfusion was needed. In the course of doing so, an arcology hospital's autosurgery noted several genetic discrepancies and alerted a few nearby drones. Simply put, while the $woman appears to be a normal _fakeRace $woman, this is the result of numerous cosmetic surgeries; $he is actually _realRace. The laws of your arcology hold that members of the _realRace race are fit only for slavery, quite unlike the superior _fakeRace people. That a _realRace $girl would gain a position of relatively high class and power through such deception and fraud is considered an outrage by many of your citizens, and so $he was place under arrest before $he even awoke from surgery. $He is now entirely at your mercy.
 
 <</switch>>
 
@@ -366,7 +401,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			You complete the legalities and biometric scanning quickly and without fuss. $He sobs throughout the process, though stops once $he realizes being a slave means free food.
 		<<case "anchorBaby">>
 			You complete the legalities and biometric scanning quickly and without fuss. $He doesn't stop screaming "citizenship" until $his children are taken from $him and $he is shoved off to the penthouse for basic slave induction.
-		<<case "businesswoman" "mule" "rapist" "whore">>
+		<<case "businesswoman" "mule" "passfail" "rapist" "whore">>
 			You complete the legalities and biometric scanning quickly and without fuss. The condemned sobs and begs throughout the process until you grow tired of the whining and apply punishment. Then it's off to the penthouse for basic slave induction.
 		<<case "liberator">>
 			You complete the legalities and biometric scanning quickly and cautiously. Though the would-be liberator is of course restrained, disarmed, and still sedated, $he could awake at any time. Based on the drone logs, $he is likely to be violent when $he does.
@@ -417,6 +452,8 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			You declare $his holes fair game for the entire arcology as punishment for trying to smuggle in a load instead of taking one. $He spends a torturous day in the stocks before being hauled in for enslavement, somewhat @@.red;the worse for wear@@ and @@.red;acting oddly@@ due to $his ordeal, bruises all over $his body, cum leaking from $his @@.lime;loosened@@ anus<<if $activeSlave.vagina > -1>> and @@.lime;fucked-out@@ pussy<</if>>. The public @@.green;enjoys the fun.@@
 		<<case "liberator">>
 			Slaveownership is the cornerstone of the society you're building in your arcology, and this $woman attempted to undermine it. $His holes are thus fair game for the entire arcology. $He spends a torturous day in the stocks before being hauled in for enslavement, somewhat @@.red;the worse for wear@@ and @@.red;acting oddly@@ due to $his ordeal, bruises all over $his body, cum leaking from $his @@.lime;loosened@@ anus<<if $activeSlave.vagina > -1>> and @@.lime;fucked-out@@ pussy<</if>>. The public @@.green;enjoys the fun,@@ and small slaveholders are @@.green;encouraged to do business with your arcology@@ after word of the incident gets around.
+		<<case "passfail">>
+			You declare $his holes fair game for the entire arcology; after all, $he did want to be around lots of _fakeRace people, didn't $he? $He spends a torturous day in the stocks before being hauled in for enslavement, somewhat @@.red;the worse for wear@@ and @@.red;acting oddly@@ due to $his ordeal, bruises all over $his body, cum leaking from $his @@.lime;loosened@@ anus<<if $activeSlave.vagina > -1>> and @@.lime;fucked-out@@ pussy<</if>>. The public @@.green;enjoys the fun.@@
 		<</switch>>
 		<<run repX(500, "event", $activeSlave)>>
 		<<set $arcologies[0].prosperity += 2>>
@@ -437,7 +474,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			You complete the legalities and biometric scanning quickly, and tell the crowd that $his holes will be available at the arcade within the hour. The public @@.green;looks forward@@ to seeing $him there, angrily suspecting $him of being an escapee and glad that they'll be able to take part in $his punishment.
 		<<case "anchorBaby">>
 			You complete the legalities and biometric scanning quickly and have $his children taken away. The condemned screeches $his displeasure throughout the process until you grow tired of the whining and sedate $him for immurement in the arcade. The public @@.green;looks forward@@ to seeing $him there and vying to see who gets to fill $his womb with another child.
-		<<case "businesswoman" "mule" "rapist" "whore">>
+		<<case "businesswoman" "mule" "passfail" "rapist" "whore">>
 			You complete the legalities and biometric scanning quickly and cautiously. The condemned sobs and begs throughout the process until you grow tired of the whining and sedate $him for immurement in the arcade. The public @@.green;looks forward@@ to seeing $him there and getting some of their own back.
 		<<case "liberator">>
 			You complete the legalities and biometric scanning quickly and cautiously. Though the would-be liberator is of course restrained, disarmed, and still sedated, $he could awake at any time. It would be best to have $him restrained for public use in the arcade first. The public @@.green;looks forward@@ to seeing $him there.
@@ -471,6 +508,8 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			You complete the legalities and biometric scanning quickly and cautiously. The condemned resists installation in $dairyName with energy born of desperation. The public @@.green;accepts@@ this as an appropriate punishment, especially when you release footage of the rapist's <<if $dairyStimulatorsSetting > 1>>agony as $his anus adapts to accommodate rectal dildo hydration<<else>>newly growing breasts as they are roughly milked<</if>>.
 		<<case "liberator">>
 			You complete the legalities and biometric scanning quickly and cautiously. The condemned resists installation in $dairyName with energy born of desperation. The public @@.green;accepts@@ this as an appropriate punishment, especially when you release footage of the criminal's <<if ($dairyPregSetting > 1) && ($activeSlave.vagina > 0)>>discomfort as $his pussy adapts to industrial reproduction<<elseif $dairyStimulatorsSetting > 1>>discomfort as $his anus adapts to accommodate rectal dildo hydration<<else>>breasts as they are roughly milked<</if>>, together with a report on the likely productivity of such a fit body capable of withstanding the stress of high throughput.
+		<<case "passfail">>
+			You complete the legalities and biometric scanning quickly. The condemned is too weak to resist as $he is installed in $dairyName but $he weeps the entire time. The public @@.green;accepts@@ this as an appropriate punishment, especially when you release footage of the criminal's <<if ($dairyPregSetting > 1) && ($activeSlave.vagina > 0)>>discomfort as $his pussy adapts to industrial reproduction<<elseif $dairyStimulatorsSetting > 1>>discomfort as $his anus adapts to accommodate rectal dildo hydration<<else>>breasts as they are roughly milked<</if>>.
 		<</switch>>
 		<<run repX(250, "event", $activeSlave)>>
 		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
@@ -491,7 +530,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 		<<case "addict">>
 			An example must be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting malefactor is stripped and stuffed into your remote surgery on public video feed. $He begs for a fix until $he realizes what's coming, at which point $he switches to fighting vainly to escape. Of course, @@.red;$his health is affected@@ and the horrible experience has left $him @@.red;acting oddly.@@ Then it's off to the penthouse for basic slave induction. The public @@.green;approves of this harshness.@@
 		<<case "escapee">>
-			An example must be made. If $he escaped once with $his tendons clipped, $he must be rather talented at it. It remains to be seen if $he can manage to escape with nor arms and legs, so you announce $his sentence to the crowd and send $his unconscious form for reduction. Of course, @@.red;$his health is affected.@@ The public @@.green;approves of this harshness,@@ believing that you have taken strong measures against escapees.
+			An example must be made. If $he escaped once with $his tendons clipped, $he must be rather talented at it. It remains to be seen if $he can manage to escape with neither arms nor legs, so you announce $his sentence to the crowd and send $his unconscious form for reduction. Of course, @@.red;$his health is affected.@@ The public @@.green;approves of this harshness,@@ believing that you have taken strong measures against escapees.
 		<<case "orphanloli">>
 			An example must be made. If $he thinks $he can escape captivity and steal to survive, let's see $him try without arms and legs, so you announce $his sentence to the crowd and send $his unconscious form for reduction. Of course, @@.red;$his health is affected.@@ The public @@.green;approves of this harshness,@@ believing that you have taken strong measures against escapees.
 		<<case "anchorBaby">>
@@ -506,6 +545,8 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			An example must be made. With the quantity of drugs consumed in the arcology, quality is everything and attempting to undermine that is unforgivable. The protesting malefactor is stripped and stuffed into your remote surgery on public video feed. $He begs and pleads until $he sees $his doom in the form of the surgical machinery, at which point $he switches to fighting vainly to escape. Of course, @@.red;$his health is affected@@ and the horrible experience has left $him @@.red;acting oddly.@@ Then it's off to the penthouse for basic slave induction. The public @@.green;approves of this harshness,@@ since $he can hardly haul contraband into your arcology without the ability to move $himself.
 		<<case "liberator">>
 			An example must be made. Slaveownership is the cornerstone of the society you're building in your arcology, and this $woman attempted to undermine it. The protesting malefactor is stripped and stuffed into your remote surgery on public video feed. $He begs and pleads until $he sees $his doom in the form of the surgical machinery, at which point $he switches to fighting vainly to escape. Of course, @@.red;$his health is affected@@ and the horrible experience has left $him @@.red;acting oddly.@@ Then it's off to the penthouse for basic slave induction. The public @@.green;approves of this harshness,@@ since $he will scarcely be able to liberate anyone without arms or legs.
+		<<case "passfail">>
+			An example must be made. The citizens of your arcology must be assured that the racially inferior will not try to rise above their station, no matter their deceptions. The protesting malefactor is stripped and stuffed into your remote surgery on public video feed. $He begs and pleads until $he sees $his doom in the form of the surgical machinery, at which point $he switches to fighting vainly to escape. Of course, @@.red;$his health is affected@@ and the horrible experience has left $him @@.red;acting oddly.@@ Then it's off to the penthouse for basic slave induction. The public @@.green;approves of this harshness.@@
 		<</switch>>
 		<<run repX(500, "event", $activeSlave)>>
 		<<include "New Slave Intro">>
@@ -540,7 +581,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 				<<run repX(500, "event", $activeSlave)>>
 			<<else>>
 				@@.red;feels you let this criminal off too easy.@@
-				<<run repX(-100, "event", $activeSlave)>>
+				<<run repX(forceNeg(100), "event", $activeSlave)>>
 			<</if>>
 		<<include "New Slave Intro">>
 		<</replace>>
@@ -561,7 +602,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 				<<run repX(100, "event", $activeSlave)>>
 			<<else>>
 				@@.red;feels you let this criminal off too easy.@@
-				<<run repX(-100, "event", $activeSlave)>>
+				<<run repX(forceNeg(100), "event", $activeSlave)>>
 			<</if>>
 		<</replace>>
 	<</link>>
@@ -581,6 +622,8 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 		Naturally, the wretch will be thrown out of the arcology: but an example must first be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting bitch is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
 	<<case "mule" "rapist" "whore">>
 		Naturally, the wretch will be thrown out of the arcology: but an example must first be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting malefactor is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
+	<<case "passfail">>
+		Naturally, the wretch will be thrown out of the arcology: but an example must first be made. Free people must understand that _realRace scum won't steal their livelihoods. The protesting malefactor is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
 	<<case "liberator">>
 		An example must be made. Slaveownership is the cornerstone of the society you're building in your arcology, and this $woman attempted to undermine it. The protesting bitch is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public @@.green;approves of this harshness.@@
 	<</switch>>
@@ -611,7 +654,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin
 			You complete the legalities and biometric scanning quickly and without fuss. $He sobs throughout the process, though stops once $he realizes being a slave means free food. $He starts crying again once $he realizes $he is heading for the slave markets.
 		<<case "anchorBaby">>
 			You complete the legalities and biometric scanning quickly and without fuss. The condemned sobs and begs throughout the process until you grow tired of the whining and apply punishment. Then it's off to slave markets for sale. $His children <<if $cash4Babies == 1>>head off to be sold as well<<else>>will be sent to a slave orphanage for future sale<</if>>.
-		<<case "businesswoman" "mule" "rapist" "whore">>
+		<<case "businesswoman" "mule" "passfail" "rapist" "whore">>
 			You complete the legalities and biometric scanning quickly and without fuss. The condemned sobs and begs throughout the process until you grow tired of the whining and apply punishment. Then it's off to slave markets for sale.
 		<<case "liberator">>
 			You complete the legalities and biometric scanning quickly and cautiously. Though the would-be liberator is of course restrained, disarmed, and still sedated, $he could awake at any time. Based on the drone logs, $he is likely to be violent when $he does. You make sure that $he isn't going to get loose as $he is sent off to the slave market; the public would not be pleased if $he went on another rampage.
diff --git a/src/uncategorized/reMilfTourist.tw b/src/uncategorized/reMilfTourist.tw
index 15751de1bcac48d4a8e4581ea1a3b88aa999ca7d..4694bdab7f0f557108d3e05dd05555b5bcbdd8f8 100644
--- a/src/uncategorized/reMilfTourist.tw
+++ b/src/uncategorized/reMilfTourist.tw
@@ -17,7 +17,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She came to your arcology as a tourist and found herself enslaved.">>
 <<set $activeSlave.devotion = random(-70,-55)>>
 <<set $activeSlave.trust = random(-45,-25)>>
@@ -164,7 +164,7 @@
 		/* 000-250-006 */
 	<</replace>>
 	<<replace "#result">>
-	When your new slave comes to, _his2 weight is hanging from _his2 wrists, bound over _his2 head. _He2's not exactly thin, making the position uncomfortable for _his2 arms, so _he2 groggily stands, finding _himself2 in a pool of light in the middle of a cell. _He2's nursing a tremendous hangover, and though _he2 does not realize it, _he2's drugged. You're present, though not visible, witnessing _his2 first conscious moment of slavery from your desk. Realization is slow. _He2's no innocent, so _he2 recognizes the sensations of waking up the morning after a night of drinking interspersed with vigorous vaginal, oral and anal intercourse, but _he2 does not remember the specifics. After a few minutes, _he2 understands that no one is coming, and speaks up hesitantly: "Is anyone there?" Getting no immediate answer, _he2 slumps against _his2 wrist restraints again, and begins to cry to _himself2. "W-why would a-anyone do this."
+	When your new slave comes to, _his2 weight is hanging from _his2 wrists, bound over _his2 head. _He2's not exactly thin, making the position uncomfortable for _his2 arms, so _he2 groggily stands, finding _himself2 in a pool of light in the middle of a cell. _He2's nursing a tremendous hangover, and though _he2 does not realize it, _he2's drugged. You're present, though not visible, witnessing _his2 first conscious moment of slavery from your desk. Realization is slow. _He2's no innocent, so _he2 recognizes the sensations of waking up the morning after a night of drinking interspersed with vigorous vaginal, oral, and anal intercourse, but _he2 does not remember the specifics. After a few minutes, _he2 understands that no one is coming, and speaks up hesitantly: "Is anyone there?" Getting no immediate answer, _he2 slumps against _his2 wrist restraints again, and begins to cry to _himself2. "W-why would a-anyone do this."
 	<br>
 	<<run cashX(-20000, "event", $activeSlave)>>
 	<<include "New Slave Intro">>
diff --git a/src/uncategorized/reNickname.tw b/src/uncategorized/reNickname.tw
index ec7d10fc2c9c94ca695d0f15f834a6994a62eecb..bd6abe7a7b655c1b23b70449ab8ec39b2a9f0cad 100644
--- a/src/uncategorized/reNickname.tw
+++ b/src/uncategorized/reNickname.tw
@@ -1027,7 +1027,7 @@
 	<<set $notApplyDesc = "accepts that $his broad areolae are just another part of $him, just like $his big tits.">>
 
 <<case "lips">>
-	<<set $nickname = either("'Beestung'", "'Cakehole'", "'Chops'", "'DSLs'", "'Ducklips'", "'Facepussy'", "'Fat Lips'",  "'Lip Gloss'", "'Kisser'", "'Kissing Booth'", "'Kissy'", "'Lippy'", "'Lips'", "'Lipstick'", "'Mwah'", "'Pillows'", "'Rims'", "'Smackers'", "'Smooches'", "'Soup Coolers'", "'Sucker'", "'Suckles'", "'Sucky-Sucky'")>>
+	<<set $nickname = either("'Beestung'", "'Cakehole'", "'Chops'", "'DSLs'", "'Ducklips'", "'Facepussy'", "'Fat Lips'", "'Kisser'", "'Kissing Booth'", "'Kissy'", "'Lip Gloss'", "'Lippy'", "'Lips'", "'Lipstick'", "'Mwah'", "'Pillows'", "'Rims'", "'Smackers'", "'Smooches'", "'Soup Coolers'", "'Sucker'", "'Suckles'", "'Sucky-Sucky'")>>
 	<<set $situationDesc = "has lovely lips. They're so big $he can hardly talk straight, and they even hinder $his ability to communicate any facial expression other than a desire to be facefucked. This is appropriate, as $he spends a lot of time getting facefucked.">>
 	<<set $applyDesc = "accepts that $his big lips define $him. Even more than before, $he presents $his mouth for oral sex whenever $he flirts, and $he views $his throat as $his primary sexual organ.">>
 	<<set $notApplyDesc = "accepts that $his mouth is only one of $his holes, and that as a sex slave $he'll be taking cock in all of them, even if $his lips are huge.">>
diff --git a/src/uncategorized/rePokerNight.tw b/src/uncategorized/rePokerNight.tw
index a8676a3ccc5482412465aff820355a3380373d67..e415f97174e92e5dc8251be3f7f47fad675a5dc4 100644
--- a/src/uncategorized/rePokerNight.tw
+++ b/src/uncategorized/rePokerNight.tw
@@ -70,9 +70,9 @@ On a particularly lackadaisical evening, you find yourself alerted to a message
 						<<set $fixedRace = _races.random()>>
 					<</if>>
 					<<if $seeDicks != 100>>
-						<<include "Generate XX Slave">>
+						<<set $activeSlave = GenerateNewSlave("XX")>>
 					<<else>>
-						<<include "Generate XY Slave">>
+						<<set $activeSlave = GenerateNewSlave("XY")>>
 					<</if>>
 					<<set $activeSlave.origin = "She put herself up as collateral at a poker game, and lost.">>
 					<<set $activeSlave.career = "a soldier">>
diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw
index 3fbc3a239eda882f0fd941973d8c99c4437be2c5..cd14e70d2112ea6645a90f08fe1356a9d7e5c458 100644
--- a/src/uncategorized/reRecruit.tw
+++ b/src/uncategorized/reRecruit.tw
@@ -35,7 +35,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself to you as a slave to escape a life of boredom.">>
 <<set $activeSlave.career = "a party girl">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -70,7 +70,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered herself to you as a slave to escape a life of boredom.">>
 <<set $activeSlave.career = "a party girl">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -100,7 +100,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself to you as a slave to escape the hard life of a free whore.">>
 <<set $activeSlave.career = "a prostitute">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -140,7 +140,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was enslaved after she fell into debt to you.">>
 <<set $activeSlave.devotion = random(-45,-25)>>
 <<set $activeSlave.trust = random(-15,0)>>
@@ -155,7 +155,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "You turned her into a slave girl after she fell into debt to you.">>
 <<set $activeSlave.devotion = random(-45,-25)>>
 <<set $activeSlave.trust = random(-15,0)>>
@@ -184,7 +184,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself into slavery out of fear that life on the streets was endangering her pregnancy.">>
 <<set $activeSlave.devotion = random(0,15)>>
 <<set $activeSlave.trust = random(0,15)>>
@@ -220,7 +220,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered herself as a slave to escape the horrors a blind girl faces on the streets.">>
 <<set $activeSlave.devotion = random(20,30)>>
 <<set $activeSlave.trust = random(0,15)>>
@@ -288,7 +288,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself into slavery to escape life on the streets.">>
 <<set $activeSlave.devotion = random(0,15)>>
 <<set $activeSlave.trust = random(0,15)>>
@@ -310,7 +310,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "You tricked her into enslavement, manipulating her based on her surgical addiction.">>
 <<set $activeSlave.devotion = random(-75,-60)>>
 <<set $activeSlave.trust = random(-15,0)>>
@@ -331,7 +331,7 @@
 <<set $activeSlaveOneTimeMaxAge = 16>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was raised in a radical slave school that treated her with drugs and surgery from a very young age.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -362,7 +362,7 @@
 <<set $activeSlaveOneTimeMaxAge = 16>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was raised in a radical slave school that treated her from a very young age, up to the point that she never experienced male puberty.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -400,7 +400,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She asked to be enslaved out of naïve infatuation with you.">>
 <<set $activeSlave.devotion = random(25,30)>>
 <<set $activeSlave.trust = random(-15,-10)>>
@@ -426,7 +426,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She asked to be enslaved in the hope you'd treat a fellow woman well.">>
 <<set $activeSlave.devotion = random(10,15)>>
 <<set $activeSlave.trust = random(-15,-10)>>
@@ -456,7 +456,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She asked to be enslaved since she felt you were her only hope of becoming a prettier woman.">>
 <<set $activeSlave.devotion = random(10,15)>>
 <<set $activeSlave.trust = random(-15,-10)>>
@@ -498,7 +498,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She got into debt for damaging someone's property during a student protest and you bought out her debt.">>
 <<set $activeSlave.devotion = random(-25,0)>>
 <<set $activeSlave.trust = random(-20,-5)>>
@@ -534,7 +534,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She got into debt for damaging someone's property during a student protest and you bought out her debt.">>
 <<set $activeSlave.devotion = random(-30,-5)>>
 <<set $activeSlave.trust = random(-25,-5)>>
@@ -573,7 +573,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She got into debt for damaging someone's property during a student protest and you bought out her debt.">>
 <<set $activeSlave.devotion = -100>>
 <<set $activeSlave.trust = 60>>
@@ -627,7 +627,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She enslaved herself to be with a man she loved, only to be sold to you afterward.">>
 <<set $activeSlave.devotion = random(-30,-5)>>
 <<set $activeSlave.trust = random(-25,-5)>>
@@ -667,7 +667,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She (formerly he) enslaved herself to be with a man she loved, only to be sold to you afterward.">>
 <<set $activeSlave.devotion = random(-30,-5)>>
 <<set $activeSlave.trust = random(-25,-5)>>
@@ -708,7 +708,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She (formerly he) enslaved herself to be with a man she loved, only to be sold to you afterward.">>
 <<set $activeSlave.devotion = random(-30,-5)>>
 <<set $activeSlave.trust = random(-25,-5)>>
@@ -744,7 +744,7 @@
 <<set $activeSlaveOneTimeMinAge = 17>>
 <<set $activeSlaveOneTimeMaxAge = 25>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was given to you by criminals as 'tribute', after which you transformed the overthrown (male) leader of their rival gang.">>
 <<set $activeSlave.devotion = random(-70,-40)>>
 <<set $activeSlave.trust = random(-20,-5)>>
@@ -777,7 +777,7 @@
 <<case "DG runaway">>
 
 <<set $activeSlaveOneTimeMaxAge = 24>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.">>
 <<set $activeSlave.devotion = random(0,25)>>
 <<set $activeSlave.trust = -20>>
@@ -817,7 +817,7 @@
 <<case "herm runaway">>
 
 <<set $activeSlaveOneTimeMaxAge = 24>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.">>
 <<set $activeSlave.devotion = random(0,25)>>
 <<set $activeSlave.trust = -20>>
@@ -863,7 +863,7 @@
 <<case "female runaway">>
 
 <<set $activeSlaveOneTimeMaxAge = 24>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a runaway slave captured by a gang outside your arcology. You bought her cheap after she was harshly used by them.">>
 <<set $activeSlave.devotion = random(0,25)>>
 <<set $activeSlave.trust = -20>>
@@ -909,7 +909,7 @@
 <<set $activeSlaveOneTimeMaxAge = 24>>
 <<set $oneTimeDisableDisability = 1>>
 <<set $fixedRace = "white">>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the private slave of a con artist cult leader before he had to abandon her and flee.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -955,7 +955,7 @@
 <<set $activeSlaveOneTimeMaxAge = 22>>
 <<set $oneTimeDisableDisability = 1>>
 <<set $fixedRace = "white">>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the private slave of a con artist cult leader before he had to abandon her and flee.">>
 <<set $activeSlave.devotion = random(-45,15)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1000,7 +1000,7 @@
 <<set $activeSlaveOneTimeMinAge = 19>>
 <<set $activeSlaveOneTimeMaxAge = 22>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was a dickgirl chaser in the slave races before being sold to you.">>
 <<set $activeSlave.prestige = 1>>
 <<set $activeSlave.prestigeDesc = "Many people remember her from the slavegirl races where she slammed her cock into countless runners' pussies after catching them.">>
@@ -1045,7 +1045,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 21>>
 <</if>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a virgin runner in the slave races before being sold to you.">>
 <<set $activeSlave.prestige = 1>>
 <<set $activeSlave.prestigeDesc = "After her short but very promising slave racing career, during which she made it through several competitions as a virgin, many people fondly remember fantasizing about taking her.">>
@@ -1093,7 +1093,7 @@
 <<set $activeSlaveOneTimeMinAge = (Math.min(21, Math.max(11,$minimumSlaveAge) + 3))>>
 <<set $activeSlaveOneTimeMaxAge = 24>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a famous virgin runner in the slave races before being sold to you.">>
 <<set $activeSlave.prestige = 2>>
 <<set $activeSlave.prestigeDesc = "For years, she delighted the watchers of slave girl racing with winning competition after competition with her virginity intact.">>
@@ -1132,7 +1132,7 @@
 <<set $activeSlaveOneTimeMinAge = 18>>
 <<set $activeSlaveOneTimeMaxAge = 23>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the housekeeper and fucktoy of a frat house before being collected by repo-men and sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1168,7 +1168,7 @@
 <<set $activeSlaveOneTimeMinAge = 20>>
 <<set $activeSlaveOneTimeMaxAge = 25>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a nanny before being sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(-50,-25)>>
@@ -1209,7 +1209,7 @@
 <</if>>
 <<set $activeSlaveOneTimeMaxAge = 30>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a milk cow in the stable of a slaveholding farmer before being sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1258,7 +1258,7 @@
 <</if>>
 <<set $activeSlaveOneTimeMaxAge = 25>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was a breeding bull in the stable of a slaveholding farmer before being sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1296,7 +1296,7 @@
 
 <<set $activeSlaveOneTimeMaxAge = 19>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was a virgin cow in the stable of a slaveholding farmer before being sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1334,7 +1334,7 @@
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was in an orphanage until reaching maturity, at which point she was sold to you.">>
 <<set $activeSlave.devotion = random(-45,-25)>>
 <<set $activeSlave.trust = random(-25,0)>>
@@ -1370,7 +1370,7 @@
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was in an orphanage until reaching maturity, at which point she was sold to you.">>
 <<set $activeSlave.devotion = random(10,40)>>
 <<set $activeSlave.trust = random(-25,0)>>
@@ -1414,7 +1414,7 @@
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $oneTimeDisableDisability = 1>>
 <<set $fixedRace = "white">>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was captured in a raid on a gated community and quickly sold off.">>
 <<set $activeSlave.devotion = -20>>
 <<set $activeSlave.trust = 0>>
@@ -1457,7 +1457,7 @@
 <<set $activeSlaveOneTimeMaxAge = 43>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Middle aged with two daughters. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself into slavery to pay for her children's education.">>
 <<set $activeSlave.devotion = random(0,15)>>
 <<set $activeSlave.trust = random(0,15)>>
@@ -1478,7 +1478,7 @@
 <<set $activeSlaveOneTimeMinAge = 12>>
 <<set $activeSlaveOneTimeMaxAge = 18>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself into slavery to spite her father.">>
 <<set $activeSlave.devotion = 20>>
 <<set $activeSlave.trust = 0>>
@@ -1547,7 +1547,7 @@
 <<set $activeSlaveOneTimeMaxAge = 43>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Decades of service. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the housekeeper and fucktoy of a frat house before being replaced in favor of fresher slaves and sold to you.">>
 <<set $activeSlave.devotion = random(25,50)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1597,7 +1597,7 @@
 <<set $oneTimeDisableDisability = 1>>
 <<set $fixedRace = "asian">>
 <<set $fixedNationality = "Stateless">>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to sell you her body and you graciously accepted.">>
 <<set $activeSlave.devotion = random(-45,-25)>>
 <<set $activeSlave.trust = random(-15,0)>>
@@ -1641,7 +1641,7 @@
 	<<set $fixedRace = _races.random()>>
 <</if>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "You helped her give birth, leaving her deeply indebted to you.">>
 <<set $activeSlave.devotion = random(0,20)>>
 <<set $activeSlave.trust = random(0,20)>>
@@ -1670,7 +1670,7 @@
 <<set $activeSlaveOneTimeMaxAge = 24>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She sold herself into slavery to feed herself and her growing brood.">>
 <<set $activeSlave.career = "a farm laborer">>
 <<set $activeSlave.health = random(-35,-10)>>
@@ -1713,7 +1713,7 @@
 <<set $activeSlaveOneTimeMaxAge = 22>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.PLimb = 1>>
 <<set $activeSlave.origin = "You helped free her from a POW camp after being abandoned by her country, leaving her deeply indebted to you.">>
 <<set $activeSlave.devotion = random(0,20)>>
@@ -1761,7 +1761,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "Her womb held a baby you desired.">>
 <<set $activeSlave.face = 100>>
 <<set $activeSlave.intelligence = random(96,100)>>
@@ -1783,7 +1783,7 @@
 <<set $activeSlave.PLimb = 1>>
 <<set $activeSlaveOneTimeMaxAge = 24>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.career = setup.bodyguardCareers.random()>>
 <<set $activeSlave.origin = "She is an unsuccessful cyborg experiment that was set free.">>
 <<set $activeSlave.devotion = random(0,20)>>
@@ -1827,7 +1827,7 @@
 <</if>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the virgin figurehead of a new religion and 'blessed' by their Lord.">>
 <<set $activeSlave.devotion = random(-20,20)>>
 <<set $activeSlave.trust = random(25,50)>>
@@ -1872,7 +1872,7 @@
 <</if>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was the holy vessel of a new religion and 'blessed' by their Lord to bring forth His servants.">>
 <<set $activeSlave.health = random(100,100)>>
 <<set $activeSlave.face = random(20,90)>>
@@ -1905,7 +1905,7 @@
 <</if>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.face = random(80,100)>>
 <<set $activeSlave.intelligence = random(60,100)>>
 <<set $activeSlave.intelligenceImplant = 30>>
@@ -1935,7 +1935,7 @@
 <<set $activeSlaveOneTimeMinAge = 14>>
 <<set $activeSlaveOneTimeMaxAge = 22>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.face = random(90,100)>>
 <<set $activeSlave.intelligence = random(60,100)>>
 <<set $activeSlave.intelligenceImplant = 30>>
@@ -1967,7 +1967,7 @@
 <<set $activeSlaveOneTimeMinAge = $fertilityAge>>
 <<set $activeSlaveOneTimeMaxAge = 22>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.face = random(60,100)>>
 <<set $activeSlave.intelligence = random(30,100)>>
 <<set $activeSlave.intelligenceImplant = 15>>
@@ -2759,7 +2759,7 @@ He explains that one of his servant <<= $girl>>s was impregnated by his fool of
 				<<set $activeSlaveOneTimeMinAge = 8>>
 				<<set $activeSlaveOneTimeMaxAge = 32>>
 				<<set $oneTimeDisableDisability = 1>>
-				<<include "Generate XX Slave">>
+				<<set $activeSlave = GenerateNewSlave("XX")>>
 				<<set $activeSlave.face = random(20,100)>>
 				<<set $activeSlave.intelligence = random(20,60)>>
 				<<set $activeSlave.intelligenceImplant = 0>>
diff --git a/src/uncategorized/reShelterInspection.tw b/src/uncategorized/reShelterInspection.tw
index bebc851112629a3ef4d367cd5232f571b6383931..7fdafd9edbf825aa1385c9054c557253ef41355c 100644
--- a/src/uncategorized/reShelterInspection.tw
+++ b/src/uncategorized/reShelterInspection.tw
@@ -13,7 +13,7 @@
 	<<set $fixedRace = _races.random()>>
 <</if>>
 <<set $contractCost = 10000>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was once an inspector for the Shelter, but you put a stop to that.">>
 <<set $activeSlave.career = "a charity worker">>
 <<set $activeSlave.devotion = random(-90,-75)>>
diff --git a/src/uncategorized/reShippingContainer.tw b/src/uncategorized/reShippingContainer.tw
index 0f6c3f1147946bba62345f24834bf47e518e0594..74c8fcf268a432d4bbb65669c6032db962b34de3 100644
--- a/src/uncategorized/reShippingContainer.tw
+++ b/src/uncategorized/reShippingContainer.tw
@@ -8,7 +8,7 @@
 
 <<set _newSlaves = []>>
 <<for _reShip = 0; _reShip < 5; _reShip++>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "She arrived at your arcology in an undocumented shipping container.">>
 	<<set $activeSlave.devotion = random(-90,-75)>>
 	<<set $activeSlave.trust = -20>>
diff --git a/src/uncategorized/recETS.tw b/src/uncategorized/recETS.tw
index d42682514adfd4147c0bf831e64c1fb9f769da1a..6bd2b758a3b136c4b0ec072897022984e6c194c2 100644
--- a/src/uncategorized/recETS.tw
+++ b/src/uncategorized/recETS.tw
@@ -71,7 +71,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was enslaved after you called in her business debts.">>
 <<set $activeSlave.career = "a business owner">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -108,7 +108,7 @@
 <<set $activeSlaveOneTimeMaxAge = 40>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a son who can knock her up. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.career = "a housewife">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -153,7 +153,7 @@
 <<set $activeSlaveOneTimeMaxAge = 40>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a daughter to knock up. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.devotion = random(-15,15)>>
 <<set $activeSlave.trust = random(-15,15)>>
@@ -182,7 +182,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.career = "a dropout">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -226,7 +226,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.career = "a dropout">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -260,7 +260,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.career = "a dropout">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -294,7 +294,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.devotion = random(-15,15)>>
 <<set $activeSlave.trust = random(-15,15)>>
@@ -326,7 +326,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.devotion = random(-15,15)>>
 <<set $activeSlave.trust = random(-15,15)>>
@@ -357,7 +357,7 @@
 <<set $activeSlaveOneTimeMaxAge = 20>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.vagina = 1>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -390,7 +390,7 @@
 <<set $activeSlaveOneTimeMaxAge = 40>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a daughter. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.career = "a housewife">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -428,7 +428,7 @@
 <<set $activeSlaveOneTimeMaxAge = 40>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to have a son. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She offered to become your slave to protect her incestuous relationship.">>
 <<set $activeSlave.devotion = random(-15,15)>>
 <<set $activeSlave.trust = random(-15,15)>>
@@ -462,7 +462,7 @@
 	<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
 	<<set $fixedRace = _races.random()>>
 <</if>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She was sold into slavery by her older sister.">>
 <<set $activeSlave.career = "a prostitute">>
 <<set $activeSlave.devotion = random(-15,15)>>
@@ -510,7 +510,7 @@
 <<set $activeSlaveOneTimeMinAge = 12>>
 <<set $activeSlaveOneTimeMaxAge = 21>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was brought up in a radical slave school to match her twin.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -562,7 +562,7 @@
 <<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
 <<set $activeSlaveOneTimeMaxAge = 21>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was brought up in a radical slave school to match her twin.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -617,7 +617,7 @@
 <<set $activeSlaveOneTimeMaxAge = 21>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She was brought up in a radical slave school to match her twin.">>
 <<set $activeSlave.career = "a slave">>
 <<set $activeSlave.devotion = random(25,45)>>
@@ -687,7 +687,7 @@
 <</if>>
 <<set $one_time_age_overrides_pedo_mode = 1>>
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She begged to be enslaved in a desperate attempt to provide for her many children.">>
 <<set $activeSlave.career = "homeless">>
 <<set $activeSlave.health = random(-45,-30)>>
diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw
index c646e97cd25ce0c59930e7b36625d435118adbe5..88fbc7338e0f46bdb346156fb7cc7b1e34d7cead 100644
--- a/src/uncategorized/remoteSurgery.tw
+++ b/src/uncategorized/remoteSurgery.tw
@@ -4,6 +4,18 @@
 
 <<set $surgeryType = 0, $showEncyclopedia = 1, $encyclopedia = "The Remote Surgery">>
 <<set _belly = bellyAdjective($activeSlave)>>
+/* get all prosthetics that are ready for this slave */
+<<if $adjustProstheticsCompleted > 0>>
+	<<set $adjustProsthetics = $adjustProsthetics.filter(function(p) {
+		if (p.workLeft <= 0 && p.slaveID == $activeSlave.ID) {
+			$activeSlave.readyProsthetics.push({id: p.id});
+			$adjustProstheticsCompleted--;
+			return false;
+		}
+		return true;
+	})>>
+<</if>>
+
 
 <h1>The Remote Surgery</h1>
 
@@ -144,8 +156,8 @@ $His $activeSlave.faceShape face is
 				| [[Remove eyes|Surgery Degradation][$activeSlave.eyes = -4, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "remove eyes"]]
 				<<if ($activeSlave.eyes > -2)>>//This will greatly restrict $him//<</if>>
 			<</if>>
-			<<if ($cyberMod == 1) && ($stockpile.ocularImplant > 0)>>
-				| [["Give " + $him + " ocular implants"|Surgery Degradation][$activeSlave.eyesImplant = 1, $stockpile.ocularImplant--,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "ocular implant"]]
+			<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "ocular"}) != -1>>
+				| [["Give " + $him + " ocular implants"|Surgery Degradation][$activeSlave.eyesImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "ocular implant"]]
 			<</if>>
 		<</if>>
 	<</if>>
@@ -277,12 +289,12 @@ $He has
 <</if>>
 
 <<if ($seeExtreme == 1) && $activeSlave.indentureRestrictions < 1>>
-	<<if $activeSlave.earImplant != 1>>
+	<<if $activeSlave.earImplant == 0>>
 		<<if ($activeSlave.hears > -2)>>
 			| [[Deafen|Surgery Degradation][$activeSlave.hears = -2,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10,$surgeryType = "deafen"]]
 		<</if>>
-		<<if ($cyberMod == 1) && ($stockpile.cochlearImplant > 0)>>
-			| [["Give " + $him + " cochlear implants"|Surgery Degradation][$activeSlave.earImplant = 1, $stockpile.cochlearImplant--,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "cochlear implant"]]
+		<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "cochlear"}) != -1>>
+			| [["Give " + $him + " cochlear implants"|Surgery Degradation][$activeSlave.earImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "cochlear implant"]]
 		<</if>>
 	<</if>>
 <</if>>
@@ -451,8 +463,8 @@ $He has
 		<<if $seeExtreme == 1>>
 			| [[Remove vocal cords|Surgery Degradation][$activeSlave.voice = 0, $activeSlave.voiceImplant = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10, $surgeryType = "mute"]]
 		<</if>>
-	<<elseif $activeSlave.voice == 0 && $cyberMod == 1 && $stockpile.electrolarynx > 0>>
-		[["Give " + $him + " an electrolarynx"|Surgery Degradation][$activeSlave.electrolarynx = 1, $activeSlave.voice = 2, $stockpile.electrolarynx--, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "electrolarynx"]]
+	<<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "electrolarynx"}) != -1>>
+		[["Give " + $him + " an electrolarynx"|Surgery Degradation][$activeSlave.electrolarynx = 1, $activeSlave.voice = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "electrolarynx"]]
 	<</if>>
 <</if>>
 
@@ -1432,19 +1444,19 @@ $He has
 		<</if>>
 		<<if $activeSlave.geneticQuirks.gigantomastia >= 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Corret gigantomastia|Surgery Degradation][$activeSlave.geneticQuirks.gigantomastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Correct gigantomastia|Surgery Degradation][$activeSlave.geneticQuirks.gigantomastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<</if>>
 		<<if $activeSlave.geneticQuirks.macromastia >= 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Corret macromastia|Surgery Degradation][$activeSlave.geneticQuirks.macromastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Correct macromastia|Surgery Degradation][$activeSlave.geneticQuirks.macromastia = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<</if>>
 		<<if $activeSlave.geneticQuirks.rearLipedema == 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Corret lipedema|Surgery Degradation][$activeSlave.geneticQuirks.rearLipedema = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Correct lipedema|Surgery Degradation][$activeSlave.geneticQuirks.rearLipedema = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<</if>>
 		<<if $activeSlave.geneticQuirks.wellHung == 2>>
 			<br>&nbsp;&nbsp;&nbsp;&nbsp;
-			[[Corret genetic predisposition for large genitals|Surgery Degradation][$activeSlave.geneticQuirks.wellHung = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
+			[[Correct genetic predisposition for large genitals|Surgery Degradation][$activeSlave.geneticQuirks.wellHung = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.chem += 100,$surgeryType = "gene treatment"]]
 		<</if>>
 	<</if>>
 	<br><br>
@@ -1671,13 +1683,13 @@ Work on $him structurally:
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
 <</if>>
 
-
+/* PROSTHETICS */
 <<if ($activeSlave.amp == 0)>>
 	$He has healthy limbs.
 <<else>>
 	$He is a quadruple amputee
 	<<if $activeSlave.PLimb == 1 && $activeSlave.amp == 1>>
-		and has been implanted with a <<if $cyberMod>>basic<</if>> PLimb interface.
+		and has been implanted with a basic PLimb interface.
 	<<elseif $activeSlave.PLimb == 2 && $activeSlave.amp == 1>>
 		and has been implanted with an advanced PLimb interface.
 	<<elseif $activeSlave.amp == -1>>
@@ -1695,44 +1707,35 @@ Work on $him structurally:
 	<</if>>
 <</if>>
 
-<<if $cyberMod == 0>>
-	<<if $activeSlave.amp == 0>>
-		<<if ($activeSlave.indentureRestrictions < 1) && ($seeExtreme == 1)>>
-			[[Remove arms and legs|Surgery Degradation][$activeSlave.amp = 1,$activeSlave.heels = 0,$activeSlave.shoes = "none",$activeSlave.legAccessory = "none",$activeSlave.heightImplant = 0,$activeSlave.legsTat = 0,$activeSlave.armsTat = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave),$activeSlave.health -= 40,$activeSlave.nails = 0,$activeSlave.PLimb = 0,$surgeryType = "amp1"]] //This will greatly restrict $him//
-		<</if>>
-	<<elseif $activeSlave.PLimb != 1 && $activeSlave.amp == 1>>
-		<<if ($activeSlave.indentureRestrictions < 1) && ($seeExtreme == 1)>>
-			[[Implant prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave),$activeSlave.health -= 20,$surgeryType = "prostheticInterface"]] //This will allow $him to use prosthetic limbs//
-		<</if>>
+<<if $activeSlave.amp == 0>>
+	<<if $activeSlave.indentureRestrictions < 1 && $seeExtreme == 1>>
+	<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP1"}) == -1 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP2"}) == -1>>
+		[[Remove arms and legs|Surgery Degradation][$activeSlave.amp = 1,$activeSlave.heels = 0,$activeSlave.shoes = "none", $activeSlave.legAccessory = "none", $activeSlave.heightImplant = 0, $activeSlave.legsTat = 0, $activeSlave.armsTat = 0, $activeSlave.releaseRules = "restrictive", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.nails = 0, $surgeryType = "amp"]] //This will greatly restrict $him//
+	<<else>>
+		[[Remove arms and legs|Surgery Degradation][$activeSlave.amp = 1, $activeSlave.heels = 0, $activeSlave.shoes = "none", $activeSlave.legAccessory = "none", $activeSlave.heightImplant = 0, $activeSlave.legsTat = 0, $activeSlave.armsTat = 0, $activeSlave.releaseRules = "restrictive", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 40, $activeSlave.nails = 0, $surgeryType = "amp1"]] //This will greatly restrict $him//
 	<</if>>
-<<else>>
-	<<if $activeSlave.amp == 0>>
-		<<if ($activeSlave.indentureRestrictions < 1) && ($seeExtreme == 1) && (($stockpile.basicPLimbInterface + $stockpile.advPLimbInterface) == 0)>>
-			[[Remove arms and legs|Surgery Degradation][$activeSlave.amp = 1,$activeSlave.heels = 0,$activeSlave.shoes = "none",$activeSlave.legAccessory = "none",$activeSlave.heightImplant = 0,$activeSlave.legsTat = 0,$activeSlave.armsTat = 0,$activeSlave.releaseRules = "restrictive",cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 40,$activeSlave.nails = 0,$surgeryType = "amp"]] //This will greatly restrict $him//
-		<<elseif ($activeSlave.indentureRestrictions < 1) && ($seeExtreme == 1)>>
-			[[Remove arms and legs|Surgery Degradation][$activeSlave.amp = 1,$activeSlave.heels = 0,$activeSlave.shoes = "none",$activeSlave.legAccessory = "none",$activeSlave.heightImplant = 0,$activeSlave.legsTat = 0,$activeSlave.armsTat = 0,$activeSlave.releaseRules = "restrictive",cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 40,$activeSlave.nails = 0,$surgeryType = "amp1"]] //This will greatly restrict $him//
-		<</if>>
-	<<elseif ($activeSlave.amp == 1) && ($activeSlave.PLimb == 0)>>
-		<<if ($stockpile.basicPLimbInterface > 0)>> |
-			[[Install basic prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 1,$stockpile.basicPLimbInterface -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "PLimb interface1"]]
-		<</if>>
-		<<if $stockpile.advPLimbInterface > 0>> |
-			[[Install advanced prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 2,$stockpile.advPLimbInterface -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "PLimb interface2"]]
-		<</if>>
-	<<elseif $activeSlave.amp == 1 && $activeSlave.PLimb == 1 && $stockpile.advPLimbInterface > 0>> |
-		[[Upgrade advanced prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 2,$stockpile.advPLimbInterface -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 5,$surgeryType = "PLimb interface3"]]
 	<</if>>
+<<elseif ($activeSlave.amp == 1) && ($activeSlave.PLimb == 0)>>
+	<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP1"}) != -1>> |
+		[[Install basic prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "PLimb interface1"]]
+	<</if>>
+	<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP2"}) != -1>> |
+		[[Install advanced prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20, $surgeryType = "PLimb interface2"]]
+	<</if>>
+<<elseif $activeSlave.amp == 1 && $activeSlave.PLimb == 1 && $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP2"}) != -1>> |
+	[[Upgrade advanced prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 5, $surgeryType = "PLimb interface3"]]
 <</if>>
 
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
-	<<if $activeSlave.PTail == 1>>
-		$He has a neural interface allowing attachment of tails.
-	<<elseif $stockpile.interfacePTail > 0>>
-		$He lacks a neural interface allowing attachment of tails.
-		[[Implant interface|Surgery Degradation][$activeSlave.PTail = 1, $activeSlave.tail = "none", $activeSlave.tailColor = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10, $stockpile.interfacePTail -= 1, $surgeryType = "tailInterface"]]
-	<<else>>
-		$He lacks a neural interface allowing attachment of tails and you have none in stock.
-	<</if>>
+<<if $activeSlave.PTail == 1>>
+	$He has a neural interface allowing attachment of tails.
+<<elseif $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceTail"}) != -1>>
+	$He lacks a neural interface allowing attachment of tails.
+	[[Implant interface|Surgery Degradation][$activeSlave.PTail = 1, $activeSlave.tail = "none", $activeSlave.tailColor = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 10, $surgeryType = "tailInterface"]]
+<<else>>
+	$He lacks a neural interface allowing attachment of tails and you have none ready for $him.
+<</if>>
+
 
 <<if $organFarmUpgrade >= 1>> /* ORGAN FARM */
 	<<if $activeSlave.indentureRestrictions < 2>>
@@ -1741,215 +1744,16 @@ Work on $him structurally:
 	<</if>>
 <</if>> /* CLOSES ORGAN FARM */
 
-<<if ndef $limbs>>
-	<<set $limbs = []>>
-<</if>>
-
-<<if $cyberMod == 0>> /* CyberMod Toggle */
-<<if $prostheticsUpgrade > 0>> /* PROSTHESIS FACTORY */
-<<if $activeSlave.indentureRestrictions < 2>>
-
-<br><br>
-
-<<set $activeLimbs = 0>>
-<<set _i = $limbs.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
-<<if _i != -1>>
-	<<set $activeLimbs = $limbs[_i]>>
-<</if>>
-
-<<if $activeLimbs == 0>>
-	<<if ($activeSlave.readyLimbs.length < 5 && $activeSlave.amp >= 0) || ($activeSlave.readyLimbs.length < 4 && $activeSlave.amp < 0)>> /* missing at least one type of limb */
-		The prosthesis facility is not currently building a set of artificial limbs for $him.
-		<br>&nbsp;&nbsp;&nbsp;&nbsp;
-		Construct prosthetics:
-
-		<<if $activeSlave.amp != -1>>
-			<<set _rems = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -1; })>>
-			<<if _rems == -1>>
-				<<link "Basic prosthetic limbs">>
-					<<run cashX(-10000, "slaveSurgery", $activeSlave)>>
-					<<set $activeLimbs = {weeksToCompletion: 4, ID: 0, type: "simple"}>>
-					<<set $activeLimbs.ID = $activeSlave.ID>>
-					<<set $limbs.push($activeLimbs)>>
-					<<goto "Remote Surgery">>
-				<</link>> //Costs <<print cashFormat(10000)>> and will take 4 weeks//
-			<</if>>
-		<</if>>
-
-		<<if $prostheticsUpgrade > 1>>
-			<<if $activeSlave.amp != -2>>
-				<<set _rems = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -2; })>>
-				<<if _rems == -1>>
-					|
-					<<link "Sexual functions">>
-						<<run cashX(-15000, "slaveSurgery", $activeSlave)>>
-						<<set $activeLimbs = {weeksToCompletion: 6, ID: 0, type: "sex"}>>
-						<<set $activeLimbs.ID = $activeSlave.ID>>
-						<<if $activeSlave.amp == 1>>
-							<<set $activeLimbs.weeksToCompletion += 3>>
-						<</if>>
-						<<set $limbs.push($activeLimbs)>>
-						<<goto "Remote Surgery">>
-					<</link>> //Costs <<print cashFormat(15000)>> and will take 6 weeks//
-				<</if>>
-			<</if>>
-
-			<<if $activeSlave.amp != -3>>
-				<<set _rems = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -3; })>>
-				<<if _rems == -1>>
-					|
-					<<link "Beauty and grace">>
-						<<run cashX(-15000, "slaveSurgery", $activeSlave)>>
-						<<set $activeLimbs = {weeksToCompletion: 6, ID: 0, type: "beauty"}>>
-						<<set $activeLimbs.ID = $activeSlave.ID>>
-						<<if $activeSlave.amp == 1>>
-							<<set $activeLimbs.weeksToCompletion += 3>>
-						<</if>>
-						<<set $limbs.push($activeLimbs)>>
-						<<goto "Remote Surgery">>
-					<</link>> //Costs <<print cashFormat(15000)>> and will take 6 weeks//
-				<</if>>
-			<</if>>
-
-			<<if $activeSlave.amp != -4>>
-				<<set _rems = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -4; })>>
-				<<if _rems == -1>>
-					|
-					<<link "Combat effectiveness">>
-						<<run cashX(-15000, "slaveSurgery", $activeSlave)>>
-						<<set $activeLimbs = {weeksToCompletion: 6, ID: 0, type: "combat"}>>
-						<<set $activeLimbs.ID = $activeSlave.ID>>
-						<<if $activeSlave.amp == 1>>
-							<<set $activeLimbs.weeksToCompletion += 3>>
-						<</if>>
-						<<set $limbs.push($activeLimbs)>>
-						<<goto "Remote Surgery">>
-					<</link>> //Costs <<print cashFormat(15000)>> and will take 6 weeks//
-				<</if>>
-			<</if>>
-		<</if>>
-		<<if $prostheticsUpgrade > 2>>
-			<<if $activeSlave.amp != -5>>
-				<<set _rems = $activeSlave.readyLimbs.findIndex(function(s) { return s.type == -5; })>>
-				<<if _rems == -1>>
-					|
-					<<link "Highly advanced cybernetics">>
-						<<run cashX(-25000, "slaveSurgery", $activeSlave)>>
-						<<set $activeLimbs = {weeksToCompletion: 8, ID: 0, type: "cyber"}>>
-						<<set $activeLimbs.ID = $activeSlave.ID>>
-						<<if $activeSlave.amp == 1>>
-							<<set $activeLimbs.weeksToCompletion += 6>>
-						<</if>>
-						<<set $limbs.push($activeLimbs)>>
-						<<goto "Remote Surgery">>
-					<</link>> //Costs <<print cashFormat(25000)>> and will take 8 weeks//
-				<</if>>
-			<</if>>
-		<</if>>
-	<<else>>
-		The prosthesis facility has already built a complete set of artificial limbs of every type for $him.
-	<</if>>
-<<elseif $activeLimbs.weeksToCompletion > 0>>
-	The prosthesis facility is currently building a set of
-	<<switch $activeLimbs.type>>
-	<<case "cyber">>
-		highly advanced cybernetic
-	<<case "sex">>
-		advanced sex-focus artificial
-	<<case "beauty">>
-		advanced beauty-focus artificial
-	<<case "combat">>
-		advanced combat-focus artificial
-	<<default>>
-		standard artificial
-	<</switch>>
-	limbs for $him, which is projected to be ready for attachment in $activeLimbs.weeksToCompletion <<if $activeLimbs.weeksToCompletion == 1>>week<<else>>weeks<</if>>.
-	<<link "Discard">>
-		<<set _i = $limbs.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
-		<<set $limbs.deleteAt(_i)>>
-		<<goto "Remote Surgery">>
-	<</link>>
-<<else>>
-	The prosthesis facility has constructed $his prosthetic limbs.
-	<br>&nbsp;&nbsp;&nbsp;&nbsp;
-	<<if $activeSlave.amp == 0>>
-		// $He must be an amputee to attach prosthetic limbs. //
-	<<elseif $activeSlave.PLimb == 0>>
-		// $He must have a prosthetic interface installed to attach prosthetic limbs. //
-	<<else>>
-		<<link "Attach">>
-			<<if $activeSlave.amp < 0>>
-				<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-				<<set _oldLimbs.type = $activeSlave.amp, _oldLimbs.armsTat = $activeSlave.armsTat, _oldLimbs.legsTat = $activeSlave.legsTat>>
-				<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
-			<</if>>
-
-			<<set _i = $limbs.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
-
-			<<switch $limbs[_i].type>>
-			<<case "simple">>
-				<<set $activeSlave.amp = -1>>
-				<<set $surgeryType = "basicPLimbs">>
-			<<case "sex">>
-				<<set $activeSlave.amp = -2>>
-				<<set $surgeryType = "sexPLimbs">>
-			<<case "beauty">>
-				<<set $activeSlave.amp = -3>>
-				<<set $surgeryType = "beautyPLimbs">>
-			<<case "combat">>
-				<<set $activeSlave.amp = -4>>
-				<<set $surgeryType = "combatPLimbs">>
-			<<case "cyber">>
-				<<set $activeSlave.amp = -5>>
-				<<set $surgeryType = "cyberPLimbs">>
-			<</switch>>
-			<<set $limbs.deleteAt(_i), $limbsCompleted-->>
-			<<set $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>>
-			<<goto "Surgery Degradation">>
-		<</link>>
-	<</if>>
-	|
-	<<link "Discard">>
-		<<set $limbs.deleteAt(_i), $limbsCompleted-->>
-		<<goto "Remote Surgery">>
-	<</link>>
-	|
-	<<link "Put into storage">>
-		<<set _i = $limbs.findIndex(function(s) { return s.ID == $activeSlave.ID; })>>
-		<<set _newLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
-
-		<<switch $limbs[_i].type>>
-		<<case "simple">>
-			<<set _newLimbs.type = -1>>
-		<<case "sex">>
-			<<set _newLimbs.type = -2>>
-		<<case "beauty">>
-			<<set _newLimbs.type = -3>>
-		<<case "combat">>
-			<<set _newLimbs.type = -4>>
-		<<case "cyber">>
-			<<set _newLimbs.type = -5>>
-		<</switch>>
-
-		<<set $activeSlave.readyLimbs.push(_newLimbs)>>
-		<<set $limbs.deleteAt(_i), $limbsCompleted-->>
-		<<goto "Remote Surgery">>
-	<</link>><<if $activeSlave.PLimb == 1>>// These can be accessed at any time during slave inspection //<</if>>
-<</if>>
-
-<</if>>
-<</if>> /* CLOSES PROSTHESIS FACTORY */
-<</if>> /* CyberMod Toggle */
 
 <br>
 <<if $seeExtreme == 1>>
 	<<if $activeSlave.fuckdoll == 0>>
 		<br>$He is a normal sex slave, not a living sex toy.
 		<<if $activeSlave.indentureRestrictions < 1 && ($activeSlave.breedingMark != 1 || $propOutcome == 0)>>
-			[[Encase in a Fuckdoll suit|Surgery Degradation][$activeSlave.subTarget=0, $activeSlave.sentence=0, $activeSlave.training=0, $activeSlave.toyHole="all her holes", $activeSlave.pubicHStyle="waxed", $activeSlave.livingRules="spare", $activeSlave.speechRules="restrictive", $activeSlave.releaseRules="restrictive", $activeSlave.relationshipRules="restrictive", $activeSlave.fuckdoll=1, $activeSlave.choosesOwnClothes=0, $activeSlave.clothes="a Fuckdoll suit", $activeSlave.collar="none", $activeSlave.shoes="heels",$activeSlave.legAccessory="none", $activeSlave.vaginalAccessory="none", $activeSlave.vaginalAttachment="none", $activeSlave.dickAccessory="none", $activeSlave.chastityAnus=0, $activeSlave.chastityPenis=0, $activeSlave.chastityVagina=0, $activeSlave.buttplug="none", $activeSlave.attrKnown=1, $activeSlave.fetishKnown=1, $activeSlave.inflation=0, $activeSlave.inflationType="none", $activeSlave.inflationMethod=0, $activeSlave.milkSource=0, $activeSlave.cumSource=0, $surgeryType = "fuckdoll"]] //This will greatly restrict $him//
+			[[Encase in a Fuckdoll suit|Surgery Degradation][$activeSlave.subTarget = 0, $activeSlave.sentence = 0, $activeSlave.training = 0, $activeSlave.toyHole = "all her holes", $activeSlave.pubicHStyle = "waxed", $activeSlave.livingRules = "spare", $activeSlave.speechRules = "restrictive", $activeSlave.releaseRules = "restrictive", $activeSlave.relationshipRules = "restrictive", $activeSlave.fuckdoll = 1, $activeSlave.choosesOwnClothes = 0, $activeSlave.clothes = "a Fuckdoll suit", $activeSlave.collar = "none", $activeSlave.shoes = "heels",$activeSlave.legAccessory = "none", $activeSlave.vaginalAccessory = "none", $activeSlave.vaginalAttachment = "none", $activeSlave.dickAccessory = "none", $activeSlave.chastityAnus = 0, $activeSlave.chastityPenis = 0, $activeSlave.chastityVagina = 0, $activeSlave.buttplug = "none", $activeSlave.attrKnown = 1, $activeSlave.fetishKnown = 1, $activeSlave.inflation = 0, $activeSlave.inflationType = "none", $activeSlave.inflationMethod = 0, $activeSlave.milkSource = 0, $activeSlave.cumSource = 0, $surgeryType = "fuckdoll"]] //This will greatly restrict $him//
 		<</if>>
 	<<else>>
-		<br>$He is encased in a Fuckdoll suit. [["Extract " + $him|Surgery Degradation][$activeSlave.fuckdoll=0, $activeSlave.clothes="no clothing", $activeSlave.shoes="none", $surgeryType = "fuckdollExtraction"]]
+		<br>$He is encased in a Fuckdoll suit. [["Extract " + $him|Surgery Degradation][$activeSlave.fuckdoll = 0, $activeSlave.clothes = "no clothing", $activeSlave.shoes = "none", $surgeryType = "fuckdollExtraction"]]
 	<</if>>
 <</if>>
 
@@ -1961,10 +1765,10 @@ Work on $him structurally:
 		<br>$His mind is gone; $he has either been chemically lobotomized, or has lost $his mind due to extreme abuse.
 	<</if>>
 	<<if $activeSlave.indentureRestrictions < 1 && ($activeSlave.breedingMark != 1 || $propOutcome == 0)>>
-	<<if $activeSlave.fetish != "mindbroken">>
-		[[Chemically lobotomize|Surgery Degradation][$activeSlave.fetish = "mindbroken",$activeSlave.fetishKnown = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "mindbreak"]]
-		//Warning: this is permanent and irreversible. It will destroy $his will and $his ability to remember anything but the simplest skills.//
-	<</if>>
+		<<if $activeSlave.fetish != "mindbroken">>
+			[[Chemically lobotomize|Surgery Degradation][$activeSlave.fetish = "mindbroken",$activeSlave.fetishKnown = 1,cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), $activeSlave.health -= 20,$surgeryType = "mindbreak"]]
+			//Warning: this is permanent and irreversible. It will destroy $his will and $his ability to remember anything but the simplest skills.//
+		<</if>>
 	<</if>>
 <</if>>
 
diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw
index 65ff68bcb9be9d8da67d6207d6da610a65a4d10d..8253abdfb4cfeaedba17ddbc36cd79ca87b5e14d 100644
--- a/src/uncategorized/reputation.tw
+++ b/src/uncategorized/reputation.tw
@@ -265,7 +265,7 @@ On formal occasions, you are announced as $PCTitle.
 			Your reputation is so strong that society has accepted your <<print $PC.race>>ness despite you being an inferior race.
 		<<else>>
 			Society @@.red;loathes;@@ being lead by an inferior $PC.race, believing that any other race would make a far better leader than you.
-			<<run repX(-200*($arcologies[0].FSSubjugationist/$FSLockinLevel), "PCappearance")>>
+			<<run repX(forceNeg(200*($arcologies[0].FSSubjugationist/$FSLockinLevel)), "PCappearance")>>
 		<</if>>
 	<</if>>
 <</if>>
@@ -286,11 +286,11 @@ On formal occasions, you are announced as $PCTitle.
 <<elseif $arcologies[0].FSSlimnessEnthusiast != "unset">>
 	<<if $PC.boobsBonus > 1>>
 		Society finds big breasts unsightly and you are no exception; your <<if $PC.boobsImplant == 1>>chest balloons<<else>>fat tits<</if>> @@.red;harm@@ your public image.
-		<<run repX(-10*$PC.boobsBonus, "PCappearance")>>
+		<<run repX(forceNeg(10*$PC.boobsBonus), "PCappearance")>>
 	<</if>>
 	<<if $PC.butt == 3>>
 		Society finds big butts unsightly and you are no exception; your <<if $PC.buttImplant == 1>>inflated ass<<else>>fat ass<</if>> @@.red;harms@@ your public image.
-		<<run repX(-10*$PC.butt, "PCappearance")>>
+		<<run repX(forceNeg(10*$PC.butt), "PCappearance")>>
 	<</if>>
 <</if>>
 
@@ -320,15 +320,15 @@ On formal occasions, you are announced as $PCTitle.
 <<elseif $arcologies[0].FSBodyPurist != "unset">>
 	<<if $PC.boobsImplant == 1>>
 		Society finds fake breasts repulsive and yours are no exception; your balloon-like breasts @@.red;harm@@ your public image.
-		<<run repX(-10*$PC.boobsBonus, "PCappearance")>>
+		<<run repX(forceNeg(10*$PC.boobsBonus), "PCappearance")>>
 	<</if>>
 	<<if $PC.buttImplant == 1>>
 		Society finds fake butts unsightly and yours is no exception; your inflated ass @@.red;harms@@ your public image.
-		<<run repX(-10*$PC.butt, "PCappearance")>>
+		<<run repX(forceNeg(10*$PC.butt), "PCappearance")>>
 	<</if>>
 	<<if $PC.ballsImplant > 1 && $PC.balls == 0>>
 		Society finds everything unnatural disgusting and the grotesque bulge in your crotch is no exception; your gel filled balls @@.red;harm@@ your public image.
-		<<run repX(-10*($PC.ballsImplant-$PC.balls), "PCappearance")>>
+		<<run repX(forceNeg(10*($PC.ballsImplant-$PC.balls)), "PCappearance")>>
 	<</if>>
 	<<if ($arcologies[0].FSRepopulationFocus != "unset") && $PC.boobsBonus > 0 && $PC.boobsImplant == 0>>
 		Society approves of anything that helps the repopulation efforts. Your large breasts promise plentiful milk and @@.green;improve@@ your public image.
@@ -361,7 +361,7 @@ On formal occasions, you are announced as $PCTitle.
 					<<set $failedElite += 100>>
 				<</if>>
 			<<else>>
-				Since it is public knowledge that you are carrying a child in the name of eugenics; society views you as a bearer of the future and @@.green;celebrates@@ your contributions to society.
+				Since it is public knowledge that you are carrying a child in the name of eugenics, society views you as a bearer of the future and @@.green;celebrates@@ your contributions to society.
 				<<run repX(200, "PCappearance")>>
 				<<set $failedElite -= 10>>
 			<</if>>
@@ -596,7 +596,6 @@ On formal occasions, you are announced as $PCTitle.
 		<</if>>
 		<<set $arcologies[0].FSRestart -= $FSSingleSlaveRep>>
 		<<run repX(forceNeg((5*$FSSingleSlaveRep*($arcologies[0].FSRestart/$FSLockinLevel))+($rep/40)), "babyTransfer")>>
-		<<run repX(-50, "PCactions")>>
 	<<elseif $arcologies[0].FSPaternalist != "unset">>
 		Society @@.red;greatly despises@@ your poor treatment of slave infants.
 		<<run repX(forceNeg((25*$FSSingleSlaveRep*($arcologies[0].FSPaternalist/$FSLockinLevel))+($rep/20)), "babyTransfer")>>
@@ -678,23 +677,23 @@ On formal occasions, you are announced as $PCTitle.
 <<if $PC.degeneracy > 0>>
 	<<if $PC.degeneracy > 100>>
 		There are @@.red;severe and devastating rumors@@ about you spreading across the arcology.
-		<<run repX(-100*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(100*$PC.degeneracy), "PCactions")>>
 		<<set $enduringRep = 0>>
 	<<elseif $PC.degeneracy > 75>>
 		There are @@.red;severe rumors@@ about you spreading across the arcology.
-		<<run repX(-20*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(20*$PC.degeneracy), "PCactions")>>
 	<<elseif $PC.degeneracy > 50>>
 		There are @@.red;bad rumors@@ about you spreading across the arcology.
-		<<run repX(-10*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(10*$PC.degeneracy), "PCactions")>>
 	<<elseif $PC.degeneracy > 25>>
 		There are @@.red;rumors@@ about you spreading across the arcology.
-		<<run repX(-5*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(5*$PC.degeneracy)), "PCactions")>>
 	<<elseif $PC.degeneracy > 10>>
 		There are @@.red;minor rumors@@ about you spreading across the arcology.
-		<<run repX(-2*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(2*$PC.degeneracy), "PCactions")>>
 	<<else>>
 		The occasional rumor about you can be heard throughout the arcology.
-		<<run repX(-1*$PC.degeneracy, "PCactions")>>
+		<<run repX(forceNeg(1*$PC.degeneracy), "PCactions")>>
 	<</if>>
 <</if>>
 
@@ -776,6 +775,10 @@ On formal occasions, you are announced as $PCTitle.
 			The Societal Elite @@.red;seem to dislike you.@@
 		<<elseif $failedElite > 50>>
 			The Societal Elite @@.red;mutter about you.@@
+		<<elseif $failedElite > 0>>
+			The Societal Elite @@.red;question some of your actions.@@
+		<<else>>
+			The Societal Elite hold you in high regards.
 		<</if>>
 	<<else>>
 		The Societal Elite can think what they want, they know better than to try and cross you again.
@@ -785,7 +788,7 @@ On formal occasions, you are announced as $PCTitle.
 		<<if $failedElite > 300>>
 			The Societal Elite @@.red;have departed from your arcology in disgust.@@
 			<<run FutureSocieties.remove("FSRestart")>>
-			<<run repX(-10000, "event")>>
+			<<run repX(forceNeg(10000), "event")>>
 			<<set $eliteFail = random(30,100),
 			$eliteFailTimer = 15>>
 			<<if $eliteFail > $topClass - 20>>
@@ -804,6 +807,10 @@ On formal occasions, you are announced as $PCTitle.
 			The Societal Elite @@.red;seem to dislike you.@@
 		<<elseif $failedElite > 50>>
 			The Societal Elite @@.red;mutter about you.@@
+		<<elseif $failedElite > 0>>
+			The Societal Elite @@.red;question some of your actions.@@
+		<<else>>
+			The Societal Elite hold you in warm regards.
 		<</if>>
 	<<else>>
 		The Societal Elite can think what they want, they know better than to try and cross you again.
diff --git a/src/uncategorized/resFailure.tw b/src/uncategorized/resFailure.tw
index eb51edc28c7d3bfe51294ccd40a7907883959d44..06ce2f71aabcc9dbeccf85693ec27ddc83c56c8a 100644
--- a/src/uncategorized/resFailure.tw
+++ b/src/uncategorized/resFailure.tw
@@ -30,7 +30,7 @@
 	<<set $TSS.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.career = "a slave">>
 		<<set $activeSlave.butt = either(1, 2, 2, 3)>>
 		<<set $activeSlave.boobs = either(200, 300, 300, 400)>>
@@ -94,7 +94,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 32>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
 		<<set $activeSlave.slaveSurname = 0>>
 		<<set $activeSlave.career = "a dairy cow">>
@@ -162,7 +162,7 @@
 	<<set $GRI.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was given to you by a failed subsidiary lab of the Growth Research Institute right after her use as a test subject ended.">>
 		<<set $activeSlave.career = "a slave">>
 		<<set $activeSlave.intelligenceImplant = 0>>
@@ -216,7 +216,7 @@
 	<<set $SCP.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was given to you by a failed branch campus of St. Claver Preparatory after she served as a plastic surgeon's passing final exam.">>
 		<<set $activeSlave.chem = 20>>
 		<<set $activeSlave.career = "a slave">>
@@ -294,7 +294,7 @@
 	<<set $LDE.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.origin = "She was given to you by a failed branch campus of the innovative École des Enculées right after her graduation.">>
 		<<set $activeSlave.career = "a slave">>
 		<<set $activeSlave.intelligenceImplant = 0>>
@@ -362,7 +362,7 @@
 	<<set $TGA.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.origin = "She was given to you by a failed branch campus of the intense Gymnasium-Academy right after her majority.">>
 		<<set $activeSlave.career = "a slave">>
 		<<set $activeSlave.intelligenceImplant = 15>>
@@ -418,7 +418,7 @@
 	<<set $HA.schoolAnnexed = 1>>
 	<<for $i = 0; $i < $slavesToAdd; $i++>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "She was given to you by a failed branch campus of the Hippolyta Academy right after her majority.">>
 		<<set $activeSlave.career = "a slave">>
 		<<set $activeSlave.intelligenceImplant = 15>>
@@ -480,7 +480,7 @@
 		<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
 			<<set $activeSlave = GenerateNewSlave()>>
 		<<else>>
-			<<include "Generate XY Slave">>
+			<<set $activeSlave = GenerateNewSlave("XY")>>
 		<</if>>
 		<<set $activeSlave.origin = "She was a Futanari Sister until you engineered her early enslavement.">>
 		<<set $activeSlave.career = "a Futanari Sister">>
@@ -677,7 +677,7 @@
 		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
 	<</for>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "She was the leader of your arcology's Futanari Sisters until you engineered her community's failure and enslavement.">>
 	<<set $activeSlave.career = "a Futanari Sister">>
 	<<set $activeSlave.intelligence = random(51,95)>>
diff --git a/src/uncategorized/rulesAssistantSummary.tw b/src/uncategorized/rulesAssistantSummary.tw
index f37fb8f72aa20ff682297ec5f16be8b0c7f27faf..df249a6f606e561f3cb1bb67e848dcc2028b5818 100644
--- a/src/uncategorized/rulesAssistantSummary.tw
+++ b/src/uncategorized/rulesAssistantSummary.tw
@@ -11,7 +11,7 @@
 		border-collapse: separate;
 		border-spacing: 5px;
 		border-style: hidden;
-		empty-cells: hide;        
+		empty-cells: hide;
 	}
 </style>
 
diff --git a/src/uncategorized/rulesSlaveExclude.tw b/src/uncategorized/rulesSlaveExclude.tw
index 3bda3fbbe8e85595d0a240438868031231cd0a27..50ff00c308ea639e7445b88fd6a79b8aba140590 100644
--- a/src/uncategorized/rulesSlaveExclude.tw
+++ b/src/uncategorized/rulesSlaveExclude.tw
@@ -7,15 +7,15 @@
 <</if>>
 
 <<if ($currentRule.excludedSlaves.length < 1)>>
-	<<set $Flag = 0>>
+	<<set $SlaveSummaryFiler = "assignable">>
 	Select slaves to exclude from Rule $r:
 	<<include "Slave Summary">>
 <<else>>
 	Slaves currently excluded from Rule $r: [[Clear list|Rules Slave Exclude][$currentRule.excludedSlaves = []]]
-	<<set $Flag = 1>>
+	<<set $SlaveSummaryFiler = "occupying">>
 	<<include "Slave Summary">>
 	<br><br>
 	Select more slaves to exclude from Rule $r:
-	<<set $Flag = 0>>
+	<<set $SlaveSummaryFiler = "assignable">>
 	<<include "Slave Summary">>
 <</if>>
diff --git a/src/uncategorized/rulesSlaveSelect.tw b/src/uncategorized/rulesSlaveSelect.tw
index 4f234f4a0790886558cb52525bd6877576724c84..ded8c3ef46ca23f4ef1eb37fbfdd57d2955c2c5a 100644
--- a/src/uncategorized/rulesSlaveSelect.tw
+++ b/src/uncategorized/rulesSlaveSelect.tw
@@ -7,15 +7,15 @@
 <</if>>
 
 <<if ($currentRule.selectedSlaves.length < 1)>>
-	<<set $Flag = 0>>
+	<<set $SlaveSummaryFiler = "assignable">>
 	Choose specific slaves to limit Rule $r:
 	<<include "Slave Summary">>
 <<else>>
 	Rule $r currently limited to specific slaves: [[Clear list|Rules Slave Select][$currentRule.selectedSlaves = []]]
-	<<set $Flag = 1>>
+	<<set $SlaveSummaryFiler = "occupying">>
 	<<include "Slave Summary">>
 	<br><br>
 	Choose more specific slaves:
-	<<set $Flag = 0>>
+	<<set $SlaveSummaryFiler = "assignable">>
 	<<include "Slave Summary">>
 <</if>>
diff --git a/src/uncategorized/saDiet.tw b/src/uncategorized/saDiet.tw
index 72d356d150c507fcce21f7b8ddf188f98b9a836c..223f906189133c1c1fd8917e2ef9cfbabec31185 100644
--- a/src/uncategorized/saDiet.tw
+++ b/src/uncategorized/saDiet.tw
@@ -974,7 +974,7 @@
 	The ports in Fuckdoll suits allow total dietary control, and $he's barely aware $he's being @@.lime;slimmed down.@@
 	<<set $slaves[$i].weight -= 9>>
 	<<if random(1,2) <= 1>>
-		<<if random(1,2) <= 1 && _gigantomastiaMod  != 3>>
+		<<if random(1,2) <= 1 && _gigantomastiaMod != 3>>
 			@@.orange;$His breasts get a little smaller.@@
 			<<set $slaves[$i].boobs -= 50>>
 			<<if ($slaves[$i].geneMods.NCS == 1)>>
diff --git a/src/uncategorized/saDrugs.tw b/src/uncategorized/saDrugs.tw
index 7d6b2e115744aa189c2d258752b19615f5f03ad3..7eac09f5be8d34298af0c449266e0ecc04a0c6f9 100644
--- a/src/uncategorized/saDrugs.tw
+++ b/src/uncategorized/saDrugs.tw
@@ -1030,7 +1030,7 @@
 
 <<case "breast redistributors">>
 	<<set _gigantomastiaMod = $slaves[$i].geneticQuirks.gigantomastia == 2 ? ($slaves[$i].geneticQuirks.macromastia == 2 ? 3 : 2) : 1>>
-	$He receives @@.lime;direct injections of fat redistributors right into $his 
+	$He receives @@.lime;direct injections of fat redistributors right into $his
 	<<if _gigantomastiaMod != 3>>
 		breasts, causing $his body to begin moving fatty tissue from them to $his core<<if $slaves[$i].geneMods.NCS == 1>>, $his @@.orange;NCS@@ amplifies the effectiveness@@<</if>>.
 		<<set _factor = 0>>
diff --git a/src/uncategorized/saGetMilked.tw b/src/uncategorized/saGetMilked.tw
index d320dd96011c392dfc73f4d997df2596a5b8ff3e..59d252f342e37dfd355e6fbe816cb35b9828b704 100644
--- a/src/uncategorized/saGetMilked.tw
+++ b/src/uncategorized/saGetMilked.tw
@@ -79,7 +79,7 @@ gets milked this week.
 	<</if>>
 
 	<<if ($slaves[$i].boobsImplant > 0)>>
-		However, $his 
+		However, $his
 		<<if _implantEffect >= .90>>
 			breast implants are ill-suited for
 		<<elseif _implantEffect >= .75>>
diff --git a/src/uncategorized/saLiveWithHG.tw b/src/uncategorized/saLiveWithHG.tw
index 70cd4dd5c9bdbff254f889a1e12c04f6b487507c..2122ca1099fbd7e33e565d85398ed58ac83594bd 100644
--- a/src/uncategorized/saLiveWithHG.tw
+++ b/src/uncategorized/saLiveWithHG.tw
@@ -219,19 +219,19 @@
 	<</if>>
 <</if>>
 
-<<set $skillIncrease = 10>>
+<<set _skillIncrease = 10>>
 <<if ($slaves[$i].skill.oral <= 30)>>
 	$HeadGirl.slaveName wants to come home to a talented tongue, so _he2 trains $slaves[$i].slaveName's oral skills.
-	<<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+	<<= SkillIncrease.Oral($slaves[$i], _skillIncrease)>>
 <<elseif ($slaves[$i].vagina > 0) && ($slaves[$i].skill.vaginal <= 30)>>
 	$HeadGirl.slaveName wants _his2 personal sex slave to be as skilled with $his pussy as possible, so _he2 trains $slaves[$i].slaveName's vaginal skills.
-	<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+	<<= SkillIncrease.Vaginal($slaves[$i], _skillIncrease)>>
 <<elseif ($slaves[$i].anus > 0) && ($slaves[$i].skill.anal <= 30)>>
 	$HeadGirl.slaveName wants _his2 personal sex slave to be a skillful backdoor whore, so _he2 trains $slaves[$i].slaveName's anal skills.
-	<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+	<<= SkillIncrease.Anal($slaves[$i], _skillIncrease)>>
 <<elseif ($slaves[$i].skill.entertainment <= 10)>>
 	$HeadGirl.slaveName wants to be kept amused in _his2 occasional free time, so _he2 trains $slaves[$i].slaveName's entertainment skills.
-	<<= SkillIncrease.Entertain($slaves[$i], $skillIncrease)>>
+	<<= SkillIncrease.Entertain($slaves[$i], _skillIncrease)>>
 <<elseif ($slaves[$i].sexualFlaw != "none")>>
 	$HeadGirl.slaveName is annoyed by $slaves[$i].slaveName's sexual flaws, so _he2 @@.green;trains@@ $him out of them.
 	<<set $slaves[$i].sexualFlaw = "none">>
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index 104cf5ae12f84e517cda6a954c315ba2c624cce2..cb32efeecc109dd8192885797f809305b95bdc73 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -4110,7 +4110,7 @@
 				The combination of pregnancy and constant sex has @@.lightcoral;sexualized pregnancy for $him.@@
 				<<set $slaves[$i].fetish = "pregnancy", $slaves[$i].fetishKnown = 1, $slaves[$i].fetishStrength = 65>>
 			<</if>>
-		<</if>> /* closes not fuckdoll or mindbroken check; still .preg >= 10 */
+		<</if>> /* closes not Fuckdoll or mindbroken check; still .preg >= 10 */
 		<<if $slaves[$i].geneMods.NCS == 1>>
 			/* NCS: always working against secondary sexual characteristics even in pregnancies. */
 			<<set _boobTarget = 0>>
@@ -4392,7 +4392,7 @@
 								<<set $slaves[$i].devotion += 1>>
 							<</if>>
 						<</if>>
-					<</if>> /* closes not fuckdoll not mindbroken */
+					<</if>> /* closes not Fuckdoll not mindbroken */
 
 					<<set $slaves[$i].preg = 1, $slaves[$i].pregSource = $HeadGirl.ID, $slaves[$i].pregWeek = 1, $slaves[$i].pregKnown = 1, $HGCum -= 1, $HeadGirl.counter.penetrative += 10, $penetrativeTotal += 10>>
 					<<set $slaves[$i].pregType = setPregType($slaves[$i])>>
diff --git a/src/uncategorized/saPleaseYou.tw b/src/uncategorized/saPleaseYou.tw
index 8445a44ae42e6ed914c55ee6b9b4434ccfd6daa0..baa00fa17a05cb2fd56e343b50dc10e103255b72 100644
--- a/src/uncategorized/saPleaseYou.tw
+++ b/src/uncategorized/saPleaseYou.tw
@@ -3,7 +3,6 @@
 serves you this week.
 
 <<set _trainingEfficiency = 5+Math.trunc($slaves[$i].devotion/30)+(($slaves[$i].intelligence+$slaves[$i].intelligenceImplant)/32)>>
-<<set $skillIncrease = _trainingEfficiency>>
 <<set _oralUse = 0, _analUse = 0, _vaginalUse = 0, _mammaryUse = 0, _penetrativeUse = 0>>
 <<set _fetishChangeChance = fetishChangeChance($slaves[$i])>>
 
@@ -108,7 +107,7 @@ serves you this week.
 				<</if>>
 				<<if ($slaves[$i].skill.vaginal < 100)>>
 					After a lot of time spent having vanilla sex, $his vaginal skill improves.
-					<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+					<<= SkillIncrease.Vaginal($slaves[$i], _trainingEfficiency)>>
 				<</if>>
 			<</if>>
 			<<if $PC.dick == 1>>
@@ -239,7 +238,7 @@ serves you this week.
 				<</if>>
 				<<if ($slaves[$i].skill.anal < 100)>>
 					After a lot of time spent getting buttfucked, $his anal skill improves.
-					<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+					<<= SkillIncrease.Anal($slaves[$i], _trainingEfficiency)>>
 				<</if>>
 				<<if $slaves[$i].fetish == "buttslut">>
 					<<if $slaves[$i].fetishKnown == 1>>
@@ -383,7 +382,7 @@ serves you this week.
 				<</if>>
 				<<if ($slaves[$i].skill.oral < 100)>>
 					After a lot of time spent <<if $PC.dick == 1>>sucking you off<<if $PC.vagina == 1>> and eating you out<</if>><<else>>eating you out<</if>>, $his oral skill improves.
-					<<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+					<<= SkillIncrease.Oral($slaves[$i], _trainingEfficiency)>>
 				<</if>>
 				<<if $slaves[$i].fetish == "cumslut">>
 					<<if $slaves[$i].fetishKnown == 1>>
@@ -1055,13 +1054,13 @@ serves you this week.
 		<<if $slaves[$i].fetish != "mindbroken">>
 			<<if ($slaves[$i].skill.oral < 100)>>
 				After a lot of time spent with <<if $PC.dick == 1>>your dick in $his mouth<<else>>$his mouth on your cunt<</if>>, $his oral skill improves.
-				<<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Oral($slaves[$i], _trainingEfficiency)>>
 			<<elseif ($slaves[$i].skill.vaginal < 100) && ($slaves[$i].vagina > 0) && canDoVaginal($slaves[$i])>>
 				After a lot of time spent getting fucked, $his vaginal skill improves.
-				<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Vaginal($slaves[$i], _trainingEfficiency)>>
 			<<elseif ($slaves[$i].skill.anal < 100) && ($slaves[$i].anus != 0) && canDoAnal($slaves[$i])>>
 				After a lot of time spent taking it up the ass, $his anal skill improves.
-				<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Anal($slaves[$i], _trainingEfficiency)>>
 			<</if>>
 		<</if>>
 	<</if>>
diff --git a/src/uncategorized/saRecruitGirls.tw b/src/uncategorized/saRecruitGirls.tw
index a4fbe817dd8b0a933668da8e69257ca40dedde33..31f0c5f89a0e36798588619156a064c8c7ffafd9 100644
--- a/src/uncategorized/saRecruitGirls.tw
+++ b/src/uncategorized/saRecruitGirls.tw
@@ -39,7 +39,7 @@
 
 		<<set _oldRepGain = hashSum($lastWeeksRepIncome)>>
 		<<set $pure = 0>>
-		<<set _dump = saServeThePublic($slaves[$i])>>
+		<<run saServeThePublic($slaves[$i])>>
 		<<set _influence = Math.clamp((hashSum($lastWeeksRepIncome)-_oldRepGain)*0.01,1,3)>>
 
 		<<if $arcologies[0].FSSubjugationist != "unset">>
@@ -80,10 +80,10 @@
 			<</if>>
 		<<elseif $arcologies[0].FSGenderFundamentalist != "unset">>
 			<<if $arcologies[_j].FSGenderFundamentalist != "unset">>
-				$He advances Gender Fundamentalism there by being a wholesome, romantic $girl<<if $slaves[$i].genes == "XX" && $slaves[$i].vagina > -1 && !$slaves[$i].dick>>, which $he's perfect for, since $he's a proper woman with a body meant for missionary<<set $arcologies[_j].FSGenderFundamentalist++>><</if>>.
+				$He advances Gender Fundamentalism there by being a wholesome, romantic $girl<<if $slaves[$i].genes == "XX" && $slaves[$i].vagina > -1 && !$slaves[$i].dick>>, which $he's perfect for, since $he's a proper $woman with a body meant for missionary<<set $arcologies[_j].FSGenderFundamentalist++>><</if>>.
 				<<set $arcologies[_j].FSGenderFundamentalist += _influence>>
 			<<elseif $arcologies[_j].FSGenderRadicalist != "unset">>
-				$He challenges Gender Radicalism there by being a wholesome, romantic $girl<<if $slaves[$i].genes == "XX" && $slaves[$i].vagina > -1 && !$slaves[$i].dick>>, which $he's perfect for, since $he's a proper woman with a body meant for missionary<<set $arcologies[_j].FSGenderRadicalist-->><</if>>.
+				$He challenges Gender Radicalism there by being a wholesome, romantic $girl<<if $slaves[$i].genes == "XX" && $slaves[$i].vagina > -1 && !$slaves[$i].dick>>, which $he's perfect for, since $he's a proper $woman with a body meant for missionary<<set $arcologies[_j].FSGenderRadicalist-->><</if>>.
 				<<set $arcologies[_j].FSGenderRadicalist -= _influence>>
 			<</if>>
 		<</if>>
@@ -297,7 +297,7 @@
 	<</if>>
 
 	<<if $slaves[$i].bellyPreg >= 300000>>
-		$His massive overfilled womb is detrimental to $his efforts to recruit girls. It instills a fear of being turned into nothing more than a baby filled sack.
+		$His massive overfilled womb is detrimental to $his efforts to recruit slaves. It instills a fear of being turned into nothing more than a baby filled sack.
 		<<set $recruiterProgress -= 3>>
 	<</if>>
 
@@ -714,7 +714,7 @@
 				<<if $slaves[$i].race != $arcologies[0].FSSupremacistRace>>
 					$He patiently explains how $slaves[$i].race <<= $girl>>s like $himself benefit from the firm guidance of their proper $arcologies[0].FSSupremacistRace masters.
 				<<else>>
-					$He makes the clear case for $arcologies[0].FSSupremacistRace superiority, although as an enslaved $slaves[$i].race woman $his words are a bit hollow.
+					$He makes the clear case for $arcologies[0].FSSupremacistRace superiority, although as an enslaved $slaves[$i].race $woman $his words are a bit hollow.
 				<</if>>
 			<<elseif $slaves[$i].race != $arcologies[0].FSSupremacistRace>>
 				The dumb $slaves[$i].race bitch can't even repeat $his Supremacist indoctrination properly.
@@ -831,7 +831,7 @@
 					$His unblemished skin shines artistically in this week's erotic studio gallery, but the shape of $his curves is too obviously artificial.
 				<</if>>
 			<<elseif $slaves[$i].boobsImplant == 0 && $slaves[$i].buttImplant == 0 && $slaves[$i].waist >= -95>>
-				$His most recent photo galleries are barely passable: you can hardly see the woman beneath $his blatant body art.
+				$His most recent photo galleries are barely passable: you can hardly see the $woman beneath $his blatant body art.
 			<<else>>
 				$He is burdened by the knowledge that $his heavy alterations don't fit your ideal of purity, and fails to show at a scheduled photo shoot.
 			<</if>>
diff --git a/src/uncategorized/saRelationships.tw b/src/uncategorized/saRelationships.tw
index 9ef868a104a1745f526f35376442bea58ddb10c4..4845edbd5f46778f1d298c8db1bb3fe03fab75ee 100644
--- a/src/uncategorized/saRelationships.tw
+++ b/src/uncategorized/saRelationships.tw
@@ -1457,13 +1457,13 @@
 				_SlaveI.slaveName's <<if _SlaveI.relationship >= 5>>wife<<else>>lover<</if>> is older, more experienced, and
 				<<if (_SlaveJ.skill.oral > _SlaveI.skill.oral)>>
 					better at blowjobs than $he is. They are such good slaves that the senior _girl2 serves as a mentor to the junior, improving $his oral skills.
-					<<set $skillIncrease = 5>><<= SkillIncrease.Oral(_SlaveI, $skillIncrease)>> 
+					<<= SkillIncrease.Oral(_SlaveI, 5)>> 
 				<<elseif (_SlaveJ.skill.anal > _SlaveI.skill.anal) && (_SlaveI.anus > 0)>>
 					better at taking a buttfuck than $he is, and they are such good slaves that the senior _girl2 serves as a mentor to the junior, improving $his anal skills.
-					<<set $skillIncrease = 5>><<= SkillIncrease.Anal(_SlaveI, $skillIncrease)>>
+					<<= SkillIncrease.Anal(_SlaveI, 5)>>
 				<<elseif (_SlaveJ.skill.vaginal > _SlaveI.skill.vaginal) && (_SlaveI.vagina > 0) && (_SlaveJ.vagina > 0)>>
 					a better lover than $he is, and they are such good slaves that the senior _girl2 serves as a mentor to the junior, improving $his vaginal skills.
-					<<set $skillIncrease = 5>><<= SkillIncrease.Vaginal(_SlaveI, $skillIncrease)>>
+					<<= SkillIncrease.Vaginal(_SlaveI, 5)>>
 				<<elseif (_SlaveJ.trust > _SlaveI.trust)>>
 					a better slave than $he is, and they are such obedient slaves that the senior _girl2 serves as a mentor to the junior, @@.mediumaquamarine;improving $his trust.@@
 					<<set _SlaveI.trust += 11>>
diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw
index 7474ea9e101fe5e87e2b8127b3249cd4cb2063b8..164d59b7ba4fd0084380afe2922336c6dc356833 100644
--- a/src/uncategorized/saRules.tw
+++ b/src/uncategorized/saRules.tw
@@ -5486,4 +5486,4 @@
 		<</switch>>
 	<</if>> /* closes mindbreak exemption */
 
-<</if>> /* closes fuckdoll exemption */
+<</if>> /* closes Fuckdoll exemption */
diff --git a/src/uncategorized/saTakeClasses.tw b/src/uncategorized/saTakeClasses.tw
index 56992df0ab5c9f595fc1c21debcd4dd6af1f19bc..a89a193792fce0ac7ed48dd1c3efc37ce9383b6e 100644
--- a/src/uncategorized/saTakeClasses.tw
+++ b/src/uncategorized/saTakeClasses.tw
@@ -142,7 +142,7 @@
 	<</if>>
 
 	<<set _seed = 0>>
-	<<set $skillIncrease = 10+Math.floor(($slaves[$i].intelligence+$slaves[$i].intelligenceImplant)/32)>>
+	<<set _skillIncrease = 10+Math.floor(($slaves[$i].intelligence+$slaves[$i].intelligenceImplant)/32)>>
 	<<for _j = 0; _j < _learning; _j++>>
 		<<if ($slaves[$i].devotion <= 20) && (_seed == 0)>>
 			Since $he is wanting in basic obedience, $he suffers through courses on @@.hotpink;$his place@@ in the Free Cities world.
@@ -150,41 +150,41 @@
 			<<set _seed = 1>>
 		<<elseif ($slaves[$i].skill.oral <= 10)>>
 			Since $he is orally incompetent, $he is taught basic gag reflex suppression exercises and other simple oral things.
-			<<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Oral($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.vaginal <= 10) && ($slaves[$i].vagina > 0) && canDoVaginal($slaves[$i])>>
 			Since $he is unskilled at using $his pussy, $he is taught Kegel exercises and other simple vaginal skills.
-			<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Vaginal($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.vaginal <= 10) && ($slaves[$i].vagina >= 0)>>
 			Since $he is unskilled at using $his pussy and not permitted to learn through practice, $he is taught Kegel exercises, vaginal basics and several new positions.
-			<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Vaginal($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.anal <= 10) && ($slaves[$i].anus > 0) && canDoAnal($slaves[$i])>>
 			Since $he is a novice at taking it up $his butt, $he is taught relaxation exercises and other simple anal basics.
-			<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Anal($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.anal <= 10) && ($slaves[$i].anus >= 0)>>
 			Since $he is a novice at taking it up $his butt and not permitted to learn through practice, $he is taught relaxation exercises and other simple anal basics.
-			<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Anal($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.whoring <= 10)>>
 			Since $he has little idea what's involved in selling $his body, $he is taught basic safety practices and other simple prostitution skills.
-			<<= SkillIncrease.Whore($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Whore($slaves[$i], _skillIncrease)>>
 		<<elseif ($slaves[$i].skill.entertainment <= 10)>>
 			Since $his entertainment value is limited to $his holes, $he is taught simple conversational skills and other courtesan's essentials.
-			<<= SkillIncrease.Entertain($slaves[$i], $skillIncrease)>>
+			<<= SkillIncrease.Entertain($slaves[$i], _skillIncrease)>>
 		<<elseif ($schoolroomUpgradeSkills == 1)>>
 			<<if ($slaves[$i].skill.oral <= 30)>>
 				Having completed the basic sex slave curriculum, $he studies more advanced ways to use $his lips and tongue to please cocks, cunts, and asses.
-				<<= SkillIncrease.Oral($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Oral($slaves[$i], _skillIncrease)>>
 			<<elseif ($slaves[$i].skill.whoring <= 30)>>
 				Having completed the basic sex slave curriculum, $he studies intermediate prostitution, including how to stay as safe as possible and maximize $his efficiency.
-				<<= SkillIncrease.Whore($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Whore($slaves[$i], _skillIncrease)>>
 			<<elseif ($slaves[$i].skill.entertainment <= 30)>>
 				Having completed the basic sex slave curriculum, $he studies courtesanship, including social dynamics and flirtation more subtle than straightforward begging for sex.
-				<<= SkillIncrease.Entertain($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Entertain($slaves[$i], _skillIncrease)>>
 			<<elseif ($slaves[$i].skill.vaginal <= 30) && ($slaves[$i].vagina >= 0)>>
 				Having completed the basic sex slave curriculum, $he studies more advanced techniques and exotic positions to make use of $his <<if $slaves[$i].vagina == 0>>virgin pussy for use in $his first time<<else>>pussy<</if>>.
-				<<= SkillIncrease.Vaginal($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Vaginal($slaves[$i], _skillIncrease)>>
 			<<elseif ($slaves[$i].skill.anal <= 30)>>
 				Having completed the basic sex slave curriculum, $he studies more advanced techniques and exotic positions to make use of $his <<if $slaves[$i].vagina == 0>>virgin ass for use in $his first time<<else>>ass<</if>>.
-				<<= SkillIncrease.Anal($slaves[$i], $skillIncrease)>>
+				<<= SkillIncrease.Anal($slaves[$i], _skillIncrease)>>
 			<</if>>
 		<</if>>
 	<</for>>
diff --git a/src/uncategorized/schoolroom.tw b/src/uncategorized/schoolroom.tw
index 0e5804136ef95699c49b6252bc64248b04d3a29f..a1b75e32d5ed0ee10b30adf3535d429530eaa6a7 100644
--- a/src/uncategorized/schoolroom.tw
+++ b/src/uncategorized/schoolroom.tw
@@ -117,7 +117,7 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These
 
 <br><br>
 <<if $Schoolteacher != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a Schoolteacher. [[Appoint one|Schoolteacher Select]]
@@ -129,13 +129,14 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These
 <div class="tab">
 	<button class="tablinks" onclick="opentab(event, 'assign')" id="tab assign">Assign a slave</button>
 	<button class="tablinks" onclick="opentab(event, 'remove')" id="tab remove">Remove a slave</button>
+	<button class="tablinks" onclick="opentab(event, 'transfer')" id="tab transfer">Transfer from Facility</button>
 </div>
 
 <div id="remove" class="tabcontent">
 	<div class="content">
 		<<if $schoolroomSlaves > 0>>
 			<<schoolAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -150,7 +151,19 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These
 			''$schoolroomNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $schoolroomSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
+			<<include "Slave Summary">>
+		<</if>>
+	</div>
+</div>
+
+<div id="transfer" class="tabcontent">
+	<div class="content">
+		<<if ($schoolroom <= $schoolroomSlaves)>>
+			''$schoolroomNameCaps is full and cannot hold any more slaves''
+		<<elseif ($slaves.length > $schoolroomSlaves)>>
+			<<resetAssignmentFilter>>
+			<<set $SlaveSummaryFiler = "transferable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
@@ -158,8 +171,10 @@ $schoolroomNameCaps is well-equipped, with wallscreens to display lessons. These
 
 <<if ($tabChoice.Schoolroom == "assign")>>
 	<script>document.getElementById("tab assign").click();</script>
-<<else>>
+<<elseif ($tabChoice.Schoolroom == "remove")>>
 	<script>document.getElementById("tab remove").click();</script>
+<<elseif ($tabChoice.Schoolroom == "transfer")>>
+	<script>document.getElementById("tab transfer").click();</script>
 <</if>>
 
 </body>
diff --git a/src/uncategorized/seCoursing.tw b/src/uncategorized/seCoursing.tw
index 8fbf50998c2cf91d1b2d4883d4fe6d771feba819..c37f650dd0078ec932ce54e9fa0ededdf147cee6 100644
--- a/src/uncategorized/seCoursing.tw
+++ b/src/uncategorized/seCoursing.tw
@@ -102,7 +102,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 <<if $origin == "virgin">>
 	<<set $activeSlaveOneTimeMaxAge = 20>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.anus = 1>>
 	<<set $activeSlave.vagina = 0>>
 	<<set $activeSlave.counter.anal += 1, $analTotal += 1>>
@@ -118,7 +118,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 	<<set $activeSlaveOneTimeMaxAge = 20>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.anus = 1>>
 	<<set $activeSlave.vagina = 1>>
 	<<set $activeSlave.counter.vaginal += 1, $vaginalTotal += 1>>
@@ -136,7 +136,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 	<<set $activeSlaveOneTimeMinAge = 35>>
 	<<set $activeSlaveOneTimeMaxAge = 39>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.boobs += 800>>
 	<<set $activeSlave.boobsImplant += 800>>
 	<<set $activeSlave.butt += 1>>
@@ -157,7 +157,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 <<elseif $origin == "disobedient young">>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.anus = 1>>
 	<<set $activeSlave.vagina = 1>>
 	<<set $activeSlave.counter.anal += 1, $analTotal += 1>>
@@ -176,7 +176,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 <<elseif $origin == "disobedient young dickgirl">>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.anus = 2>>
 	<<set $activeSlave.counter.anal += 1, $analTotal += 1>>
 	<<set $activeSlave.dick = random(2,4)>>
@@ -194,7 +194,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 <<elseif $origin == "huge balled">>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.anus = 1>>
 	<<set $activeSlave.counter.anal += 1, $analTotal += 1>>
 	<<set $activeSlave.balls = 5>>
@@ -207,7 +207,7 @@ You lead your lurcher $Lurcher.slaveName out on a leash, naked just like the har
 <<elseif $origin == "feminized">>
 	<<set $activeSlaveOneTimeMaxAge = 25>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.boobs += 800>>
 	<<set $activeSlave.boobsImplant += 800>>
 	<<set $activeSlave.butt += 1>>
diff --git a/src/uncategorized/seCustomSlaveDelivery.tw b/src/uncategorized/seCustomSlaveDelivery.tw
index ea30f3b6b46781283b6b1643e4f18daafd472690..2ff7f797bd697f1839de6e48d879d789fd8aee8d 100644
--- a/src/uncategorized/seCustomSlaveDelivery.tw
+++ b/src/uncategorized/seCustomSlaveDelivery.tw
@@ -111,13 +111,13 @@
 	<<set $fixedRace = $customSlave.race>>
 <</if>>
 <<if $customSlave.sex == 2>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.dick = $customSlave.dick>>
 	<<set $activeSlave.balls = $customSlave.balls>>
 	<<set $activeSlave.scrotum = $activeSlave.balls>>
 	<<set $activeSlave.foreskin = $activeSlave.dick>>
 <<else>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<if $customSlave.virgin == 0>>
 		<<set $activeSlave.vagina = $customSlave.virgin>>
 	<</if>>
diff --git a/src/uncategorized/seRaiding.tw b/src/uncategorized/seRaiding.tw
index 45bb7c7254158216676a1a1006388fc420d8055e..02e9fccae0617afeb52a53d557885a73ab4e3974 100644
--- a/src/uncategorized/seRaiding.tw
+++ b/src/uncategorized/seRaiding.tw
@@ -76,7 +76,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 39>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Not a young woman. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.boobs += 800>>
 	<<set $activeSlave.boobsImplant += 800>>
 	<<set $activeSlave.butt += 1>>
@@ -110,7 +110,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 55>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% Not a young woman. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a professor">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -139,7 +139,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 22>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a student">>
 	<<set $activeSlave.face = random(-20,0)>>
 	<<set $activeSlave.anus = 0>>
@@ -170,7 +170,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 45>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a military officer">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -189,7 +189,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 45>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.career = "a military officer">>
 	<<set $activeSlave.face = Math.clamp($activeSlave.face+20,-100,100)>>
 	<<set $activeSlave.faceImplant += 20>>
@@ -218,7 +218,7 @@ target
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a soldier">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -248,7 +248,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 55>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a doctor">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -275,7 +275,7 @@ target
 <<case "nun">>
 	<<set $activeSlaveOneTimeMaxAge = 70>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a nun">>
 	<<set $activeSlave.anus = 0>>
 	<<set $activeSlave.vagina = 0>>
@@ -295,7 +295,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 26>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a journalist">>
 	<<set $activeSlave.face = random(-20,0)>>
 	<<set $activeSlave.anus = 0>>
@@ -325,7 +325,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 39>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.boobs += 800>>
 	<<set $activeSlave.boobsImplant += 800>>
 	<<set $activeSlave.butt += 1>>
@@ -346,7 +346,7 @@ target
 <<case "classical dancer">>
 	<<set $activeSlaveOneTimeMaxAge = 20>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a classical dancer">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was the pride of renowned dance troupe.">>
@@ -371,7 +371,7 @@ target
 		<<set $activeSlaveOneTimeMaxAge = 25>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a law enforcement officer">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -399,7 +399,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 43>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a classical musician">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She was the pride of a renowned orchestra.">>
@@ -434,7 +434,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 65>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a politician">>
 	<<set $activeSlave.prestige = 2>>
 	<<set $activeSlave.prestigeDesc = "She was a widely known politician in her former life. Her face has graced many campaign posters.">>
@@ -463,7 +463,7 @@ target
 <<case "shut-in">>
 	<<set $activeSlaveOneTimeMaxAge = 43>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a shut-in">>
 	<<set $activeSlave.anus = 0>>
 	<<set $activeSlave.face = random(15,100)>>
@@ -478,7 +478,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 65>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a procuress">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -493,7 +493,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 55>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "an investor">>
 	<<set $activeSlave.prestige = 1>>
 	<<set $activeSlave.prestigeDesc = "She is a reputable investor from a bygone age.">>
@@ -523,7 +523,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 55>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a scientist">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
@@ -540,7 +540,7 @@ target
 	<<set $activeSlaveOneTimeMaxAge = 55>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a lawyer">>
 	<<set $activeSlave.face = random(15,100)>>
 	<<set $activeSlave.vagina = 1>>
diff --git a/src/uncategorized/seRecruiterSuccess.tw b/src/uncategorized/seRecruiterSuccess.tw
index fbd6cf9e6a9418a143448fc1e25f20b00be935f7..ee1a94180df1f3246282ddce5a3b9284981b4ab3 100644
--- a/src/uncategorized/seRecruiterSuccess.tw
+++ b/src/uncategorized/seRecruiterSuccess.tw
@@ -66,7 +66,7 @@
 <<elseif $recruiterTarget == "reassignment candidates">>
 
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She submitted to enslavement as her only way to obtain surgery to transform her into a woman.">>
 <<set $activeSlave.devotion = random(-15,5)>>
 <<set $activeSlave.trust = random(-10,10)>>
@@ -94,7 +94,7 @@
 <<elseif $recruiterTarget == "dissolute sissies">>
 
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XY Slave">>
+<<set $activeSlave = GenerateNewSlave("XY")>>
 <<set $activeSlave.origin = "She submitted to enslavement out of a misguided desire to join a sexually libertine society.">>
 <<set $activeSlave.devotion = random(-15,5)>>
 <<set $activeSlave.trust = random(-10,10)>>
@@ -133,7 +133,7 @@
 <<set $activeSlaveOneTimeMinAge = Math.max($fertilityAge, $minimumSlaveAge)>>
 <<set $one_time_age_overrides_pedo_mode = 1>> /% Old enough to be pregnant. %/
 <<set $oneTimeDisableDisability = 1>>
-<<include "Generate XX Slave">>
+<<set $activeSlave = GenerateNewSlave("XX")>>
 <<set $activeSlave.origin = "She submitted to enslavement to get access to modern prenatal care.">>
 <<set $activeSlave.devotion = random(-15,5)>>
 <<set $activeSlave.trust = random(-10,10)>>
diff --git a/src/uncategorized/seWeddingSingle.tw b/src/uncategorized/seWeddingSingle.tw
index c2242ff398e8df1b43882a858d435f2c81c95761..3af3b19a953e36ae7b8e6578efc9639246115750 100644
--- a/src/uncategorized/seWeddingSingle.tw
+++ b/src/uncategorized/seWeddingSingle.tw
@@ -723,25 +723,25 @@ In the days leading up to your wedding, $slaves[_wedS].slaveName spent $his time
 		$His slave dick is hidden by its chastity cage.
 	<<elseif canAchieveErection($slaves[_wedS])>>
 		<<if ($slaves[_wedS].dick > 4) && ($slaves[_wedS].belly >= 5000)>>
-		$He's hugely erect, with $his lacy g-string only serving to hold $his dick agonizingly pressed against the bottom of $his _belly <<if $slaves[_wedS].bellyPreg >= 3000>>pregnant <</if>>belly.
+			$He's hugely erect, with $his lacy g-string only serving to hold $his dick agonizingly pressed against the bottom of $his _belly <<if $slaves[_wedS].bellyPreg >= 3000>>pregnant <</if>>belly.
 		<<elseif $slaves[_wedS].dick > 4>>
-		$He's hugely erect, with $his lacy g-string only serving to hold $his dick upright along $his belly.
+			$He's hugely erect, with $his lacy g-string only serving to hold $his dick upright along $his belly.
 		<<else>>
-		$His erection tents the front of $his lacy g-string.
+			$His erection tents the front of $his lacy g-string.
 		<</if>>
 	<<elseif ($slaves[_wedS].dick > 0)>>
 		<<if $slaves[_wedS].dick > 10>>
-		$His huge soft cock is allowed to dangle freely as no g-string could hope to contain it.
+			$His huge soft cock is allowed to dangle freely as no g-string could hope to contain it.
 		<<elseif $slaves[_wedS].dick > 4>>
-		$His big soft cock forms a lewd mass, stuffed into $his lacy g-string.
+			$His big soft cock forms a lewd mass, stuffed into $his lacy g-string.
 		<<else>>
-		$His lacy g-string perfectly conceals $his soft dick.
+			$His lacy g-string perfectly conceals $his soft dick.
 		<</if>>
 	<<else>>
 		<<if $slaves[_wedS].clit > 1>>
-		$His huge clit is quite hard, making $him shift uncomfortably as $his lacy g-string stimulates it.
+			$His huge clit is quite hard, making $him shift uncomfortably as $his lacy g-string stimulates it.
 		<<else>>
-		$His lacy g-string covers $his womanhood demurely.
+			$His lacy g-string covers $his womanhood demurely.
 		<</if>>
 	<</if>>
 	There is no aisle for $him to <<if $slaves[_wedS].amp == 1>>be carried<<else>>walk<</if>> down, just a small space at the head of the room where you're standing alone, and there's no one to <<if $slaves[_wedS].amp == 1>>walk alongside the slave carrying<<else>>walk<</if>> $him there; this symbolizes $his submission to you
diff --git a/src/uncategorized/servantsQuarters.tw b/src/uncategorized/servantsQuarters.tw
index 879198bd2f3271393da4ca480ed601f30e6406c8..ae1fbcc51cb4d0f161ef216133d6275a8d734b43 100644
--- a/src/uncategorized/servantsQuarters.tw
+++ b/src/uncategorized/servantsQuarters.tw
@@ -105,7 +105,7 @@ $servantsQuartersNameCaps
 <br><br>
 <<if $Stewardess != 0>>
 	<<setLocalPronouns $Stewardess>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 	<<if canAchieveErection($Stewardess) && $Stewardess.pubertyXY == 1>>
 		<br>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -132,7 +132,7 @@ $servantsQuartersNameCaps
 	<div class="content">
 		<<if $servantsQuartersSlaves > 0>>
 			<<quartersAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -147,7 +147,7 @@ $servantsQuartersNameCaps
 			''$servantsQuartersNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $servantsQuartersSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
diff --git a/src/uncategorized/servantsQuartersReport.tw b/src/uncategorized/servantsQuartersReport.tw
index f37ada6591a4c2023fd96701cd5b85989ef4dc40..72d3b2c3bd9bacf063f73b3975625c8291103392 100644
--- a/src/uncategorized/servantsQuartersReport.tw
+++ b/src/uncategorized/servantsQuartersReport.tw
@@ -202,7 +202,7 @@
 		<br><<include "SA devotion">>
 	<<else>>
 		<<silently>>
-		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+		<<run saChoosesOwnClothes($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
@@ -281,12 +281,12 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own job">>
-		<<_dump = saServant($slaves[$i])>>
+		<<run saServant($slaves[$i])>>
 		<<if ($servantMilkers == 1) && ($slaves[$i].lactation > 0)>>
 			<<include "SA get milked">>
 			<<set _SQMilk += $milk, _SQMilkSale += $milkSale>>
 		<</if>>
-		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
+		<<run saChoosesOwnClothes($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
diff --git a/src/uncategorized/slaveAssignmentsReport.tw b/src/uncategorized/slaveAssignmentsReport.tw
index 37d26f4d3fdd06d76ba46737325bd30a806162d3..295605163cf1340b5372dc9cb487bc5bb1cf8b68 100644
--- a/src/uncategorized/slaveAssignmentsReport.tw
+++ b/src/uncategorized/slaveAssignmentsReport.tw
@@ -8,7 +8,7 @@
 /*We can add milk etc. to this as well, though this is a good that can be traded beyond the arcology and also needs its own market much like the slavemarket. TODO*/
 /*In the default scenario these numbers indicate the amount of money each individual citizen of a particular class is looking to spend on sex (and milk) every week
 Depending on the conditions they may derive more or less 'utility' out of their credits spent
-i.e. a highly paternalist arcology with little choice for its lower class but fuckdolls may still put money into them but not get the same satisfaction out of it*/
+i.e. a highly paternalist arcology with little choice for its lower class but Fuckdolls may still put money into them but not get the same satisfaction out of it*/
 /*Low rent increases demand/available money for sexual services, high rent decreases it*/
 <<set _LCRent = 1 + (20 - $LCRent) / 100,
 _lowerClassSexDemand = Math.trunc($lowerClass * _LCRent) * 10,
@@ -624,13 +624,13 @@ $NPCMarketShareLC = Math.trunc(($NPCSexSupply.lowerClass * 1000) / ($NPCSexSuppl
 <<if $averageDick > 0>><<set $averageDick = $averageDick/$slavesWithWorkingDicks>><</if>>
 <<set $freeSexualEnergy = $PC.sexualEnergy-$fuckSlaves>>
 <<if $freeSexualEnergy > 0>>
-<<if $freeSexualEnergy > $slavesVisible/2>>
-	<<set $freeSexualEnergy = 3>>
-<<elseif $freeSexualEnergy > $slavesVisible/4>>
-	<<set $freeSexualEnergy = 2>>
-<<else>>
-	<<set $freeSexualEnergy = 1>>
-<</if>>
+	<<if $freeSexualEnergy > $slavesVisible/2>>
+		<<set $freeSexualEnergy = 3>>
+	<<elseif $freeSexualEnergy > $slavesVisible/4>>
+		<<set $freeSexualEnergy = 2>>
+	<<else>>
+		<<set $freeSexualEnergy = 1>>
+	<</if>>
 <</if>>
 
 /** silent pass for any reassignments before generating reports */
@@ -664,22 +664,22 @@ $NPCMarketShareLC = Math.trunc(($NPCSexSupply.lowerClass * 1000) / ($NPCSexSuppl
 		<</if>>
 
 		<<if $headGirlTrainsFlaws || $headGirlSoftensFlaws>>
-		<<if _Slave.behavioralFlaw != "none" || (_Slave.sexualFlaw != "none" && !_hasParaphilia)>>
-			<<if $headGirlSoftensFlaws>>
-				<<if _Slave.devotion > 20>>
-					<<if (_Slave.behavioralFlaw != "none" && _Slave.behavioralQuirk == "none") || (_Slave.sexualFlaw != "none" && _Slave.sexualQuirk == "none" && !_hasParaphilia)>>
-						<<set _HGPossibleSlaves[3].push({ID: _Slave.ID, training: "soften"})>>
-					<<else>>
-						<<set _HGPossibleSlaves[3].push({ID: _Slave.ID, training: "flaw"})>>
+			<<if _Slave.behavioralFlaw != "none" || (_Slave.sexualFlaw != "none" && !_hasParaphilia)>>
+				<<if $headGirlSoftensFlaws>>
+					<<if _Slave.devotion > 20>>
+						<<if (_Slave.behavioralFlaw != "none" && _Slave.behavioralQuirk == "none") || (_Slave.sexualFlaw != "none" && _Slave.sexualQuirk == "none" && !_hasParaphilia)>>
+							<<set _HGPossibleSlaves[3].push({ID: _Slave.ID, training: "soften"})>>
+						<<else>>
+							<<set _HGPossibleSlaves[3].push({ID: _Slave.ID, training: "flaw"})>>
+						<</if>>
+						<<continue>>
 					<</if>>
+				<<elseif $headGirlTrainsFlaws>>
+					<<set _HGPossibleSlaves[2].push({ID: _Slave.ID, training: "flaw"})>>
 					<<continue>>
 				<</if>>
-			<<elseif $headGirlTrainsFlaws>>
-				<<set _HGPossibleSlaves[2].push({ID: _Slave.ID, training: "flaw"})>>
-				<<continue>>
 			<</if>>
 		<</if>>
-		<</if>>
 
 		<<if ($headGirlTrainsObedience && _Slave.devotion <= 20 && _Slave.trust >= -20)>>
 			<<set _HGPossibleSlaves[4].push({ID: _Slave.ID, training: "obedience"})>>
@@ -738,7 +738,6 @@ $NPCMarketShareLC = Math.trunc(($NPCSexSupply.lowerClass * 1000) / ($NPCSexSuppl
 	["Schoolroom Report", $schoolroomNameCaps, $schoolroom, $schoolroomSlaves, $Schoolteacher, "Schoolteacher"],
 	["Spa Report", $spaNameCaps, $spa, $spaSlaves, $Attendant, "Attendant"],
 	["Nursery Report", $nurseryNameCaps, $nurseryNannies, $nurserySlaves, $Matron, "Matron"],
-/** ["Lab Report"], "Research Lab", $researchLab.built, $researchLab.hired + $researchLab.menials, -1, -1], **/
 	["Servants' Quarters Report", $servantsQuartersNameCaps, $servantsQuarters, $servantsQuartersSlaves, $Stewardess, "Stewardess"],
 	["Incubator Report", $incubatorNameCaps, $incubator, $incubatorSlaves, -1, -1],
 	["Master Suite Report", $masterSuiteNameCaps, $masterSuite, $masterSuiteSlaves, $Concubine, "Concubine"],
@@ -781,6 +780,6 @@ $NPCMarketShareLC = Math.trunc(($NPCSexSupply.lowerClass * 1000) / ($NPCSexSuppl
 <<unset _ii>>
 /** /Accordion */
 
-<<if ($researchLab.built == "true")>>
+<<if ($researchLab.level > 0)>>
 	<<include "Lab Report">><br><br>
 <</if>>
diff --git a/src/uncategorized/slaveInteract.tw b/src/uncategorized/slaveInteract.tw
index c0aa029f59dd53df7cd270dff250f157bec445ad..3141c161db508e0206eb31bfaa0fd46307fabc24 100644
--- a/src/uncategorized/slaveInteract.tw
+++ b/src/uncategorized/slaveInteract.tw
@@ -61,7 +61,7 @@
 | [[Auto salon|Salon][$degradation = 0,$primaryHairColor = "",$secondaryHairColor = "",$primaryEarColor = "",$secondaryEarColor = "",$primaryTailColor = "",$secondaryTailColor = "",$artificialEyeColor = "",$artificialEyeShape = "",$artificialEyeFill = "",$tattooChoice = "",$piercingLevel = ""]]
 | [[Body mod studio|Body Modification][$degradation = 0, $tattooChoice = undefined]]
 | [[Remote surgery|Remote Surgery][$degradation = 0]]
-<<if $cyberMod == 1>>| [[Configure cybernetics|cyberConfig][$temp = 0]]<</if>>
+<<if $prostheticsUpgrade > 0>>| [[Configure cybernetics|Prosthetics Config][$prostheticsConfig = "main"]]<</if>>
 
 
 <br>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -435,16 +435,6 @@
 	| <<link "Exempt $him" "Slave Interact">><<set $activeSlave.useRulesAssistant = 0>><</link>>
 <</if>>
 
-<<if $cyberMod == 0>>/* CyberMod Toggle */
-/* START hotswap prosthetics */
-<<if ndef $activeSlave.readyLimbs>>
-	<<set $activeSlave.readyLimbs = []>>
-<</if>>
-<<if ($activeSlave.readyLimbs.length > 0 || $activeSlave.amp < 0) && $activeSlave.PLimb == 1>>
-	<br><br><span id = "LimbOptions"><<include "Hotswap Prosthetics">></span>
-<</if>>
-/* END hotswap prosthetics */
-<</if>>/* CyberMod Toggle */
 <br>
 
 <span id="fucktoypref">
@@ -953,9 +943,9 @@
 		<</if>>
 	<</if>>
 
-	<br>Chastity device: ''<span id="chastity"><<if $activeSlave.chastityAnus == 1 && $activeSlave.chastityPenis == 1 && $activeSlave.chastityVagina == 1>>full chastity<<elseif $activeSlave.chastityPenis == 1 && $activeSlave.chastityVagina == 1>>genital chastity<<elseif $activeSlave.chastityAnus == 1 && $activeSlave.chastityPenis == 1>>combined chastity cage<<elseif $activeSlave.chastityAnus == 1 && $activeSlave.chastityVagina == 1>>combined chastity belt<<elseif $activeSlave.chastityVagina == 1>>chastity belt<<elseif $activeSlave.chastityPenis == 1>>chastity cage<<elseif $activeSlave.chastityAnus == 1>>anal bhastity<<elseif $activeSlave.chastityAnus == 0 && $activeSlave.chastityPenis == 0 && $activeSlave.chastityVagina == 0>>none<<else>>THERE HAS BEEN AN ERROR<</if>></span>.''
-	<<link "None">><<set $activeSlave.chastityAnus = 0>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 0>><<replace "#chastity">>None<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
-	| <<link "Anal chastity">><<set $activeSlave.choosesOwnChastity = 0>><<set $activeSlave.chastityAnus = 1>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 0>><<replace "#chastity">>Anal chastity<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
+	<br>Chastity device: ''<span id="chastity"><<if $activeSlave.chastityAnus == 1 && $activeSlave.chastityPenis == 1 && $activeSlave.chastityVagina == 1>>full chastity<<elseif $activeSlave.chastityPenis == 1 && $activeSlave.chastityVagina == 1>>genital chastity<<elseif $activeSlave.chastityAnus == 1 && $activeSlave.chastityPenis == 1>>combined chastity cage<<elseif $activeSlave.chastityAnus == 1 && $activeSlave.chastityVagina == 1>>combined chastity belt<<elseif $activeSlave.chastityVagina == 1>>chastity belt<<elseif $activeSlave.chastityPenis == 1>>chastity cage<<elseif $activeSlave.chastityAnus == 1>>anal chastity<<elseif $activeSlave.chastityAnus == 0 && $activeSlave.chastityPenis == 0 && $activeSlave.chastityVagina == 0>>none<<else>>THERE HAS BEEN AN ERROR<</if>></span>.''
+	<<link "None">><<set $activeSlave.chastityAnus = 0>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 0>><<replace "#chastity">>none<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
+	| <<link "Anal chastity">><<set $activeSlave.choosesOwnChastity = 0>><<set $activeSlave.chastityAnus = 1>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 0>><<replace "#chastity">>anal chastity<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
 	<<if $activeSlave.vagina > -1>>
 		| <<link "Chastity belt">><<set $activeSlave.choosesOwnChastity = 0>><<set $activeSlave.chastityAnus = 0>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 1>><<replace "#chastity">>Chastity belt<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
 		| <<link "Combined chastity belt">><<set $activeSlave.choosesOwnChastity = 0>><<set $activeSlave.chastityAnus = 1>><<set $activeSlave.chastityPenis = 0>><<set $activeSlave.chastityVagina = 1>><<replace "#chastity">>Combined chastity belt<</replace>><<SlaveInteractAnalGropeOption>><<SlaveInteractAnalSexOption>><<SlaveInteractDickGropeOption>><<SlaveInteractFertility>><<SlaveInteractGropeOption>><<SlaveInteractImpreg>><<SlaveInteractSexOption>><</link>>
@@ -1446,18 +1436,18 @@ Hormones: <strong><span id="hormones">
 | //$He has no muscles left to lose//
 <</if>>
 
-<br>Diet Base: <strong><span id="dietBase"><<if $activeSlave.dietCum == 2>>Cum Based<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 0)>>Cum Added<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 1)>>Cum and Milk Added<<elseif ($activeSlave.dietMilk == 1) && ($activeSlave.dietCum == 0)>>Milk Added<<elseif ($activeSlave.dietMilk == 2)>>Milk Based<<elseif ($activeSlave.dietCum == 0) && ($activeSlave.dietMilk == 0)>>Normal<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>
-<<link "Normal">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>Normal<</replace>><</link>> |
-<<link "Cum Added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>Cum Added<</replace>><</link>> |
-<<link "Milk Added">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>Milk Added<</replace>><</link>> |
-<<link "Cum & Milk Added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>Cum & Milk Added<</replace>><</link>> |
-<<link "Cum Based">><<set $activeSlave.dietCum = 2>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>Cum Based<</replace>><</link>> |
-<<link "Milk Based">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 2>><<replace "#dietBase">>Milk Based<</replace>><</link>>
+<br>Diet Base: <strong><span id="dietBase"><<if $activeSlave.dietCum == 2>>cum based<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 0)>>cum added<<elseif ($activeSlave.dietCum == 1) && ($activeSlave.dietMilk == 1)>>cum and milk added<<elseif ($activeSlave.dietMilk == 1) && ($activeSlave.dietCum == 0)>>milk added<<elseif ($activeSlave.dietMilk == 2)>>milk based<<elseif ($activeSlave.dietCum == 0) && ($activeSlave.dietMilk == 0)>>normal<<else>>THERE HAS BEEN AN ERROR<</if>></span></strong>.
+<<link "Normal">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>normal<</replace>><</link>> |
+<<link "Cum added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>cum added<</replace>><</link>> |
+<<link "Milk added">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>milk added<</replace>><</link>> |
+<<link "Cum & milk added">><<set $activeSlave.dietCum = 1>><<set $activeSlave.dietMilk = 1>><<replace "#dietBase">>cum & milk added<</replace>><</link>> |
+<<link "Cum based">><<set $activeSlave.dietCum = 2>><<set $activeSlave.dietMilk = 0>><<replace "#dietBase">>cum based<</replace>><</link>> |
+<<link "Milk based">><<set $activeSlave.dietCum = 0>><<set $activeSlave.dietMilk = 2>><<replace "#dietBase">>milk based<</replace>><</link>>
 
 <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>
 	<br>Solid Slave Food Access: <strong><span id="snacks"><<if $activeSlave.onDiet == 0>>Free to stuff $himself.<<else>>On a strict diet.<</if>></span></strong>
-	<<link "No Access">><<set $activeSlave.onDiet = 1>><<replace "#snacks">>On a strict diet.<</replace>><</link>> |
-	<<link "Full Access">><<set $activeSlave.onDiet = 0>><<replace "#snacks">>Free to stuff $himself.<</replace>><</link>>
+	<<link "No access">><<set $activeSlave.onDiet = 1>><<replace "#snacks">>On a strict diet.<</replace>><</link>> |
+	<<link "Full access">><<set $activeSlave.onDiet = 0>><<replace "#snacks">>Free to stuff $himself.<</replace>><</link>>
 <</if>>
 
 <br><br>__Behavior__:<br>
diff --git a/src/uncategorized/slaveShelter.tw b/src/uncategorized/slaveShelter.tw
index fd9ca71a5a8aad54fb694d7400c65107326dad93..14c04dcfeb7ccc3e061773a446798e5534acc50c 100644
--- a/src/uncategorized/slaveShelter.tw
+++ b/src/uncategorized/slaveShelter.tw
@@ -106,7 +106,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $activeSlaveOneTimeMinAge = 6>>
 	<<set $activeSlaveOneTimeMaxAge = 22>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "She was found unresponsive in the lower arcology with a gaping pussy and deflated belly. It is unclear what happened to her.">>
 	<<set $shelterSlave.career = "homeless">>
@@ -136,7 +136,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 		<<set $activeSlaveOneTimeMaxAge = 42>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her previous owner forced her to cut off her dick and balls and cook them.">>
 	<<set $shelterSlave.career = "a slave">>
@@ -160,7 +160,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 		<<set $activeSlaveOneTimeMaxAge = 42>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her previous owner forced her to cut off her breasts and cook them.">>
 	<<set $shelterSlave.career = "a slave">>
@@ -223,7 +223,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $activeSlaveOneTimeMinAge = 20>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her previous owner gelded her and used her for anal abuse.">>
 	<<set $shelterSlave.career = "a slave">>
@@ -246,7 +246,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $activeSlaveOneTimeMinAge = 20>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her background is obscure, but seems to have involved terrible abuse of her huge cock and balls.">>
 	<<set $shelterSlave.career = "a slave">>
@@ -270,7 +270,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $activeSlaveOneTimeMinAge = 20>>
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her holes were cruelly stretched by constant plug use.">>
 	<<set $shelterSlave.career = "a slave">>
@@ -296,7 +296,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 		<<set $activeSlaveOneTimeMaxAge = 42>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "Her previous owner discarded her after many pregnancies.">>
 	<<set $shelterSlave.career = "a breeder">>
@@ -321,7 +321,7 @@ You contact the Slave Shelter to review the profile of the slave the Shelter is
 	<<set $activeSlaveOneTimeMaxAge = 42>>
 	<<set $one_time_age_overrides_pedo_mode = 1>> /% 20 years of brothel service. %/
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $shelterSlave = $activeSlave>>
 	<<set $shelterSlave.origin = "She was worn out by twenty years of brothel service.">>
 	<<set $shelterSlave.career = "a prostitute">>
diff --git a/src/uncategorized/slaveSummary.tw b/src/uncategorized/slaveSummary.tw
index 3264fbbead5df3a1047ccceff7770912e09efe57..8a44cf7adebb039456ac43659b3fde964399ee12 100644
--- a/src/uncategorized/slaveSummary.tw
+++ b/src/uncategorized/slaveSummary.tw
@@ -3,7 +3,7 @@
 <<print App.UI.slaveSummaryList(passage())>>
 
 <<run $(document).one(':passagedisplay', function() {
-	$("[data-quick-index]").click(function () {
+	$("[data-quick-index]").click(function() {
 		let which = this.attributes["data-quick-index"].value;
 		let quick = $("div#list_index" + which);
 		quick.toggleClass("hidden");
diff --git a/src/uncategorized/spa.tw b/src/uncategorized/spa.tw
index 365de16c72667fb97e74655092b5a2370d7226bb..1c7e28ba55915ba469c9194c1af4687cdfb4e805 100644
--- a/src/uncategorized/spa.tw
+++ b/src/uncategorized/spa.tw
@@ -119,7 +119,7 @@ $spaNameCaps
 
 <br><br>
 <<if $Attendant != 0>>
-	<<set $Flag = 2>>
+	<<set $SlaveSummaryFiler = "leading">>
 	<<include "Slave Summary">>
 <<else>>
 	You do not have a slave serving as a spa Attendant. [[Appoint one|Attendant Select]]
@@ -133,13 +133,14 @@ $spaNameCaps
 <div class="tab">
 	<button class="tablinks" onclick="opentab(event, 'assign')" id="tab assign">Assign a slave</button>
 	<button class="tablinks" onclick="opentab(event, 'remove')" id="tab remove">Remove a slave</button>
+	<button class="tablinks" onclick="opentab(event, 'transfer')" id="tab transfer">Transfer from Facility</button>
 </div>
 
 <div id="remove" class="tabcontent">
 	<div class="content">
 		<<if $spaSlaves > 0>>
 			<<spaAssignmentFilter>>
-			<<set $Flag = 1>>
+			<<set $SlaveSummaryFiler = "occupying">>
 			<<include "Slave Summary">>
 			<<resetAssignmentFilter>>
 		<<else>>
@@ -154,7 +155,19 @@ $spaNameCaps
 			''$spaNameCaps is full and cannot hold any more slaves''
 		<<elseif ($slaves.length > $spaSlaves)>>
 			<<resetAssignmentFilter>>
-			<<set $Flag = 0>>
+			<<set $SlaveSummaryFiler = "assignable">>
+			<<include "Slave Summary">>
+		<</if>>
+	</div>
+</div>
+
+<div id="transfer" class="tabcontent">
+	<div class="content">
+		<<if ($spa <= $spaSlaves)>>
+			''$spaNameCaps is full and cannot hold any more slaves''
+		<<elseif ($slaves.length > $spaSlaves)>>
+			<<resetAssignmentFilter>>
+			<<set $SlaveSummaryFiler = "transferable">>
 			<<include "Slave Summary">>
 		<</if>>
 	</div>
@@ -162,8 +175,10 @@ $spaNameCaps
 
 <<if ($tabChoice.Spa == "assign")>>
 	<script>document.getElementById("tab assign").click();</script>
-<<else>>
+<<elseif ($tabChoice.Spa == "remove")>>
 	<script>document.getElementById("tab remove").click();</script>
+<<elseif ($tabChoice.Spa == "transfer")>>
+	<script>document.getElementById("tab transfer").click();</script>
 <</if>>
 
 </body>
diff --git a/src/uncategorized/spaReport.tw b/src/uncategorized/spaReport.tw
index 6f2182e93dedbbe8ba9e097b47e7e47b3502f95e..c7a5f00650f1018dd466b9d23a449c08d3baead8 100644
--- a/src/uncategorized/spaReport.tw
+++ b/src/uncategorized/spaReport.tw
@@ -321,8 +321,8 @@
 	<<else>>
 		<<silently>>
 		<<include "SA chooses own job">>
-		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
-		<<set _dump = saRest($slaves[$i])>>
+		<<run saChoosesOwnClothes($slaves[$i])>>
+		<<run saRest($slaves[$i])>>
 		<<include "SA rules">>
 		<<include "SA diet">>
 		<<include "SA long term effects">>
diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw
index 5368b096152b4320bc0f3684b007a6acc89d002e..acf98626f3455dbdcd4d2c90d884a26c6570768b 100644
--- a/src/uncategorized/storyCaption.tw
+++ b/src/uncategorized/storyCaption.tw
@@ -613,9 +613,6 @@
 		<br><span id="riotCenter"><<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>></span> @@.cyan;[Shift+R]@@
 		<</if>>
 		<</if>>
-		<<if $cyberMod != 0 && $researchLab.built == "true">>
-			<br>[[Manage Research Lab|Research Lab][$temp = 0]]
-		<</if>>
 		<<if $SF.Toggle && $SF.Active >= 1>>
 			<br><span id="SFMButton"> <<link "$SF.Caps's firebase""Firebase">><</link>> </span> @@.cyan;[Z]@@
 		<</if>>
@@ -655,9 +652,6 @@
 	<br><span id="riotCenter"><<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>></span> @@.cyan;[Shift+R]@@
 	<</if>>
 	<</if>>
-	<<if $cyberMod != 0 && $researchLab.built == "true">>
-	<br>[[Manage Research Lab|Research Lab][$temp = 0]]
-	<</if>>
 	<<if $SF.Toggle && $SF.Active >= 1>>
 	<br><span id="SFMButton"> <<link "$SF.Caps's firebase""Firebase">><</link>> </span> @@.cyan;[Z]@@
 	<</if>>
@@ -683,6 +677,7 @@
 	<br><<link [[Wardrobe]]>><</link>>
 	<br><<if $dispensary>>[[Pharmaceutical Fabricator|Dispensary]]<</if>>
 	<br><<if $ImplantProductionUpgrade>>[[Implant Manufactory|Implant Manufactory]]<</if>>
+	<br><<if $prostheticsUpgrade > 0>>[[Prosthetic Lab|Prosthetic Lab]]<</if>>
 	<br><<if $organFarmUpgrade>>[[Organ Farm|Organ Farm]]<</if>>
 	<br><<if $geneticMappingUpgrade>>[[Gene Lab|Gene Lab]]<</if>>
 	<br><<if $rep >= 10000>>[[Black Market|The Black Market]]<</if>>
@@ -707,9 +702,6 @@
 	<br><span id="riotCenter"><<link "Manage Rebels">><<set $nextButton = "Back", $nextLink = _Pass>><<goto "riotControlCenter">><</link>></span> @@.cyan;[Shift+R]@@
 	<</if>>
 	<</if>>
-	<<if $cyberMod != 0 && $researchLab.built == "true">>
-	<br>[[Manage Research Lab|Research Lab][$temp = 0]]
-	<</if>>
 	<<if $SF.Toggle && $SF.Active >= 1>>
 	<br><span id="SFMButton"> <<link "$SF.Caps's firebase""Firebase">><</link>> </span> @@.cyan;[Z]@@
 	<</if>>
diff --git a/src/uncategorized/surgeryDegradation.tw b/src/uncategorized/surgeryDegradation.tw
index 1ba4f1c94f0cd6c2d562e531bb76671fa058cd4e..f16a9c82f10305d3c3b57551ee187439f66ae139 100644
--- a/src/uncategorized/surgeryDegradation.tw
+++ b/src/uncategorized/surgeryDegradation.tw
@@ -27,11 +27,8 @@
 
 <<set _slaveDevotion = $activeSlave.devotion>>
 
-<<if ($activeSlave.health < random(-100,-80)) && !["basicPLimbs", "beautyPLimbs", "body hair removal", "braces", "chem castrate", "combatPLimbs", "cyberPLimbs", "eyebrow removal", "hair removal", "insemination", "removeBraces", "sexPLimbs"].includes($surgeryType)>>
+<<if ($activeSlave.health < random(-100,-80)) && !["body hair removal", "braces", "chem castrate", "eyebrow removal", "hair removal", "insemination", "removeBraces"].includes($surgeryType)>>
 	$activeSlave.slaveName @@.red;has died from complications of surgery.@@
-	<<if $surgeryType == "ocular implant">>At least the ocular implants are still good.<<set $stockpile.ocularImplant++>><</if>>
-	<<if $surgeryType == "cochlear implant">>At least the cochlear implants are still good.<<set $stockpile.cochlearImplant++>><</if>>
-	<<if $surgeryType == "electrolarynx">>At least the electrolarynx is still good.<<set $stockpile.electrolarynx++>><</if>>
 	<<= removeActiveSlave() >>
 	<<set $nextLink = "Main">>
 <<elseif $surgeryType == "breastShapePreservation" && (($activeSlave.health-($activeSlave.boobs/1000)) < random(-100,-80))>>
@@ -242,7 +239,10 @@ As the remote surgery's long recovery cycle completes,
 	<<if $activeSlave.amp == 0>>
 		It's rocking back and forth slightly on its heeled boots, which are designed for stability.
 	<<else>>
-		<<if $activeSlave.amp < 0>>Its P-Limbs have been removed, since they aren't compatible with Fuckdoll suits.<</if>>
+		<<if $activeSlave.amp < 0>>
+			Its P-Limbs have been removed, since they aren't compatible with Fuckdoll suits.
+			<<set $activeSlave.amp = 1>>
+		<</if>>
 		The Fuckdoll's limbless torso rocks back and forth slightly.
 	<</if>>
 	The heart rate reading is so high that the Fuckdoll is receiving drugs to calm it down and prevent damage; the suit can deliver these and any other necessary pharmaceuticals by intravenous shunt. Farther down, on the Fuckdoll's side over its ribcage, there are a pair of metal ports. These allow it to be fed.
@@ -1845,50 +1845,15 @@ As the remote surgery's long recovery cycle completes,
 		<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 50>>
 	<</if>>
 
-<<case "ampInterface">>
-	<<if $activeSlave.fetish == "mindbroken">>
-		Of course, $he could not walk out of the surgery; you carried $him. $He squirms the entire time trying to move the arms and legs $he now lacks, never noticing the ports in $his stumps. Since the surgery was invasive, @@.red;$his health has been greatly affected.@@
-	<<elseif ($activeSlave.devotion > 50)>>
-		Of course, $he could not walk out of the surgery; you carried $him. $He knows what a slave's life is, but $he did not really expect that it would ever come to this for $him. Anesthesia has yet to completely wear off so it takes $him a while to notice ports in $his stumps. When $he does, $he visibly relaxes, realizing $he may yet walk again. $He squares $his shoulders and visibly resolves to carry on being a good slave as best $he can. Since the surgery was invasive, @@.red;$his health has been greatly affected.@@
-	<<elseif ($activeSlave.devotion > 20)>>
-		Of course, $he could not walk out of the surgery; you carried $him. Despite $his obedience, $he cries softly the whole time, shoulder and hip stumps moving occasionally as $he reflexively tries to stand — to walk — to touch $himself — to gesture — all things that $he will never do again. $He slightly calms down when $he <<if canSee($activeSlave)>>sees<<else>>feels<</if>> ports installed in $his stumps and realizes $his immobility may not be permanent. Even so, $he is still @@.gold;terrified@@ of your total power over $his body. @@.mediumorchid;$He will struggle greatly with $his medically created disability.@@ Since the surgery was invasive, @@.red;$his health has been greatly affected.@@
-		<<set $activeSlave.trust -= 10, $activeSlave.devotion -= 10>>
-	<<else>>
-		Of course, $he could not walk out of the surgery; you carried $him. You had a good idea what $his reaction would be, so <<if ($activeSlave.teeth == "removable")>>you removed $his teeth<<else>>$he's muzzled<</if>> to prevent $him from trying to bite. $He sobs convulsively, and <<if canSee($activeSlave)>>seeing<<else>>noticing<</if>> ports installed in $his stumps does little to stop $his tears. @@.mediumorchid;The surgical invasion has filled $him with horror and anger.@@ Since the surgery was invasive, @@.red;$his health has been greatly affected.@@ $He is @@.gold;terrified to the point of insanity@@ of your total power over $his body.
-		<<set $activeSlave.trust -= 40, $activeSlave.devotion -= 40>>
-	<</if>>
-
-<<case "prostheticInterface">>
-	When $he is carried out of surgery $he <<if canSee($activeSlave)>>cranes $his neck to better see the ports<<else>>wiggles $his stumps trying to feel the ports<</if>> installed in $his stumps. Recovery will be @@.red;significant,@@ since the surgical implantation of anchor points for the limbs themselves and the installation of nerve impulse detectors constituted major surgery.
-	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
-		<<if $activeSlave.devotion > 20>>
-			Nevertheless, $he's @@.hotpink;overwhelmed with gratitude,@@ and thanks you profusely the first chance $he gets. $He follows the acclimation program diligently, doing $his best to learn how to be a good slave despite, or sometimes even because of, $his disability. $He @@.mediumaquamarine;places more trust in you,@@ too, since you obviously have $his best interests at heart.
-			<<set $activeSlave.devotion += 5, $activeSlave.trust += 5>>
-		<<elseif $activeSlave.devotion >= -20>>
-			$He's @@.hotpink;overwhelmed with gratitude,@@ in part because $he didn't think you'd do something like this for $him. $He thanks you profusely the first chance $he gets, and follows the acclimation program diligently, trying to deserve the expense you went to. $He @@.mediumaquamarine;places more trust in you,@@ too, since you seem to have a plan for $him.
-			<<set $activeSlave.devotion += 5, $activeSlave.trust += 5>>
-		<<else>>
-			Despite $his hatred of you, $he can't help but @@.mediumaquamarine;trust you a bit more,@@ since you clearly have a plan that involves putting a good deal of value into $him. Your goals might not be $hers, but at least $he has an indication that you're not toying with $him.
-			<<set $activeSlave.trust += 5>>
-		<</if>>
-	<</if>>
-
 <<case "amp1">>
 	<<set $nextLink = "Surgery Degradation", $surgeryType = "amp">>
-	<<if $cyberMod == 0>>
-		During the procedure you may install a prosthetic interface so that $he may use prosthetic limbs immediately afterwards.<br>
-		This will cost extra and put further strain on $activeSlave.slaveName's health, but choosing to do this now will be cheaper and be less damaging to $his health than if you were to perform the procedures separately.<br>
-		[[Install prosthetic interface|Surgery Degradation][$activeSlave.PLimb = 1, $activeSlave.health -= 10, $surgeryType = "ampInterface", cashX(forceNeg(Math.trunc($surgeryCost/2)), "slaveSurgery", $activeSlave)]]<br>
-		[[Only perform amputation|Surgery Degradation][$surgeryType = "amp"]]
-	<<else>>
-		Since you invested in cybernetic technology you can install PLimb interface into $his body during the operation.<br>
-		Procedure will put additional strain on $his health but less so than if you were to perform the procedures separately.<br>
-		<<if $stockpile.basicPLimbInterface > 0>>
-			[[Install basic interface|Surgery Degradation][$activeSlave.PLimb = 1, $activeSlave.health -= 10, $stockpile.basicPLimbInterface -= 1, $surgeryType = "amp2", $nextLink = "Remote Surgery"]]
-		<br><</if>>
-		<<if $stockpile.advPLimbInterface > 0>>
-			[[Install advanced interface|Surgery Degradation][$activeSlave.PLimb = 2, $activeSlave.health -= 10, $stockpile.advPLimbInterface -= 1, $surgeryType = "amp2", $nextLink = "Remote Surgery"]]
-		<</if>>
+	Since you have already have a prosthetic interface prepared for this slave you can install it during the operation.<br>
+	The procedure will put additional strain on $his health but less so than if you were to perform the procedures separately.
+	<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP1"}) != -1>><br>
+		[[Install basic interface|Surgery Degradation][$activeSlave.PLimb = 1, $activeSlave.health -= 10, $surgeryType = "amp2", $nextLink = "Surgery Degradation"]]
+	<</if>>
+	<<if $activeSlave.readyProsthetics.findIndex(function(p) {return p.id == "interfaceP2"}) != -1>><br>
+		[[Install advanced interface|Surgery Degradation][$activeSlave.PLimb = 2, $activeSlave.health -= 10, $surgeryType = "amp2", $nextLink = "Surgery Degradation"]]
 	<</if>>
 
 <<case "amp2">>
@@ -1904,6 +1869,11 @@ As the remote surgery's long recovery cycle completes,
 		<<set $activeSlave.trust -= 50, $activeSlave.devotion -= 50>>
 	<</if>>
 
+	<<set $prostheticsConfig = "interface">>
+	<<include "Prosthetics Config">>
+	<<set $nextLink = "Remote Surgery">>
+
+
 <<case "PLimb interface1">>
 	When $he is carried out of surgery $he <<if canSee($activeSlave)>>cranes $his neck to better see the ports<<else>>wiggles $his stumps trying to feel the ports<</if>> installed in $his stumps. Recovery will be @@.red;significant,@@ since the surgical implantation of anchor points for the limbs themselves and the installation of nerve impulse detectors constituted major surgery.
 	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
@@ -1919,6 +1889,10 @@ As the remote surgery's long recovery cycle completes,
 		<</if>>
 	<</if>>
 
+	<<set $prostheticsConfig = "interface">>
+	<<include "Prosthetics Config">>
+	<<set $nextLink = "Remote Surgery">>
+
 <<case "PLimb interface2">>
 	When $he is carried out of surgery $he <<if canSee($activeSlave)>>cranes $his neck to better see the ports<<else>>wiggles $his stumps trying to feel the ports<</if>> installed in $his stumps. $His stumps twitch slightly as the software begins configuring. Recovery will be @@.red;significant,@@ since the surgical implantation of anchor points for the limbs themselves and the installation of nerve bridges constituted major surgery.
 	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
@@ -1934,6 +1908,10 @@ As the remote surgery's long recovery cycle completes,
 		<</if>>
 	<</if>>
 
+	<<set $prostheticsConfig = "interface">>
+	<<include "Prosthetics Config">>
+	<<set $nextLink = "Remote Surgery">>
+
 <<case "PLimb interface3">>
 	When $he is carried out of surgery $he <<if canSee($activeSlave)>>cranes $his neck to better see the ports<<else>>wiggles $his stumps trying to feel the ports<</if>> installed in $his stumps. $His stumps twitch slightly as the software begins configuring. Since $he already had anchors installed in previous surgery this procedure was less invasive and thus @@.red;$his health has been only slightly affected.@@
 	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
@@ -1949,6 +1927,11 @@ As the remote surgery's long recovery cycle completes,
 		<</if>>
 	<</if>>
 
+	<<set $prostheticsConfig = "interface">>
+	<<include "Prosthetics Config">>
+	<<set $nextLink = "Remote Surgery">>
+
+/* This was moved to prostheticsConfig.tw
 <<case "basicPLimbs">>
 	$He exits the surgery hesitantly, the software of $his prosthetic limbs and the wetware of $his brain working together to figure out how to walk together under the tutelage of a prescribed tutorial. Recovery will be @@.red;significant,@@ since the surgical implantation of anchor points for the limbs themselves and the installation of nerve impulse detectors constituted major surgery.
 	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
@@ -2036,6 +2019,7 @@ As the remote surgery's long recovery cycle completes,
 		Of course, $he could not walk out of the surgery; you carried $him. It seems that $his mistrust of you was well founded and this removal of $his artificial limbs has caused @@.mediumorchid;$his devotion to drop@@ and @@.gold;$his trust to drop.@@ As with all surgery @@.red;$his health has been slightly affected.@@
 		<<set $activeSlave.trust -= 5, $activeSlave.devotion -= 5>>
 	<</if>>
+*/
 
 <<case "ster">>
 	<<if $activeSlave.fetish == "mindbroken">>
diff --git a/src/uncategorized/wardrobeUse.tw b/src/uncategorized/wardrobeUse.tw
index 076f3e7ab5d1d69a5e4d2a3c3431d999f85b2bfd..0309112121b208f18d5ff45bac8bfea7aac0ea24 100644
--- a/src/uncategorized/wardrobeUse.tw
+++ b/src/uncategorized/wardrobeUse.tw
@@ -24,7 +24,7 @@
 <</if>>
 /* 000-250-006 */
 
-<<if $activeSlave.fuckdoll == 0>> /* begin fuckdoll check */
+<<if $activeSlave.fuckdoll == 0>> /* begin Fuckdoll check */
 	Clothes: ''$activeSlave.clothes''.
 	&nbsp;&nbsp;[["Let " + $him + " choose"|Wardrobe Use][$activeSlave.clothes = "choosing her own clothes"]]
 	<br>
@@ -243,7 +243,7 @@
 		<<option "uncomfortable straps" "Uncomfortable straps">>
 	<</options>>
 
-<</if>> /* closes fuckdoll check for color picker */
+<</if>> /* closes Fuckdoll check for color picker */
 
 <<if $activeSlave.fuckdoll != 0 || $activeSlave.clothes == "restrictive latex" || $activeSlave.clothes == "a latex catsuit" || $activeSlave.clothes == "a cybersuit" || $activeSlave.clothes == "a comfortable bodysuit">>
 	&nbsp;&nbsp;&nbsp;&nbsp;//Color://&nbsp;&nbsp;
@@ -273,7 +273,7 @@
 	<</if>>
 	<br>
 <</if>>
-<<if $activeSlave.fuckdoll == 0>> /* begin fuckdoll check */
+<<if $activeSlave.fuckdoll == 0>> /* begin Fuckdoll check */
 <br>
 Collar: ''$activeSlave.collar.''
 <<if $activeSlave.collar != "none">>
diff --git a/src/utility/descriptionWidgets.tw b/src/utility/descriptionWidgets.tw
index 0c5851398a49547d17c87d6d05fb816e6ecce465..effd7f8868d5a02a0b82941ebc18100fbac6a6d0 100644
--- a/src/utility/descriptionWidgets.tw
+++ b/src/utility/descriptionWidgets.tw
@@ -131,7 +131,7 @@
 	<<if $activeSlave.geneticQuirks.macromastia == 2 && $activeSlave.geneticQuirks.gigantomastia == 2>>
 		$He has an abnormal strain of gigantomastia and will experience constant excessive breast growth.
 	<<elseif $activeSlave.geneticQuirks.gigantomastia >= 2>>
-		$He has 
+		$He has
 		<<if $activeSlave.geneticQuirks.gigantomastia == 3>>
 			dormant gigantomastia. Hormonal effects may cause it to become active.
 		<<else>>
@@ -249,7 +249,7 @@
 	<<case "She was the result of a night of hard celebration after a big score under the glow of monitors and the calming hum of 750 RPM fans. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
 		<<print "$He was the result of a night of hard celebration after a big score under the glow of monitors and the calming hum of 750 RPM fans. It took quite a bit of alcohol to come to terms with drunkenly knocking yourself up.">>
 	<<case "She was the result of an intruder brute forcing your firewall, overloading your pleasure sensors, and allowing a corrupted packet to slip by. With a quick wipe of your RAM and cache with some powerful liquor, you have no idea who planted her in your womb.">>
-		<<print "$He was the result of an intruder brute forcing your firewall, overloading your pleasure sensors, and allowing a corrupted packet to slip by. With a quick wipe of your RAM and cache with some powerful liquor, you have no idea who planted her in your womb.">>
+		<<print "$He was the result of an intruder brute forcing your firewall, overloading your pleasure sensors, and allowing a corrupted packet to slip by. With a quick wipe of your RAM and cache with some powerful liquor, you have no idea who planted $him in your womb.">>
 	<<case "She was born out of a trade for secure data access. Nine months later, your daughter was born.">>
 		<<print "$He was born out of a trade for secure data access. Nine months later, your daughter was born.">>
 	<<case "She was a case officer you captured after going dark.">>
diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw
index 107cf0e4434a2ee810d39767bba0b8ad15974b2e..5dbf617ac10fc4d457e95ece399e5bd5f6021861 100644
--- a/src/utility/slaveCreationWidgets.tw
+++ b/src/utility/slaveCreationWidgets.tw
@@ -689,10 +689,10 @@
 	<</if>>
 	<<if $corpSpecGender == 1>>
 		Slaves without pussies are not trained.
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<elseif $corpSpecGender == 2>>
 		Slaves without dicks are not trained.
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<else>>
 		Slaves are passed to training regardless of whether they have dicks or pussies.
 		<<set $activeSlave = GenerateNewSlave()>>
@@ -1900,7 +1900,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.career = "a slave">>
 	<<set $activeSlave.butt = either(1, 2, 2, 3)>>
 	<<set $activeSlave.boobs = either(200, 300, 300, 400)>>
@@ -1956,7 +1956,7 @@
 	<<set $activeSlaveOneTimeMinAge = 16>>
 	<<set $activeSlaveOneTimeMaxAge = 19>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her from the Growth Research Institute right after her use as a test subject ended.">>
 	<<set $activeSlave.career = "a slave">>
 	<<set $activeSlave.intelligenceImplant = 0>>
@@ -2004,7 +2004,7 @@
 	<<set $activeSlaveOneTimeMinAge = 16>>
 	<<set $activeSlaveOneTimeMaxAge = 19>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her from St. Claver Preparatory after she served as a plastic surgeon's passing final exam.">>
 	<<set $activeSlave.chem = 20>>
 	<<set $activeSlave.career = "a slave">>
@@ -2079,7 +2079,7 @@
 	<<set $activeSlaveOneTimeMinAge = 16>>
 	<<set $activeSlaveOneTimeMaxAge = 19>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her from the innovative École des Enculées right after her graduation.">>
 	<<set $activeSlave.career = "a slave">>
 	<<set $activeSlave.intelligenceImplant = 0>>
@@ -2139,7 +2139,7 @@
 	<<set $activeSlaveOneTimeMinAge = 16>>
 	<<set $activeSlaveOneTimeMaxAge = 19>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 	<<set $activeSlave.origin = "You bought her fresh from the intense Gymnasium-Academy right after her majority.">>
 	<<set $activeSlave.career = "a slave">>
 	<<set $activeSlave.intelligenceImplant = 30>>
@@ -2190,7 +2190,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 18>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
 		<<set $activeSlave.career = "a dairy slave">>
 		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
@@ -2231,7 +2231,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 24>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
 		<<set $activeSlave.slaveSurname = 0>>
 		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
@@ -2277,7 +2277,7 @@
 		<<set $activeSlaveOneTimeMaxAge = 24>>
 		<<set $one_time_age_overrides_pedo_mode = 1>>
 		<<set $oneTimeDisableDisability = 1>>
-		<<include "Generate XX Slave">>
+		<<set $activeSlave = GenerateNewSlave("XX")>>
 		<<set $activeSlave.slaveName = setup.cowSlaveNames.random()>>
 		<<set $activeSlave.slaveSurname = 0>>
 		<<set $activeSlave.origin = "You bought her from The Cattle Ranch.">>
@@ -2336,7 +2336,7 @@
 	<<if $TFS.schoolUpgrade == 3 && $TFS.compromiseWeek+15 <= $week>>
 		<<set $activeSlave = GenerateNewSlave()>>
 	<<else>>
-		<<include "Generate XY Slave">>
+		<<set $activeSlave = GenerateNewSlave("XY")>>
 	<</if>>
 	<<set $activeSlave.origin = "You bought her from the enigmatic Futanari Sisters after they sold her into slavery.">>
 	<<set $activeSlave.career = "a Futanari Sister">>
@@ -2567,7 +2567,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 26>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.origin = "You bought her from the prestigious Hippolyta Academy.">>
 	<<set $activeSlave.career = "a bodyguard">>
 	<<set $activeSlave.intelligenceImplant = 30>>
@@ -2651,7 +2651,7 @@
 		<</if>>
 	<</if>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XY Slave">>
+	<<set $activeSlave = GenerateNewSlave("XY")>>
 
 	<<set _criminal = setup.gangCriminalPool.random()>>
 
@@ -3549,7 +3549,7 @@
 	<<set $activeSlaveOneTimeMaxAge = 36>>
 	<<set $one_time_age_overrides_pedo_mode = 1>>
 	<<set $oneTimeDisableDisability = 1>>
-	<<include "Generate XX Slave">>
+	<<set $activeSlave = GenerateNewSlave("XX")>>
 	<<set $activeSlave.weight = random(-30,20), $activeSlave.waist = random(-30,10), $activeSlave.face = random(40,60)>>
 	<<if $activeSlave.faceShape == "masculine">>
 		<<set $activeSlave.faceShape = "sensual">>