Index: binaries/data/mods/public/gui/summary/summary.js
===================================================================
--- binaries/data/mods/public/gui/summary/summary.js	(revision 16105)
+++ binaries/data/mods/public/gui/summary/summary.js	(working copy)
@@ -582,7 +582,7 @@
 			var yStart = TEAMS_BOX_Y_START + withoutTeam * (PLAYER_BOX_Y_SIZE + PLAYER_BOX_GAP);
 			for (var i = 0; i < teams.length; ++i)
 			{
-				var teamBox = Engine.GetGUIObjectByName("teamBox"+p+"t"+i);
+				var teamBox = Engine.GetGUIObjectByName("teamBox"+p+"t["+i+"]");
 				teamBox.hidden = false;
 				var teamBoxSize = teamBox.size;
 				teamBoxSize.top = yStart;
@@ -590,7 +590,7 @@
 				
 				yStart += 30 + teams[i] * (PLAYER_BOX_Y_SIZE + PLAYER_BOX_GAP) + 32;
 				
-				Engine.GetGUIObjectByName("teamNameHeading"+p+"t"+i).caption = "Team "+(i+1);
+				Engine.GetGUIObjectByName("teamNameHeading"+p+"t["+i+"]").caption = "Team "+(i+1);
 				
 				// Make place to store team scores
 				for each (var counter in panel.counters)
@@ -627,7 +627,7 @@
 			playerBoxesCounts[playerState.team+1] += 1;
 
 		if (playerState.team != -1)
-			tn = "t"+playerState.team+"p";
+			tn = "t["+playerState.team+"]p";
 
 		var j = 0;
 		for each (var panel in panels)
@@ -803,7 +803,7 @@
 		var pn = 0;
 		for each (var panel in panels)
 		{
-			var teamHeading = Engine.GetGUIObjectByName("teamHeading"+pn+"t"+i);
+			var teamHeading = Engine.GetGUIObjectByName("teamHeading"+pn+"t["+i+"]");
 			var yStart = 30 + teams[i] * (PLAYER_BOX_Y_SIZE + PLAYER_BOX_GAP) + 2;
 			teamHeading.size = "50 "+yStart+" 100% "+(yStart+20);
 			teamHeading.caption = translate("Team total");
@@ -811,7 +811,7 @@
 			var left = 250;
 			for (var c in panel.counters)
 			{
-				var counter = Engine.GetGUIObjectByName(c+"t"+i);
+				var counter = Engine.GetGUIObjectByName(c+"t["+i+"]");
 				counter.size = left + " " + yStart + " " + (left + panel.counters[c].width) + " " + (yStart+20);
 				counter.caption = panel.counters[c].teamsScoresCaption[i];
 				
Index: binaries/data/mods/public/gui/summary/summary.xml
===================================================================
--- binaries/data/mods/public/gui/summary/summary.xml	(revision 16105)
+++ binaries/data/mods/public/gui/summary/summary.xml	(working copy)
@@ -114,91 +114,29 @@
 					<translatableAttribute id="caption">Total score</translatableAttribute>
 				</object>
 			</object>
-
-			<object type="image" name="teamBox0t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading0t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox0t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox0t0p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName0t0p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText" />
-							<object name="civIcon0t0p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="economyScoret0p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="militaryScoret0p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="explorationScoret0p[n]" type="text"  style="ModernLabelText"/>
-							<object name="totalScoret0p[n]"       type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox0t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading0t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8" var="n">
+							<object type="image" name="playerBox0t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox0t[i]p[n]" type="image" size="10 4 30 24"/>
+								<object name="playerName0t[i]p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText" />
+								<object name="civIcon0t[i]p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
+								<object name="economyScoret[i]p[n]"     type="text"  style="ModernLabelText"/>
+								<object name="militaryScoret[i]p[n]"    type="text"  style="ModernLabelText"/>
+								<object name="explorationScoret[i]p[n]" type="text"  style="ModernLabelText"/>
+								<object name="totalScoret[i]p[n]"       type="text"  style="ModernLabelText"/>
+							</object>
+						</repeat>
+					</object>
+					<object name="teamHeading0t[i]"     type="text" style="ModernLeftTabLabelText"/>
+					<object name="economyScoret[i]"     type="text" style="ModernLabelText"/>
+					<object name="militaryScoret[i]"    type="text" style="ModernLabelText"/>
+					<object name="explorationScoret[i]" type="text" style="ModernLabelText"/>
+					<object name="totalScoret[i]" 	  type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading0t0"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="economyScoret0"     type="text" style="ModernLabelText"/>
-				<object name="militaryScoret0"    type="text" style="ModernLabelText"/>
-				<object name="explorationScoret0" type="text" style="ModernLabelText"/>
-				<object name="totalScoret0" 	  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox0t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading0t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox0t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox0t1p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName0t1p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon0t1p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="economyScoret1p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="militaryScoret1p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="explorationScoret1p[n]" type="text"  style="ModernLabelText"/>
-							<object name="totalScoret1p[n]"       type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading0t1"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="economyScoret1"     type="text" style="ModernLabelText"/>
-				<object name="militaryScoret1"    type="text" style="ModernLabelText"/>
-				<object name="explorationScoret1" type="text" style="ModernLabelText"/>
-				<object name="totalScoret1" 	  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox0t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading0t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox0t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox0t2p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName0t2p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon0t2p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="economyScoret2p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="militaryScoret2p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="explorationScoret2p[n]" type="text"  style="ModernLabelText"/>
-							<object name="totalScoret2p[n]"       type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading0t2"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="economyScoret2"     type="text" style="ModernLabelText"/>
-				<object name="militaryScoret2"    type="text" style="ModernLabelText"/>
-				<object name="explorationScoret2" type="text" style="ModernLabelText"/>
-				<object name="totalScoret2" 	  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox0t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading0t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox0t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox0t3p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName0t3p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon0t3p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="economyScoret3p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="militaryScoret3p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="explorationScoret3p[n]" type="text"  style="ModernLabelText"/>
-							<object name="totalScoret3p[n]"       type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading0t3"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="economyScoret3"     type="text" style="ModernLabelText"/>
-				<object name="militaryScoret3"    type="text" style="ModernLabelText"/>
-				<object name="explorationScoret3" type="text" style="ModernLabelText"/>
-				<object name="totalScoret3" 	  type="text" style="ModernLabelText"/>
-			</object>
+			</repeat>
 			
 			<object type="image" name="noTeamsBox0" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
@@ -252,124 +190,39 @@
 				</object>
 
 			</object>
-			
-			<object type="image" name="teamBox1t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading1t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox1t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox1t0p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName1t0p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon1t0p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="totalBuildingst0p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="houseBuildingst0p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="economicBuildingst0p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="outpostBuildingst0p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="militaryBuildingst0p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="fortressBuildingst0p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="civCentreBuildingst0p[n]" type="text"  style="ModernLabelText"/>
-							<object name="wonderBuildingst0p[n]"    type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
+
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox1t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading1t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8">
+							<object type="image" name="playerBox1t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox1t[i]p[n]"   type="image" size="10 4 30 24"/>
+								<object name="playerName1t[i]p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
+								<object name="civIcon1t[i]p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
+								<object name="totalBuildingst[i]p[n]"     type="text"  style="ModernLabelText"/>
+								<object name="houseBuildingst[i]p[n]"     type="text"  style="ModernLabelText"/>
+								<object name="economicBuildingst[i]p[n]"  type="text"  style="ModernLabelText"/>
+								<object name="outpostBuildingst[i]p[n]"   type="text"  style="ModernLabelText"/>
+								<object name="militaryBuildingst[i]p[n]"  type="text"  style="ModernLabelText"/>
+								<object name="fortressBuildingst[i]p[n]"  type="text"  style="ModernLabelText"/>
+								<object name="civCentreBuildingst[i]p[n]" type="text"  style="ModernLabelText"/>
+								<object name="wonderBuildingst[i]p[n]"    type="text"  style="ModernLabelText"/>
+							</object>
+						</repeat>
+					</object>
+					<object name="teamHeading1t[i]"       type="text" style="ModernLeftTabLabelText"/>
+					<object name="totalBuildingst[i]"     type="text" style="ModernLabelText"/>
+					<object name="houseBuildingst[i]"     type="text" style="ModernLabelText"/>
+					<object name="economicBuildingst[i]"  type="text" style="ModernLabelText"/>
+					<object name="outpostBuildingst[i]"   type="text" style="ModernLabelText"/>
+					<object name="militaryBuildingst[i]"  type="text" style="ModernLabelText"/>
+					<object name="fortressBuildingst[i]"  type="text" style="ModernLabelText"/>
+					<object name="civCentreBuildingst[i]" type="text" style="ModernLabelText"/>
+					<object name="wonderBuildingst[i]"    type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading1t0"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalBuildingst0"     type="text" style="ModernLabelText"/>
-				<object name="houseBuildingst0"     type="text" style="ModernLabelText"/>
-				<object name="economicBuildingst0"  type="text" style="ModernLabelText"/>
-				<object name="outpostBuildingst0"   type="text" style="ModernLabelText"/>
-				<object name="militaryBuildingst0"  type="text" style="ModernLabelText"/>
-				<object name="fortressBuildingst0"  type="text" style="ModernLabelText"/>
-				<object name="civCentreBuildingst0" type="text" style="ModernLabelText"/>
-				<object name="wonderBuildingst0"    type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox1t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading1t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox1t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox1t1p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName1t1p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon1t1p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="totalBuildingst1p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="houseBuildingst1p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="economicBuildingst1p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="outpostBuildingst1p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="militaryBuildingst1p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="fortressBuildingst1p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="civCentreBuildingst1p[n]" type="text"  style="ModernLabelText"/>
-							<object name="wonderBuildingst1p[n]"    type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading1t1"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalBuildingst1"     type="text" style="ModernLabelText"/>
-				<object name="houseBuildingst1"     type="text" style="ModernLabelText"/>
-				<object name="economicBuildingst1"  type="text" style="ModernLabelText"/>
-				<object name="outpostBuildingst1"   type="text" style="ModernLabelText"/>
-				<object name="militaryBuildingst1"  type="text" style="ModernLabelText"/>
-				<object name="fortressBuildingst1"  type="text" style="ModernLabelText"/>
-				<object name="civCentreBuildingst1" type="text" style="ModernLabelText"/>
-				<object name="wonderBuildingst1"    type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox1t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading1t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox1t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox1t2p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName1t2p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon1t2p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="totalBuildingst2p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="houseBuildingst2p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="economicBuildingst2p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="outpostBuildingst2p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="militaryBuildingst2p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="fortressBuildingst2p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="civCentreBuildingst2p[n]" type="text"  style="ModernLabelText"/>
-							<object name="wonderBuildingst2p[n]"    type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading1t2"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalBuildingst2"     type="text" style="ModernLabelText"/>
-				<object name="houseBuildingst2"     type="text" style="ModernLabelText"/>
-				<object name="economicBuildingst2"  type="text" style="ModernLabelText"/>
-				<object name="outpostBuildingst2"   type="text" style="ModernLabelText"/>
-				<object name="militaryBuildingst2"  type="text" style="ModernLabelText"/>
-				<object name="fortressBuildingst2"  type="text" style="ModernLabelText"/>
-				<object name="civCentreBuildingst2" type="text" style="ModernLabelText"/>
-				<object name="wonderBuildingst2"    type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox1t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading1t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox1t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox1t3p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName1t3p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon1t3p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="totalBuildingst3p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="houseBuildingst3p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="economicBuildingst3p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="outpostBuildingst3p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="militaryBuildingst3p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="fortressBuildingst3p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="civCentreBuildingst3p[n]" type="text"  style="ModernLabelText"/>
-							<object name="wonderBuildingst3p[n]"    type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading1t3"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalBuildingst3"     type="text" style="ModernLabelText"/>
-				<object name="houseBuildingst3"     type="text" style="ModernLabelText"/>
-				<object name="economicBuildingst3"  type="text" style="ModernLabelText"/>
-				<object name="outpostBuildingst3"   type="text" style="ModernLabelText"/>
-				<object name="militaryBuildingst3"  type="text" style="ModernLabelText"/>
-				<object name="fortressBuildingst3"  type="text" style="ModernLabelText"/>
-				<object name="civCentreBuildingst3" type="text" style="ModernLabelText"/>
-				<object name="wonderBuildingst3"    type="text" style="ModernLabelText"/>
-			</object>
-			
+			</repeat>
+
 			<object type="image" name="noTeamsBox1" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
 					<object type="image" name="playerBox1[n]" size="10 0 10 30" hidden="true">
@@ -423,114 +276,35 @@
 				</object>
 			</object>
 			
-			<object type="image" name="teamBox2t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading2t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox2t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox2t0p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName2t0p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon2t0p[n]"         type="image" size="208 0 240 32" tooltip_style="sessionToolTip"/>
-							<object name="totalUnitst0p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="infantryUnitst0p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="workerUnitst0p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="cavalryUnitst0p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="championUnitst0p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="heroesUnitst0p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="navyUnitst0p[n]"        type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox2t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading2t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8">
+							<object type="image" name="playerBox2t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox2t[i]p[n]" type="image" size="10 4 30 24"/>
+								<object name="playerName2t[i]p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
+								<object name="civIcon2t[i]p[n]"         type="image" size="208 0 240 32" tooltip_style="sessionToolTip"/>
+								<object name="totalUnitst[i]p[n]"       type="text"  style="ModernLabelText"/>
+								<object name="infantryUnitst[i]p[n]"    type="text"  style="ModernLabelText"/>
+								<object name="workerUnitst[i]p[n]"      type="text"  style="ModernLabelText"/>
+								<object name="cavalryUnitst[i]p[n]"     type="text"  style="ModernLabelText"/>
+								<object name="championUnitst[i]p[n]"    type="text"  style="ModernLabelText"/>
+								<object name="heroesUnitst[i]p[n]"      type="text"  style="ModernLabelText"/>
+								<object name="navyUnitst[i]p[n]"        type="text"  style="ModernLabelText"/>
+							</object>
+						</repeat>
+					</object>
+					<object name="teamHeading2t[i]"  type="text" style="ModernLeftTabLabelText"/>
+					<object name="totalUnitst[i]"    type="text" style="ModernLabelText"/>
+					<object name="infantryUnitst[i]" type="text" style="ModernLabelText"/>
+					<object name="workerUnitst[i]"   type="text" style="ModernLabelText"/>
+					<object name="cavalryUnitst[i]"  type="text" style="ModernLabelText"/>
+					<object name="championUnitst[i]" type="text" style="ModernLabelText"/>
+					<object name="heroesUnitst[i]"   type="text" style="ModernLabelText"/>
+					<object name="navyUnitst[i]"     type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading2t0"  type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalUnitst0"    type="text" style="ModernLabelText"/>
-				<object name="infantryUnitst0" type="text" style="ModernLabelText"/>
-				<object name="workerUnitst0"   type="text" style="ModernLabelText"/>
-				<object name="cavalryUnitst0"  type="text" style="ModernLabelText"/>
-				<object name="championUnitst0" type="text" style="ModernLabelText"/>
-				<object name="heroesUnitst0"   type="text" style="ModernLabelText"/>
-				<object name="navyUnitst0"     type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox2t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading2t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox2t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox2t1p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName2t1p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon2t1p[n]"         type="image" size="208 0 240 32" tooltip_style="sessionToolTip"/>
-							<object name="totalUnitst1p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="infantryUnitst1p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="workerUnitst1p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="cavalryUnitst1p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="championUnitst1p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="heroesUnitst1p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="navyUnitst1p[n]"        type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading2t1"  type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalUnitst1"    type="text" style="ModernLabelText"/>
-				<object name="infantryUnitst1" type="text" style="ModernLabelText"/>
-				<object name="workerUnitst1"   type="text" style="ModernLabelText"/>
-				<object name="cavalryUnitst1"  type="text" style="ModernLabelText"/>
-				<object name="championUnitst1" type="text" style="ModernLabelText"/>
-				<object name="heroesUnitst1"   type="text" style="ModernLabelText"/>
-				<object name="navyUnitst1"     type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox2t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading2t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox2t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox2t2p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName2t2p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon2t2p[n]"         type="image" size="208 0 240 32" tooltip_style="sessionToolTip"/>
-							<object name="totalUnitst2p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="infantryUnitst2p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="workerUnitst2p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="cavalryUnitst2p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="championUnitst2p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="heroesUnitst2p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="navyUnitst2p[n]"        type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading2t2"  type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalUnitst2"    type="text" style="ModernLabelText"/>
-				<object name="infantryUnitst2" type="text" style="ModernLabelText"/>
-				<object name="workerUnitst2"   type="text" style="ModernLabelText"/>
-				<object name="cavalryUnitst2"  type="text" style="ModernLabelText"/>
-				<object name="championUnitst2" type="text" style="ModernLabelText"/>
-				<object name="heroesUnitst2"   type="text" style="ModernLabelText"/>
-				<object name="navyUnitst2"     type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox2t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading2t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox2t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox2t3p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName2t3p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon2t3p[n]"         type="image" size="208 0 240 32" tooltip_style="sessionToolTip"/>
-							<object name="totalUnitst3p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="infantryUnitst3p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="workerUnitst3p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="cavalryUnitst3p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="championUnitst3p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="heroesUnitst3p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="navyUnitst3p[n]"        type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading2t3"  type="text" style="ModernLeftTabLabelText"/>
-				<object name="totalUnitst3"    type="text" style="ModernLabelText"/>
-				<object name="infantryUnitst3" type="text" style="ModernLabelText"/>
-				<object name="workerUnitst3"   type="text" style="ModernLabelText"/>
-				<object name="cavalryUnitst3"  type="text" style="ModernLabelText"/>
-				<object name="championUnitst3" type="text" style="ModernLabelText"/>
-				<object name="heroesUnitst3"   type="text" style="ModernLabelText"/>
-				<object name="navyUnitst3"     type="text" style="ModernLabelText"/>
-			</object>
+			</repeat>
 
 			<object type="image" name="noTeamsBox2" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
@@ -584,115 +358,36 @@
 				</object>
 			</object>
 
-			<object type="image" name="teamBox3t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading3t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox3t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox3t0p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName3t0p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon3t0p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="foodGatheredt0p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="woodGatheredt0p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="stoneGatheredt0p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="metalGatheredt0p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="totalGatheredt0p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="treasuresCollectedt0p[n]" type="text"  style="ModernLabelText"/>
-							<object name="resourcesTributedt0p[n]"  type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox3t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading3t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8">
+							<object type="image" name="playerBox3t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox3t[i]p[n]"   type="image" size="10 4 30 24"/>
+								<object name="playerName3t[i]p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
+								<object name="civIcon3t[i]p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
+								<object name="foodGatheredt[i]p[n]"       type="text"  style="ModernLabelText"/>
+								<object name="woodGatheredt[i]p[n]"       type="text"  style="ModernLabelText"/>
+								<object name="stoneGatheredt[i]p[n]"      type="text"  style="ModernLabelText"/>
+								<object name="metalGatheredt[i]p[n]"      type="text"  style="ModernLabelText"/>
+								<object name="totalGatheredt[i]p[n]"      type="text"  style="ModernLabelText"/>
+								<object name="treasuresCollectedt[i]p[n]" type="text"  style="ModernLabelText"/>
+								<object name="resourcesTributedt[i]p[n]"  type="text"  style="ModernLabelText"/>
+							</object>
+						</repeat>
+					</object>
+					<object name="teamHeading3t[i]"       type="text" style="ModernLeftTabLabelText"/>
+					<object name="foodGatheredt[i]"       type="text" style="ModernLabelText"/>
+					<object name="woodGatheredt[i]"       type="text" style="ModernLabelText"/>
+					<object name="stoneGatheredt[i]"      type="text" style="ModernLabelText"/>
+					<object name="metalGatheredt[i]"      type="text" style="ModernLabelText"/>
+					<object name="totalGatheredt[i]"      type="text" style="ModernLabelText"/>
+					<object name="treasuresCollectedt[i]" type="text" style="ModernLabelText"/>
+					<object name="resourcesTributedt[i]"  type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading3t0"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="foodGatheredt0"       type="text" style="ModernLabelText"/>
-				<object name="woodGatheredt0"       type="text" style="ModernLabelText"/>
-				<object name="stoneGatheredt0"      type="text" style="ModernLabelText"/>
-				<object name="metalGatheredt0"      type="text" style="ModernLabelText"/>
-				<object name="totalGatheredt0"      type="text" style="ModernLabelText"/>
-				<object name="treasuresCollectedt0" type="text" style="ModernLabelText"/>
-				<object name="resourcesTributedt0"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox3t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading3t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox3t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox3t1p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName3t1p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon3t1p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="foodGatheredt1p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="woodGatheredt1p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="stoneGatheredt1p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="metalGatheredt1p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="totalGatheredt1p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="treasuresCollectedt1p[n]" type="text"  style="ModernLabelText"/>
-							<object name="resourcesTributedt1p[n]"  type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading3t1"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="foodGatheredt1"       type="text" style="ModernLabelText"/>
-				<object name="woodGatheredt1"       type="text" style="ModernLabelText"/>
-				<object name="stoneGatheredt1"      type="text" style="ModernLabelText"/>
-				<object name="metalGatheredt1"      type="text" style="ModernLabelText"/>
-				<object name="totalGatheredt1"      type="text" style="ModernLabelText"/>
-				<object name="treasuresCollectedt1" type="text" style="ModernLabelText"/>
-				<object name="resourcesTributedt1"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox3t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading3t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox3t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox3t2p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName3t2p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon3t2p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="foodGatheredt2p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="woodGatheredt2p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="stoneGatheredt2p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="metalGatheredt2p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="totalGatheredt2p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="treasuresCollectedt2p[n]" type="text"  style="ModernLabelText"/>
-							<object name="resourcesTributedt2p[n]"  type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading3t2"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="foodGatheredt2"       type="text" style="ModernLabelText"/>
-				<object name="woodGatheredt2"       type="text" style="ModernLabelText"/>
-				<object name="stoneGatheredt2"      type="text" style="ModernLabelText"/>
-				<object name="metalGatheredt2"      type="text" style="ModernLabelText"/>
-				<object name="totalGatheredt2"      type="text" style="ModernLabelText"/>
-				<object name="treasuresCollectedt2" type="text" style="ModernLabelText"/>
-				<object name="resourcesTributedt2"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox3t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading3t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox3t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox3t3p[n]"   type="image" size="10 4 30 24"/>
-							<object name="playerName3t3p[n]"        type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon3t3p[n]"           type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="foodGatheredt3p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="woodGatheredt3p[n]"       type="text"  style="ModernLabelText"/>
-							<object name="stoneGatheredt3p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="metalGatheredt3p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="totalGatheredt3p[n]"      type="text"  style="ModernLabelText"/>
-							<object name="treasuresCollectedt3p[n]" type="text"  style="ModernLabelText"/>
-							<object name="resourcesTributedt3p[n]"  type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading3t3"       type="text" style="ModernLeftTabLabelText"/>
-				<object name="foodGatheredt3"       type="text" style="ModernLabelText"/>
-				<object name="woodGatheredt3"       type="text" style="ModernLabelText"/>
-				<object name="stoneGatheredt3"      type="text" style="ModernLabelText"/>
-				<object name="metalGatheredt3"      type="text" style="ModernLabelText"/>
-				<object name="totalGatheredt3"      type="text" style="ModernLabelText"/>
-				<object name="treasuresCollectedt3" type="text" style="ModernLabelText"/>
-				<object name="resourcesTributedt3"  type="text" style="ModernLabelText"/>
-			</object>
-			
+			</repeat>
+
 			<object type="image" name="noTeamsBox3" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
 					<object type="image" name="playerBox3[n]" size="10 0 10 30" hidden="true">
@@ -738,108 +433,35 @@
 					<translatableAttribute id="caption">Trade income</translatableAttribute>
 				</object>
 			</object>
-			
-			<object type="image" name="teamBox4t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading4t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox4t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox4t0p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName4t0p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon4t0p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="exchangedFoodt0p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedWoodt0p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedStonet0p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="exchangedMetalt0p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="barterEfficiencyt0p[n]" type="text"  style="ModernLabelText"/>
-							<object name="tradeIncomet0p[n]"      type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
+
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox4t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading4t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8">
+							<object type="image" name="playerBox4t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox4t[i]p[n]" type="image" size="10 4 30 24"/>
+								<object name="playerName4t[i]p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
+								<object name="civIcon4t[i]p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
+								<object name="exchangedFoodt[i]p[n]"    type="text"  style="ModernLabelText"/>
+								<object name="exchangedWoodt[i]p[n]"    type="text"  style="ModernLabelText"/>
+								<object name="exchangedStonet[i]p[n]"   type="text"  style="ModernLabelText"/>
+								<object name="exchangedMetalt[i]p[n]"   type="text"  style="ModernLabelText"/>
+								<object name="barterEfficiencyt[i]p[n]" type="text"  style="ModernLabelText"/>
+								<object name="tradeIncomet[i]p[n]"      type="text"  style="ModernLabelText"/>
+							</object>
+						</repeat>
+					</object>
+					<object name="teamHeading4t[i]"     type="text" style="ModernLeftTabLabelText"/>
+					<object name="exchangedFoodt[i]"    type="text" style="ModernLabelText"/>
+					<object name="exchangedWoodt[i]"    type="text" style="ModernLabelText"/>
+					<object name="exchangedStonet[i]"   type="text" style="ModernLabelText"/>
+					<object name="exchangedMetalt[i]"   type="text" style="ModernLabelText"/>
+					<object name="barterEfficiencyt[i]" type="text" style="ModernLabelText"/>
+					<object name="tradeIncomet[i]"      type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading4t0"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="exchangedFoodt0"    type="text" style="ModernLabelText"/>
-				<object name="exchangedWoodt0"    type="text" style="ModernLabelText"/>
-				<object name="exchangedStonet0"   type="text" style="ModernLabelText"/>
-				<object name="exchangedMetalt0"   type="text" style="ModernLabelText"/>
-				<object name="barterEfficiencyt0" type="text" style="ModernLabelText"/>
-				<object name="tradeIncomet0"      type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox4t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading4t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox4t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox4t1p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName4t1p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon4t1p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="exchangedFoodt1p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedWoodt1p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedStonet1p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="exchangedMetalt1p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="barterEfficiencyt1p[n]" type="text"  style="ModernLabelText"/>
-							<object name="tradeIncomet1p[n]"      type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading4t1"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="exchangedFoodt1"    type="text" style="ModernLabelText"/>
-				<object name="exchangedWoodt1"    type="text" style="ModernLabelText"/>
-				<object name="exchangedStonet1"   type="text" style="ModernLabelText"/>
-				<object name="exchangedMetalt1"   type="text" style="ModernLabelText"/>
-				<object name="barterEfficiencyt1" type="text" style="ModernLabelText"/>
-				<object name="tradeIncomet1"      type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox4t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading4t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox4t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox4t2p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName4t2p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon4t2p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="exchangedFoodt2p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedWoodt2p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedStonet2p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="exchangedMetalt2p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="barterEfficiencyt2p[n]" type="text"  style="ModernLabelText"/>
-							<object name="tradeIncomet2p[n]"      type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading4t2"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="exchangedFoodt2"    type="text" style="ModernLabelText"/>
-				<object name="exchangedWoodt2"    type="text" style="ModernLabelText"/>
-				<object name="exchangedStonet2"   type="text" style="ModernLabelText"/>
-				<object name="exchangedMetalt2"   type="text" style="ModernLabelText"/>
-				<object name="barterEfficiencyt2" type="text" style="ModernLabelText"/>
-				<object name="tradeIncomet2"      type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox4t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading4t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox4t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox4t3p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName4t3p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon4t3p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="exchangedFoodt3p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedWoodt3p[n]"    type="text"  style="ModernLabelText"/>
-							<object name="exchangedStonet3p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="exchangedMetalt3p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="barterEfficiencyt3p[n]" type="text"  style="ModernLabelText"/>
-							<object name="tradeIncomet3p[n]"      type="text"  style="ModernLabelText"/>
-						</object>
-					</repeat>
-				</object>
-				<object name="teamHeading4t3"     type="text" style="ModernLeftTabLabelText"/>
-				<object name="exchangedFoodt3"    type="text" style="ModernLabelText"/>
-				<object name="exchangedWoodt3"    type="text" style="ModernLabelText"/>
-				<object name="exchangedStonet3"   type="text" style="ModernLabelText"/>
-				<object name="exchangedMetalt3"   type="text" style="ModernLabelText"/>
-				<object name="barterEfficiencyt3" type="text" style="ModernLabelText"/>
-				<object name="tradeIncomet3"      type="text" style="ModernLabelText"/>
-			</object>
-			
+			</repeat>
+
 			<object type="image" name="noTeamsBox4" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
 					<object type="image" name="playerBox4[n]" size="10 0 10 30" hidden="true">
@@ -878,92 +500,31 @@
 					<translatableAttribute id="caption">Map\nexploration</translatableAttribute>
 				</object>
 			</object>
-			
-			<object type="image" name="teamBox5t0" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading5t0" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox5t0p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox5t0p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName5t0p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon5t0p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="vegetarianRatiot0p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="feminisationt0p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="killDeathRatiot0p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="mapExplorationt0p[n]"   type="text"  style="ModernLabelText"/>
-						</object>	
-					</repeat>
+
+			<repeat count="4" var="i">
+				<object type="image" name="teamBox5t[i]" size="0 65 100% 100%-50" hidden="true">
+					<object type="text" name="teamNameHeading5t[i]" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
+					<object size="0 30 100% 100%">
+						<repeat count="8">
+							<object type="image" name="playerBox5t[i]p[n]" size="10 0 10 30" hidden="true">
+								<object name="playerColourBox5t[i]p[n]" type="image" size="10 4 30 24"/>
+								<object name="playerName5t[i]p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
+								<object name="civIcon5t[i]p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
+								<object name="vegetarianRatiot[i]p[n]"  type="text"  style="ModernLabelText"/>
+								<object name="feminisationt[i]p[n]"     type="text"  style="ModernLabelText"/>
+								<object name="killDeathRatiot[i]p[n]"   type="text"  style="ModernLabelText"/>
+								<object name="mapExplorationt[i]p[n]"   type="text"  style="ModernLabelText"/>
+							</object>	
+						</repeat>
+					</object>
+					<object name="teamHeading5t[i]"    type="text" style="ModernLeftTabLabelText"/>
+					<object name="vegetarianRatiot[i]" type="text" style="ModernLabelText"/>
+					<object name="feminisationt[i]"    type="text" style="ModernLabelText"/>
+					<object name="killDeathRatiot[i]"  type="text" style="ModernLabelText"/>
+					<object name="mapExplorationt[i]"  type="text" style="ModernLabelText"/>
 				</object>
-				<object name="teamHeading5t0"    type="text" style="ModernLeftTabLabelText"/>
-				<object name="vegetarianRatiot0" type="text" style="ModernLabelText"/>
-				<object name="feminisationt0"    type="text" style="ModernLabelText"/>
-				<object name="killDeathRatiot0"  type="text" style="ModernLabelText"/>
-				<object name="mapExplorationt0"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox5t1" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading5t1" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox5t1p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox5t1p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName5t1p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon5t1p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="vegetarianRatiot1p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="feminisationt1p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="killDeathRatiot1p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="mapExplorationt1p[n]"   type="text"  style="ModernLabelText"/>
-						</object>	
-					</repeat>
-				</object>
-				<object name="teamHeading5t1"    type="text" style="ModernLeftTabLabelText"/>
-				<object name="vegetarianRatiot1" type="text" style="ModernLabelText"/>
-				<object name="feminisationt1"    type="text" style="ModernLabelText"/>
-				<object name="killDeathRatiot1"  type="text" style="ModernLabelText"/>
-				<object name="mapExplorationt1"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox5t2" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading5t2" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox5t2p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox5t2p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName5t2p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon5t2p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="vegetarianRatiot2p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="feminisationt2p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="killDeathRatiot2p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="mapExplorationt2p[n]"   type="text"  style="ModernLabelText"/>
-						</object>	
-					</repeat>
-				</object>
-				<object name="teamHeading5t2"    type="text" style="ModernLeftTabLabelText"/>
-				<object name="vegetarianRatiot2" type="text" style="ModernLabelText"/>
-				<object name="feminisationt2"    type="text" style="ModernLabelText"/>
-				<object name="killDeathRatiot2"  type="text" style="ModernLabelText"/>
-				<object name="mapExplorationt2"  type="text" style="ModernLabelText"/>
-			</object>
-			<object type="image" name="teamBox5t3" size="0 65 100% 100%-50" hidden="true">
-				<object type="text" name="teamNameHeading5t3" size="15 5 100% 100%" style="ModernLeftTabLabelText"/>
-				<object size="0 30 100% 100%">
-					<repeat count="8">
-						<object type="image" name="playerBox5t3p[n]" size="10 0 10 30" hidden="true">
-							<object name="playerColourBox5t3p[n]" type="image" size="10 4 30 24"/>
-							<object name="playerName5t3p[n]"      type="text"  size="40 2 208 100%" style="ModernLeftLabelText"/>
-							<object name="civIcon5t3p[n]"         type="image" size="208 0 240 32"  tooltip_style="sessionToolTip"/>
-							<object name="vegetarianRatiot3p[n]"  type="text"  style="ModernLabelText"/>
-							<object name="feminisationt3p[n]"     type="text"  style="ModernLabelText"/>
-							<object name="killDeathRatiot3p[n]"   type="text"  style="ModernLabelText"/>
-							<object name="mapExplorationt3p[n]"   type="text"  style="ModernLabelText"/>
-						</object>	
-					</repeat>
-				</object>
-				<object name="teamHeading5t3"    type="text" style="ModernLeftTabLabelText"/>
-				<object name="vegetarianRatiot3" type="text" style="ModernLabelText"/>
-				<object name="feminisationt3"    type="text" style="ModernLabelText"/>
-				<object name="killDeathRatiot3"  type="text" style="ModernLabelText"/>
-				<object name="mapExplorationt3"  type="text" style="ModernLabelText"/>
-			</object>
-			
+			</repeat>
+
 			<object type="image" name="noTeamsBox5" size="0 65 100% 100%-50" hidden="true"> 
 				<repeat count="8">
 					<object type="image" name="playerBox5[n]" size="10 0 10 30" hidden="true">