Index: binaries/data/mods/public/civs/athen.json
===================================================================
--- binaries/data/mods/public/civs/athen.json	(revision 15299)
+++ binaries/data/mods/public/civs/athen.json	(working copy)
@@ -167,5 +167,20 @@
 		"skirmish/units/default_infantry_ranged_b": "units/athen_infantry_slinger_b",
 		"skirmish/structures/default_house_10": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/athen_infantry_spearman_b",
+		"units/athen_infantry_slinger_b",
+		"units/athen_cavalry_javelinist_b",
+		"units/athen_infantry_javelinist_b",
+		"units/athen_cavalry_javelinist_b",
+		"units/athen_mechanical_siege_oxybeles_packed",
+		"units/athen_mechanical_siege_lithobolos_packed",
+		"units/athen_champion_infantry",
+		"units/athen_champion_ranged",
+		"units/athen_hero_themistocles",
+		"units/athen_hero_pericles",
+		"units/athen_hero_iphicrates"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/brit.json
===================================================================
--- binaries/data/mods/public/civs/brit.json	(revision 15299)
+++ binaries/data/mods/public/civs/brit.json	(working copy)
@@ -145,5 +145,21 @@
 		"skirmish/units/special_starting_unit": "units/brit_war_dog_b",
 		"skirmish/structures/default_house_5": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/brit_infantry_spearman_b",
+		"units/brit_infantry_slinger_b",
+		"units/brit_cavalry_javelinist_b",
+		"units/brit_infantry_javelinist_b",
+		"units/brit_champion_infantry_barracks",
+		"units/brit_cavalry_swordsman_b",
+		"units/brit_champion_cavalry_barracks",
+		"units/brit_champion_cavalry",
+		"units/brit_champion_infantry",
+		"units/brit_hero_boudicca",
+		"units/brit_hero_caratacos",
+		"units/brit_hero_cynvelin",
+		"units/brit_mechanical_siege_ram"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/cart.json
===================================================================
--- binaries/data/mods/public/civs/cart.json	(revision 15299)
+++ binaries/data/mods/public/civs/cart.json	(working copy)
@@ -170,5 +170,26 @@
 		"skirmish/units/default_infantry_ranged_b": "units/cart_infantry_archer_b",
 		"skirmish/structures/default_house_10": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/cart_infantry_spearman_b",
+		"units/cart_infantry_archer_b",
+		"units/cart_cavalry_javelinist_b",
+		"units/cart_infantry_swordsman_b",
+		"units/cart_cavalry_swordsman_2_b",
+		"units/cart_infantry_javelinist_b",
+		"units/cart_infantry_slinger_b",
+		"units/cart_cavalry_swordsman_b",
+		"units/cart_infantry_swordsman_2_b",
+		"units/cart_cavalry_spearman_b",
+		"units/cart_champion_infantry",
+		"units/cart_champion_cavalry",
+		"units/cart_hero_hamilcar",
+		"units/cart_hero_hannibal",
+		"units/cart_hero_maharbal",
+		"units/cart_mechanical_siege_ballista_packed",
+		"units/cart_mechanical_siege_oxybeles_packed",
+		"units/cart_champion_elephant"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/celt.json
===================================================================
--- binaries/data/mods/public/civs/celt.json	(revision 15299)
+++ binaries/data/mods/public/civs/celt.json	(working copy)
@@ -168,5 +168,14 @@
 		"skirmish/structures/default_house_5": "structures/{civ}_house",
 		"skirmish/structures/default_fortress": "structures/celt_fortress_g"
 	},
+	"TrainableUnits":
+	[
+		"units/celt_infantry_spearman_b",
+		"units/celt_infantry_javelinist_b",
+		"units/celt_cavalry_javelinist_b",
+		"units/celt_infantry_slinger_b",
+		"units/celt_cavalry_swordsman_b",
+		"units/celt_mechanical_siege_ram"
+	],
 	"SelectableInGameSetup": false
 }
Index: binaries/data/mods/public/civs/gaul.json
===================================================================
--- binaries/data/mods/public/civs/gaul.json	(revision 15299)
+++ binaries/data/mods/public/civs/gaul.json	(working copy)
@@ -137,5 +137,21 @@
 	{
 		"skirmish/structures/default_house_5": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/gaul_infantry_spearman_b",
+		"units/gaul_infantry_javelinist_b",
+		"units/gaul_cavalry_javelinist_b",
+		"units/gaul_infantry_slinger_b",
+		"units/gaul_champion_infantry_barracks",
+		"units/gaul_cavalry_swordsman_b",
+		"units/gaul_champion_cavalry_barracks",
+		"units/gaul_champion_cavalry",
+		"units/gaul_champion_infantry",
+		"units/gaul_hero_brennus",
+		"units/gaul_hero_britomartus",
+		"units/gaul_hero_vercingetorix",
+		"units/gaul_mechanical_siege_ram"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/hele.json
===================================================================
--- binaries/data/mods/public/civs/hele.json	(revision 15299)
+++ binaries/data/mods/public/civs/hele.json	(working copy)
@@ -185,5 +185,27 @@
 		"skirmish/units/default_cavalry": "units/hele_cavalry_swordsman_b",
 		"skirmish/structures/default_house_10": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/hele_infantry_spearman_b",
+		"units/hele_infantry_javelinist_b",
+		"units/hele_cavalry_javelinist_b",
+		"units/hele_infantry_archer_b",
+		"units/hele_infantry_slinger_b",
+		"units/hele_cavalry_swordsman_b",
+		"units/hele_champion_cavalry_mace",
+		"units/hele_champion_infantry_mace",
+		"units/hele_champion_infantry_polis",
+		"units/hele_champion_swordsman_polis",
+		"units/hele_hero_alexander",
+		"units/hele_hero_demetrius",
+		"units/hele_hero_leonidas",
+		"units/hele_hero_philip",
+		"units/hele_hero_themistocles",
+		"units/hele_hero_xenophon",
+		"units/hele_mechanical_siege_oxybeles_packed",
+		"units/hele_mechanical_siege_lithobolos_packed",
+		"units/hele_mechanical_siege_tower"
+	],
 	"SelectableInGameSetup": false
 }
Index: binaries/data/mods/public/civs/iber.json
===================================================================
--- binaries/data/mods/public/civs/iber.json	(revision 15299)
+++ binaries/data/mods/public/civs/iber.json	(working copy)
@@ -140,5 +140,22 @@
 		"skirmish/structures/iber_wall_gate": "structures/iber_wall_gate",
 		"skirmish/structures/iber_wall_tower": "structures/iber_wall_tower"
 	},
+	"TrainableUnits":
+	[
+		"units/iber_infantry_swordsman_b",
+		"units/iber_infantry_javelinist_b",
+		"units/iber_cavalry_javelinist_b",
+		"units/iber_infantry_spearman_b",
+		"units/iber_infantry_slinger_b",
+		"units/iber_champion_infantry_barracks",
+		"units/iber_cavalry_spearman_b",
+		"units/iber_champion_cavalry_barracks",
+		"units/iber_champion_infantry",
+		"units/iber_champion_cavalry",
+		"units/iber_hero_caros",
+		"units/iber_hero_indibil",
+		"units/iber_hero_viriato",
+		"units/iber_mechanical_siege_ram"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/mace.json
===================================================================
--- binaries/data/mods/public/civs/mace.json	(revision 15299)
+++ binaries/data/mods/public/civs/mace.json	(working copy)
@@ -170,5 +170,25 @@
 	{
 		"skirmish/structures/default_house_10": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/mace_infantry_spearman_b",
+		"units/mace_infantry_javelinist_b",
+		"units/mace_cavalry_spearman_b",
+		"units/mace_infantry_archer_b",
+		"units/mace_infantry_slinger_b",
+		"units/mace_champion_infantry_a_barracks",
+		"units/mace_cavalry_javelinist_b",
+		"units/mace_champion_cavalry_barracks",
+		"units/mace_champion_infantry_a",
+		"units/mace_champion_cavalry",
+		"units/mace_hero_philip",
+		"units/mace_hero_alexander",
+		"units/mace_hero_demetrius",
+		"units/mace_mechanical_siege_oxybeles_packed",
+		"units/mace_mechanical_siege_lithobolos_packed",
+		"units/mace_mechanical_siege_ram",
+		"units/mace_mechanical_siege_tower"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/maur.json
===================================================================
--- binaries/data/mods/public/civs/maur.json	(revision 15299)
+++ binaries/data/mods/public/civs/maur.json	(working copy)
@@ -153,5 +153,26 @@
 		"skirmish/units/special_starting_unit": "units/maur_support_elephant",
 		"skirmish/structures/default_house_5": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/maur_infantry_spearman_b",
+		"units/maur_infantry_archer_b",
+		"units/maur_cavalry_javelinist_b",
+		"units/maur_support_elephant",
+		"units/maur_infantry_swordsman_b",
+		"units/maur_champion_infantry_barracks",
+		"units/maur_champion_maiden_barracks",
+		"units/maur_cavalry_swordsman_b",
+		"units/maur_champion_chariot_barracks",
+		"units/maur_champion_infantry",
+		"units/maur_champion_maiden",
+		"units/maur_champion_chariot",
+		"units/maur_hero_chanakya",
+		"units/maur_hero_maurya",
+		"units/maur_hero_ashoka",
+		"units/maur_support_elephant",
+		"units/maur_elephant_archer_b",
+		"units/maur_champion_elephant"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/pers.json
===================================================================
--- binaries/data/mods/public/civs/pers.json	(revision 15299)
+++ binaries/data/mods/public/civs/pers.json	(working copy)
@@ -158,5 +158,21 @@
 		"skirmish/units/default_infantry_ranged_b": "units/pers_infantry_archer_b",
 		"skirmish/structures/default_house_10" : "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/pers_infantry_spearman_b",
+		"units/pers_infantry_archer_b",
+		"units/pers_cavalry_javelinist_b",
+		"units/pers_cavalry_spearman_b",
+		"units/pers_cavalry_swordsman_b",
+		"units/pers_cavalry_archer_b",
+		"units/pers_champion_infantry",
+		"units/pers_champion_cavalry",
+		"units/pers_hero_cyrus",
+		"units/pers_hero_darius",
+		"units/pers_hero_xerxes",
+		"units/pers_mechanical_siege_ram",
+		"units/pers_champion_elephant"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/ptol.json
===================================================================
--- binaries/data/mods/public/civs/ptol.json	(revision 15299)
+++ binaries/data/mods/public/civs/ptol.json	(working copy)
@@ -177,5 +177,24 @@
 		"skirmish/units/default_cavalry": "units/ptol_cavalry_archer_b",
 		"skirmish/structures/default_house_5": "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/ptol_infantry_spearman_b",
+		"units/ptol_infantry_archer_b",
+		"units/ptol_cavalry_archer_b",
+		"units/ptol_infantry_slinger_b",
+		"units/ptol_infantry_spearman_2_b",
+		"units/ptol_infantry_swordsman_b",
+		"units/ptol_cavalry_spearman_b",
+		"units/ptol_cavalry_javelinist_b",
+		"units/ptol_champion_cavalry",
+		"units/ptol_hero_ptolemy_I",
+		"units/ptol_hero_ptolemy_IV",
+		"units/ptol_hero_cleopatra",
+		"units/ptol_mechanical_siege_polybolos_packed",
+		"units/ptol_mechanical_siege_lithobolos_packed",
+		"units/ptol_mechanical_siege_tower",
+		"units/ptol_champion_elephant"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/rome.json
===================================================================
--- binaries/data/mods/public/civs/rome.json	(revision 15299)
+++ binaries/data/mods/public/civs/rome.json	(working copy)
@@ -147,5 +147,23 @@
 		"skirmish/units/default_infantry_melee_b": "units/rome_infantry_swordsman_b",
 		"skirmish/structures/default_house_10" : "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+		"units/rome_infantry_swordsman_b",
+		"units/rome_infantry_javelinist_b",
+		"units/rome_cavalry_spearman_b",
+		"units/rome_infantry_spearman_b",
+		"units/rome_champion_infantry_barracks",
+		"units/rome_cavalry_javelinist_b",
+		"units/rome_champion_cavalry_barracks",
+		"units/rome_champion_infantry",
+		"units/rome_champion_cavalry",
+		"units/rome_hero_marcellus",
+		"units/rome_hero_maximus",
+		"units/rome_hero_scipio",
+		"units/rome_mechanical_siege_ballista_packed",
+		"units/rome_mechanical_siege_scorpio_packed",
+		"units/rome_mechanical_siege_ram"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/sele.json
===================================================================
--- binaries/data/mods/public/civs/sele.json	(revision 15299)
+++ binaries/data/mods/public/civs/sele.json	(working copy)
@@ -184,5 +184,26 @@
 		"skirmish/units/default_cavalry" : "units/sele_cavalry_javelinist",
 		"skirmish/structures/default_house_10" : "structures/{civ}_house"
 	},
+	"TrainableUnits":
+	[
+			"units/sele_infantry_spearman_2_b",
+			"units/sele_cavalry_javelinist",
+			"units/sele_infantry_spearman_b",
+			"units/sele_infantry_javelinist_b",
+			"units/sele_cavalry_archer_b",
+			"units/sele_infantry_swordsman_b",
+			"units/sele_infantry_archer_b",
+			"units/sele_cavalry_spearman_b",
+			"units/sele_champion_infantry_pikeman",
+			"units/sele_champion_chariot",
+			"units/sele_champion_infantry_swordsman",
+			"units/sele_champion_cavalry",
+			"units/sele_hero_seleucus_victor",
+			"units/sele_hero_antiochus_great",
+			"units/sele_hero_antiochus_righteous",
+			"units/sele_mechanical_siege_lithobolos_packed",
+			"units/sele_mechanical_siege_tower",
+			"units/sele_champion_elephant"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/civs/spart.json
===================================================================
--- binaries/data/mods/public/civs/spart.json	(revision 15299)
+++ binaries/data/mods/public/civs/spart.json	(working copy)
@@ -164,5 +164,19 @@
 		"skirmish/structures/default_wall_medium": "",
 		"skirmish/structures/default_wall_long": ""
 	},
+	"TrainableUnits":
+	[
+			"units/spart_infantry_spearman_b",
+			"units/spart_infantry_javelinist_b",
+			"units/spart_cavalry_javelinist_b",
+			"units/spart_champion_infantry_sword",
+			"units/spart_cavalry_spearman_b",
+			"units/spart_champion_infantry_spear",
+			"units/spart_hero_leonidas",
+			"units/spart_hero_brasidas",
+			"units/spart_hero_agis",
+			"units/spart_mechanical_siege_ram",
+			"units/spart_mechanical_siege_oxybeles_packed"
+	],
 	"SelectableInGameSetup": true
 }
Index: binaries/data/mods/public/simulation/components/Player.js
===================================================================
--- binaries/data/mods/public/simulation/components/Player.js	(revision 15299)
+++ binaries/data/mods/public/simulation/components/Player.js	(working copy)
@@ -36,6 +36,7 @@
 	this.cheatsEnabled = false;
 	this.cheatTimeMultiplier = 1;
 	this.heroes = [];
+	this.trainableUnits = {};
 	this.resourceNames = {
 		"food": markForTranslation("Food"),
 		"wood": markForTranslation("Wood"),
@@ -464,6 +465,16 @@
 	this.formations = formations;
 };
 
+Player.prototype.GetTrainableUnits = function()
+{
+	return this.trainableUnits;
+};
+
+Player.prototype.SetTrainableUnits = function(units)
+{
+	this.trainableUnits = units;
+};
+
 Player.prototype.GetStartingCameraPos = function()
 {
 	return this.startCam.position;
Index: binaries/data/mods/public/simulation/components/ProductionQueue.js
===================================================================
--- binaries/data/mods/public/simulation/components/ProductionQueue.js	(revision 15299)
+++ binaries/data/mods/public/simulation/components/ProductionQueue.js	(working copy)
@@ -15,7 +15,12 @@
 		"<ref name='nonNegativeDecimal'/>" +
 	"</element>" +
 	"<optional>" + 
-		"<element name='Entities' a:help='Space-separated list of entity template names that this building can train. The special string \"{civ}\" will be automatically replaced by the building&apos;s four-character civ code'>" +
+		"<element name='TrainFromJSON' a:help='Set to \"true\" in order to add all entities defined in the civ JSON.'>" +
+			"<text/>" +
+		"</element>" +
+	"</optional>" + 
+	"<optional>" + 
+		"<element name='Entities' a:help='Space-separated list of entity template names that this building can train (in addition to the training group). The special string \"{civ}\" will be automatically replaced by the building&apos;s four-character civ code'>" +
 			"<attribute name='datatype'>" +
 				"<value>tokens</value>" +
 			"</attribute>" +
@@ -23,6 +28,22 @@
 		"</element>" +
 	"</optional>" + 
 	"<optional>" + 
+		"<element name='RequiredClasses' a:help='Require certain classes from the trainable entities'>" +
+			"<attribute name='datatype'>" +
+				"<value>tokens</value>" +
+			"</attribute>" +
+			"<text/>" +
+		"</element>" +
+	"</optional>" + 
+	"<optional>" + 
+		"<element name='ForbiddenClasses' a:help='Forbid certain classes from the trainable entities'>" +
+			"<attribute name='datatype'>" +
+				"<value>tokens</value>" +
+			"</attribute>" +
+			"<text/>" +
+		"</element>" +
+	"</optional>" + 
+	"<optional>" + 
 		"<element name='Technologies' a:help='Space-separated list of technology names that this building can research.'>" +
 			"<attribute name='datatype'>" +
 				"<value>tokens</value>" +
@@ -67,6 +88,12 @@
 	this.spawnNotified = false;
 	
 	this.alertRaiser = undefined;
+
+	// Hack for atlas, where the player settings are only set when the game starts
+	// so update the entities and technologies on the first turn
+	var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
+	cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "CalculateEntitiesList", 1, {});
+	cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "CalculateTechnologiesList", 1, {});
 };
 
 ProductionQueue.prototype.PutUnderAlert = function(raiser)
@@ -90,22 +117,33 @@
 ProductionQueue.prototype.CalculateEntitiesList = function()
 {
 	this.entitiesList = [];
-	if (!this.template.Entities)
+	var cmpPlayer = QueryOwnerInterface(this.entity, IID_Player);
+	var cmpIdentity = Engine.QueryInterface(this.entity, IID_Identity);
+	if (!cmpIdentity || !cmpPlayer || cmpPlayer.GetPlayerID() == 0)
 		return;
-	
-	var string = this.template.Entities._string;
-	if (!string)
-		return;
-	
-	// Replace the "{civ}" codes with this entity's civ ID
-	var cmpIdentity = Engine.QueryInterface(this.entity, IID_Identity);
-	if (cmpIdentity)
-		string = string.replace(/\{civ\}/g, cmpIdentity.GetCiv());
-	
-	var entitiesList = string.split(/\s+/);
 
-	// check if some templates need to show their advanced or elite version
-	var upgradeTemplate = function(templateName)
+	// temporary variable to work with
+	var ents = [];
+	// add the entities defined in the template
+	if (this.template.Entities && this.template.Entities._string)
+		ents = ents.concat(this.template.Entities._string.split(/\s+/));
+
+	// add the entities defined in the civ.json
+	if (this.template.TrainFromJSON && this.template.TrainFromJSON == "true")
+		ents = ents.concat(cmpPlayer.GetTrainableUnits());
+
+	var cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
+	var playerID = cmpPlayer.GetPlayerID();
+
+	var requiredClasses, forbiddenClasses;
+	if (this.template.RequiredClasses)
+		requiredClasses = this.template.RequiredClasses._string;
+	if (this.template.ForbiddenClasses)
+		forbiddenClasses = this.template.ForbiddenClasses._string;
+
+	// function to check if some templates need to show their advanced or elite version
+	// Also filters the entities already in the list based on their classes
+	var upgradeAndFilterTemplate = function(templateName)
 	{
 		var template = cmpTemplateManager.GetTemplate(templateName);
 		while (template && template.Promotion !== undefined)
@@ -116,17 +154,32 @@
 			templateName = template.Promotion.Entity;
 			template = cmpTemplateManager.GetTemplate(templateName);
 		}
+		if (!template || !template.Identity)
+			return null;
+		var classes = GetIdentityClasses(template.Identity);
+		if (requiredClasses && !MatchesClassList(classes, requiredClasses))
+			return null;
+		if (forbiddenClasses && MatchesClassList(classes, requiredClasses))
+			return null;
 		return templateName;
 	};
 
-	var cmpTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager);
-	var playerID = QueryOwnerInterface(this.entity, IID_Player).GetPlayerID();
-	for each (var templateName in entitiesList)
-		this.entitiesList.push(upgradeTemplate(templateName));
-	for each (var item in this.queue)
+	for (var i = 0; i <  ents.length; i++)
 	{
+		var templateName = ents[i].replace(/\{civ\}/g, cmpPlayer.GetCiv());
+		templateName = upgradeAndFilterTemplate(templateName);
+		if (templateName)
+			this.entitiesList.push(templateName);
+	}
+	// also update the queue, to produce more advanced units in case they should be upgraded now
+	for (var item of this.queue)
+	{
 		if (item.unitTemplate)
-			item.unitTemplate = upgradeTemplate(item.unitTemplate);
+		{
+			var templateName = upgradeAndFilterTemplate(item.unitTemplate);
+			if (templateName)
+				item.unitTemplate = templateName;
+		}
 	}
 };
 
@@ -135,16 +188,22 @@
  */
 ProductionQueue.prototype.GetTechnologiesList = function()
 {
+	return this.technologiesList
+};
+
+ProductionQueue.prototype.CalculateTechnologiesList = function()
+{
+	this.technologiesList = [];
 	if (!this.template.Technologies)
-		return [];
+		return;
 	
 	var string = this.template.Technologies._string;
 	if (!string)
-		return [];
+		return;
 	
 	var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
 	if (!cmpTechnologyManager)
-		return [];
+		return;
 	
 	var techs = string.split(/\s+/);
 	var techList = [];
@@ -174,8 +233,6 @@
 		techList[i] = tech;
 	}
 	
-	var ret = []
-	
 	// This inserts the techs into the correct positions to line up the technology pairs
 	for (var i = 0; i < techList.length; i++)
 	{
@@ -182,18 +239,16 @@
 		var tech = techList[i];
 		if (!tech)
 		{
-			ret[i] = undefined;
+			this.technologiesList[i] = undefined;
 			continue;
 		}
 		
 		var template = cmpTechnologyManager.GetTechnologyTemplate(tech);
 		if (template.top)
-			ret[i] = {"pair": true, "top": template.top, "bottom": template.bottom};
+			this.technologiesList[i] = {"pair": true, "top": template.top, "bottom": template.bottom};
 		else
-			ret[i] = tech;
+			this.technologiesList[i] = tech;
 	}
-	
-	return ret;
 };
 
 ProductionQueue.prototype.IsTechnologyResearchedOrInProgress = function(tech)
@@ -324,6 +379,7 @@
 				"timeTotal": time*1000,
 				"timeRemaining": time*1000,
 			});
+			this.CalculateTechnologiesList();
 		}
 		else
 		{
@@ -406,6 +462,7 @@
 			// item.player is used as this.entity's owner may be invalid (deletion, etc.)
 			var cmpTechnologyManager = QueryPlayerIDInterface(item.player, IID_TechnologyManager);
 			cmpTechnologyManager.StoppedResearch(item.technologyTemplate);
+			this.CalculateTechnologiesList();
 		}
 		
 		// Remove from the queue
@@ -474,7 +531,10 @@
 			cmpPlayer.UnBlockTraining();
 	}
 	if (msg.to != -1)
+	{
 		this.CalculateEntitiesList();
+		this.CalculateTechnologiesList();
+	}
 
 	// Reset the production queue whenever the owner changes.
 	// (This should prevent players getting surprised when they capture
@@ -774,4 +834,9 @@
 		this.CalculateEntitiesList();
 };
 
+ProductionQueue.prototype.OnGlobalTemplateModification = function()
+{
+	this.CalculateTechnologiesList();
+};
+
 Engine.RegisterComponentType(IID_ProductionQueue, "ProductionQueue", ProductionQueue);
Index: binaries/data/mods/public/simulation/helpers/Player.js
===================================================================
--- binaries/data/mods/public/simulation/helpers/Player.js	(revision 15299)
+++ binaries/data/mods/public/simulation/helpers/Player.js	(working copy)
@@ -123,6 +123,17 @@
 				cmpPlayer.SetFormations(rawFormations.Formations);
 			}
 
+			var trainableUnits = getSetting(pData, pDefs, "TrainableUnits");
+			if (trainableUnits !== undefined)
+				cmpPlayer.SetTrainableUnits(trainableUnits);
+			else
+			{
+				var data = Engine.ReadCivJSONFile(cmpPlayer.GetCiv()+".json");
+				if (data && data.TrainableUnits)
+					cmpPlayer.SetTrainableUnits(data.TrainableUnits);
+			}
+
+
 			var startCam = getSetting(pData, pDefs, "StartingCamera");
 			if (startCam !== undefined)
 				cmpPlayer.SetStartingCamera(startCam.Position, startCam.Rotation);
Index: binaries/data/mods/public/simulation/templates/structures/athen_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/athen_barracks.xml	(working copy)
@@ -22,13 +22,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/athen_infantry_spearman_b
-      units/athen_infantry_javelinist_b
-      units/athen_infantry_slinger_b
-      units/athen_cavalry_swordsman_b
-      units/athen_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
 	  upgrade_rank_advanced_infantry
Index: binaries/data/mods/public/simulation/templates/structures/athen_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/athen_civil_centre.xml	(working copy)
@@ -9,11 +9,6 @@
     <History>The most important place in Athens, the Agora served many purposes; it was a place for public speeches and was the stage for civic life and commercial interests.</History>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/athen_infantry_spearman_b
-      units/athen_infantry_slinger_b
-      units/athen_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
       -phase_town_generic
       phase_town_athen
Index: binaries/data/mods/public/simulation/templates/structures/athen_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/athen_fortress.xml	(working copy)
@@ -14,10 +14,9 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/athen_mechanical_siege_oxybeles_packed
-      units/athen_mechanical_siege_lithobolos_packed
-    </Entities>
+    <RequiredClasses datatype="tokens" replace="">
+      Siege
+    </RequiredClasses>
     <Technologies datatype="tokens">
       -pair_champ_02
       pair_siege_attack_pack
Index: binaries/data/mods/public/simulation/templates/structures/athen_gymnasion.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_gymnasion.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/athen_gymnasion.xml	(working copy)
@@ -35,10 +35,8 @@
   </Sound>
   <ProductionQueue>
     <BatchTimeModifier>0.7</BatchTimeModifier>
-    <Entities datatype="tokens">
-      units/athen_champion_infantry
-      units/athen_champion_ranged
-    </Entities>
+    <TrainFromJSON>true</TrainFromJSON>
+    <RequiredClasses datatype="tokens">Champion</RequiredClasses>
     <Technologies datatype="tokens">
       pair_champ_02
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/athen_prytaneion.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/athen_prytaneion.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/athen_prytaneion.xml	(working copy)
@@ -39,11 +39,8 @@
   </Sound>
   <ProductionQueue>
     <BatchTimeModifier>0.7</BatchTimeModifier>
-    <Entities datatype="tokens">
-      units/athen_hero_themistocles
-      units/athen_hero_pericles
-      units/athen_hero_iphicrates
-    </Entities>
+    <TrainFromJSON>true</TrainFromJSON>
+    <RequiredClasses datatype="tokens">Hero</RequiredClasses>
     <Technologies datatype="tokens">
       hellenes/special_long_walls
       hellenes/special_iphicratean_reforms
@@ -52,4 +49,4 @@
   <VisualActor>
     <Actor>structures/athenians/prytaneion.xml</Actor>
   </VisualActor>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/structures/brit_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/brit_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/brit_barracks.xml	(working copy)
@@ -19,15 +19,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/brit_infantry_spearman_b
-      units/brit_infantry_javelinist_b
-      units/brit_infantry_slinger_b
-	  units/brit_champion_infantry_barracks
-      units/brit_cavalry_swordsman_b
-      units/brit_cavalry_javelinist_b
-	  units/brit_champion_cavalry_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_advanced_cavalry
Index: binaries/data/mods/public/simulation/templates/structures/brit_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/brit_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/brit_civil_centre.xml	(working copy)
@@ -15,13 +15,6 @@
   <Obstruction>
     <Static width="25.0" depth="25.0"/>
   </Obstruction>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/brit_infantry_spearman_b
-      units/brit_infantry_slinger_b
-      units/brit_cavalry_javelinist_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/britons/civic_centre.xml</Actor>
     <FoundationActor>structures/fndn_6x6.xml</FoundationActor>
Index: binaries/data/mods/public/simulation/templates/structures/brit_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/brit_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/brit_fortress.xml	(working copy)
@@ -33,14 +33,6 @@
     </SoundGroups>
   </Sound>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/brit_hero_boudicca
-      units/brit_hero_caratacos
-      units/brit_hero_cynvelin
-      units/brit_champion_cavalry
-      units/brit_champion_infantry
-      units/brit_mechanical_siege_ram
-    </Entities>
     <Technologies datatype="tokens">
       pair_siege_attack_cost
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/cart_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/cart_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/cart_barracks.xml	(working copy)
@@ -23,11 +23,6 @@
     <Static width="22.0" depth="23.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/cart_infantry_spearman_b
-      units/cart_infantry_archer_b
-      units/cart_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/cart_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/cart_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/cart_civil_centre.xml	(working copy)
@@ -9,11 +9,6 @@
     <SpawnEntityOnDeath>rubble/rubble_kart_cc</SpawnEntityOnDeath>
   </Health>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/cart_infantry_spearman_b
-      units/cart_infantry_archer_b
-      units/cart_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
       carthaginians/special_colonisation
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/cart_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/cart_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/cart_fortress.xml	(working copy)
@@ -14,14 +14,6 @@
     <Static width="26.0" depth="28.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/cart_hero_hamilcar
-      units/cart_hero_hannibal
-      units/cart_hero_maharbal
-      units/cart_champion_elephant
-      units/cart_mechanical_siege_ballista_packed
-      units/cart_mechanical_siege_oxybeles_packed
-    </Entities>
     <Technologies datatype="tokens">
       pair_siege_attack_pack
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/celt_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/celt_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/celt_barracks.xml	(working copy)
@@ -19,13 +19,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/celt_infantry_spearman_b
-      units/celt_infantry_javelinist_b
-      units/celt_infantry_slinger_b
-      units/celt_cavalry_swordsman_b
-      units/celt_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_advanced_cavalry
Index: binaries/data/mods/public/simulation/templates/structures/celt_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/celt_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/celt_civil_centre.xml	(working copy)
@@ -16,11 +16,6 @@
     <Static width="25.0" depth="25.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/celt_infantry_spearman_b
-      units/celt_infantry_javelinist_b
-      units/celt_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
       -phase_city_generic
       phase_city_pair_celts
Index: binaries/data/mods/public/simulation/templates/structures/gaul_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/gaul_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/gaul_barracks.xml	(working copy)
@@ -19,15 +19,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/gaul_infantry_spearman_b
-      units/gaul_infantry_javelinist_b
-      units/gaul_infantry_slinger_b
-	  units/gaul_champion_infantry_barracks
-      units/gaul_cavalry_swordsman_b
-      units/gaul_cavalry_javelinist_b
-	  units/gaul_champion_cavalry_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_advanced_cavalry
Index: binaries/data/mods/public/simulation/templates/structures/gaul_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/gaul_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/gaul_civil_centre.xml	(working copy)
@@ -15,13 +15,6 @@
   <Obstruction>
     <Static width="25.0" depth="25.0"/>
   </Obstruction>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/gaul_infantry_spearman_b
-      units/gaul_infantry_javelinist_b
-      units/gaul_cavalry_javelinist_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/gauls/civic_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/gaul_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/gaul_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/gaul_fortress.xml	(working copy)
@@ -17,14 +17,6 @@
     </SoundGroups>
   </Sound>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/gaul_hero_brennus
-      units/gaul_hero_britomartus
-      units/gaul_hero_vercingetorix
-      units/gaul_champion_cavalry
-      units/gaul_champion_infantry
-      units/gaul_mechanical_siege_ram
-    </Entities>
     <Technologies datatype="tokens">
       pair_siege_attack_cost
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/hele_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/hele_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/hele_barracks.xml	(working copy)
@@ -24,14 +24,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-	  units/hele_infantry_spearman_b
-	  units/hele_infantry_javelinist_b
-	  units/hele_infantry_archer_b
-	  units/hele_infantry_slinger_b
-	  units/hele_cavalry_swordsman_b
-	  units/hele_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
 	  upgrade_rank_advanced_infantry
Index: binaries/data/mods/public/simulation/templates/structures/hele_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/hele_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/hele_civil_centre.xml	(working copy)
@@ -12,13 +12,6 @@
     <SpecificName>Agorā́</SpecificName>
     <History>The most important place in most Classical Greek poleis, the Agora served many purposes; it was a place for public speeches and was the stage for civic life and commercial interests.</History>
   </Identity>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/hele_infantry_spearman_b
-      units/hele_infantry_javelinist_b
-      units/hele_cavalry_javelinist_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/hellenes/civic_centre_new.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/hele_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/hele_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/hele_fortress.xml	(working copy)
@@ -20,11 +20,10 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/hele_mechanical_siege_oxybeles_packed
-      units/hele_mechanical_siege_lithobolos_packed
-      units/hele_mechanical_siege_tower
-    </Entities>
+    <RequiredClasses datatype="tokens">
+      -Hero
+      -Champion
+    </RequiredClasses>
     <Technologies datatype="tokens">
       pair_siege_attack_pack
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/iber_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/iber_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/iber_barracks.xml	(working copy)
@@ -12,16 +12,6 @@
     <History>The Iberians did not have standing armies in the sense that we know of them elsewhere or of today. Citizens were expected to take up arms whenever called by necessity.</History>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/iber_infantry_spearman_b
-      units/iber_infantry_swordsman_b
-      units/iber_infantry_javelinist_b
-      units/iber_infantry_slinger_b
-	  units/iber_champion_infantry_barracks
-      units/iber_cavalry_spearman_b
-      units/iber_cavalry_javelinist_b
-	  units/iber_champion_cavalry_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_advanced_cavalry
Index: binaries/data/mods/public/simulation/templates/structures/iber_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/iber_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/iber_civil_centre.xml	(working copy)
@@ -8,13 +8,6 @@
   <Health>
     <SpawnEntityOnDeath>rubble/rubble_iber_cc</SpawnEntityOnDeath>
   </Health>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/iber_infantry_swordsman_b
-      units/iber_infantry_javelinist_b
-      units/iber_cavalry_javelinist_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/iberians/civil_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/iber_fortress.xml	(working copy)
@@ -20,14 +20,6 @@
     <Static width="27.0" depth="27.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/iber_hero_caros
-      units/iber_hero_indibil
-      units/iber_hero_viriato
-      units/iber_champion_infantry
-      units/iber_champion_cavalry
-      units/iber_mechanical_siege_ram
-    </Entities>
     <Technologies datatype="tokens">
       pair_siege_attack_cost
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/mace_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/mace_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/mace_barracks.xml	(working copy)
@@ -22,16 +22,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/mace_infantry_spearman_b
-      units/mace_infantry_javelinist_b
-      units/mace_infantry_archer_b
-      units/mace_infantry_slinger_b
-      units/mace_champion_infantry_a_barracks
-      units/mace_cavalry_spearman_b
-      units/mace_cavalry_javelinist_b
-      units/mace_champion_cavalry_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_elite_infantry
Index: binaries/data/mods/public/simulation/templates/structures/mace_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/mace_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/mace_civil_centre.xml	(working copy)
@@ -8,13 +8,6 @@
     <SpecificName>Agorā́</SpecificName>
     <History>The most important place in most Classical Greek poleis, the Agora served many purposes; it was a place for public speeches and was the stage for civic life and commercial interests.</History>
   </Identity>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/mace_infantry_spearman_b
-      units/mace_infantry_javelinist_b
-      units/mace_cavalry_spearman_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/macedonians/civic_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/mace_fortress.xml	(working copy)
@@ -20,13 +20,9 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/mace_hero_philip
-      units/mace_hero_alexander
-      units/mace_hero_demetrius
-      units/mace_champion_infantry_a
-      units/mace_champion_cavalry
-    </Entities>
+    <RequiredClasses datatype="tokens">
+      -Siege
+    </RequiredClasses>
     <Technologies datatype="tokens">
 	  successors/upgrade_mace_silvershields
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/maur_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/maur_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/maur_barracks.xml	(working copy)
@@ -13,16 +13,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/maur_infantry_spearman_b
-      units/maur_infantry_swordsman_b
-      units/maur_infantry_archer_b
-	  units/maur_champion_infantry_barracks
-	  units/maur_champion_maiden_barracks
-      units/maur_cavalry_swordsman_b
-      units/maur_cavalry_javelinist_b
-	  units/maur_champion_chariot_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  mauryans/special_archery_tradition
     </Technologies>
@@ -30,4 +20,4 @@
   <VisualActor>
     <Actor>structures/mauryans/barracks.xml</Actor>
   </VisualActor>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/structures/maur_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/maur_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/maur_civil_centre.xml	(working copy)
@@ -15,14 +15,6 @@
   <Obstruction>
     <Static width="36.0" depth="30.0"/>
   </Obstruction>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/maur_infantry_spearman_b
-      units/maur_infantry_archer_b
-      units/maur_cavalry_javelinist_b
-      units/maur_support_elephant
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/mauryans/civil_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/maur_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/maur_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/maur_fortress.xml	(working copy)
@@ -7,14 +7,9 @@
     <Tooltip>Train heroes and champion units.</Tooltip>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/maur_hero_chanakya
-      units/maur_hero_maurya
-      units/maur_hero_ashoka
-      units/maur_champion_infantry
-      units/maur_champion_maiden
-      units/maur_champion_chariot
-    </Entities>
+    <ForbiddenClasses datatype="tokens">
+      Elephant
+    </ForbiddenClasses>
     <Technologies datatype="tokens">
       pair_champ_02
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/pers_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/pers_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/pers_barracks.xml	(working copy)
@@ -8,11 +8,10 @@
     <Icon>structures/pers_barracks.png</Icon>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/pers_infantry_spearman_b
-      units/pers_infantry_javelinist_b
-      units/pers_infantry_archer_b
-    </Entities>
+    <RequiredClasses datatype="tokens" replace="">
+      CitizenSoldier+Infantry
+      Extra+Champion+Infantry
+    </RequiredClasses>
     <Technologies datatype="tokens">
 	  persians/training_levy_infantry
 	  persians/training_conscription_infantry
Index: binaries/data/mods/public/simulation/templates/structures/pers_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/pers_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/pers_civil_centre.xml	(working copy)
@@ -10,11 +10,6 @@
     <SpawnEntityOnDeath>rubble/rubble_pers_cc</SpawnEntityOnDeath>
   </Health>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/pers_infantry_spearman_b
-      units/pers_infantry_archer_b
-      units/pers_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
       persians/persian_architecture
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/pers_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/pers_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/pers_fortress.xml	(working copy)
@@ -7,10 +7,10 @@
     <Tooltip>Train Champion Cavalry and Construct Siege Rams.</Tooltip>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/pers_champion_cavalry
-      units/pers_mechanical_siege_ram
-    </Entities>
+    <RequiredClasses replace="" datatype="tokens">
+      Champion+Cavalry
+      Siege
+    </RequiredClasses>
     <Technologies datatype="tokens">
       pair_siege_attack_cost
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/pers_stables.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/pers_stables.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/pers_stables.xml	(working copy)
@@ -29,12 +29,10 @@
     <Static width="18.0" depth="16.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/pers_cavalry_spearman_b
-      units/pers_cavalry_swordsman_b
-      units/pers_cavalry_javelinist_b
-      units/pers_cavalry_archer_b
-    </Entities>
+    <RequiredClasses datatype="tokens" replace="">
+      CitizenSoldier+Cavalry
+      Champion+Extra+Cavalry
+	</RequiredClasses>
     <Technologies datatype="tokens">
 	  -pair_levy_01
 	  -training_conscription
Index: binaries/data/mods/public/simulation/templates/structures/ptol_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/ptol_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/ptol_barracks.xml	(working copy)
@@ -22,12 +22,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/ptol_infantry_spearman_b
-      units/ptol_infantry_archer_b
-      units/ptol_infantry_slinger_b
-      units/ptol_cavalry_archer_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/ptol_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/ptol_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/ptol_civil_centre.xml	(working copy)
@@ -15,13 +15,6 @@
     <SpecificName>pr-'a</SpecificName>
     <History>?</History>
   </Identity>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/ptol_infantry_spearman_b
-      units/ptol_infantry_archer_b
-      units/ptol_cavalry_archer_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/ptolemies/civic_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/ptol_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/ptol_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/ptol_fortress.xml	(working copy)
@@ -13,16 +13,6 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-	  units/ptol_hero_ptolemy_I
-	  units/ptol_hero_ptolemy_IV
-	  units/ptol_hero_cleopatra
-      units/ptol_champion_cavalry
-      units/ptol_champion_elephant
-      units/ptol_mechanical_siege_polybolos_packed
-      units/ptol_mechanical_siege_lithobolos_packed
-      units/ptol_mechanical_siege_tower
-    </Entities>
     <Technologies datatype="tokens">
 	  pair_siege_attack_pack
 	  pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/rome_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/rome_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/rome_barracks.xml	(working copy)
@@ -22,15 +22,6 @@
     <Static width="24.0" depth="24.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/rome_infantry_swordsman_b
-      units/rome_infantry_spearman_a
-      units/rome_infantry_javelinist_b
-	  units/rome_champion_infantry_barracks
-      units/rome_cavalry_spearman_b
-      units/rome_cavalry_javelinist_b
-	  units/rome_champion_cavalry_barracks
-    </Entities>
     <Technologies datatype="tokens">
 	  upgrade_rank_advanced_infantry
 	  upgrade_rank_elite_infantry
Index: binaries/data/mods/public/simulation/templates/structures/rome_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/rome_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/rome_civil_centre.xml	(working copy)
@@ -15,13 +15,6 @@
   <Obstruction>
     <Static width="37.0" depth="37.0"/>
   </Obstruction>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/rome_infantry_swordsman_b
-      units/rome_infantry_javelinist_b
-      units/rome_cavalry_spearman_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/romans/civic_centre.xml</Actor>
     <FoundationActor>structures/fndn_8x8.xml</FoundationActor>
Index: binaries/data/mods/public/simulation/templates/structures/rome_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/rome_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/rome_fortress.xml	(working copy)
@@ -6,16 +6,6 @@
     <History>Fortified auxillary camp.</History>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/rome_hero_marcellus
-      units/rome_hero_maximus
-      units/rome_hero_scipio
-      units/rome_champion_infantry
-      units/rome_champion_cavalry
-      units/rome_mechanical_siege_ballista_packed
-      units/rome_mechanical_siege_scorpio_packed
-      units/rome_mechanical_siege_ram
-    </Entities>
     <Technologies datatype="tokens">
       pair_siege_attack_pack
       pair_siege_cost_armor
Index: binaries/data/mods/public/simulation/templates/structures/sele_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/sele_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/sele_barracks.xml	(working copy)
@@ -21,12 +21,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/sele_infantry_spearman_b
-      units/sele_infantry_javelinist_b
-      units/sele_cavalry_javelinist_b
-      units/sele_cavalry_archer_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/structures/sele_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/sele_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/sele_civil_centre.xml	(working copy)
@@ -9,13 +9,7 @@
     <History>The most important place in most Hellenistic cities, the Agora served many purposes; it was a place for public speeches and was the stage for civic life and commercial interests.</History>
   </Identity>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/sele_infantry_spearman_2_b
-      units/sele_cavalry_javelinist
-      units/sele_hero_seleucus_victor
-      units/sele_hero_antiochus_great
-      units/sele_hero_antiochus_righteous
-    </Entities>
+    <RequiredClasses datatype="tokens">Hero</RequiredClasses>
   </ProductionQueue>
   <VisualActor>
     <Actor>structures/macedonians/civic_centre.xml</Actor>
Index: binaries/data/mods/public/simulation/templates/structures/sele_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/sele_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/sele_fortress.xml	(working copy)
@@ -14,15 +14,9 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-	  units/sele_champion_infantry_pikeman
-	  units/sele_champion_chariot
-	  units/sele_champion_infantry_swordsman
-	  units/sele_champion_cavalry	
-      units/sele_champion_elephant
-      units/sele_mechanical_siege_lithobolos_packed
-      units/sele_mechanical_siege_tower
-    </Entities>
+    <RequiredClasses datatype="tokens">
+      -Hero
+    </RequiredClasses>
     <Technologies datatype="tokens">
 	  successors/pair_unlock_champions
 	  pair_siege_attack_pack
Index: binaries/data/mods/public/simulation/templates/structures/spart_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/spart_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/spart_barracks.xml	(working copy)
@@ -22,13 +22,6 @@
     <Static width="20.0" depth="20.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/spart_infantry_spearman_b
-      units/spart_champion_infantry_sword
-      units/spart_infantry_javelinist_b
-      units/spart_cavalry_spearman_b
-      units/spart_cavalry_javelinist_b
-    </Entities>
     <Technologies datatype="tokens">
 	  -unlock_champion_units
 	  upgrade_rank_advanced_infantry
Index: binaries/data/mods/public/simulation/templates/structures/spart_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/spart_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/spart_civil_centre.xml	(working copy)
@@ -8,13 +8,6 @@
     <SpecificName>Agorā́</SpecificName>
     <History>The most important place in most Classical Greek poleis, the Agora served many purposes; it was a place for public speeches and was the stage for civic life and commercial interests.</History>
   </Identity>
-  <ProductionQueue>
-    <Entities datatype="tokens">
-      units/spart_infantry_spearman_b
-      units/spart_infantry_javelinist_b
-      units/spart_cavalry_javelinist_b
-    </Entities>
-  </ProductionQueue>
   <VisualActor>
     <Actor>structures/spartans/civic_centre.xml</Actor>
   </VisualActor>
Index: binaries/data/mods/public/simulation/templates/structures/spart_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/structures/spart_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/structures/spart_fortress.xml	(working copy)
@@ -14,10 +14,9 @@
     <Static width="24.0" depth="26.0"/>
   </Obstruction>
   <ProductionQueue>
-    <Entities datatype="tokens">
-      units/spart_mechanical_siege_ram
-      units/spart_mechanical_siege_oxybeles_packed
-    </Entities>
+    <RequiredClasses datatype="tokens" replace="">
+      Siege
+    </RequiredClasses>
     <Technologies datatype="tokens">
       -pair_champ_02
       pair_siege_attack_cost
Index: binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml	(working copy)
@@ -84,6 +84,8 @@
     <Entities datatype="tokens">
       units/{civ}_support_female_citizen
     </Entities>
+    <TrainFromJSON>true</TrainFromJSON>
+    <RequiredClasses datatype="tokens">Standard</RequiredClasses>
     <Technologies datatype="tokens">
       phase_town_generic
       phase_city_generic
Index: binaries/data/mods/public/simulation/templates/template_structure_military_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_structure_military_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/template_structure_military_barracks.xml	(working copy)
@@ -47,6 +47,8 @@
   </Obstruction>
   <ProductionQueue>
     <BatchTimeModifier>0.8</BatchTimeModifier>
+    <TrainFromJSON>true</TrainFromJSON>
+    <RequiredClasses datatype="tokens">CitizenSoldier Champion+Extra</RequiredClasses>
     <Technologies datatype="tokens">
       pair_levy_01
 	  training_conscription
Index: binaries/data/mods/public/simulation/templates/template_structure_military_fortress.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_structure_military_fortress.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/template_structure_military_fortress.xml	(working copy)
@@ -80,6 +80,8 @@
   </Obstruction>
   <ProductionQueue>
     <BatchTimeModifier>0.8</BatchTimeModifier>
+    <RequiredClasses datatype="tokens">Hero Champion Siege</RequiredClasses>
+    <ForbiddenClasses datatype="tokens">Extra</ForbiddenClasses>
     <Technologies datatype="tokens">
       pair_champ_02
     </Technologies>
Index: binaries/data/mods/public/simulation/templates/template_unit_support_female_citizen.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/template_unit_support_female_citizen.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/template_unit_support_female_citizen.xml	(working copy)
@@ -53,7 +53,7 @@
     <History>Women in the ancient world took on a variety of roles - from leadership (Celts) to servant (Greeks). Women are hard workers, the economic backbone of any civilization. In history, it was typical when all the males (capable of fighting) were killed for the females, children, and elderly to be sold as slaves.</History>
     <Tooltip>Classes: Citizen Support Worker Female.
 Gather resources, build civic structures, and inspire nearby males to work faster. Bonused at foraging and farming.</Tooltip>
-    <Classes datatype="tokens">Worker Female Citizen</Classes>
+    <Classes datatype="tokens">Worker Female Citizen Standard</Classes>
     <Formations disable=""/>
   </Identity>
   <ResourceGatherer>
Index: binaries/data/mods/public/simulation/templates/units/athen_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/athen_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/athen_cavalry_javelinist_b.xml	(working copy)
@@ -6,6 +6,7 @@
     <SpecificName>Pródromos</SpecificName>
     <History>Prodromoi were the light scouts of Greek armies.</History>
     <Icon>units/hele_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/athen_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/athen_infantry_slinger_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/athen_infantry_slinger_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/athen_infantry_slinger_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Psilós Athēnaïkós</SpecificName>
     <History></History>
     <Icon>units/hele_infantry_slinger.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/athen_infantry_slinger_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/athen_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/athen_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/athen_infantry_spearman_b.xml	(working copy)
@@ -23,6 +23,7 @@
 	<SpecificName>Hoplī́tēs Athēnaïkós</SpecificName>
     <History>Hoplites were the very symbol of Hellenic prestige and citizenship, armed with a spear and a large round bronze-coated shield known as an aspis. Armor was heavy, with bronze helmets and a cuirass of either bronze or linen, in addition to greaves. Hoplites fought in a tight formation called a phalanx, guarding each other with their shields while they attacked the enemy with their 2.5 meter spear or short iron sword.</History>
     <Icon>units/athen_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/athen_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/brit_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/brit_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/brit_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <GenericName>Raiding Cavalry</GenericName>
     <History>The Celts were extremely proficient horsemen and created excellent tack for their mounts. This included an early form of saddle with horns at each corner, giving them a huge edge in terms or control over their counterparts. Since the cavalry was made up of rich nobles armor and fine weapons were in great supply, making them formidable opponents.</History>
     <Icon>units/celt_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/brit_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/brit_champion_cavalry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/brit_champion_cavalry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/brit_champion_cavalry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/brit_champion_cavalry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
 </Entity>
Index: binaries/data/mods/public/simulation/templates/units/brit_champion_infantry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/brit_champion_infantry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/brit_champion_infantry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/brit_champion_infantry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/brit_infantry_slinger_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/brit_infantry_slinger_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/brit_infantry_slinger_b.xml	(working copy)
@@ -14,6 +14,7 @@
     <SpecificName>Iaosae</SpecificName>
     <History>Sling bullets are found in enormous numbers in Celtic sites, made of lead, though clay bullets would also have been used. Slings figure prominently in Celtic myth, and were not associated with any sense of shame. To the contrary, the great skill needed to use a sling well was highly rewarded and favored, so they found much more use in Celtic society for a ranged weapon than bows, outside of specific tribes. The god Lugos, in Irish myth Lug, is associated closely with many weapons, among them his sling. Slings were the primary weapon of Celtic hunters as well.</History>
     <Icon>units/celt_infantry_slinger.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/brit_infantry_slinger_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/brit_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/brit_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/brit_infantry_spearman_b.xml	(working copy)
@@ -17,6 +17,7 @@
     <GenericName>Celtic Spearman</GenericName>
     <History>The spear was the main weapon of the Celts, arming the bulk of their forces. The average Celt would only have to take up his long spear and body shield to be ready for battle. While armor was rare, the rabid fighting spirit of the Celts more than made up for in vigor what was lost in protection.</History>
     <Icon>units/celt_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/brit_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/cart_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Ḥayyāl Raḫūv Masili</SpecificName>
     <History>The Carthaginians possessed the greatest light cavalry of the ancient world in the Numidians. Tough and hardy like their mounts, the Numidians were famous for their ability to ride bareback and without bridles. Riders controlled their horses through a combination of voice commands, knee pressure, and a rope around the animals' necks. Used mostly for pursuing defeated opponents, the Numidians' favored weapon was a javelin that could be used for close combat if necessary.</History>
     <Icon>units/cart_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/cart_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/cart_infantry_archer_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/cart_infantry_archer_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/cart_infantry_archer_b.xml	(working copy)
@@ -16,6 +16,7 @@
     <SpecificName>Qešet</SpecificName>
     <History>A mercenary archer from North Africa.</History>
     <Icon>units/cart_infantry_archer.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/cart_infantry_archer_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/cart_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/cart_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/cart_infantry_spearman_b.xml	(working copy)
@@ -16,6 +16,7 @@
     <SpecificName>Sǝḫīr Ḥanīt</SpecificName>
     <History>The core of the Carthaginian army was made up of Liby-Phoenicians, Africans with Phoenician ancestors. The wealthy residents of Carthage recruited the non-citizen Liby-Phoenicians as heavy infantry, fighting in the phalanx armed with the long spear. Armor could range from chain mail hauberks to bronze cuirasses and helmets often included the latest Hellenistic types. Although armed with a shield and a sword, Carthaginian swordsmen were woefully ill-trained compared to their Roman or Iberian counterparts in fencing.</History>
     <Icon>units/cart_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/cart_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/celt_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/celt_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/celt_cavalry_javelinist_b.xml	(working copy)
@@ -6,6 +6,7 @@
     <SpecificName>Gaisaredos</SpecificName>
     <History>The Celts were extremely proficient horsemen and created excellent tack for their mounts. This included an early form of saddle with horns at each corner, giving them a huge edge in terms or control over their counterparts. Since the cavalry was made up of rich nobles armor and fine weapons were in great supply, making them formidable opponents.</History>
     <Icon>units/celt_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/celt_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/celt_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/celt_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/celt_infantry_javelinist_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Baguada</SpecificName>
     <History>Gesatae were young men who devoted themselves to war, often serving as mercenaries for other tribes. They were the last Celts to fight stark naked to show their courage, often carrying only a shield with several javelins and a regular Celtic spear. More often than not they were covered in geometric designs painted in woad, a blue dye.</History>
     <Icon>units/celt_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/celt_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/celt_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/celt_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/celt_infantry_spearman_b.xml	(working copy)
@@ -18,6 +18,7 @@
     <SpecificName>Gaeroa</SpecificName>
     <History>The spear was the main weapon of the Celts, arming the bulk of their forces. The average Celt would only have to take up his long spear and body shield to be ready for battle. While armor was rare the rabid fighting spirit of the Celts more than made up for in vigor what was lost in protection.</History>
     <Icon>units/celt_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/celt_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/gaul_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/gaul_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/gaul_cavalry_javelinist_b.xml	(working copy)
@@ -6,6 +6,7 @@
     <SpecificName>Gaisaredos</SpecificName>
     <History>The Celts were extremely proficient horsemen and created excellent tack for their mounts. This included an early form of saddle with horns at each corner, giving them a huge edge in terms or control over their counterparts. Since the cavalry was made up of rich nobles armor and fine weapons were in great supply, making them formidable opponents.</History>
     <Icon>units/celt_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/gaul_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/gaul_champion_cavalry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/gaul_champion_cavalry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/gaul_champion_cavalry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/gaul_champion_cavalry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/gaul_champion_infantry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/gaul_champion_infantry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/gaul_champion_infantry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/gaul_champion_infantry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/gaul_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/gaul_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/gaul_infantry_javelinist_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Baguada</SpecificName>
     <History>Gesatae were young men who devoted themselves to war, often serving as mercenaries for other tribes. They were the last Celts to fight stark naked to show their courage, often carrying only a shield with several javelins and a regular Celtic spear. More often than not they were covered in geometric designs painted in woad, a blue dye.</History>
     <Icon>units/celt_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/gaul_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/gaul_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/gaul_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/gaul_infantry_spearman_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Gaeroa</SpecificName>
     <History>The spear was the main weapon of the Celts, arming the bulk of their forces. The average Celt would only have to take up his long spear and body shield to be ready for battle. While armor was rare the rabid fighting spirit of the Celts more than made up for in vigor what was lost in protection.</History>
     <Icon>units/celt_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/gaul_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/hele_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/hele_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/hele_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Pródromos</SpecificName>
     <History>Prodromoi were the light scouts of Greek armies.</History>
     <Icon>units/hele_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/hele_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml	(working copy)
@@ -24,6 +24,7 @@
     <SpecificName>Peltastḗs Thrâx</SpecificName>
     <History>Peltasts were javelinists originating in Thrace but their form of combat was widely copied by the Hellenes, Macedonians, and Persians. Equipped with a small oval or crescent shield, a peltast would charge at enemy formations whilst hurling his javelins then fall back to avoid close combat. They wore no armor and were at a significant disadvantage against heavy infantry and cavalry, relying on their speed and skill for survival. Thracians sold their services to Hellene cities as mercenaries and added a much needed ranged and skirmishing ability to Hellenic armies.</History>
     <Icon>units/hele_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/hele_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/hele_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/hele_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/hele_infantry_spearman_b.xml	(working copy)
@@ -27,6 +27,7 @@
 	<SpecificName>Hoplī́tēs Hellēnikós</SpecificName>
     <History>Hoplites were the very symbol of Hellenic prestige and citizenship, armed with a spear and a large round bronze-coated shield known as an aspis. Armor was heavy, with bronze helmets and a cuirass of either bronze or linen, in addition to greaves. Hoplites fought in a tight formation called a phalanx, guarding each other with their shields while they attacked the enemy with their 2.5 meter spear or short iron sword.</History>
     <Icon>units/hele_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/hele_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/iber_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/iber_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/iber_cavalry_javelinist_b.xml	(working copy)
@@ -6,6 +6,7 @@
     <SpecificName>Kantabriako Zaldun</SpecificName>
     <History></History>
     <Icon>units/iber_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/iber_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/iber_champion_cavalry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/iber_champion_cavalry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/iber_champion_cavalry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/iber_champion_cavalry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/iber_champion_infantry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/iber_champion_infantry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/iber_champion_infantry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/iber_champion_infantry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/iber_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/iber_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/iber_infantry_javelinist_b.xml	(working copy)
@@ -11,6 +11,7 @@
     <SpecificName>Lusitano Ezpatari</SpecificName>
     <History>Iberians, especially the Lusitanians, were good at ranged combat and ambushing enemy columns. They throw heavy iron javelins and sometimes even add burning pitch to them, making them good as a cheap siege weapon.</History>
 	<Icon>units/iber_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/iber_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/iber_infantry_swordsman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/iber_infantry_swordsman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/iber_infantry_swordsman_b.xml	(working copy)
@@ -11,6 +11,7 @@
     <SpecificName>Ezpatari</SpecificName>
     <Icon>units/iber_infantry_swordsman.png</Icon>
     <History>The Iberians were master sword-smiths and the falcata was their greatest creation. Wielded by superb swordsmen equipped with light armor and a buckler known as a caetra, they caused untold carnage. Thanks to this Iberian infantry were fast and agile unlike many of their opponents and could bite hard when they attacked. Their skill with sword and buckler were legendary, allowing them to go toe-to-toe with heavy infantry.</History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/iber_infantry_swordsman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/mace_cavalry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/mace_cavalry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/mace_cavalry_spearman_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Xystophoros Thessalikos</SpecificName>
     <History>The best cavalry in Greece, besides the Macedonian hetairoi. Thessalians led an agrarian life and raised horses in the large pasture lands of Thessaly. They were widely regarded as the best cavalry in all of Hellas due to the speed and tenacity of their horses. They were used effectively in the Macedonian armies as light cavalry and held the important left flank of the battle line, staving off enemy advances long enough for the heavy cavalry on the right flank to make the killer blow.</History>
     <Icon>units/mace_cavalry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/mace_cavalry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/mace_champion_cavalry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/mace_champion_cavalry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/mace_champion_cavalry_barracks.xml	(working copy)
@@ -3,5 +3,6 @@
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
 	<SelectionGroupName>units/mace_champion_cavalry</SelectionGroupName>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
 </Entity>
Index: binaries/data/mods/public/simulation/templates/units/mace_champion_infantry_a_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/mace_champion_infantry_a_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/mace_champion_infantry_a_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/mace_champion_infantry_a">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
 </Entity>
Index: binaries/data/mods/public/simulation/templates/units/mace_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/mace_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/mace_infantry_javelinist_b.xml	(working copy)
@@ -24,6 +24,7 @@
     <SpecificName>Peltastes Agrianikos</SpecificName>
     <History>Peltasts were javelinists originating in Thrace but their form of combat was widely copied by the Hellenes, Macedonians, and Persians. Equipped with a small oval or crescent shield, a peltast would charge at enemy formations whilst hurling his javelins then fall back to avoid close combat. They wore no armor and were at a significant disadvantage against heavy infantry and cavalry, relying on their speed and skill for survival. Agrianians are a Thracian tribe who sold their services to the Macedonians as mercenaries and added a much needed ranged and skirmishing ability to Macedonian armies.</History>
     <Icon>units/mace_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/mace_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/mace_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/mace_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/mace_infantry_spearman_b.xml	(working copy)
@@ -14,6 +14,7 @@
     <SpecificName>Pezétairos</SpecificName>
     <History>'Foot Companions', these were the elite troops from the Macedonian phalanx, whom carried their Sarissas with both hands, the white shields being attached to their armor. The Sarissa and the new tactics they used were developed by Philip II under Theban influence. If properly protected by cavalry on both sides, the Pezhetairoi were virtually invincible to any kind of enemy unit. They were always deployed in deep formations of 16+.</History>
     <Icon>units/hele_champion_infantry_mace.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/mace_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Ashwarohi</SpecificName>
     <History/>
     <Icon>units/maur_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/maur_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_champion_chariot_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_champion_chariot_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_champion_chariot_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/maur_champion_chariot">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_champion_infantry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_champion_infantry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_champion_infantry_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/maur_champion_infantry">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_champion_maiden_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_champion_maiden_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_champion_maiden_barracks.xml	(working copy)
@@ -2,5 +2,6 @@
 <Entity parent="units/maur_champion_maiden">
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_infantry_archer_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_infantry_archer_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_infantry_archer_b.xml	(working copy)
@@ -14,6 +14,7 @@
     <SpecificName>Dhanurdhar</SpecificName>
     <Icon>units/maur_infantry_archer.png</Icon>
     <History>Longbowman.</History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/maur_infantry_archer_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_infantry_spearman_b.xml	(working copy)
@@ -24,6 +24,7 @@
     <SpecificName>Kauntika</SpecificName>
     <Icon>units/maur_infantry_spearman.png</Icon>
     <History>Bamboo Spearman.</History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/maur_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/maur_support_elephant.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/maur_support_elephant.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/maur_support_elephant.xml	(working copy)
@@ -30,6 +30,7 @@
     <Icon>units/maur_support_elephant.png</Icon>
     <History>Support Elephant.</History>
     <Tooltip>Mobile dropsite. Can also assist in constructing buildings.</Tooltip>
+    <Classes datatype="tokens">Standard</Classes>
     <Formations disable=""/>
   </Identity>
   <Loot>
Index: binaries/data/mods/public/simulation/templates/units/pers_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/pers_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/pers_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Mada Asabara</SpecificName>
     <History>Just as the archers were the rock of the Persian infantry, the Persian cavalry was formed around the light cavalryman, or Asabari. Armed with javelins for long-ranged combat or close-quarter fighting, Asabari were also equipped with swords and axes. Since they were recruited from the upper classes many wore armor and helmets and their horses could also be fitted with light armor.</History>
     <Icon>units/pers_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/pers_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/pers_infantry_archer_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/pers_infantry_archer_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/pers_infantry_archer_b.xml	(working copy)
@@ -14,6 +14,7 @@
     <SpecificName>Sugda Vaçabara</SpecificName>
     <Icon>units/pers_infantry_archer.png</Icon>
     <History>Archers were the core of the Persian infantry, often going into battle with spearmen equipped with spara, whom they heavily outnumbered. Although powerful, the Persian recurved bow was cursed with light arrows that had trouble piercing the armor of heavily armed opponents. But the huge numbers loosed in each volley were more than enough to alarm even the most armored enemy.</History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/pers_infantry_archer_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/pers_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/pers_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/pers_infantry_spearman_b.xml	(working copy)
@@ -20,6 +20,7 @@
     <SpecificName>Sparabara</SpecificName>
     <Icon>units/pers_infantry_spearman.png</Icon>
     <History>Median and Persian shieldbearers comprised the main infantry regiment of the Persians during this period, especially in the reign of Xerxes. First under the Medes and later the Achaemenid Persians these soldiers were the bread and butter infantry for hand-to-hand engagement. Within the Satabam, the basic tactical unit of the Achamenid army, the shieldbearers formed the first two ranks, protecting the arhcers and also serving as a way to keep the enemy pinned down until the cavalry could act. While well known for tenacity the shieldbearers were not equipped to last long in an extended melee with heavy infantry, like hoplites. </History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/pers_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/ptol_cavalry_archer_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/ptol_cavalry_archer_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/ptol_cavalry_archer_b.xml	(working copy)
@@ -2,7 +2,7 @@
 <Entity parent="template_unit_cavalry_ranged_archer">
   <Identity>
     <Civ>ptol</Civ>
-    <Classes datatype="tokens">Camel</Classes>
+    <Classes datatype="tokens">Camel Standard</Classes>
 	<SelectionGroupName>units/ptol_cavalry_archer_b</SelectionGroupName>
 	<GenericName>Nabataean Camel Archer</GenericName>
     <SpecificName>Mutsābiq Gamal Nabatu</SpecificName>
Index: binaries/data/mods/public/simulation/templates/units/ptol_infantry_archer_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/ptol_infantry_archer_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/ptol_infantry_archer_b.xml	(working copy)
@@ -21,7 +21,7 @@
   </Health>
   <Identity>
     <Civ>ptol</Civ>
-    <Classes datatype="tokens">Mercenary</Classes>
+    <Classes datatype="tokens">Mercenary Standard</Classes>
 	<SelectionGroupName>units/ptol_infantry_archer_b</SelectionGroupName>
     <GenericName>Nubian Mercenary Archer</GenericName>
     <SpecificName>Kousít Misthophóros Toxóti̱s</SpecificName>
Index: binaries/data/mods/public/simulation/templates/units/ptol_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/ptol_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/ptol_infantry_spearman_b.xml	(working copy)
@@ -16,6 +16,7 @@
     <SpecificName>Makhimos Phalangites</SpecificName>
     <History>When pressed hard by the fellow successor states, the Ptolemies of Egypt began to arm and train the Egyptian people in "Macedonian fashion." These levies of indigenous Egyptians were crucial in turning back the Seleucid tide at the Battle of Raphia, cementing nationalist pride and threatening the rule of the Ptolemies over their own kingdom.</History>
     <Icon>units/ptol_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/ptol_infantry_spearman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/rome_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/rome_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/rome_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
 	<SpecificName>Eques Socius</SpecificName>
     <History>Rome's Italian allies frequently supplied Rome's armies with light cavalry, an arm in which Rome was often deficient. After the Social War concluded, all Italy became Roman citizens and thus could enroll into Roman army units. Upon the Marian Reforms, the role of the Italian allied cavalry was given to auxiliary units of Thracians, Numidians, Gauls and Germans.</History>
     <Icon>units/hele_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
     <RequiredTechnology>phase_town</RequiredTechnology>
   </Identity>
   <Promotion>
Index: binaries/data/mods/public/simulation/templates/units/rome_champion_cavalry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/rome_champion_cavalry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/rome_champion_cavalry_barracks.xml	(working copy)
@@ -3,5 +3,6 @@
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
 	<SelectionGroupName>units/rome_champion_cavalry</SelectionGroupName>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/rome_champion_infantry_barracks.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/rome_champion_infantry_barracks.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/rome_champion_infantry_barracks.xml	(working copy)
@@ -3,5 +3,6 @@
   <Identity>
     <RequiredTechnology>unlock_champion_units</RequiredTechnology>
 	<SelectionGroupName>units/rome_champion_infantry</SelectionGroupName>
+    <Classes datatype="tokens">Extra</Classes>
   </Identity>
-</Entity>
\ No newline at end of file
+</Entity>
Index: binaries/data/mods/public/simulation/templates/units/rome_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/rome_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/rome_infantry_javelinist_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Veles</SpecificName>
     <Icon>units/rome_infantry_javelinist.png</Icon>
     <History>The Velites (sing. Veles) were the light skirmish infantry of the Polybian legion. They were the younger men who could not afford hastatus equipment or boys too young to serve otherwise. They usually numbered 1200 men in squads of twenty assigned to the maniples of the Hastati, Principes, and Triarii. Their job was to harry the enemy lines before the heavy infantry engaged and to support the cavalry. </History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/rome_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_b.xml	(working copy)
@@ -28,6 +28,7 @@
     <SpecificName>Hastatus</SpecificName>
     <Icon>units/rome_infantry_swordsman.png</Icon>
     <History>The hastati were the first line of heavy infantry in the early Republican Roman army. They used pila and gladii as their main weapons, throwing the former into the enemy formation and then closing with the sword. For defense they used a large shield called a scutum and wore the best armor they could afford. Hastati were recruited from the young men of Rome, a small part of the 700,000 troops Rome could bring to bear against its opponents.</History>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/rome_infantry_swordsman_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/sele_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/sele_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/sele_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Hippeus Medikos</SpecificName>
     <History>.</History>
     <Icon>units/pers_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
     <RequiredTechnology>phase_village</RequiredTechnology>
   </Identity>
   <Promotion>
Index: binaries/data/mods/public/simulation/templates/units/sele_infantry_spearman_2_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/sele_infantry_spearman_2_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/sele_infantry_spearman_2_b.xml	(working copy)
@@ -15,6 +15,7 @@
     <SpecificName>Thureophóros Politès</SpecificName>
     <History>The cities at the heart of the Seleucid realm, Syria, fielded their own citizen militia infantry, usually armed as thureophoroi, or medium infantry. In 148 BC at the Battle of Azotos against the Jewish Maccabees, the Seleucid army was called the 'Power of the Cities', due to the high proportion of citizen militia mobilized from the coastal cities of Syria. The thureophoroi (singular: thureophoros) was a type of infantry soldier, common in the 3rd to 1st century BCE, who carried a large oval shield called a thureos which had a type of metal strip boss and a central spine. They were armed with a long thrusting spear, javelins and a sword. They also usually wore an iron or bronze Macedonian helmet. The thureos was probably originally an adapted form of a Celtic shield. Thracian and Illyrian infantry probably adopted the shield before the Greeks. However it has been suggested that the thureos was brought to Greece after Pyrrhus of Epirus' campaigns in Italy, as his Oscan allies and Roman enemies used the scutum. Thureophoroi were a 3rd century development on the Peltast and wore no body armor, but did wear sturdy leather boots for quick movement. Thureophoroi could skirmish, as well as fight in a phalanx when necessary. They were often stationed on the flanks of the traditional pike phalanx as a flexible link between the heavier pikemen and the cavalry wings.</History>
     <Icon>units/sele_infantry_spearman_2.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/sele_infantry_spearman_2_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/spart_cavalry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/spart_cavalry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/spart_cavalry_javelinist_b.xml	(working copy)
@@ -7,6 +7,7 @@
     <SpecificName>Pródromos Perioïkós</SpecificName>
     <History>Spartan scout cavalry, supplied by the Perioikoi, or middle-class of Spartan society. Good for hunting and harassing the enemy. The best such cavalry in Greece come from the pastoral territories of Thessaly. Spartan cavalry, though, was no to good.</History>
     <Icon>units/spart_cavalry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/spart_cavalry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/spart_infantry_javelinist_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/spart_infantry_javelinist_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/spart_infantry_javelinist_b.xml	(working copy)
@@ -17,6 +17,7 @@
     <SpecificName>Akontistes Heilotes</SpecificName>
     <History>Helots were the subject class of Spartan society and toiled tirelessly for their full-blooded Spartan masters. In times of need, Helots were pressed into service to serve as squires and battlefield skirmishers if necessary. The loyalty and performance of these troops was often suspect, but good performance on the battlefield sometimes meant freedom could be earned for the Helot warrior and his family.</History>
     <Icon>units/spart_infantry_javelinist.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/spart_infantry_javelinist_a</Entity>
Index: binaries/data/mods/public/simulation/templates/units/spart_infantry_spearman_b.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/spart_infantry_spearman_b.xml	(revision 15299)
+++ binaries/data/mods/public/simulation/templates/units/spart_infantry_spearman_b.xml	(working copy)
@@ -22,6 +22,7 @@
 	<SpecificName>Hoplī́tēs Perioïkós</SpecificName>
     <History>The basic unit of the Spartan army made up of middle-class men ("Perioikoi"). The Hoplite formed the core of any Greek army with the unique Phalanx formation ready to hold all potential attacks.</History>
     <Icon>units/spart_infantry_spearman.png</Icon>
+    <Classes datatype="tokens">Standard</Classes>
   </Identity>
   <Promotion>
     <Entity>units/spart_infantry_spearman_a</Entity>
