diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml
index af0621f9c663e374fffa89a5058eb6a7373d5172..d9b573887d758c63849b7842baa318a2f5d5cb6a 100644
--- a/modeling/AVATAR/CoffeeMachine_Avatar.xml
+++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="4" TAGS="deactivated root" SHOW_TAGS="true">
+<TURTLEGMODELING version="3.0 beta" ANIMATE_INTERACTIVE_SIMULATION="false" ACTIVATE_PENALTIES="true" UPDATE_INFORMATION_DIPLO_SIM="false" ANIMATE_WITH_INFO_DIPLO_SIM="true" OPEN_DIAG_DIPLO_SIM="false" LAST_SELECTED_MAIN_TAB="1" LAST_SELECTED_SUB_TAB="3" TAGS="deactivated root" SHOW_TAGS="true">
 
 <Modeling type="Avatar Requirement" nameTab="AVATAR Requirements" >
 <AvatarRDPanel name="AVATAR RD" minX="10" maxX="1900" minY="10" maxY="1400" zoom="1.0" >
@@ -29,6 +29,7 @@
 <TGConnectingPoint num="15" id="16" />
 <tags value="" />
 <extraparam>
+<Line value="" />
 </extraparam>
 </COMPONENT>
 
@@ -801,7 +802,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="449" />
-<P1  x="302" y="261" id="480" />
+<P1  x="302" y="261" id="493" />
 <P2  x="361" y="261" id="468" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -821,7 +822,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="453" />
-<P1  x="305" y="211" id="493" />
+<P1  x="305" y="211" id="480" />
 <P2  x="361" y="211" id="467" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -917,13 +918,13 @@
 <TGConnectingPoint num="23" id="527" />
 <tags value="" />
 </COMPONENT>
-<SUBCOMPONENT type="5304" id="490" index="13" uid="e14fd5a7-c9ae-42ab-b99a-306f91c69127" >
+<SUBCOMPONENT type="5304" id="490" index="13" uid="2dbef5cf-57eb-4674-94d5-4b37c6777b4a" >
 <father id="528" num="0" />
-<cdparam x="154" y="241" />
-<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="166" y="191" />
+<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" />
-<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" />
+<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" />
+<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" />
 <new d="false" />
 <TGConnectingPoint num="0" id="478" />
 <TGConnectingPoint num="1" id="479" />
@@ -939,13 +940,13 @@
 <TGConnectingPoint num="11" id="489" />
 <tags value="" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5304" id="503" index="14" uid="2dbef5cf-57eb-4674-94d5-4b37c6777b4a" >
+<SUBCOMPONENT type="5304" id="503" index="14" uid="e14fd5a7-c9ae-42ab-b99a-306f91c69127" >
 <father id="528" num="1" />
-<cdparam x="166" y="191" />
-<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="154" y="241" />
+<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" />
-<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" />
+<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" />
+<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" />
 <new d="false" />
 <TGConnectingPoint num="0" id="491" />
 <TGConnectingPoint num="1" id="492" />
@@ -1086,7 +1087,7 @@
 <TGConnectingPoint num="0" id="587" />
 <TGConnectingPoint num="1" id="588" />
 <TGConnectingPoint num="2" id="589" />
-<P1  x="581" y="154" id="676" />
+<P1  x="581" y="154" id="663" />
 <P2  x="546" y="305" id="733" />
 <Point x="518" y="154" />
 <Point x="518" y="305" />
@@ -1119,7 +1120,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="592" />
 <TGConnectingPoint num="1" id="593" />
-<P1  x="631" y="164" id="671" />
+<P1  x="631" y="164" id="658" />
 <P2  x="667" y="310" id="720" />
 <Point x="631" y="310" />
 <AutomaticDrawing  data="true" />
@@ -1151,7 +1152,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="598" />
 <TGConnectingPoint num="1" id="599" />
-<P1  x="721" y="158" id="656" />
+<P1  x="721" y="158" id="669" />
 <P2  x="700" y="204" id="710" />
 <Point x="700" y="158" />
 <AutomaticDrawing  data="true" />
@@ -1322,13 +1323,13 @@
 <TGConnectingPoint num="23" id="704" />
 <tags value="" />
 </COMPONENT>
-<SUBCOMPONENT type="5303" id="667" index="24" uid="bf44a33b-5344-46b2-9170-509d38670a83" >
+<SUBCOMPONENT type="5304" id="667" index="24" uid="5ba2c908-950a-4288-889b-0b4c00bd9d79" >
 <father id="705" num="0" />
-<cdparam x="721" y="133" />
-<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="581" y="125" />
+<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" />
-<infoparam name="TGComponent" value="nbOfCoins" />
+<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" />
+<infoparam name="TGComponent" value="Start" />
 <new d="false" />
 <TGConnectingPoint num="0" id="655" />
 <TGConnectingPoint num="1" id="656" />
@@ -1343,17 +1344,14 @@
 <TGConnectingPoint num="10" id="665" />
 <TGConnectingPoint num="11" id="666" />
 <tags value="" />
-<extraparam>
-<Toggle value="" />
-</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5304" id="680" index="25" uid="5ba2c908-950a-4288-889b-0b4c00bd9d79" >
+<SUBCOMPONENT type="5303" id="680" index="25" uid="bf44a33b-5344-46b2-9170-509d38670a83" >
 <father id="705" num="1" />
-<cdparam x="581" y="125" />
-<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="721" y="133" />
+<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" />
-<infoparam name="TGComponent" value="Start" />
+<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" />
+<infoparam name="TGComponent" value="nbOfCoins" />
 <new d="false" />
 <TGConnectingPoint num="0" id="668" />
 <TGConnectingPoint num="1" id="669" />
@@ -1368,6 +1366,9 @@
 <TGConnectingPoint num="10" id="678" />
 <TGConnectingPoint num="11" id="679" />
 <tags value="" />
+<extraparam>
+<Toggle value="" />
+</extraparam>
 </SUBCOMPONENT>
 
 <COMPONENT type="5306" id="717" index="14" uid="7a1c9320-1617-4710-a22f-ae8365f354ef" >
@@ -1508,7 +1509,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Block1 to Block0" value="" />
 <TGConnectingPoint num="0" id="770" />
-<P1  x="556" y="346" id="874" />
+<P1  x="556" y="346" id="915" />
 <P2  x="557" y="373" id="964" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -1540,7 +1541,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Block1 to Block0" value="" />
 <TGConnectingPoint num="0" id="774" />
-<P1  x="787" y="345" id="915" />
+<P1  x="787" y="345" id="874" />
 <P2  x="787" y="373" id="965" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -1802,13 +1803,13 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <Signal value="out ejectCoin(int nbOfCoins)" attached="true" />
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5000" id="908" index="8" uid="7a21d6ab-e515-4a9c-b908-bcb26c800cfb" >
+<SUBCOMPONENT type="5000" id="908" index="8" uid="a5114e80-03e3-4820-b57a-bfcefd90a9c8" >
 <father id="990" num="0" />
-<cdparam x="462" y="246" />
-<sizeparam width="188" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="694" y="245" />
+<sizeparam width="186" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" />
-<infoparam name="Block1" value="CoffeeButton" />
+<cdrectangleparam minX="0" maxX="274" minY="0" maxY="256" />
+<infoparam name="Block1" value="TeaButton" />
 <new d="false" />
 <TGConnectingPoint num="0" id="868" />
 <TGConnectingPoint num="1" id="869" />
@@ -1858,13 +1859,13 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <Signal value="out push()" attached="true" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5000" id="949" index="9" uid="a5114e80-03e3-4820-b57a-bfcefd90a9c8" >
+<SUBCOMPONENT type="5000" id="949" index="9" uid="7a21d6ab-e515-4a9c-b908-bcb26c800cfb" >
 <father id="990" num="1" />
-<cdparam x="694" y="245" />
-<sizeparam width="186" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="462" y="246" />
+<sizeparam width="188" height="100" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="274" minY="0" maxY="256" />
-<infoparam name="Block1" value="TeaButton" />
+<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" />
+<infoparam name="Block1" value="CoffeeButton" />
 <new d="false" />
 <TGConnectingPoint num="0" id="909" />
 <TGConnectingPoint num="1" id="910" />
@@ -1924,8 +1925,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from start state to Send signal" value="null" />
 <TGConnectingPoint num="0" id="996" />
-<P1  x="340" y="233" id="1178" />
-<P2  x="363" y="255" id="1167" />
+<P1  x="340" y="233" id="1167" />
+<P2  x="363" y="255" id="1169" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="995" index="8" uid="4b47f2ec-3073-4a06-b6e0-da7704454345" >
@@ -2032,7 +2033,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to state0" value="null" />
 <TGConnectingPoint num="0" id="1017" />
-<P1  x="363" y="285" id="1168" />
+<P1  x="363" y="285" id="1170" />
 <P2  x="399" y="352" id="1020" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -2329,36 +2330,36 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <extraparam>
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5103" id="1177" index="12" uid="71f14636-3c96-4e4e-8d0e-c1cd11e52641" >
+<SUBCOMPONENT type="5100" id="1168" index="12" uid="4ea28494-de50-4f99-8981-3ef7a87d7d34" >
 <father id="1252" num="0" />
-<cdparam x="340" y="260" />
-<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="333" y="213" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<enabled value="true" />
-<cdrectangleparam minX="0" maxX="138" minY="0" maxY="110" />
-<infoparam name="Send signal" value="push()" />
+<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
+<infoparam name="start state" value="null" />
 <new d="false" />
 <TGConnectingPoint num="0" id="1167" />
-<TGConnectingPoint num="1" id="1168" />
-<TGConnectingPoint num="2" id="1169" />
-<TGConnectingPoint num="3" id="1170" />
-<TGConnectingPoint num="4" id="1171" />
-<TGConnectingPoint num="5" id="1172" />
-<TGConnectingPoint num="6" id="1173" />
-<TGConnectingPoint num="7" id="1174" />
-<TGConnectingPoint num="8" id="1175" />
-<TGConnectingPoint num="9" id="1176" />
 <tags value="" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5100" id="1179" index="13" uid="4ea28494-de50-4f99-8981-3ef7a87d7d34" >
+<SUBCOMPONENT type="5103" id="1179" index="13" uid="71f14636-3c96-4e4e-8d0e-c1cd11e52641" >
 <father id="1252" num="1" />
-<cdparam x="333" y="213" />
-<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="340" y="260" />
+<sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
-<infoparam name="start state" value="null" />
+<enabled value="true" />
+<cdrectangleparam minX="0" maxX="138" minY="0" maxY="110" />
+<infoparam name="Send signal" value="push()" />
 <new d="false" />
-<TGConnectingPoint num="0" id="1178" />
+<TGConnectingPoint num="0" id="1169" />
+<TGConnectingPoint num="1" id="1170" />
+<TGConnectingPoint num="2" id="1171" />
+<TGConnectingPoint num="3" id="1172" />
+<TGConnectingPoint num="4" id="1173" />
+<TGConnectingPoint num="5" id="1174" />
+<TGConnectingPoint num="6" id="1175" />
+<TGConnectingPoint num="7" id="1176" />
+<TGConnectingPoint num="8" id="1177" />
+<TGConnectingPoint num="9" id="1178" />
 <tags value="" />
 </SUBCOMPONENT>
 
@@ -2981,8 +2982,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from start state to state0" value="null" />
 <TGConnectingPoint num="0" id="1494" />
-<P1  x="261" y="421" id="2129" />
-<P2  x="261" y="434" id="2057" />
+<P1  x="261" y="421" id="2140" />
+<P2  x="261" y="434" id="2143" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1493" index="38" uid="a28ea541-81ef-4713-8ea6-c7f5ba166daa" >
@@ -3017,8 +3018,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1501" />
-<P1  x="228" y="474" id="2070" />
-<P2  x="126" y="524" id="2131" />
+<P1  x="228" y="474" id="2156" />
+<P2  x="126" y="524" id="2129" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1500" index="39" uid="2484893a-3443-40dc-8f74-e1443edc2bde" >
@@ -3053,8 +3054,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1508" />
-<P1  x="126" y="554" id="2132" />
-<P2  x="126" y="653" id="2154" />
+<P1  x="126" y="554" id="2130" />
+<P2  x="126" y="653" id="2046" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1507" index="40" uid="6f6c6e3e-0702-4e99-b1e6-da999207526e" >
@@ -3091,8 +3092,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1515" />
-<P1  x="294" y="474" id="2071" />
-<P2  x="298" y="524" id="2045" />
+<P1  x="294" y="474" id="2157" />
+<P2  x="298" y="524" id="2215" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1514" index="41" uid="18f77c23-d770-43b2-a9ca-161802d8a987" >
@@ -3127,7 +3128,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1522" />
-<P1  x="298" y="554" id="2046" />
+<P1  x="298" y="554" id="2216" />
 <P2  x="296" y="650" id="1973" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -3165,8 +3166,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1529" />
-<P1  x="327" y="454" id="2060" />
-<P2  x="442" y="497" id="2142" />
+<P1  x="327" y="454" id="2146" />
+<P2  x="442" y="497" id="2118" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1528" index="43" uid="1286b08f-20a2-44ff-9ae2-d3d09cf02647" >
@@ -3202,7 +3203,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1537" />
 <TGConnectingPoint num="1" id="1538" />
-<P1  x="442" y="527" id="2143" />
+<P1  x="442" y="527" id="2119" />
 <P2  x="323" y="748" id="1835" />
 <Point x="442" y="737" />
 <AutomaticDrawing  data="true" />
@@ -3296,7 +3297,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
 <TGConnectingPoint num="0" id="1553" />
-<P1  x="126" y="702" id="2159" />
+<P1  x="126" y="702" id="2051" />
 <P2  x="221" y="758" id="1836" />
 <AutomaticDrawing  data="true" />
 <new d="false" />
@@ -3688,7 +3689,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="71" id="1824" />
 <accessibility />
 <latencyCheck />
-<tags value="" />
+<tags value="deactivated" />
 <extraparam>
 </extraparam>
 </COMPONENT>
@@ -3774,7 +3775,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="70" id="1896" />
 <TGConnectingPoint num="71" id="1897" />
 <color value="-52" />
-<tags value="" />
+<tags value="root" />
 <extraparam>
 </extraparam>
 </COMPONENT>
@@ -3860,7 +3861,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="70" id="1969" />
 <TGConnectingPoint num="71" id="1970" />
 <invariant />
-<tags value="" />
+<tags value="deactivated" />
 <extraparam>
 </extraparam>
 </COMPONENT>
@@ -4031,18 +4032,18 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="70" id="2296" />
 <TGConnectingPoint num="71" id="2297" />
 <invariant />
-<tags value="" />
+<tags value="deactivated" />
 <extraparam>
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5104" id="2055" index="48" uid="8718a1dd-4942-43e5-b6ce-b5f78b82a355" >
+<SUBCOMPONENT type="5106" id="2117" index="48" uid="52044bb2-8b01-4108-a1ac-b5e7886ea624" >
 <father id="2298" num="0" />
-<cdparam x="242" y="529" />
-<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="53" y="653" />
+<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" />
-<infoparam name="Send signal" value="pushTeaButton()" />
+<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" />
+<infoparam name="state0" value="CoffeeDelivered" />
 <new d="false" />
 <TGConnectingPoint num="0" id="2045" />
 <TGConnectingPoint num="1" id="2046" />
@@ -4054,110 +4055,96 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="7" id="2052" />
 <TGConnectingPoint num="8" id="2053" />
 <TGConnectingPoint num="9" id="2054" />
-<accessibility />
+<TGConnectingPoint num="10" id="2055" />
+<TGConnectingPoint num="11" id="2056" />
+<TGConnectingPoint num="12" id="2057" />
+<TGConnectingPoint num="13" id="2058" />
+<TGConnectingPoint num="14" id="2059" />
+<TGConnectingPoint num="15" id="2060" />
+<TGConnectingPoint num="16" id="2061" />
+<TGConnectingPoint num="17" id="2062" />
+<TGConnectingPoint num="18" id="2063" />
+<TGConnectingPoint num="19" id="2064" />
+<TGConnectingPoint num="20" id="2065" />
+<TGConnectingPoint num="21" id="2066" />
+<TGConnectingPoint num="22" id="2067" />
+<TGConnectingPoint num="23" id="2068" />
+<TGConnectingPoint num="24" id="2069" />
+<TGConnectingPoint num="25" id="2070" />
+<TGConnectingPoint num="26" id="2071" />
+<TGConnectingPoint num="27" id="2072" />
+<TGConnectingPoint num="28" id="2073" />
+<TGConnectingPoint num="29" id="2074" />
+<TGConnectingPoint num="30" id="2075" />
+<TGConnectingPoint num="31" id="2076" />
+<TGConnectingPoint num="32" id="2077" />
+<TGConnectingPoint num="33" id="2078" />
+<TGConnectingPoint num="34" id="2079" />
+<TGConnectingPoint num="35" id="2080" />
+<TGConnectingPoint num="36" id="2081" />
+<TGConnectingPoint num="37" id="2082" />
+<TGConnectingPoint num="38" id="2083" />
+<TGConnectingPoint num="39" id="2084" />
+<TGConnectingPoint num="40" id="2085" />
+<TGConnectingPoint num="41" id="2086" />
+<TGConnectingPoint num="42" id="2087" />
+<TGConnectingPoint num="43" id="2088" />
+<TGConnectingPoint num="44" id="2089" />
+<TGConnectingPoint num="45" id="2090" />
+<TGConnectingPoint num="46" id="2091" />
+<TGConnectingPoint num="47" id="2092" />
+<TGConnectingPoint num="48" id="2093" />
+<TGConnectingPoint num="49" id="2094" />
+<TGConnectingPoint num="50" id="2095" />
+<TGConnectingPoint num="51" id="2096" />
+<TGConnectingPoint num="52" id="2097" />
+<TGConnectingPoint num="53" id="2098" />
+<TGConnectingPoint num="54" id="2099" />
+<TGConnectingPoint num="55" id="2100" />
+<TGConnectingPoint num="56" id="2101" />
+<TGConnectingPoint num="57" id="2102" />
+<TGConnectingPoint num="58" id="2103" />
+<TGConnectingPoint num="59" id="2104" />
+<TGConnectingPoint num="60" id="2105" />
+<TGConnectingPoint num="61" id="2106" />
+<TGConnectingPoint num="62" id="2107" />
+<TGConnectingPoint num="63" id="2108" />
+<TGConnectingPoint num="64" id="2109" />
+<TGConnectingPoint num="65" id="2110" />
+<TGConnectingPoint num="66" id="2111" />
+<TGConnectingPoint num="67" id="2112" />
+<TGConnectingPoint num="68" id="2113" />
+<TGConnectingPoint num="69" id="2114" />
+<TGConnectingPoint num="70" id="2115" />
+<TGConnectingPoint num="71" id="2116" />
 <tags value="" />
+<extraparam>
+</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5106" id="2128" index="49" uid="542c0583-8080-46a1-9ae2-775c6446817c" >
+<SUBCOMPONENT type="5103" id="2128" index="49" uid="9c813d39-192a-47ff-98b2-607e27617acf" >
 <father id="2298" num="1" />
-<cdparam x="195" y="434" />
-<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="377" y="502" />
+<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" />
-<infoparam name="state0" value="WaitingForSelection" />
+<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" />
+<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
 <new d="false" />
-<TGConnectingPoint num="0" id="2056" />
-<TGConnectingPoint num="1" id="2057" />
-<TGConnectingPoint num="2" id="2058" />
-<TGConnectingPoint num="3" id="2059" />
-<TGConnectingPoint num="4" id="2060" />
-<TGConnectingPoint num="5" id="2061" />
-<TGConnectingPoint num="6" id="2062" />
-<TGConnectingPoint num="7" id="2063" />
-<TGConnectingPoint num="8" id="2064" />
-<TGConnectingPoint num="9" id="2065" />
-<TGConnectingPoint num="10" id="2066" />
-<TGConnectingPoint num="11" id="2067" />
-<TGConnectingPoint num="12" id="2068" />
-<TGConnectingPoint num="13" id="2069" />
-<TGConnectingPoint num="14" id="2070" />
-<TGConnectingPoint num="15" id="2071" />
-<TGConnectingPoint num="16" id="2072" />
-<TGConnectingPoint num="17" id="2073" />
-<TGConnectingPoint num="18" id="2074" />
-<TGConnectingPoint num="19" id="2075" />
-<TGConnectingPoint num="20" id="2076" />
-<TGConnectingPoint num="21" id="2077" />
-<TGConnectingPoint num="22" id="2078" />
-<TGConnectingPoint num="23" id="2079" />
-<TGConnectingPoint num="24" id="2080" />
-<TGConnectingPoint num="25" id="2081" />
-<TGConnectingPoint num="26" id="2082" />
-<TGConnectingPoint num="27" id="2083" />
-<TGConnectingPoint num="28" id="2084" />
-<TGConnectingPoint num="29" id="2085" />
-<TGConnectingPoint num="30" id="2086" />
-<TGConnectingPoint num="31" id="2087" />
-<TGConnectingPoint num="32" id="2088" />
-<TGConnectingPoint num="33" id="2089" />
-<TGConnectingPoint num="34" id="2090" />
-<TGConnectingPoint num="35" id="2091" />
-<TGConnectingPoint num="36" id="2092" />
-<TGConnectingPoint num="37" id="2093" />
-<TGConnectingPoint num="38" id="2094" />
-<TGConnectingPoint num="39" id="2095" />
-<TGConnectingPoint num="40" id="2096" />
-<TGConnectingPoint num="41" id="2097" />
-<TGConnectingPoint num="42" id="2098" />
-<TGConnectingPoint num="43" id="2099" />
-<TGConnectingPoint num="44" id="2100" />
-<TGConnectingPoint num="45" id="2101" />
-<TGConnectingPoint num="46" id="2102" />
-<TGConnectingPoint num="47" id="2103" />
-<TGConnectingPoint num="48" id="2104" />
-<TGConnectingPoint num="49" id="2105" />
-<TGConnectingPoint num="50" id="2106" />
-<TGConnectingPoint num="51" id="2107" />
-<TGConnectingPoint num="52" id="2108" />
-<TGConnectingPoint num="53" id="2109" />
-<TGConnectingPoint num="54" id="2110" />
-<TGConnectingPoint num="55" id="2111" />
-<TGConnectingPoint num="56" id="2112" />
-<TGConnectingPoint num="57" id="2113" />
-<TGConnectingPoint num="58" id="2114" />
-<TGConnectingPoint num="59" id="2115" />
-<TGConnectingPoint num="60" id="2116" />
-<TGConnectingPoint num="61" id="2117" />
-<TGConnectingPoint num="62" id="2118" />
-<TGConnectingPoint num="63" id="2119" />
-<TGConnectingPoint num="64" id="2120" />
-<TGConnectingPoint num="65" id="2121" />
-<TGConnectingPoint num="66" id="2122" />
-<TGConnectingPoint num="67" id="2123" />
-<TGConnectingPoint num="68" id="2124" />
-<TGConnectingPoint num="69" id="2125" />
-<TGConnectingPoint num="70" id="2126" />
-<TGConnectingPoint num="71" id="2127" />
-<latencyCheck />
-<invariant />
-<color value="-13057" />
+<TGConnectingPoint num="0" id="2118" />
+<TGConnectingPoint num="1" id="2119" />
+<TGConnectingPoint num="2" id="2120" />
+<TGConnectingPoint num="3" id="2121" />
+<TGConnectingPoint num="4" id="2122" />
+<TGConnectingPoint num="5" id="2123" />
+<TGConnectingPoint num="6" id="2124" />
+<TGConnectingPoint num="7" id="2125" />
+<TGConnectingPoint num="8" id="2126" />
+<TGConnectingPoint num="9" id="2127" />
+<accessibility />
 <tags value="" />
-<extraparam>
-</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5100" id="2130" index="50" uid="d60fd6d2-14be-4b25-b424-35a9ae5e3ba3" >
+<SUBCOMPONENT type="5104" id="2139" index="50" uid="f73b994e-357b-446d-a13d-97a66d7a4653" >
 <father id="2298" num="2" />
-<cdparam x="254" y="401" />
-<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" />
-<infoparam name="start state" value="null" />
-<new d="false" />
-<TGConnectingPoint num="0" id="2129" />
-<tags value="" />
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5104" id="2141" index="51" uid="f73b994e-357b-446d-a13d-97a66d7a4653" >
-<father id="2298" num="3" />
 <cdparam x="63" y="529" />
 <sizeparam width="127" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
@@ -4165,27 +4152,38 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <cdrectangleparam minX="0" maxX="450" minY="0" maxY="334" />
 <infoparam name="Send signal" value="pushCoffeeButton()" />
 <new d="false" />
-<TGConnectingPoint num="0" id="2131" />
-<TGConnectingPoint num="1" id="2132" />
-<TGConnectingPoint num="2" id="2133" />
-<TGConnectingPoint num="3" id="2134" />
-<TGConnectingPoint num="4" id="2135" />
-<TGConnectingPoint num="5" id="2136" />
-<TGConnectingPoint num="6" id="2137" />
-<TGConnectingPoint num="7" id="2138" />
-<TGConnectingPoint num="8" id="2139" />
-<TGConnectingPoint num="9" id="2140" />
+<TGConnectingPoint num="0" id="2129" />
+<TGConnectingPoint num="1" id="2130" />
+<TGConnectingPoint num="2" id="2131" />
+<TGConnectingPoint num="3" id="2132" />
+<TGConnectingPoint num="4" id="2133" />
+<TGConnectingPoint num="5" id="2134" />
+<TGConnectingPoint num="6" id="2135" />
+<TGConnectingPoint num="7" id="2136" />
+<TGConnectingPoint num="8" id="2137" />
+<TGConnectingPoint num="9" id="2138" />
 <accessibility />
 <tags value="" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5103" id="2152" index="52" uid="9c813d39-192a-47ff-98b2-607e27617acf" >
+<SUBCOMPONENT type="5100" id="2141" index="51" uid="d60fd6d2-14be-4b25-b424-35a9ae5e3ba3" >
+<father id="2298" num="3" />
+<cdparam x="254" y="401" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" />
+<infoparam name="start state" value="null" />
+<new d="false" />
+<TGConnectingPoint num="0" id="2140" />
+<tags value="" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="5106" id="2214" index="52" uid="542c0583-8080-46a1-9ae2-775c6446817c" >
 <father id="2298" num="4" />
-<cdparam x="377" y="502" />
-<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="195" y="434" />
+<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" />
-<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
+<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" />
+<infoparam name="state0" value="WaitingForSelection" />
 <new d="false" />
 <TGConnectingPoint num="0" id="2142" />
 <TGConnectingPoint num="1" id="2143" />
@@ -4197,93 +4195,96 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="7" id="2149" />
 <TGConnectingPoint num="8" id="2150" />
 <TGConnectingPoint num="9" id="2151" />
-<accessibility />
+<TGConnectingPoint num="10" id="2152" />
+<TGConnectingPoint num="11" id="2153" />
+<TGConnectingPoint num="12" id="2154" />
+<TGConnectingPoint num="13" id="2155" />
+<TGConnectingPoint num="14" id="2156" />
+<TGConnectingPoint num="15" id="2157" />
+<TGConnectingPoint num="16" id="2158" />
+<TGConnectingPoint num="17" id="2159" />
+<TGConnectingPoint num="18" id="2160" />
+<TGConnectingPoint num="19" id="2161" />
+<TGConnectingPoint num="20" id="2162" />
+<TGConnectingPoint num="21" id="2163" />
+<TGConnectingPoint num="22" id="2164" />
+<TGConnectingPoint num="23" id="2165" />
+<TGConnectingPoint num="24" id="2166" />
+<TGConnectingPoint num="25" id="2167" />
+<TGConnectingPoint num="26" id="2168" />
+<TGConnectingPoint num="27" id="2169" />
+<TGConnectingPoint num="28" id="2170" />
+<TGConnectingPoint num="29" id="2171" />
+<TGConnectingPoint num="30" id="2172" />
+<TGConnectingPoint num="31" id="2173" />
+<TGConnectingPoint num="32" id="2174" />
+<TGConnectingPoint num="33" id="2175" />
+<TGConnectingPoint num="34" id="2176" />
+<TGConnectingPoint num="35" id="2177" />
+<TGConnectingPoint num="36" id="2178" />
+<TGConnectingPoint num="37" id="2179" />
+<TGConnectingPoint num="38" id="2180" />
+<TGConnectingPoint num="39" id="2181" />
+<TGConnectingPoint num="40" id="2182" />
+<TGConnectingPoint num="41" id="2183" />
+<TGConnectingPoint num="42" id="2184" />
+<TGConnectingPoint num="43" id="2185" />
+<TGConnectingPoint num="44" id="2186" />
+<TGConnectingPoint num="45" id="2187" />
+<TGConnectingPoint num="46" id="2188" />
+<TGConnectingPoint num="47" id="2189" />
+<TGConnectingPoint num="48" id="2190" />
+<TGConnectingPoint num="49" id="2191" />
+<TGConnectingPoint num="50" id="2192" />
+<TGConnectingPoint num="51" id="2193" />
+<TGConnectingPoint num="52" id="2194" />
+<TGConnectingPoint num="53" id="2195" />
+<TGConnectingPoint num="54" id="2196" />
+<TGConnectingPoint num="55" id="2197" />
+<TGConnectingPoint num="56" id="2198" />
+<TGConnectingPoint num="57" id="2199" />
+<TGConnectingPoint num="58" id="2200" />
+<TGConnectingPoint num="59" id="2201" />
+<TGConnectingPoint num="60" id="2202" />
+<TGConnectingPoint num="61" id="2203" />
+<TGConnectingPoint num="62" id="2204" />
+<TGConnectingPoint num="63" id="2205" />
+<TGConnectingPoint num="64" id="2206" />
+<TGConnectingPoint num="65" id="2207" />
+<TGConnectingPoint num="66" id="2208" />
+<TGConnectingPoint num="67" id="2209" />
+<TGConnectingPoint num="68" id="2210" />
+<TGConnectingPoint num="69" id="2211" />
+<TGConnectingPoint num="70" id="2212" />
+<TGConnectingPoint num="71" id="2213" />
+<latencyCheck />
+<invariant />
+<color value="-13057" />
 <tags value="" />
+<extraparam>
+</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5106" id="2225" index="53" uid="52044bb2-8b01-4108-a1ac-b5e7886ea624" >
+<SUBCOMPONENT type="5104" id="2225" index="53" uid="8718a1dd-4942-43e5-b6ce-b5f78b82a355" >
 <father id="2298" num="5" />
-<cdparam x="53" y="653" />
-<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="242" y="529" />
+<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" />
-<infoparam name="state0" value="CoffeeDelivered" />
+<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" />
+<infoparam name="Send signal" value="pushTeaButton()" />
 <new d="false" />
-<TGConnectingPoint num="0" id="2153" />
-<TGConnectingPoint num="1" id="2154" />
-<TGConnectingPoint num="2" id="2155" />
-<TGConnectingPoint num="3" id="2156" />
-<TGConnectingPoint num="4" id="2157" />
-<TGConnectingPoint num="5" id="2158" />
-<TGConnectingPoint num="6" id="2159" />
-<TGConnectingPoint num="7" id="2160" />
-<TGConnectingPoint num="8" id="2161" />
-<TGConnectingPoint num="9" id="2162" />
-<TGConnectingPoint num="10" id="2163" />
-<TGConnectingPoint num="11" id="2164" />
-<TGConnectingPoint num="12" id="2165" />
-<TGConnectingPoint num="13" id="2166" />
-<TGConnectingPoint num="14" id="2167" />
-<TGConnectingPoint num="15" id="2168" />
-<TGConnectingPoint num="16" id="2169" />
-<TGConnectingPoint num="17" id="2170" />
-<TGConnectingPoint num="18" id="2171" />
-<TGConnectingPoint num="19" id="2172" />
-<TGConnectingPoint num="20" id="2173" />
-<TGConnectingPoint num="21" id="2174" />
-<TGConnectingPoint num="22" id="2175" />
-<TGConnectingPoint num="23" id="2176" />
-<TGConnectingPoint num="24" id="2177" />
-<TGConnectingPoint num="25" id="2178" />
-<TGConnectingPoint num="26" id="2179" />
-<TGConnectingPoint num="27" id="2180" />
-<TGConnectingPoint num="28" id="2181" />
-<TGConnectingPoint num="29" id="2182" />
-<TGConnectingPoint num="30" id="2183" />
-<TGConnectingPoint num="31" id="2184" />
-<TGConnectingPoint num="32" id="2185" />
-<TGConnectingPoint num="33" id="2186" />
-<TGConnectingPoint num="34" id="2187" />
-<TGConnectingPoint num="35" id="2188" />
-<TGConnectingPoint num="36" id="2189" />
-<TGConnectingPoint num="37" id="2190" />
-<TGConnectingPoint num="38" id="2191" />
-<TGConnectingPoint num="39" id="2192" />
-<TGConnectingPoint num="40" id="2193" />
-<TGConnectingPoint num="41" id="2194" />
-<TGConnectingPoint num="42" id="2195" />
-<TGConnectingPoint num="43" id="2196" />
-<TGConnectingPoint num="44" id="2197" />
-<TGConnectingPoint num="45" id="2198" />
-<TGConnectingPoint num="46" id="2199" />
-<TGConnectingPoint num="47" id="2200" />
-<TGConnectingPoint num="48" id="2201" />
-<TGConnectingPoint num="49" id="2202" />
-<TGConnectingPoint num="50" id="2203" />
-<TGConnectingPoint num="51" id="2204" />
-<TGConnectingPoint num="52" id="2205" />
-<TGConnectingPoint num="53" id="2206" />
-<TGConnectingPoint num="54" id="2207" />
-<TGConnectingPoint num="55" id="2208" />
-<TGConnectingPoint num="56" id="2209" />
-<TGConnectingPoint num="57" id="2210" />
-<TGConnectingPoint num="58" id="2211" />
-<TGConnectingPoint num="59" id="2212" />
-<TGConnectingPoint num="60" id="2213" />
-<TGConnectingPoint num="61" id="2214" />
-<TGConnectingPoint num="62" id="2215" />
-<TGConnectingPoint num="63" id="2216" />
-<TGConnectingPoint num="64" id="2217" />
-<TGConnectingPoint num="65" id="2218" />
-<TGConnectingPoint num="66" id="2219" />
-<TGConnectingPoint num="67" id="2220" />
-<TGConnectingPoint num="68" id="2221" />
-<TGConnectingPoint num="69" id="2222" />
-<TGConnectingPoint num="70" id="2223" />
-<TGConnectingPoint num="71" id="2224" />
+<TGConnectingPoint num="0" id="2215" />
+<TGConnectingPoint num="1" id="2216" />
+<TGConnectingPoint num="2" id="2217" />
+<TGConnectingPoint num="3" id="2218" />
+<TGConnectingPoint num="4" id="2219" />
+<TGConnectingPoint num="5" id="2220" />
+<TGConnectingPoint num="6" id="2221" />
+<TGConnectingPoint num="7" id="2222" />
+<TGConnectingPoint num="8" id="2223" />
+<TGConnectingPoint num="9" id="2224" />
+<accessibility />
 <tags value="" />
-<extraparam>
-</extraparam>
 </SUBCOMPONENT>
 
 
diff --git a/src/main/java/avatartranslator/AvatarElement.java b/src/main/java/avatartranslator/AvatarElement.java
index bb9d644e3788cf9cc865d34b599a7af5a97fae35..0a955342569b0eb21a169ce452158bef5f8f326d 100644
--- a/src/main/java/avatartranslator/AvatarElement.java
+++ b/src/main/java/avatartranslator/AvatarElement.java
@@ -212,7 +212,10 @@ public class AvatarElement implements NameChecker.NamedElement, CanBeTagged {
     }
 
     public void addTag(Tag tag) {
-        tags.addTag(tag);
+        TraceManager.addDev("Adding TAG for element: " + this);
+        if (!hasTag(tag.getTag())) {
+            tags.addTag(tag);
+        }
     }
     public void removeAllTags() {
         tags.removeAllTags();
diff --git a/src/main/java/avatartranslator/AvatarSpecification.java b/src/main/java/avatartranslator/AvatarSpecification.java
index 5eff2ba1aea028c9b219d8d4f6fbbab3b0256fef..d8269e35b88e9eff1f6844f1741632ce66d20321 100644
--- a/src/main/java/avatartranslator/AvatarSpecification.java
+++ b/src/main/java/avatartranslator/AvatarSpecification.java
@@ -1836,7 +1836,7 @@ public class AvatarSpecification extends AvatarElement implements IBSParamSpec {
                 elt.addTag(t);
             }
         }
-        if (elt.getReferenceObjects() != null) {
+        /*if (elt.getReferenceObjects() != null) {
             for (Object ref : elt.getReferenceObjects()) {
                 if (ref instanceof CanBeTagged) {
                     for (Tag t : ((CanBeTagged) ref).getAllTags()) {
@@ -1844,7 +1844,7 @@ public class AvatarSpecification extends AvatarElement implements IBSParamSpec {
                     }
                 }
             }
-        }
+        }*/
     }
 
 }
diff --git a/src/main/java/ui/AvatarPanelDrawer.java b/src/main/java/ui/AvatarPanelDrawer.java
index 29994619804ac7519eecc97551d39e52e339cb64..aa506ac122efe93a2ac39ecc6d949f7536553177 100644
--- a/src/main/java/ui/AvatarPanelDrawer.java
+++ b/src/main/java/ui/AvatarPanelDrawer.java
@@ -43,6 +43,8 @@ package ui;
 
 
 import avatartranslator.*;
+import common.CanBeTagged;
+import common.Tag;
 import myutil.TraceManager;
 import ui.avatarbd.*;
 import ui.avatarsmd.*;
@@ -137,9 +139,9 @@ public class AvatarPanelDrawer {
 						if ((ab.getReferenceObject() != null) && (ab.getReferenceObject() instanceof CDElement)) {
 							CDElement cd = (CDElement) ab.getReferenceObject();
 							bl.setUserResize(cd.getX(), cd.getY(), cd.getWidth(), cd.getHeight());
-							abd.addComponent(bl, cd.getX(), cd.getY(), false, true);
+							addComponent(ab, abd, bl, cd.getX(), cd.getY(), false, true);
 						} else {
-							abd.addComponent(bl, xpos, ypos, false, true);
+							addComponent(ab, abd, bl, xpos, ypos, false, true);
 							bl.resize(100 * blockSizeMap.get(ab) + 100, 100 + (maxLevel - level) * 50);
 						}
 						drawBlockProperties(avspec, ab, bl, useOriginalValuesFirst);
@@ -171,7 +173,7 @@ public class AvatarPanelDrawer {
 						//abd.addComponent(bl, xpos, ypos, false, true);
 						//bl.resize(100 * blockSizeMap.get(ab) + 100, 100 + (maxLevel - level) * 50);
 						//}
-						abd.addComponent(bl, father.getX() + blockIncMap.get(ab.getFather()), father.getY() + 10, false, true);
+						addComponent(ab, abd, bl, father.getX() + blockIncMap.get(ab.getFather()), father.getY() + 10, false, true);
 						int size = 100;
 						if ((ab.getReferenceObject() != null) && (ab.getReferenceObject() instanceof CDElement)) {
 							CDElement cd = (CDElement) ab.getReferenceObject();
@@ -273,7 +275,7 @@ public class AvatarPanelDrawer {
 
 					AvatarBDPortConnector conn = new AvatarBDPortConnector(0, 0, 0, 0, 0, 0, true, null,
 							abd, p1, p2, points);
-					abd.addComponent(conn, 0, 0, false, true);
+					addComponent(ar, abd, conn, 0, 0, false, true);
 					conn.setAsynchronous(ar.isAsynchronous());
 					conn.setSynchronous(!ar.isAsynchronous());
 					conn.setAMS(false);
@@ -325,9 +327,9 @@ public class AvatarPanelDrawer {
 			if ((adt.getReferenceObject() != null) && (adt.getReferenceObject() instanceof CDElement)) {
 				CDElement cd = ((CDElement) (adt.getReferenceObject()));
 				abdType.setUserResize(cd.getX(), cd.getY(), cd.getWidth(), cd.getHeight());
-				abd.addComponent(abdType, cd.getX(), cd.getY(), false, true);
+				addComponent(adt, abd, abdType, cd.getX(), cd.getY(), false, true);
 			} else {
-				abd.addComponent(abdType, xpos, ypos, false, true);
+				addComponent(adt, abd, abdType, xpos, ypos, false, true);
 			}
 
 		}
@@ -595,7 +597,7 @@ public class AvatarPanelDrawer {
 			// Transition Law
 			SMDCon.setTransitionProbability(t.getDelayDistributionLaw(), t.getDelayExtra1(), t.getDelayExtra2());
 
-			smp.addComponent(SMDCon, p1.getX(), p1.getY(), false, true);
+			addComponent(t, smp, SMDCon, p1.getX(), p1.getY(), false, true);
 
 			if (t.getOtherReferenceObjects() != null) {
 				for (int i = 0; i < t.getOtherReferenceObjects().size(); i++) {
@@ -674,7 +676,7 @@ public class AvatarPanelDrawer {
 			AvatarSMDStartState smdss = new AvatarSMDStartState(newX, newY, smp.getMinX(), smp.getMaxX(), smp.getMinY(), smp.getMaxY(), false, null,
 					smp);
 			tgcomp = smdss;
-			smp.addComponent(smdss, newX, newY, false, true);
+			addComponent(asme, smp, smdss, newX, newY, false, true);
 			if (tgc != null) smdss.resize(width, height);
 			SMDMap.put(asme, smdss);
 			newTGCToAvatarElement.put(smdss, asme);
@@ -702,7 +704,7 @@ public class AvatarPanelDrawer {
 			} else {
 				smdr.setMaxValue(ar.getMaxValue());
 			}
-			smp.addComponent(smdr, newX, newY, false, true);
+			addComponent(asme, smp, smdr, newX, newY, false, true);
 			if (tgc != null) smdr.resize(width, height);
 			tgcomp = smdr;
 			SMDMap.put(asme, smdr);
@@ -720,7 +722,7 @@ public class AvatarPanelDrawer {
 					false, null,
 					smp);
 			smdqrs.setNames(((AvatarQueryOnSignal) asme).getAttribute().getName(), ((AvatarQueryOnSignal) asme).getSignal().getName());
-			smp.addComponent(smdqrs, newX, newY, false, true);
+			addComponent(asme, smp, smdqrs, newX, newY, false, true);
 			if (tgc != null) smdqrs.resize(width, height);
 			tgcomp = smdqrs;
 			SMDMap.put(asme, smdqrs);
@@ -744,7 +746,7 @@ public class AvatarPanelDrawer {
 				if (asme.isCheckable() && asme.isChecked()) {
 					smdrs.setCheckableAccessibility(asme.isChecked());
 				}
-				smp.addComponent(smdrs, newX, newY, false, true);
+				addComponent(asme, smp, smdrs, newX, newY, false, true);
 				//                              String name=sig.minString();
 				//
 				if (tgc != null) smdrs.resize(width, height);
@@ -798,7 +800,7 @@ public class AvatarPanelDrawer {
 				}
 				smdss.setCheckLatency(((AvatarActionOnSignal) asme).getCheckLatency());
 				tgcomp = smdss;
-				smp.addComponent(smdss, newX, newY, false, true);
+				addComponent(asme, smp, smdss, newX, newY, false, true);
 				if (tgc != null) smdss.resize(width, height);
 				AvatarActionOnSignal aaos = (AvatarActionOnSignal) asme;
 				String parameters = aaos.getAllOriginalVals();
@@ -846,7 +848,7 @@ public class AvatarPanelDrawer {
 			if (tgc != null) {
 				newTGCToOldOne.put(smdstop, tgc);
 			}
-			smp.addComponent(smdstop, newX, newY, false, true);
+			addComponent(asme, smp, smdstop, newX, newY, false, true);
 			if (tgc != null) smdstop.resize(width, height);
 			//  tp = smdstop.tgconnectingPointAtIndex(0);
 			locMap.put(asme, smdstop);
@@ -870,7 +872,7 @@ public class AvatarPanelDrawer {
 			if (tgc != null) {
 				newTGCToOldOne.put(timerSet, tgc);
 			}
-			smp.addComponent(timerSet, newX, newY, false, true);
+			addComponent(asme, smp, timerSet, newX, newY, false, true);
 			if (tgc != null) timerSet.resize(width, height);
 			//  tp = smdstop.tgconnectingPointAtIndex(0);
 			locMap.put(asme, timerSet);
@@ -889,7 +891,7 @@ public class AvatarPanelDrawer {
 			if (tgc != null) {
 				newTGCToOldOne.put(timerExpire, tgc);
 			}
-			smp.addComponent(timerExpire, newX, newY, false, true);
+			addComponent(asme, smp, timerExpire, newX, newY, false, true);
 			if (tgc != null) timerExpire.resize(width, height);
 			//  tp = smdstop.tgconnectingPointAtIndex(0);
 			locMap.put(asme, timerExpire);
@@ -907,7 +909,7 @@ public class AvatarPanelDrawer {
 			if (tgc != null) {
 				newTGCToOldOne.put(timerReset, tgc);
 			}
-			smp.addComponent(timerReset, newX, newY, false, true);
+			addComponent(asme, smp, timerReset, newX, newY, false, true);
 			if (tgc != null) timerReset.resize(width, height);
 			//  tp = smdstop.tgconnectingPointAtIndex(0);
 			locMap.put(asme, timerReset);
@@ -939,7 +941,7 @@ public class AvatarPanelDrawer {
 			}
 			smdstate.setCheckLatency(((AvatarState) asme).getCheckLatency());
 			tgcomp = smdstate;
-			smp.addComponent(smdstate, newX, newY, false, true);
+			addComponent(asme, smp, smdstate, newX, newY, false, true);
 			if (tgc != null) smdstate.resize(width, height);
 			smdstate.setValue(asme.getName());
 			//smdstate.recalculateSize();
@@ -967,7 +969,7 @@ public class AvatarPanelDrawer {
 						}
 						newTGCToAvatarElement.put(smdstateBis, asme);
 						newTGCToOldOne.put(smdstateBis, tmpT);
-						smp.addComponent(smdstateBis, tmpT.getX(), tmpT.getY(), false, true);
+						addComponent(asme, smp, smdstateBis, tmpT.getX(), tmpT.getY(), false, true);
 						smdstateBis.resize(tmpT.getWidth(), tmpT.getHeight());
 						smdstateBis.setValue(asme.getName());
 						refMap.put(o, smdstateBis);
@@ -1223,7 +1225,7 @@ public class AvatarPanelDrawer {
 				comp = new AvatarBDPragma(xPos, yPos, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, null, abd);
 				xPos = xPos + dec;
 				yPos = yPos + dec;
-				abd.addComponent(comp, xPos, yPos, false, true);
+				addComponent(p, abd, comp, xPos, yPos, false, true);
 				if (tgcO != null) {
 					comp.resize(tgcO.getWidth(), tgcO.getHeight());
 				}
@@ -1272,7 +1274,7 @@ public class AvatarPanelDrawer {
 				comp = new AvatarBDPerformancePragma(xPos, yPos, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, null, abd);
 				xPos = xPos + dec;
 				yPos = yPos + dec;
-				abd.addComponent(comp, xPos, yPos, false, true);
+				addComponent(p, abd, comp, xPos, yPos, false, true);
 				if (tgcO != null) {
 					comp.resize(tgcO.getWidth(), tgcO.getHeight());
 				}
@@ -1308,7 +1310,7 @@ public class AvatarPanelDrawer {
 			tgcNote = new TGCNote(xPos, yPos, abd.getMinX(), abd.getMaxX(), abd.getMinY(), abd.getMaxY(), false, null, abd);
 			xPos = xPos + dec;
 			yPos = yPos + dec;
-			abd.addComponent(tgcNote, xPos, yPos, false, true);
+			addComponent(note, abd, tgcNote, xPos, yPos, false, true);
 			tgcNote.setValue(note.getValue());
 			tgcNote.makeValue();
 			if (tgcO != null) {
@@ -1361,6 +1363,28 @@ public class AvatarPanelDrawer {
 			comp.setValue(value);
 			comp.makeValue();
 		}
+
+
+
+	}
+
+	public boolean addComponent(AvatarElement ae, TDiagramPanel tdp, TGComponent tgc, int x, int y, boolean swallow, boolean addToList) {
+
+		for(Tag tag: ae.getAllTags()) {
+			TraceManager.addDev("\tTAG: tag " + tag.getTag() + " for component " + tgc);
+			tgc.addTag(tag);
+		}
+
+		/*Object o = ae.getReferenceObject();
+		if ((o != null) && (o instanceof CanBeTagged)) {
+			for(Tag tag: ((CanBeTagged)o).getAllTags()) {
+				tgc.addTag(tag);
+			}
+		}*/
+
+		return tdp.addComponent(tgc, x, y,  swallow, addToList);
+
+
 	}