diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml
index 12c571aa55400c4c7d1366f61d68c5afafb55ffc..1549c904c89d3e588f7e9c6f24c9d4817a10556f 100644
--- a/modeling/AVATAR/CoffeeMachine_Avatar.xml
+++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml
@@ -643,7 +643,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="373" />
-<P1  x="302" y="261" id="404" />
+<P1  x="302" y="261" id="417" />
 <P2  x="361" y="261" id="392" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
@@ -661,7 +661,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="377" />
-<P1  x="305" y="211" id="417" />
+<P1  x="305" y="211" id="404" />
 <P2  x="361" y="211" id="391" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
@@ -750,11 +750,11 @@
 </COMPONENT>
 <SUBCOMPONENT type="5304" id="414" >
 <father id="452" 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" />
 <TGConnectingPoint num="0" id="402" />
 <TGConnectingPoint num="1" id="403" />
 <TGConnectingPoint num="2" id="404" />
@@ -770,11 +770,11 @@
 </SUBCOMPONENT>
 <SUBCOMPONENT type="5304" id="427" >
 <father id="452" 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" />
 <TGConnectingPoint num="0" id="415" />
 <TGConnectingPoint num="1" id="416" />
 <TGConnectingPoint num="2" id="417" />
@@ -904,7 +904,7 @@
 <TGConnectingPoint num="0" id="511" />
 <TGConnectingPoint num="1" id="512" />
 <TGConnectingPoint num="2" id="513" />
-<P1  x="581" y="154" id="600" />
+<P1  x="581" y="154" id="587" />
 <P2  x="546" y="305" id="657" />
 <Point x="518" y="154" />
 <Point x="518" y="305" />
@@ -932,7 +932,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="516" />
 <TGConnectingPoint num="1" id="517" />
-<P1  x="631" y="164" id="595" />
+<P1  x="631" y="164" id="582" />
 <P2  x="667" y="310" id="644" />
 <Point x="631" y="310" />
 <AutomaticDrawing  data="true" />
@@ -960,7 +960,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="522" />
 <TGConnectingPoint num="1" id="523" />
-<P1  x="721" y="158" id="580" />
+<P1  x="721" y="158" id="593" />
 <P2  x="700" y="204" id="634" />
 <Point x="700" y="158" />
 <AutomaticDrawing  data="true" />
@@ -1115,13 +1115,13 @@
 <TGConnectingPoint num="22" id="627" />
 <TGConnectingPoint num="23" id="628" />
 </COMPONENT>
-<SUBCOMPONENT type="5303" id="591" >
+<SUBCOMPONENT type="5304" id="591" >
 <father id="629" 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" />
 <TGConnectingPoint num="0" id="579" />
 <TGConnectingPoint num="1" id="580" />
 <TGConnectingPoint num="2" id="581" />
@@ -1134,17 +1134,14 @@
 <TGConnectingPoint num="9" id="588" />
 <TGConnectingPoint num="10" id="589" />
 <TGConnectingPoint num="11" id="590" />
-<extraparam>
-<Toggle value="" />
-</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5304" id="604" >
+<SUBCOMPONENT type="5303" id="604" >
 <father id="629" 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" />
 <TGConnectingPoint num="0" id="592" />
 <TGConnectingPoint num="1" id="593" />
 <TGConnectingPoint num="2" id="594" />
@@ -1157,6 +1154,9 @@
 <TGConnectingPoint num="9" id="601" />
 <TGConnectingPoint num="10" id="602" />
 <TGConnectingPoint num="11" id="603" />
+<extraparam>
+<Toggle value="" />
+</extraparam>
 </SUBCOMPONENT>
 
 <COMPONENT type="5306" id="641" >
@@ -1278,7 +1278,7 @@
 <MainCode value="void __user_init() {"/>
 <MainCode value="}"/>
 <Optimized value="true" />
-<Validated value="Wallet;CoffeeMachine;CoffeeButton;TeaButton;" />
+<Validated value="" />
 <Ignored value="" />
 
 <CONNECTOR type="5002" id="695" >
@@ -1286,8 +1286,8 @@
 <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="694" />
-<P1  x="559" y="330" id="731" />
-<P2  x="560" y="377" id="789" />
+<P1  x="559" y="330" id="835" />
+<P2  x="560" y="377" id="868" />
 <AutomaticDrawing  data="true" />
 <extraparam>
 <isd value="in pushCoffeeButton()" />
@@ -1301,7 +1301,7 @@
 <infoparam name="connector from Block0 to Block0" value="" />
 <TGConnectingPoint num="0" id="696" />
 <P1  x="306" y="109" id="711" />
-<P2  x="445" y="108" id="785" />
+<P2  x="445" y="108" id="864" />
 <AutomaticDrawing  data="true" />
 <extraparam>
 <iso value="in getCoin(int nbOfCoins)" />
@@ -1316,8 +1316,8 @@
 <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="698" />
-<P1  x="789" y="326" id="756" />
-<P2  x="790" y="377" id="790" />
+<P1  x="789" y="326" id="810" />
+<P2  x="790" y="377" id="869" />
 <AutomaticDrawing  data="true" />
 <extraparam>
 <isd value="in pushTeaButton()" />
@@ -1368,36 +1368,36 @@
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5000" id="799" >
+<COMPONENT type="5000" id="878" >
 <cdparam x="445" y="19" />
 <sizeparam width="461" height="358" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="Block0" value="CoffeeMachine" />
-<TGConnectingPoint num="0" id="775" />
-<TGConnectingPoint num="1" id="776" />
-<TGConnectingPoint num="2" id="777" />
-<TGConnectingPoint num="3" id="778" />
-<TGConnectingPoint num="4" id="779" />
-<TGConnectingPoint num="5" id="780" />
-<TGConnectingPoint num="6" id="781" />
-<TGConnectingPoint num="7" id="782" />
-<TGConnectingPoint num="8" id="783" />
-<TGConnectingPoint num="9" id="784" />
-<TGConnectingPoint num="10" id="785" />
-<TGConnectingPoint num="11" id="786" />
-<TGConnectingPoint num="12" id="787" />
-<TGConnectingPoint num="13" id="788" />
-<TGConnectingPoint num="14" id="789" />
-<TGConnectingPoint num="15" id="790" />
-<TGConnectingPoint num="16" id="791" />
-<TGConnectingPoint num="17" id="792" />
-<TGConnectingPoint num="18" id="793" />
-<TGConnectingPoint num="19" id="794" />
-<TGConnectingPoint num="20" id="795" />
-<TGConnectingPoint num="21" id="796" />
-<TGConnectingPoint num="22" id="797" />
-<TGConnectingPoint num="23" id="798" />
+<TGConnectingPoint num="0" id="854" />
+<TGConnectingPoint num="1" id="855" />
+<TGConnectingPoint num="2" id="856" />
+<TGConnectingPoint num="3" id="857" />
+<TGConnectingPoint num="4" id="858" />
+<TGConnectingPoint num="5" id="859" />
+<TGConnectingPoint num="6" id="860" />
+<TGConnectingPoint num="7" id="861" />
+<TGConnectingPoint num="8" id="862" />
+<TGConnectingPoint num="9" id="863" />
+<TGConnectingPoint num="10" id="864" />
+<TGConnectingPoint num="11" id="865" />
+<TGConnectingPoint num="12" id="866" />
+<TGConnectingPoint num="13" id="867" />
+<TGConnectingPoint num="14" id="868" />
+<TGConnectingPoint num="15" id="869" />
+<TGConnectingPoint num="16" id="870" />
+<TGConnectingPoint num="17" id="871" />
+<TGConnectingPoint num="18" id="872" />
+<TGConnectingPoint num="19" id="873" />
+<TGConnectingPoint num="20" id="874" />
+<TGConnectingPoint num="21" id="875" />
+<TGConnectingPoint num="22" id="876" />
+<TGConnectingPoint num="23" id="877" />
 <extraparam>
 <blockType data="block" color="-4072719" />
 <CryptoBlock value="false" />
@@ -1415,37 +1415,37 @@
 <Signal value="out ejectCoin(int nbOfCoins)" attached="true" />
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5000" id="749" >
-<father id="799" num="0" />
-<cdparam x="464" y="228" />
-<sizeparam width="190" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5000" id="828" >
+<father id="878" num="0" />
+<cdparam x="695" y="224" />
+<sizeparam width="189" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="271" minY="0" maxY="256" />
-<infoparam name="Block1" value="CoffeeButton" />
-<TGConnectingPoint num="0" id="725" />
-<TGConnectingPoint num="1" id="726" />
-<TGConnectingPoint num="2" id="727" />
-<TGConnectingPoint num="3" id="728" />
-<TGConnectingPoint num="4" id="729" />
-<TGConnectingPoint num="5" id="730" />
-<TGConnectingPoint num="6" id="731" />
-<TGConnectingPoint num="7" id="732" />
-<TGConnectingPoint num="8" id="733" />
-<TGConnectingPoint num="9" id="734" />
-<TGConnectingPoint num="10" id="735" />
-<TGConnectingPoint num="11" id="736" />
-<TGConnectingPoint num="12" id="737" />
-<TGConnectingPoint num="13" id="738" />
-<TGConnectingPoint num="14" id="739" />
-<TGConnectingPoint num="15" id="740" />
-<TGConnectingPoint num="16" id="741" />
-<TGConnectingPoint num="17" id="742" />
-<TGConnectingPoint num="18" id="743" />
-<TGConnectingPoint num="19" id="744" />
-<TGConnectingPoint num="20" id="745" />
-<TGConnectingPoint num="21" id="746" />
-<TGConnectingPoint num="22" id="747" />
-<TGConnectingPoint num="23" id="748" />
+<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" />
+<infoparam name="Block1" value="TeaButton" />
+<TGConnectingPoint num="0" id="804" />
+<TGConnectingPoint num="1" id="805" />
+<TGConnectingPoint num="2" id="806" />
+<TGConnectingPoint num="3" id="807" />
+<TGConnectingPoint num="4" id="808" />
+<TGConnectingPoint num="5" id="809" />
+<TGConnectingPoint num="6" id="810" />
+<TGConnectingPoint num="7" id="811" />
+<TGConnectingPoint num="8" id="812" />
+<TGConnectingPoint num="9" id="813" />
+<TGConnectingPoint num="10" id="814" />
+<TGConnectingPoint num="11" id="815" />
+<TGConnectingPoint num="12" id="816" />
+<TGConnectingPoint num="13" id="817" />
+<TGConnectingPoint num="14" id="818" />
+<TGConnectingPoint num="15" id="819" />
+<TGConnectingPoint num="16" id="820" />
+<TGConnectingPoint num="17" id="821" />
+<TGConnectingPoint num="18" id="822" />
+<TGConnectingPoint num="19" id="823" />
+<TGConnectingPoint num="20" id="824" />
+<TGConnectingPoint num="21" id="825" />
+<TGConnectingPoint num="22" id="826" />
+<TGConnectingPoint num="23" id="827" />
 <extraparam>
 <blockType data="block" color="-4072719" />
 <CryptoBlock value="false" />
@@ -1453,37 +1453,37 @@
 <Signal value="out push()" attached="true" />
 </extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5000" id="774" >
-<father id="799" num="1" />
-<cdparam x="695" y="224" />
-<sizeparam width="189" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5000" id="853" >
+<father id="878" num="1" />
+<cdparam x="464" y="228" />
+<sizeparam width="190" height="102" minWidth="5" minHeight="2" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="272" minY="0" maxY="256" />
-<infoparam name="Block1" value="TeaButton" />
-<TGConnectingPoint num="0" id="750" />
-<TGConnectingPoint num="1" id="751" />
-<TGConnectingPoint num="2" id="752" />
-<TGConnectingPoint num="3" id="753" />
-<TGConnectingPoint num="4" id="754" />
-<TGConnectingPoint num="5" id="755" />
-<TGConnectingPoint num="6" id="756" />
-<TGConnectingPoint num="7" id="757" />
-<TGConnectingPoint num="8" id="758" />
-<TGConnectingPoint num="9" id="759" />
-<TGConnectingPoint num="10" id="760" />
-<TGConnectingPoint num="11" id="761" />
-<TGConnectingPoint num="12" id="762" />
-<TGConnectingPoint num="13" id="763" />
-<TGConnectingPoint num="14" id="764" />
-<TGConnectingPoint num="15" id="765" />
-<TGConnectingPoint num="16" id="766" />
-<TGConnectingPoint num="17" id="767" />
-<TGConnectingPoint num="18" id="768" />
-<TGConnectingPoint num="19" id="769" />
-<TGConnectingPoint num="20" id="770" />
-<TGConnectingPoint num="21" id="771" />
-<TGConnectingPoint num="22" id="772" />
-<TGConnectingPoint num="23" id="773" />
+<cdrectangleparam minX="0" maxX="271" minY="0" maxY="256" />
+<infoparam name="Block1" value="CoffeeButton" />
+<TGConnectingPoint num="0" id="829" />
+<TGConnectingPoint num="1" id="830" />
+<TGConnectingPoint num="2" id="831" />
+<TGConnectingPoint num="3" id="832" />
+<TGConnectingPoint num="4" id="833" />
+<TGConnectingPoint num="5" id="834" />
+<TGConnectingPoint num="6" id="835" />
+<TGConnectingPoint num="7" id="836" />
+<TGConnectingPoint num="8" id="837" />
+<TGConnectingPoint num="9" id="838" />
+<TGConnectingPoint num="10" id="839" />
+<TGConnectingPoint num="11" id="840" />
+<TGConnectingPoint num="12" id="841" />
+<TGConnectingPoint num="13" id="842" />
+<TGConnectingPoint num="14" id="843" />
+<TGConnectingPoint num="15" id="844" />
+<TGConnectingPoint num="16" id="845" />
+<TGConnectingPoint num="17" id="846" />
+<TGConnectingPoint num="18" id="847" />
+<TGConnectingPoint num="19" id="848" />
+<TGConnectingPoint num="20" id="849" />
+<TGConnectingPoint num="21" id="850" />
+<TGConnectingPoint num="22" id="851" />
+<TGConnectingPoint num="23" id="852" />
 <extraparam>
 <blockType data="block" color="-4072719" />
 <CryptoBlock value="false" />
@@ -1496,26 +1496,26 @@
 </AVATARBlockDiagramPanel>
 
 <AVATARStateMachineDiagramPanel name="Wallet" minX="10" maxX="1400" minY="10" maxY="900" >
-<CONNECTOR type="5102" id="806" >
+<CONNECTOR type="5102" id="960" >
 <cdparam x="516" y="264" />
 <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="805" />
-<P1  x="485" y="219" id="847" />
-<P2  x="485" y="275" id="858" />
+<TGConnectingPoint num="0" id="959" />
+<P1  x="485" y="219" id="1001" />
+<P2  x="485" y="275" id="1012" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="804" >
-<father id="806" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="958" >
+<father id="960" num="0" />
 <cdparam x="493" y="251" />
 <sizeparam width="173" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="800" />
-<TGConnectingPoint num="1" id="801" />
-<TGConnectingPoint num="2" id="802" />
-<TGConnectingPoint num="3" id="803" />
+<TGConnectingPoint num="0" id="954" />
+<TGConnectingPoint num="1" id="955" />
+<TGConnectingPoint num="2" id="956" />
+<TGConnectingPoint num="3" id="957" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1528,26 +1528,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="813" >
+<CONNECTOR type="5102" id="967" >
 <cdparam x="382" y="165" />
 <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="812" />
-<P1  x="382" y="165" id="954" />
-<P2  x="485" y="189" id="846" />
+<TGConnectingPoint num="0" id="966" />
+<P1  x="382" y="165" id="1108" />
+<P2  x="485" y="189" id="1000" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="811" >
-<father id="813" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="965" >
+<father id="967" num="0" />
 <cdparam x="382" y="205" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="807" />
-<TGConnectingPoint num="1" id="808" />
-<TGConnectingPoint num="2" id="809" />
-<TGConnectingPoint num="3" id="810" />
+<TGConnectingPoint num="0" id="961" />
+<TGConnectingPoint num="1" id="962" />
+<TGConnectingPoint num="2" id="963" />
+<TGConnectingPoint num="3" id="964" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1558,26 +1558,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="820" >
+<CONNECTOR type="5102" id="974" >
 <cdparam x="223" y="260" />
 <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="819" />
-<P1  x="251" y="231" id="836" />
-<P2  x="252" y="300" id="899" />
+<TGConnectingPoint num="0" id="973" />
+<P1  x="251" y="231" id="990" />
+<P2  x="252" y="300" id="1053" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="818" >
-<father id="820" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="972" >
+<father id="974" num="0" />
 <cdparam x="175" y="246" />
 <sizeparam width="225" height="60" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="814" />
-<TGConnectingPoint num="1" id="815" />
-<TGConnectingPoint num="2" id="816" />
-<TGConnectingPoint num="3" id="817" />
+<TGConnectingPoint num="0" id="968" />
+<TGConnectingPoint num="1" id="969" />
+<TGConnectingPoint num="2" id="970" />
+<TGConnectingPoint num="3" id="971" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="minUserDelay" enabled="true"/>
@@ -1590,26 +1590,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="827" >
+<CONNECTOR type="5102" id="981" >
 <cdparam x="357" y="165" />
 <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="826" />
-<P1  x="357" y="165" id="953" />
-<P2  x="251" y="201" id="835" />
+<TGConnectingPoint num="0" id="980" />
+<P1  x="357" y="165" id="1107" />
+<P2  x="251" y="201" id="989" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="825" >
-<father id="827" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="979" >
+<father id="981" num="0" />
 <cdparam x="220" y="174" />
 <sizeparam width="99" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="821" />
-<TGConnectingPoint num="1" id="822" />
-<TGConnectingPoint num="2" id="823" />
-<TGConnectingPoint num="3" id="824" />
+<TGConnectingPoint num="0" id="975" />
+<TGConnectingPoint num="1" id="976" />
+<TGConnectingPoint num="2" id="977" />
+<TGConnectingPoint num="3" id="978" />
 <extraparam>
 <guard value="[nbOfCoins &gt; 0]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1620,26 +1620,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="834" >
+<CONNECTOR type="5102" id="988" >
 <cdparam x="369" y="115" />
 <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="833" />
-<P1  x="370" y="64" id="980" />
-<P2  x="370" y="135" id="940" />
+<TGConnectingPoint num="0" id="987" />
+<P1  x="370" y="64" id="1134" />
+<P2  x="370" y="135" id="1094" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="832" >
-<father id="834" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="986" >
+<father id="988" num="0" />
 <cdparam x="376" y="105" />
 <sizeparam width="173" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="828" />
-<TGConnectingPoint num="1" id="829" />
-<TGConnectingPoint num="2" id="830" />
-<TGConnectingPoint num="3" id="831" />
+<TGConnectingPoint num="0" id="982" />
+<TGConnectingPoint num="1" id="983" />
+<TGConnectingPoint num="2" id="984" />
+<TGConnectingPoint num="3" id="985" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1651,238 +1651,238 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<COMPONENT type="5103" id="845" >
+<COMPONENT type="5103" id="999" >
 <cdparam x="214" y="206" />
 <sizeparam width="74" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="Send signal" value="putCoin(x)" />
-<TGConnectingPoint num="0" id="835" />
-<TGConnectingPoint num="1" id="836" />
-<TGConnectingPoint num="2" id="837" />
-<TGConnectingPoint num="3" id="838" />
-<TGConnectingPoint num="4" id="839" />
-<TGConnectingPoint num="5" id="840" />
-<TGConnectingPoint num="6" id="841" />
-<TGConnectingPoint num="7" id="842" />
-<TGConnectingPoint num="8" id="843" />
-<TGConnectingPoint num="9" id="844" />
+<TGConnectingPoint num="0" id="989" />
+<TGConnectingPoint num="1" id="990" />
+<TGConnectingPoint num="2" id="991" />
+<TGConnectingPoint num="3" id="992" />
+<TGConnectingPoint num="4" id="993" />
+<TGConnectingPoint num="5" id="994" />
+<TGConnectingPoint num="6" id="995" />
+<TGConnectingPoint num="7" id="996" />
+<TGConnectingPoint num="8" id="997" />
+<TGConnectingPoint num="9" id="998" />
 </COMPONENT>
 
-<COMPONENT type="5104" id="856" >
+<COMPONENT type="5104" id="1010" >
 <cdparam x="444" y="194" />
 <sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="Receive signal" value="getCoin(x)" />
-<TGConnectingPoint num="0" id="846" />
-<TGConnectingPoint num="1" id="847" />
-<TGConnectingPoint num="2" id="848" />
-<TGConnectingPoint num="3" id="849" />
-<TGConnectingPoint num="4" id="850" />
-<TGConnectingPoint num="5" id="851" />
-<TGConnectingPoint num="6" id="852" />
-<TGConnectingPoint num="7" id="853" />
-<TGConnectingPoint num="8" id="854" />
-<TGConnectingPoint num="9" id="855" />
+<TGConnectingPoint num="0" id="1000" />
+<TGConnectingPoint num="1" id="1001" />
+<TGConnectingPoint num="2" id="1002" />
+<TGConnectingPoint num="3" id="1003" />
+<TGConnectingPoint num="4" id="1004" />
+<TGConnectingPoint num="5" id="1005" />
+<TGConnectingPoint num="6" id="1006" />
+<TGConnectingPoint num="7" id="1007" />
+<TGConnectingPoint num="8" id="1008" />
+<TGConnectingPoint num="9" id="1009" />
 </COMPONENT>
 
-<COMPONENT type="5106" id="897" >
+<COMPONENT type="5106" id="1051" >
 <cdparam x="460" y="275" />
 <sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="857" />
-<TGConnectingPoint num="1" id="858" />
-<TGConnectingPoint num="2" id="859" />
-<TGConnectingPoint num="3" id="860" />
-<TGConnectingPoint num="4" id="861" />
-<TGConnectingPoint num="5" id="862" />
-<TGConnectingPoint num="6" id="863" />
-<TGConnectingPoint num="7" id="864" />
-<TGConnectingPoint num="8" id="865" />
-<TGConnectingPoint num="9" id="866" />
-<TGConnectingPoint num="10" id="867" />
-<TGConnectingPoint num="11" id="868" />
-<TGConnectingPoint num="12" id="869" />
-<TGConnectingPoint num="13" id="870" />
-<TGConnectingPoint num="14" id="871" />
-<TGConnectingPoint num="15" id="872" />
-<TGConnectingPoint num="16" id="873" />
-<TGConnectingPoint num="17" id="874" />
-<TGConnectingPoint num="18" id="875" />
-<TGConnectingPoint num="19" id="876" />
-<TGConnectingPoint num="20" id="877" />
-<TGConnectingPoint num="21" id="878" />
-<TGConnectingPoint num="22" id="879" />
-<TGConnectingPoint num="23" id="880" />
-<TGConnectingPoint num="24" id="881" />
-<TGConnectingPoint num="25" id="882" />
-<TGConnectingPoint num="26" id="883" />
-<TGConnectingPoint num="27" id="884" />
-<TGConnectingPoint num="28" id="885" />
-<TGConnectingPoint num="29" id="886" />
-<TGConnectingPoint num="30" id="887" />
-<TGConnectingPoint num="31" id="888" />
-<TGConnectingPoint num="32" id="889" />
-<TGConnectingPoint num="33" id="890" />
-<TGConnectingPoint num="34" id="891" />
-<TGConnectingPoint num="35" id="892" />
-<TGConnectingPoint num="36" id="893" />
-<TGConnectingPoint num="37" id="894" />
-<TGConnectingPoint num="38" id="895" />
-<TGConnectingPoint num="39" id="896" />
+<TGConnectingPoint num="0" id="1011" />
+<TGConnectingPoint num="1" id="1012" />
+<TGConnectingPoint num="2" id="1013" />
+<TGConnectingPoint num="3" id="1014" />
+<TGConnectingPoint num="4" id="1015" />
+<TGConnectingPoint num="5" id="1016" />
+<TGConnectingPoint num="6" id="1017" />
+<TGConnectingPoint num="7" id="1018" />
+<TGConnectingPoint num="8" id="1019" />
+<TGConnectingPoint num="9" id="1020" />
+<TGConnectingPoint num="10" id="1021" />
+<TGConnectingPoint num="11" id="1022" />
+<TGConnectingPoint num="12" id="1023" />
+<TGConnectingPoint num="13" id="1024" />
+<TGConnectingPoint num="14" id="1025" />
+<TGConnectingPoint num="15" id="1026" />
+<TGConnectingPoint num="16" id="1027" />
+<TGConnectingPoint num="17" id="1028" />
+<TGConnectingPoint num="18" id="1029" />
+<TGConnectingPoint num="19" id="1030" />
+<TGConnectingPoint num="20" id="1031" />
+<TGConnectingPoint num="21" id="1032" />
+<TGConnectingPoint num="22" id="1033" />
+<TGConnectingPoint num="23" id="1034" />
+<TGConnectingPoint num="24" id="1035" />
+<TGConnectingPoint num="25" id="1036" />
+<TGConnectingPoint num="26" id="1037" />
+<TGConnectingPoint num="27" id="1038" />
+<TGConnectingPoint num="28" id="1039" />
+<TGConnectingPoint num="29" id="1040" />
+<TGConnectingPoint num="30" id="1041" />
+<TGConnectingPoint num="31" id="1042" />
+<TGConnectingPoint num="32" id="1043" />
+<TGConnectingPoint num="33" id="1044" />
+<TGConnectingPoint num="34" id="1045" />
+<TGConnectingPoint num="35" id="1046" />
+<TGConnectingPoint num="36" id="1047" />
+<TGConnectingPoint num="37" id="1048" />
+<TGConnectingPoint num="38" id="1049" />
+<TGConnectingPoint num="39" id="1050" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="938" >
+<COMPONENT type="5106" id="1092" >
 <cdparam x="227" y="300" />
 <sizeparam width="50" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="898" />
-<TGConnectingPoint num="1" id="899" />
-<TGConnectingPoint num="2" id="900" />
-<TGConnectingPoint num="3" id="901" />
-<TGConnectingPoint num="4" id="902" />
-<TGConnectingPoint num="5" id="903" />
-<TGConnectingPoint num="6" id="904" />
-<TGConnectingPoint num="7" id="905" />
-<TGConnectingPoint num="8" id="906" />
-<TGConnectingPoint num="9" id="907" />
-<TGConnectingPoint num="10" id="908" />
-<TGConnectingPoint num="11" id="909" />
-<TGConnectingPoint num="12" id="910" />
-<TGConnectingPoint num="13" id="911" />
-<TGConnectingPoint num="14" id="912" />
-<TGConnectingPoint num="15" id="913" />
-<TGConnectingPoint num="16" id="914" />
-<TGConnectingPoint num="17" id="915" />
-<TGConnectingPoint num="18" id="916" />
-<TGConnectingPoint num="19" id="917" />
-<TGConnectingPoint num="20" id="918" />
-<TGConnectingPoint num="21" id="919" />
-<TGConnectingPoint num="22" id="920" />
-<TGConnectingPoint num="23" id="921" />
-<TGConnectingPoint num="24" id="922" />
-<TGConnectingPoint num="25" id="923" />
-<TGConnectingPoint num="26" id="924" />
-<TGConnectingPoint num="27" id="925" />
-<TGConnectingPoint num="28" id="926" />
-<TGConnectingPoint num="29" id="927" />
-<TGConnectingPoint num="30" id="928" />
-<TGConnectingPoint num="31" id="929" />
-<TGConnectingPoint num="32" id="930" />
-<TGConnectingPoint num="33" id="931" />
-<TGConnectingPoint num="34" id="932" />
-<TGConnectingPoint num="35" id="933" />
-<TGConnectingPoint num="36" id="934" />
-<TGConnectingPoint num="37" id="935" />
-<TGConnectingPoint num="38" id="936" />
-<TGConnectingPoint num="39" id="937" />
+<TGConnectingPoint num="0" id="1052" />
+<TGConnectingPoint num="1" id="1053" />
+<TGConnectingPoint num="2" id="1054" />
+<TGConnectingPoint num="3" id="1055" />
+<TGConnectingPoint num="4" id="1056" />
+<TGConnectingPoint num="5" id="1057" />
+<TGConnectingPoint num="6" id="1058" />
+<TGConnectingPoint num="7" id="1059" />
+<TGConnectingPoint num="8" id="1060" />
+<TGConnectingPoint num="9" id="1061" />
+<TGConnectingPoint num="10" id="1062" />
+<TGConnectingPoint num="11" id="1063" />
+<TGConnectingPoint num="12" id="1064" />
+<TGConnectingPoint num="13" id="1065" />
+<TGConnectingPoint num="14" id="1066" />
+<TGConnectingPoint num="15" id="1067" />
+<TGConnectingPoint num="16" id="1068" />
+<TGConnectingPoint num="17" id="1069" />
+<TGConnectingPoint num="18" id="1070" />
+<TGConnectingPoint num="19" id="1071" />
+<TGConnectingPoint num="20" id="1072" />
+<TGConnectingPoint num="21" id="1073" />
+<TGConnectingPoint num="22" id="1074" />
+<TGConnectingPoint num="23" id="1075" />
+<TGConnectingPoint num="24" id="1076" />
+<TGConnectingPoint num="25" id="1077" />
+<TGConnectingPoint num="26" id="1078" />
+<TGConnectingPoint num="27" id="1079" />
+<TGConnectingPoint num="28" id="1080" />
+<TGConnectingPoint num="29" id="1081" />
+<TGConnectingPoint num="30" id="1082" />
+<TGConnectingPoint num="31" id="1083" />
+<TGConnectingPoint num="32" id="1084" />
+<TGConnectingPoint num="33" id="1085" />
+<TGConnectingPoint num="34" id="1086" />
+<TGConnectingPoint num="35" id="1087" />
+<TGConnectingPoint num="36" id="1088" />
+<TGConnectingPoint num="37" id="1089" />
+<TGConnectingPoint num="38" id="1090" />
+<TGConnectingPoint num="39" id="1091" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="979" >
+<COMPONENT type="5106" id="1133" >
 <cdparam x="345" y="135" />
 <sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="939" />
-<TGConnectingPoint num="1" id="940" />
-<TGConnectingPoint num="2" id="941" />
-<TGConnectingPoint num="3" id="942" />
-<TGConnectingPoint num="4" id="943" />
-<TGConnectingPoint num="5" id="944" />
-<TGConnectingPoint num="6" id="945" />
-<TGConnectingPoint num="7" id="946" />
-<TGConnectingPoint num="8" id="947" />
-<TGConnectingPoint num="9" id="948" />
-<TGConnectingPoint num="10" id="949" />
-<TGConnectingPoint num="11" id="950" />
-<TGConnectingPoint num="12" id="951" />
-<TGConnectingPoint num="13" id="952" />
-<TGConnectingPoint num="14" id="953" />
-<TGConnectingPoint num="15" id="954" />
-<TGConnectingPoint num="16" id="955" />
-<TGConnectingPoint num="17" id="956" />
-<TGConnectingPoint num="18" id="957" />
-<TGConnectingPoint num="19" id="958" />
-<TGConnectingPoint num="20" id="959" />
-<TGConnectingPoint num="21" id="960" />
-<TGConnectingPoint num="22" id="961" />
-<TGConnectingPoint num="23" id="962" />
-<TGConnectingPoint num="24" id="963" />
-<TGConnectingPoint num="25" id="964" />
-<TGConnectingPoint num="26" id="965" />
-<TGConnectingPoint num="27" id="966" />
-<TGConnectingPoint num="28" id="967" />
-<TGConnectingPoint num="29" id="968" />
-<TGConnectingPoint num="30" id="969" />
-<TGConnectingPoint num="31" id="970" />
-<TGConnectingPoint num="32" id="971" />
-<TGConnectingPoint num="33" id="972" />
-<TGConnectingPoint num="34" id="973" />
-<TGConnectingPoint num="35" id="974" />
-<TGConnectingPoint num="36" id="975" />
-<TGConnectingPoint num="37" id="976" />
-<TGConnectingPoint num="38" id="977" />
-<TGConnectingPoint num="39" id="978" />
+<TGConnectingPoint num="0" id="1093" />
+<TGConnectingPoint num="1" id="1094" />
+<TGConnectingPoint num="2" id="1095" />
+<TGConnectingPoint num="3" id="1096" />
+<TGConnectingPoint num="4" id="1097" />
+<TGConnectingPoint num="5" id="1098" />
+<TGConnectingPoint num="6" id="1099" />
+<TGConnectingPoint num="7" id="1100" />
+<TGConnectingPoint num="8" id="1101" />
+<TGConnectingPoint num="9" id="1102" />
+<TGConnectingPoint num="10" id="1103" />
+<TGConnectingPoint num="11" id="1104" />
+<TGConnectingPoint num="12" id="1105" />
+<TGConnectingPoint num="13" id="1106" />
+<TGConnectingPoint num="14" id="1107" />
+<TGConnectingPoint num="15" id="1108" />
+<TGConnectingPoint num="16" id="1109" />
+<TGConnectingPoint num="17" id="1110" />
+<TGConnectingPoint num="18" id="1111" />
+<TGConnectingPoint num="19" id="1112" />
+<TGConnectingPoint num="20" id="1113" />
+<TGConnectingPoint num="21" id="1114" />
+<TGConnectingPoint num="22" id="1115" />
+<TGConnectingPoint num="23" id="1116" />
+<TGConnectingPoint num="24" id="1117" />
+<TGConnectingPoint num="25" id="1118" />
+<TGConnectingPoint num="26" id="1119" />
+<TGConnectingPoint num="27" id="1120" />
+<TGConnectingPoint num="28" id="1121" />
+<TGConnectingPoint num="29" id="1122" />
+<TGConnectingPoint num="30" id="1123" />
+<TGConnectingPoint num="31" id="1124" />
+<TGConnectingPoint num="32" id="1125" />
+<TGConnectingPoint num="33" id="1126" />
+<TGConnectingPoint num="34" id="1127" />
+<TGConnectingPoint num="35" id="1128" />
+<TGConnectingPoint num="36" id="1129" />
+<TGConnectingPoint num="37" id="1130" />
+<TGConnectingPoint num="38" id="1131" />
+<TGConnectingPoint num="39" id="1132" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5100" id="981" >
+<COMPONENT type="5100" id="1135" >
 <cdparam x="363" y="44" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="980" />
+<TGConnectingPoint num="0" id="1134" />
 </COMPONENT>
 
 
 </AVATARStateMachineDiagramPanel>
 
 <AVATARStateMachineDiagramPanel name="CoffeeMachine" minX="10" maxX="1400" minY="10" maxY="1400" >
-<CONNECTOR type="118" id="982" >
+<CONNECTOR type="118" id="1136" >
 <cdparam x="372" y="83" />
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
-<P1  x="412" y="82" id="1258" />
-<P2  x="472" y="82" id="1091" />
+<P1  x="412" y="82" id="1412" />
+<P2  x="472" y="82" id="1245" />
 <AutomaticDrawing  data="false" />
 </CONNECTOR>
-<CONNECTOR type="5102" id="989" >
+<CONNECTOR type="5102" id="1143" >
 <cdparam x="691" y="288" />
 <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="988" />
-<P1  x="699" y="289" id="1144" />
-<P2  x="699" y="316" id="1116" />
+<TGConnectingPoint num="0" id="1142" />
+<P1  x="699" y="289" id="1298" />
+<P2  x="699" y="316" id="1270" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="987" >
-<father id="989" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1141" >
+<father id="1143" num="0" />
 <cdparam x="691" y="328" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="983" />
-<TGConnectingPoint num="1" id="984" />
-<TGConnectingPoint num="2" id="985" />
-<TGConnectingPoint num="3" id="986" />
+<TGConnectingPoint num="0" id="1137" />
+<TGConnectingPoint num="1" id="1138" />
+<TGConnectingPoint num="2" id="1139" />
+<TGConnectingPoint num="3" id="1140" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1893,26 +1893,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="996" >
+<CONNECTOR type="5102" id="1150" >
 <cdparam x="481" y="501" />
 <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="995" />
-<P1  x="442" y="527" id="1411" />
-<P2  x="323" y="748" id="1272" />
+<TGConnectingPoint num="0" id="1149" />
+<P1  x="442" y="527" id="1500" />
+<P2  x="323" y="748" id="1426" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="994" >
-<father id="996" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1148" >
+<father id="1150" num="0" />
 <cdparam x="420" y="552" />
 <sizeparam width="89" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="990" />
-<TGConnectingPoint num="1" id="991" />
-<TGConnectingPoint num="2" id="992" />
-<TGConnectingPoint num="3" id="993" />
+<TGConnectingPoint num="0" id="1144" />
+<TGConnectingPoint num="1" id="1145" />
+<TGConnectingPoint num="2" id="1146" />
+<TGConnectingPoint num="3" id="1147" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1924,26 +1924,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1003" >
+<CONNECTOR type="5102" id="1157" >
 <cdparam x="555" y="559" />
 <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="1002" />
-<P1  x="326" y="457" id="1360" />
-<P2  x="442" y="497" id="1410" />
+<TGConnectingPoint num="0" id="1156" />
+<P1  x="326" y="457" id="1527" />
+<P2  x="442" y="497" id="1499" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1001" >
-<father id="1003" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1155" >
+<father id="1157" num="0" />
 <cdparam x="395" y="448" />
 <sizeparam width="100" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="997" />
-<TGConnectingPoint num="1" id="998" />
-<TGConnectingPoint num="2" id="999" />
-<TGConnectingPoint num="3" id="1000" />
+<TGConnectingPoint num="0" id="1151" />
+<TGConnectingPoint num="1" id="1152" />
+<TGConnectingPoint num="2" id="1153" />
+<TGConnectingPoint num="3" id="1154" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="coinDelay" enabled="true"/>
@@ -1954,26 +1954,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1010" >
+<CONNECTOR type="5102" id="1164" >
 <cdparam x="355" y="545" />
 <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="1009" />
-<P1  x="298" y="554" id="1346" />
-<P2  x="289" y="748" id="1264" />
+<TGConnectingPoint num="0" id="1163" />
+<P1  x="298" y="554" id="1565" />
+<P2  x="289" y="748" id="1418" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1008" >
-<father id="1010" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1162" >
+<father id="1164" num="0" />
 <cdparam x="284" y="594" />
 <sizeparam width="252" height="45" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1004" />
-<TGConnectingPoint num="1" id="1005" />
-<TGConnectingPoint num="2" id="1006" />
-<TGConnectingPoint num="3" id="1007" />
+<TGConnectingPoint num="0" id="1158" />
+<TGConnectingPoint num="1" id="1159" />
+<TGConnectingPoint num="2" id="1160" />
+<TGConnectingPoint num="3" id="1161" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -1986,26 +1986,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1017" >
+<CONNECTOR type="5102" id="1171" >
 <cdparam x="295" y="465" />
 <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="1016" />
-<P1  x="293" y="477" id="1371" />
-<P2  x="298" y="524" id="1345" />
+<TGConnectingPoint num="0" id="1170" />
+<P1  x="293" y="477" id="1538" />
+<P2  x="298" y="524" id="1564" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1015" >
-<father id="1017" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1169" >
+<father id="1171" num="0" />
 <cdparam x="295" y="505" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1011" />
-<TGConnectingPoint num="1" id="1012" />
-<TGConnectingPoint num="2" id="1013" />
-<TGConnectingPoint num="3" id="1014" />
+<TGConnectingPoint num="0" id="1165" />
+<TGConnectingPoint num="1" id="1166" />
+<TGConnectingPoint num="2" id="1167" />
+<TGConnectingPoint num="3" id="1168" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2016,26 +2016,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1024" >
+<CONNECTOR type="5102" id="1178" >
 <cdparam x="148" y="549" />
 <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="1023" />
-<P1  x="126" y="554" id="1400" />
-<P2  x="255" y="748" id="1271" />
+<TGConnectingPoint num="0" id="1177" />
+<P1  x="126" y="554" id="1511" />
+<P2  x="255" y="748" id="1425" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1022" >
-<father id="1024" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1176" >
+<father id="1178" num="0" />
 <cdparam x="32" y="587" />
 <sizeparam width="288" height="45" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1018" />
-<TGConnectingPoint num="1" id="1019" />
-<TGConnectingPoint num="2" id="1020" />
-<TGConnectingPoint num="3" id="1021" />
+<TGConnectingPoint num="0" id="1172" />
+<TGConnectingPoint num="1" id="1173" />
+<TGConnectingPoint num="2" id="1174" />
+<TGConnectingPoint num="3" id="1175" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2048,26 +2048,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1031" >
+<CONNECTOR type="5102" id="1185" >
 <cdparam x="229" y="465" />
 <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="1030" />
-<P1  x="227" y="477" id="1370" />
-<P2  x="126" y="524" id="1399" />
+<TGConnectingPoint num="0" id="1184" />
+<P1  x="227" y="477" id="1537" />
+<P2  x="126" y="524" id="1510" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1029" >
-<father id="1031" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1183" >
+<father id="1185" num="0" />
 <cdparam x="229" y="505" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1025" />
-<TGConnectingPoint num="1" id="1026" />
-<TGConnectingPoint num="2" id="1027" />
-<TGConnectingPoint num="3" id="1028" />
+<TGConnectingPoint num="0" id="1179" />
+<TGConnectingPoint num="1" id="1180" />
+<TGConnectingPoint num="2" id="1181" />
+<TGConnectingPoint num="3" id="1182" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2078,26 +2078,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1038" >
+<CONNECTOR type="5102" id="1192" >
 <cdparam x="280" y="420" />
 <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="1037" />
-<P1  x="261" y="421" id="1397" />
-<P2  x="260" y="437" id="1357" />
+<TGConnectingPoint num="0" id="1191" />
+<P1  x="261" y="421" id="1521" />
+<P2  x="260" y="437" id="1524" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1036" >
-<father id="1038" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1190" >
+<father id="1192" num="0" />
 <cdparam x="280" y="460" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1032" />
-<TGConnectingPoint num="1" id="1033" />
-<TGConnectingPoint num="2" id="1034" />
-<TGConnectingPoint num="3" id="1035" />
+<TGConnectingPoint num="0" id="1186" />
+<TGConnectingPoint num="1" id="1187" />
+<TGConnectingPoint num="2" id="1188" />
+<TGConnectingPoint num="3" id="1189" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2108,26 +2108,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1045" >
+<CONNECTOR type="5102" id="1199" >
 <cdparam x="667" y="346" />
 <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="1044" />
-<P1  x="699" y="346" id="1117" />
-<P2  x="699" y="381" id="1305" />
+<TGConnectingPoint num="0" id="1198" />
+<P1  x="699" y="346" id="1271" />
+<P2  x="699" y="381" id="1459" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1043" >
-<father id="1045" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1197" >
+<father id="1199" num="0" />
 <cdparam x="707" y="368" />
 <sizeparam width="89" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1039" />
-<TGConnectingPoint num="1" id="1040" />
-<TGConnectingPoint num="2" id="1041" />
-<TGConnectingPoint num="3" id="1042" />
+<TGConnectingPoint num="0" id="1193" />
+<TGConnectingPoint num="1" id="1194" />
+<TGConnectingPoint num="2" id="1195" />
+<TGConnectingPoint num="3" id="1196" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2139,26 +2139,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1052" >
+<CONNECTOR type="5102" id="1206" >
 <cdparam x="348" y="228" />
 <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="1051" />
-<P1  x="388" y="208" id="1183" />
-<P2  x="649" y="264" id="1141" />
+<TGConnectingPoint num="0" id="1205" />
+<P1  x="388" y="208" id="1337" />
+<P2  x="649" y="264" id="1295" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1050" >
-<father id="1052" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1204" >
+<father id="1206" num="0" />
 <cdparam x="411" y="206" />
 <sizeparam width="100" height="30" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1046" />
-<TGConnectingPoint num="1" id="1047" />
-<TGConnectingPoint num="2" id="1048" />
-<TGConnectingPoint num="3" id="1049" />
+<TGConnectingPoint num="0" id="1200" />
+<TGConnectingPoint num="1" id="1201" />
+<TGConnectingPoint num="2" id="1202" />
+<TGConnectingPoint num="3" id="1203" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="coinDelay" enabled="true"/>
@@ -2169,26 +2169,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1059" >
+<CONNECTOR type="5102" id="1213" >
 <cdparam x="243" y="319" />
 <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="1058" />
-<P1  x="277" y="305" id="1128" />
-<P2  x="311" y="372" id="1422" />
+<TGConnectingPoint num="0" id="1212" />
+<P1  x="277" y="305" id="1282" />
+<P2  x="311" y="372" id="1576" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1057" >
-<father id="1059" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1211" >
+<father id="1213" num="0" />
 <cdparam x="243" y="359" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1053" />
-<TGConnectingPoint num="1" id="1054" />
-<TGConnectingPoint num="2" id="1055" />
-<TGConnectingPoint num="3" id="1056" />
+<TGConnectingPoint num="0" id="1207" />
+<TGConnectingPoint num="1" id="1208" />
+<TGConnectingPoint num="2" id="1209" />
+<TGConnectingPoint num="3" id="1210" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2199,26 +2199,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1066" >
+<CONNECTOR type="5102" id="1220" >
 <cdparam x="270" y="224" />
 <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="1065" />
-<P1  x="270" y="228" id="1193" />
-<P2  x="277" y="275" id="1127" />
+<TGConnectingPoint num="0" id="1219" />
+<P1  x="270" y="228" id="1347" />
+<P2  x="277" y="275" id="1281" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1064" >
-<father id="1066" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1218" >
+<father id="1220" num="0" />
 <cdparam x="270" y="264" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1060" />
-<TGConnectingPoint num="1" id="1061" />
-<TGConnectingPoint num="2" id="1062" />
-<TGConnectingPoint num="3" id="1063" />
+<TGConnectingPoint num="0" id="1214" />
+<TGConnectingPoint num="1" id="1215" />
+<TGConnectingPoint num="2" id="1216" />
+<TGConnectingPoint num="3" id="1217" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2229,26 +2229,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1073" >
+<CONNECTOR type="5102" id="1227" >
 <cdparam x="309" y="160" />
 <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="1072" />
-<P1  x="306" y="166" id="1106" />
-<P2  x="309" y="188" id="1180" />
+<TGConnectingPoint num="0" id="1226" />
+<P1  x="306" y="166" id="1260" />
+<P2  x="309" y="188" id="1334" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1071" >
-<father id="1073" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1225" >
+<father id="1227" num="0" />
 <cdparam x="328" y="178" />
 <sizeparam width="168" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1067" />
-<TGConnectingPoint num="1" id="1068" />
-<TGConnectingPoint num="2" id="1069" />
-<TGConnectingPoint num="3" id="1070" />
+<TGConnectingPoint num="0" id="1221" />
+<TGConnectingPoint num="1" id="1222" />
+<TGConnectingPoint num="2" id="1223" />
+<TGConnectingPoint num="3" id="1224" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2260,26 +2260,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1080" >
+<CONNECTOR type="5102" id="1234" >
 <cdparam x="303" y="103" />
 <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="1079" />
-<P1  x="302" y="102" id="1228" />
-<P2  x="306" y="136" id="1105" />
+<TGConnectingPoint num="0" id="1233" />
+<P1  x="302" y="102" id="1382" />
+<P2  x="306" y="136" id="1259" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1078" >
-<father id="1080" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1232" >
+<father id="1234" num="0" />
 <cdparam x="303" y="143" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1074" />
-<TGConnectingPoint num="1" id="1075" />
-<TGConnectingPoint num="2" id="1076" />
-<TGConnectingPoint num="3" id="1077" />
+<TGConnectingPoint num="0" id="1228" />
+<TGConnectingPoint num="1" id="1229" />
+<TGConnectingPoint num="2" id="1230" />
+<TGConnectingPoint num="3" id="1231" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2290,26 +2290,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1087" >
+<CONNECTOR type="5102" id="1241" >
 <cdparam x="303" y="40" />
 <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="1086" />
-<P1  x="303" y="40" id="1220" />
-<P2  x="302" y="62" id="1223" />
+<TGConnectingPoint num="0" id="1240" />
+<P1  x="303" y="40" id="1374" />
+<P2  x="302" y="62" id="1377" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1085" >
-<father id="1087" num="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1239" >
+<father id="1241" num="0" />
 <cdparam x="303" y="80" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1081" />
-<TGConnectingPoint num="1" id="1082" />
-<TGConnectingPoint num="2" id="1083" />
-<TGConnectingPoint num="3" id="1084" />
+<TGConnectingPoint num="0" id="1235" />
+<TGConnectingPoint num="1" id="1236" />
+<TGConnectingPoint num="2" id="1237" />
+<TGConnectingPoint num="3" id="1238" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2320,556 +2320,556 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<COMPONENT type="301" id="1104" >
+<COMPONENT type="301" id="1258" >
 <cdparam x="472" y="75" />
 <sizeparam width="104" height="15" minWidth="20" minHeight="10" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="UML Note" value="Activity1.docx
 " />
-<TGConnectingPoint num="0" id="1088" />
-<TGConnectingPoint num="1" id="1089" />
-<TGConnectingPoint num="2" id="1090" />
-<TGConnectingPoint num="3" id="1091" />
-<TGConnectingPoint num="4" id="1092" />
-<TGConnectingPoint num="5" id="1093" />
-<TGConnectingPoint num="6" id="1094" />
-<TGConnectingPoint num="7" id="1095" />
-<TGConnectingPoint num="8" id="1096" />
-<TGConnectingPoint num="9" id="1097" />
-<TGConnectingPoint num="10" id="1098" />
-<TGConnectingPoint num="11" id="1099" />
-<TGConnectingPoint num="12" id="1100" />
-<TGConnectingPoint num="13" id="1101" />
-<TGConnectingPoint num="14" id="1102" />
-<TGConnectingPoint num="15" id="1103" />
+<TGConnectingPoint num="0" id="1242" />
+<TGConnectingPoint num="1" id="1243" />
+<TGConnectingPoint num="2" id="1244" />
+<TGConnectingPoint num="3" id="1245" />
+<TGConnectingPoint num="4" id="1246" />
+<TGConnectingPoint num="5" id="1247" />
+<TGConnectingPoint num="6" id="1248" />
+<TGConnectingPoint num="7" id="1249" />
+<TGConnectingPoint num="8" id="1250" />
+<TGConnectingPoint num="9" id="1251" />
+<TGConnectingPoint num="10" id="1252" />
+<TGConnectingPoint num="11" id="1253" />
+<TGConnectingPoint num="12" id="1254" />
+<TGConnectingPoint num="13" id="1255" />
+<TGConnectingPoint num="14" id="1256" />
+<TGConnectingPoint num="15" id="1257" />
 <extraparam>
 <Line value="Activity1.docx" />
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5104" id="1115" >
+<COMPONENT type="5104" id="1269" >
 <cdparam x="265" y="141" />
 <sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="Receive signal" value="getCoin(x)" />
-<TGConnectingPoint num="0" id="1105" />
-<TGConnectingPoint num="1" id="1106" />
-<TGConnectingPoint num="2" id="1107" />
-<TGConnectingPoint num="3" id="1108" />
-<TGConnectingPoint num="4" id="1109" />
-<TGConnectingPoint num="5" id="1110" />
-<TGConnectingPoint num="6" id="1111" />
-<TGConnectingPoint num="7" id="1112" />
-<TGConnectingPoint num="8" id="1113" />
-<TGConnectingPoint num="9" id="1114" />
+<TGConnectingPoint num="0" id="1259" />
+<TGConnectingPoint num="1" id="1260" />
+<TGConnectingPoint num="2" id="1261" />
+<TGConnectingPoint num="3" id="1262" />
+<TGConnectingPoint num="4" id="1263" />
+<TGConnectingPoint num="5" id="1264" />
+<TGConnectingPoint num="6" id="1265" />
+<TGConnectingPoint num="7" id="1266" />
+<TGConnectingPoint num="8" id="1267" />
+<TGConnectingPoint num="9" id="1268" />
 </COMPONENT>
 
-<COMPONENT type="5103" id="1126" >
+<COMPONENT type="5103" id="1280" >
 <cdparam x="629" y="321" />
 <sizeparam width="141" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
-<TGConnectingPoint num="0" id="1116" />
-<TGConnectingPoint num="1" id="1117" />
-<TGConnectingPoint num="2" id="1118" />
-<TGConnectingPoint num="3" id="1119" />
-<TGConnectingPoint num="4" id="1120" />
-<TGConnectingPoint num="5" id="1121" />
-<TGConnectingPoint num="6" id="1122" />
-<TGConnectingPoint num="7" id="1123" />
-<TGConnectingPoint num="8" id="1124" />
-<TGConnectingPoint num="9" id="1125" />
+<TGConnectingPoint num="0" id="1270" />
+<TGConnectingPoint num="1" id="1271" />
+<TGConnectingPoint num="2" id="1272" />
+<TGConnectingPoint num="3" id="1273" />
+<TGConnectingPoint num="4" id="1274" />
+<TGConnectingPoint num="5" id="1275" />
+<TGConnectingPoint num="6" id="1276" />
+<TGConnectingPoint num="7" id="1277" />
+<TGConnectingPoint num="8" id="1278" />
+<TGConnectingPoint num="9" id="1279" />
 </COMPONENT>
 
-<COMPONENT type="5104" id="1137" >
+<COMPONENT type="5104" id="1291" >
 <cdparam x="236" y="280" />
 <sizeparam width="82" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="Receive signal" value="getCoin(x)" />
-<TGConnectingPoint num="0" id="1127" />
-<TGConnectingPoint num="1" id="1128" />
-<TGConnectingPoint num="2" id="1129" />
-<TGConnectingPoint num="3" id="1130" />
-<TGConnectingPoint num="4" id="1131" />
-<TGConnectingPoint num="5" id="1132" />
-<TGConnectingPoint num="6" id="1133" />
-<TGConnectingPoint num="7" id="1134" />
-<TGConnectingPoint num="8" id="1135" />
-<TGConnectingPoint num="9" id="1136" />
+<TGConnectingPoint num="0" id="1281" />
+<TGConnectingPoint num="1" id="1282" />
+<TGConnectingPoint num="2" id="1283" />
+<TGConnectingPoint num="3" id="1284" />
+<TGConnectingPoint num="4" id="1285" />
+<TGConnectingPoint num="5" id="1286" />
+<TGConnectingPoint num="6" id="1287" />
+<TGConnectingPoint num="7" id="1288" />
+<TGConnectingPoint num="8" id="1289" />
+<TGConnectingPoint num="9" id="1290" />
 <accessibility />
 </COMPONENT>
 
-<COMPONENT type="5106" id="1178" >
+<COMPONENT type="5106" id="1332" >
 <cdparam x="649" y="239" />
 <sizeparam width="100" height="50" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="ejectState" />
-<TGConnectingPoint num="0" id="1138" />
-<TGConnectingPoint num="1" id="1139" />
-<TGConnectingPoint num="2" id="1140" />
-<TGConnectingPoint num="3" id="1141" />
-<TGConnectingPoint num="4" id="1142" />
-<TGConnectingPoint num="5" id="1143" />
-<TGConnectingPoint num="6" id="1144" />
-<TGConnectingPoint num="7" id="1145" />
-<TGConnectingPoint num="8" id="1146" />
-<TGConnectingPoint num="9" id="1147" />
-<TGConnectingPoint num="10" id="1148" />
-<TGConnectingPoint num="11" id="1149" />
-<TGConnectingPoint num="12" id="1150" />
-<TGConnectingPoint num="13" id="1151" />
-<TGConnectingPoint num="14" id="1152" />
-<TGConnectingPoint num="15" id="1153" />
-<TGConnectingPoint num="16" id="1154" />
-<TGConnectingPoint num="17" id="1155" />
-<TGConnectingPoint num="18" id="1156" />
-<TGConnectingPoint num="19" id="1157" />
-<TGConnectingPoint num="20" id="1158" />
-<TGConnectingPoint num="21" id="1159" />
-<TGConnectingPoint num="22" id="1160" />
-<TGConnectingPoint num="23" id="1161" />
-<TGConnectingPoint num="24" id="1162" />
-<TGConnectingPoint num="25" id="1163" />
-<TGConnectingPoint num="26" id="1164" />
-<TGConnectingPoint num="27" id="1165" />
-<TGConnectingPoint num="28" id="1166" />
-<TGConnectingPoint num="29" id="1167" />
-<TGConnectingPoint num="30" id="1168" />
-<TGConnectingPoint num="31" id="1169" />
-<TGConnectingPoint num="32" id="1170" />
-<TGConnectingPoint num="33" id="1171" />
-<TGConnectingPoint num="34" id="1172" />
-<TGConnectingPoint num="35" id="1173" />
-<TGConnectingPoint num="36" id="1174" />
-<TGConnectingPoint num="37" id="1175" />
-<TGConnectingPoint num="38" id="1176" />
-<TGConnectingPoint num="39" id="1177" />
+<TGConnectingPoint num="0" id="1292" />
+<TGConnectingPoint num="1" id="1293" />
+<TGConnectingPoint num="2" id="1294" />
+<TGConnectingPoint num="3" id="1295" />
+<TGConnectingPoint num="4" id="1296" />
+<TGConnectingPoint num="5" id="1297" />
+<TGConnectingPoint num="6" id="1298" />
+<TGConnectingPoint num="7" id="1299" />
+<TGConnectingPoint num="8" id="1300" />
+<TGConnectingPoint num="9" id="1301" />
+<TGConnectingPoint num="10" id="1302" />
+<TGConnectingPoint num="11" id="1303" />
+<TGConnectingPoint num="12" id="1304" />
+<TGConnectingPoint num="13" id="1305" />
+<TGConnectingPoint num="14" id="1306" />
+<TGConnectingPoint num="15" id="1307" />
+<TGConnectingPoint num="16" id="1308" />
+<TGConnectingPoint num="17" id="1309" />
+<TGConnectingPoint num="18" id="1310" />
+<TGConnectingPoint num="19" id="1311" />
+<TGConnectingPoint num="20" id="1312" />
+<TGConnectingPoint num="21" id="1313" />
+<TGConnectingPoint num="22" id="1314" />
+<TGConnectingPoint num="23" id="1315" />
+<TGConnectingPoint num="24" id="1316" />
+<TGConnectingPoint num="25" id="1317" />
+<TGConnectingPoint num="26" id="1318" />
+<TGConnectingPoint num="27" id="1319" />
+<TGConnectingPoint num="28" id="1320" />
+<TGConnectingPoint num="29" id="1321" />
+<TGConnectingPoint num="30" id="1322" />
+<TGConnectingPoint num="31" id="1323" />
+<TGConnectingPoint num="32" id="1324" />
+<TGConnectingPoint num="33" id="1325" />
+<TGConnectingPoint num="34" id="1326" />
+<TGConnectingPoint num="35" id="1327" />
+<TGConnectingPoint num="36" id="1328" />
+<TGConnectingPoint num="37" id="1329" />
+<TGConnectingPoint num="38" id="1330" />
+<TGConnectingPoint num="39" id="1331" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1219" >
+<COMPONENT type="5106" id="1373" >
 <cdparam x="231" y="188" />
 <sizeparam width="157" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="WaitingForSecondCoin" />
-<TGConnectingPoint num="0" id="1179" />
-<TGConnectingPoint num="1" id="1180" />
-<TGConnectingPoint num="2" id="1181" />
-<TGConnectingPoint num="3" id="1182" />
-<TGConnectingPoint num="4" id="1183" />
-<TGConnectingPoint num="5" id="1184" />
-<TGConnectingPoint num="6" id="1185" />
-<TGConnectingPoint num="7" id="1186" />
-<TGConnectingPoint num="8" id="1187" />
-<TGConnectingPoint num="9" id="1188" />
-<TGConnectingPoint num="10" id="1189" />
-<TGConnectingPoint num="11" id="1190" />
-<TGConnectingPoint num="12" id="1191" />
-<TGConnectingPoint num="13" id="1192" />
-<TGConnectingPoint num="14" id="1193" />
-<TGConnectingPoint num="15" id="1194" />
-<TGConnectingPoint num="16" id="1195" />
-<TGConnectingPoint num="17" id="1196" />
-<TGConnectingPoint num="18" id="1197" />
-<TGConnectingPoint num="19" id="1198" />
-<TGConnectingPoint num="20" id="1199" />
-<TGConnectingPoint num="21" id="1200" />
-<TGConnectingPoint num="22" id="1201" />
-<TGConnectingPoint num="23" id="1202" />
-<TGConnectingPoint num="24" id="1203" />
-<TGConnectingPoint num="25" id="1204" />
-<TGConnectingPoint num="26" id="1205" />
-<TGConnectingPoint num="27" id="1206" />
-<TGConnectingPoint num="28" id="1207" />
-<TGConnectingPoint num="29" id="1208" />
-<TGConnectingPoint num="30" id="1209" />
-<TGConnectingPoint num="31" id="1210" />
-<TGConnectingPoint num="32" id="1211" />
-<TGConnectingPoint num="33" id="1212" />
-<TGConnectingPoint num="34" id="1213" />
-<TGConnectingPoint num="35" id="1214" />
-<TGConnectingPoint num="36" id="1215" />
-<TGConnectingPoint num="37" id="1216" />
-<TGConnectingPoint num="38" id="1217" />
-<TGConnectingPoint num="39" id="1218" />
+<TGConnectingPoint num="0" id="1333" />
+<TGConnectingPoint num="1" id="1334" />
+<TGConnectingPoint num="2" id="1335" />
+<TGConnectingPoint num="3" id="1336" />
+<TGConnectingPoint num="4" id="1337" />
+<TGConnectingPoint num="5" id="1338" />
+<TGConnectingPoint num="6" id="1339" />
+<TGConnectingPoint num="7" id="1340" />
+<TGConnectingPoint num="8" id="1341" />
+<TGConnectingPoint num="9" id="1342" />
+<TGConnectingPoint num="10" id="1343" />
+<TGConnectingPoint num="11" id="1344" />
+<TGConnectingPoint num="12" id="1345" />
+<TGConnectingPoint num="13" id="1346" />
+<TGConnectingPoint num="14" id="1347" />
+<TGConnectingPoint num="15" id="1348" />
+<TGConnectingPoint num="16" id="1349" />
+<TGConnectingPoint num="17" id="1350" />
+<TGConnectingPoint num="18" id="1351" />
+<TGConnectingPoint num="19" id="1352" />
+<TGConnectingPoint num="20" id="1353" />
+<TGConnectingPoint num="21" id="1354" />
+<TGConnectingPoint num="22" id="1355" />
+<TGConnectingPoint num="23" id="1356" />
+<TGConnectingPoint num="24" id="1357" />
+<TGConnectingPoint num="25" id="1358" />
+<TGConnectingPoint num="26" id="1359" />
+<TGConnectingPoint num="27" id="1360" />
+<TGConnectingPoint num="28" id="1361" />
+<TGConnectingPoint num="29" id="1362" />
+<TGConnectingPoint num="30" id="1363" />
+<TGConnectingPoint num="31" id="1364" />
+<TGConnectingPoint num="32" id="1365" />
+<TGConnectingPoint num="33" id="1366" />
+<TGConnectingPoint num="34" id="1367" />
+<TGConnectingPoint num="35" id="1368" />
+<TGConnectingPoint num="36" id="1369" />
+<TGConnectingPoint num="37" id="1370" />
+<TGConnectingPoint num="38" id="1371" />
+<TGConnectingPoint num="39" id="1372" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5100" id="1221" >
+<COMPONENT type="5100" id="1375" >
 <cdparam x="296" y="20" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="1220" />
+<TGConnectingPoint num="0" id="1374" />
 </COMPONENT>
 
-<COMPONENT type="5106" id="1262" >
+<COMPONENT type="5106" id="1416" >
 <cdparam x="192" y="62" />
 <sizeparam width="220" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="WaitingForFirstCoin" />
-<TGConnectingPoint num="0" id="1222" />
-<TGConnectingPoint num="1" id="1223" />
-<TGConnectingPoint num="2" id="1224" />
-<TGConnectingPoint num="3" id="1225" />
-<TGConnectingPoint num="4" id="1226" />
-<TGConnectingPoint num="5" id="1227" />
-<TGConnectingPoint num="6" id="1228" />
-<TGConnectingPoint num="7" id="1229" />
-<TGConnectingPoint num="8" id="1230" />
-<TGConnectingPoint num="9" id="1231" />
-<TGConnectingPoint num="10" id="1232" />
-<TGConnectingPoint num="11" id="1233" />
-<TGConnectingPoint num="12" id="1234" />
-<TGConnectingPoint num="13" id="1235" />
-<TGConnectingPoint num="14" id="1236" />
-<TGConnectingPoint num="15" id="1237" />
-<TGConnectingPoint num="16" id="1238" />
-<TGConnectingPoint num="17" id="1239" />
-<TGConnectingPoint num="18" id="1240" />
-<TGConnectingPoint num="19" id="1241" />
-<TGConnectingPoint num="20" id="1242" />
-<TGConnectingPoint num="21" id="1243" />
-<TGConnectingPoint num="22" id="1244" />
-<TGConnectingPoint num="23" id="1245" />
-<TGConnectingPoint num="24" id="1246" />
-<TGConnectingPoint num="25" id="1247" />
-<TGConnectingPoint num="26" id="1248" />
-<TGConnectingPoint num="27" id="1249" />
-<TGConnectingPoint num="28" id="1250" />
-<TGConnectingPoint num="29" id="1251" />
-<TGConnectingPoint num="30" id="1252" />
-<TGConnectingPoint num="31" id="1253" />
-<TGConnectingPoint num="32" id="1254" />
-<TGConnectingPoint num="33" id="1255" />
-<TGConnectingPoint num="34" id="1256" />
-<TGConnectingPoint num="35" id="1257" />
-<TGConnectingPoint num="36" id="1258" />
-<TGConnectingPoint num="37" id="1259" />
-<TGConnectingPoint num="38" id="1260" />
-<TGConnectingPoint num="39" id="1261" />
+<TGConnectingPoint num="0" id="1376" />
+<TGConnectingPoint num="1" id="1377" />
+<TGConnectingPoint num="2" id="1378" />
+<TGConnectingPoint num="3" id="1379" />
+<TGConnectingPoint num="4" id="1380" />
+<TGConnectingPoint num="5" id="1381" />
+<TGConnectingPoint num="6" id="1382" />
+<TGConnectingPoint num="7" id="1383" />
+<TGConnectingPoint num="8" id="1384" />
+<TGConnectingPoint num="9" id="1385" />
+<TGConnectingPoint num="10" id="1386" />
+<TGConnectingPoint num="11" id="1387" />
+<TGConnectingPoint num="12" id="1388" />
+<TGConnectingPoint num="13" id="1389" />
+<TGConnectingPoint num="14" id="1390" />
+<TGConnectingPoint num="15" id="1391" />
+<TGConnectingPoint num="16" id="1392" />
+<TGConnectingPoint num="17" id="1393" />
+<TGConnectingPoint num="18" id="1394" />
+<TGConnectingPoint num="19" id="1395" />
+<TGConnectingPoint num="20" id="1396" />
+<TGConnectingPoint num="21" id="1397" />
+<TGConnectingPoint num="22" id="1398" />
+<TGConnectingPoint num="23" id="1399" />
+<TGConnectingPoint num="24" id="1400" />
+<TGConnectingPoint num="25" id="1401" />
+<TGConnectingPoint num="26" id="1402" />
+<TGConnectingPoint num="27" id="1403" />
+<TGConnectingPoint num="28" id="1404" />
+<TGConnectingPoint num="29" id="1405" />
+<TGConnectingPoint num="30" id="1406" />
+<TGConnectingPoint num="31" id="1407" />
+<TGConnectingPoint num="32" id="1408" />
+<TGConnectingPoint num="33" id="1409" />
+<TGConnectingPoint num="34" id="1410" />
+<TGConnectingPoint num="35" id="1411" />
+<TGConnectingPoint num="36" id="1412" />
+<TGConnectingPoint num="37" id="1413" />
+<TGConnectingPoint num="38" id="1414" />
+<TGConnectingPoint num="39" id="1415" />
 <latencyCheck />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1303" >
+<COMPONENT type="5106" id="1457" >
 <cdparam x="221" y="748" />
 <sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="WaitingForFirstCoin" />
-<TGConnectingPoint num="0" id="1263" />
-<TGConnectingPoint num="1" id="1264" />
-<TGConnectingPoint num="2" id="1265" />
-<TGConnectingPoint num="3" id="1266" />
-<TGConnectingPoint num="4" id="1267" />
-<TGConnectingPoint num="5" id="1268" />
-<TGConnectingPoint num="6" id="1269" />
-<TGConnectingPoint num="7" id="1270" />
-<TGConnectingPoint num="8" id="1271" />
-<TGConnectingPoint num="9" id="1272" />
-<TGConnectingPoint num="10" id="1273" />
-<TGConnectingPoint num="11" id="1274" />
-<TGConnectingPoint num="12" id="1275" />
-<TGConnectingPoint num="13" id="1276" />
-<TGConnectingPoint num="14" id="1277" />
-<TGConnectingPoint num="15" id="1278" />
-<TGConnectingPoint num="16" id="1279" />
-<TGConnectingPoint num="17" id="1280" />
-<TGConnectingPoint num="18" id="1281" />
-<TGConnectingPoint num="19" id="1282" />
-<TGConnectingPoint num="20" id="1283" />
-<TGConnectingPoint num="21" id="1284" />
-<TGConnectingPoint num="22" id="1285" />
-<TGConnectingPoint num="23" id="1286" />
-<TGConnectingPoint num="24" id="1287" />
-<TGConnectingPoint num="25" id="1288" />
-<TGConnectingPoint num="26" id="1289" />
-<TGConnectingPoint num="27" id="1290" />
-<TGConnectingPoint num="28" id="1291" />
-<TGConnectingPoint num="29" id="1292" />
-<TGConnectingPoint num="30" id="1293" />
-<TGConnectingPoint num="31" id="1294" />
-<TGConnectingPoint num="32" id="1295" />
-<TGConnectingPoint num="33" id="1296" />
-<TGConnectingPoint num="34" id="1297" />
-<TGConnectingPoint num="35" id="1298" />
-<TGConnectingPoint num="36" id="1299" />
-<TGConnectingPoint num="37" id="1300" />
-<TGConnectingPoint num="38" id="1301" />
-<TGConnectingPoint num="39" id="1302" />
+<TGConnectingPoint num="0" id="1417" />
+<TGConnectingPoint num="1" id="1418" />
+<TGConnectingPoint num="2" id="1419" />
+<TGConnectingPoint num="3" id="1420" />
+<TGConnectingPoint num="4" id="1421" />
+<TGConnectingPoint num="5" id="1422" />
+<TGConnectingPoint num="6" id="1423" />
+<TGConnectingPoint num="7" id="1424" />
+<TGConnectingPoint num="8" id="1425" />
+<TGConnectingPoint num="9" id="1426" />
+<TGConnectingPoint num="10" id="1427" />
+<TGConnectingPoint num="11" id="1428" />
+<TGConnectingPoint num="12" id="1429" />
+<TGConnectingPoint num="13" id="1430" />
+<TGConnectingPoint num="14" id="1431" />
+<TGConnectingPoint num="15" id="1432" />
+<TGConnectingPoint num="16" id="1433" />
+<TGConnectingPoint num="17" id="1434" />
+<TGConnectingPoint num="18" id="1435" />
+<TGConnectingPoint num="19" id="1436" />
+<TGConnectingPoint num="20" id="1437" />
+<TGConnectingPoint num="21" id="1438" />
+<TGConnectingPoint num="22" id="1439" />
+<TGConnectingPoint num="23" id="1440" />
+<TGConnectingPoint num="24" id="1441" />
+<TGConnectingPoint num="25" id="1442" />
+<TGConnectingPoint num="26" id="1443" />
+<TGConnectingPoint num="27" id="1444" />
+<TGConnectingPoint num="28" id="1445" />
+<TGConnectingPoint num="29" id="1446" />
+<TGConnectingPoint num="30" id="1447" />
+<TGConnectingPoint num="31" id="1448" />
+<TGConnectingPoint num="32" id="1449" />
+<TGConnectingPoint num="33" id="1450" />
+<TGConnectingPoint num="34" id="1451" />
+<TGConnectingPoint num="35" id="1452" />
+<TGConnectingPoint num="36" id="1453" />
+<TGConnectingPoint num="37" id="1454" />
+<TGConnectingPoint num="38" id="1455" />
+<TGConnectingPoint num="39" id="1456" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1344" >
+<COMPONENT type="5106" id="1498" >
 <cdparam x="631" y="381" />
 <sizeparam width="137" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="WaitingForFirstCoin" />
-<TGConnectingPoint num="0" id="1304" />
-<TGConnectingPoint num="1" id="1305" />
-<TGConnectingPoint num="2" id="1306" />
-<TGConnectingPoint num="3" id="1307" />
-<TGConnectingPoint num="4" id="1308" />
-<TGConnectingPoint num="5" id="1309" />
-<TGConnectingPoint num="6" id="1310" />
-<TGConnectingPoint num="7" id="1311" />
-<TGConnectingPoint num="8" id="1312" />
-<TGConnectingPoint num="9" id="1313" />
-<TGConnectingPoint num="10" id="1314" />
-<TGConnectingPoint num="11" id="1315" />
-<TGConnectingPoint num="12" id="1316" />
-<TGConnectingPoint num="13" id="1317" />
-<TGConnectingPoint num="14" id="1318" />
-<TGConnectingPoint num="15" id="1319" />
-<TGConnectingPoint num="16" id="1320" />
-<TGConnectingPoint num="17" id="1321" />
-<TGConnectingPoint num="18" id="1322" />
-<TGConnectingPoint num="19" id="1323" />
-<TGConnectingPoint num="20" id="1324" />
-<TGConnectingPoint num="21" id="1325" />
-<TGConnectingPoint num="22" id="1326" />
-<TGConnectingPoint num="23" id="1327" />
-<TGConnectingPoint num="24" id="1328" />
-<TGConnectingPoint num="25" id="1329" />
-<TGConnectingPoint num="26" id="1330" />
-<TGConnectingPoint num="27" id="1331" />
-<TGConnectingPoint num="28" id="1332" />
-<TGConnectingPoint num="29" id="1333" />
-<TGConnectingPoint num="30" id="1334" />
-<TGConnectingPoint num="31" id="1335" />
-<TGConnectingPoint num="32" id="1336" />
-<TGConnectingPoint num="33" id="1337" />
-<TGConnectingPoint num="34" id="1338" />
-<TGConnectingPoint num="35" id="1339" />
-<TGConnectingPoint num="36" id="1340" />
-<TGConnectingPoint num="37" id="1341" />
-<TGConnectingPoint num="38" id="1342" />
-<TGConnectingPoint num="39" id="1343" />
+<TGConnectingPoint num="0" id="1458" />
+<TGConnectingPoint num="1" id="1459" />
+<TGConnectingPoint num="2" id="1460" />
+<TGConnectingPoint num="3" id="1461" />
+<TGConnectingPoint num="4" id="1462" />
+<TGConnectingPoint num="5" id="1463" />
+<TGConnectingPoint num="6" id="1464" />
+<TGConnectingPoint num="7" id="1465" />
+<TGConnectingPoint num="8" id="1466" />
+<TGConnectingPoint num="9" id="1467" />
+<TGConnectingPoint num="10" id="1468" />
+<TGConnectingPoint num="11" id="1469" />
+<TGConnectingPoint num="12" id="1470" />
+<TGConnectingPoint num="13" id="1471" />
+<TGConnectingPoint num="14" id="1472" />
+<TGConnectingPoint num="15" id="1473" />
+<TGConnectingPoint num="16" id="1474" />
+<TGConnectingPoint num="17" id="1475" />
+<TGConnectingPoint num="18" id="1476" />
+<TGConnectingPoint num="19" id="1477" />
+<TGConnectingPoint num="20" id="1478" />
+<TGConnectingPoint num="21" id="1479" />
+<TGConnectingPoint num="22" id="1480" />
+<TGConnectingPoint num="23" id="1481" />
+<TGConnectingPoint num="24" id="1482" />
+<TGConnectingPoint num="25" id="1483" />
+<TGConnectingPoint num="26" id="1484" />
+<TGConnectingPoint num="27" id="1485" />
+<TGConnectingPoint num="28" id="1486" />
+<TGConnectingPoint num="29" id="1487" />
+<TGConnectingPoint num="30" id="1488" />
+<TGConnectingPoint num="31" id="1489" />
+<TGConnectingPoint num="32" id="1490" />
+<TGConnectingPoint num="33" id="1491" />
+<TGConnectingPoint num="34" id="1492" />
+<TGConnectingPoint num="35" id="1493" />
+<TGConnectingPoint num="36" id="1494" />
+<TGConnectingPoint num="37" id="1495" />
+<TGConnectingPoint num="38" id="1496" />
+<TGConnectingPoint num="39" id="1497" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1461" >
+<COMPONENT type="5106" id="1615" >
 <cdparam x="23" y="372" />
 <sizeparam width="577" height="354" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="1400" />
 <infoparam name="state0" value="Beverage" />
-<TGConnectingPoint num="0" id="1421" />
-<TGConnectingPoint num="1" id="1422" />
-<TGConnectingPoint num="2" id="1423" />
-<TGConnectingPoint num="3" id="1424" />
-<TGConnectingPoint num="4" id="1425" />
-<TGConnectingPoint num="5" id="1426" />
-<TGConnectingPoint num="6" id="1427" />
-<TGConnectingPoint num="7" id="1428" />
-<TGConnectingPoint num="8" id="1429" />
-<TGConnectingPoint num="9" id="1430" />
-<TGConnectingPoint num="10" id="1431" />
-<TGConnectingPoint num="11" id="1432" />
-<TGConnectingPoint num="12" id="1433" />
-<TGConnectingPoint num="13" id="1434" />
-<TGConnectingPoint num="14" id="1435" />
-<TGConnectingPoint num="15" id="1436" />
-<TGConnectingPoint num="16" id="1437" />
-<TGConnectingPoint num="17" id="1438" />
-<TGConnectingPoint num="18" id="1439" />
-<TGConnectingPoint num="19" id="1440" />
-<TGConnectingPoint num="20" id="1441" />
-<TGConnectingPoint num="21" id="1442" />
-<TGConnectingPoint num="22" id="1443" />
-<TGConnectingPoint num="23" id="1444" />
-<TGConnectingPoint num="24" id="1445" />
-<TGConnectingPoint num="25" id="1446" />
-<TGConnectingPoint num="26" id="1447" />
-<TGConnectingPoint num="27" id="1448" />
-<TGConnectingPoint num="28" id="1449" />
-<TGConnectingPoint num="29" id="1450" />
-<TGConnectingPoint num="30" id="1451" />
-<TGConnectingPoint num="31" id="1452" />
-<TGConnectingPoint num="32" id="1453" />
-<TGConnectingPoint num="33" id="1454" />
-<TGConnectingPoint num="34" id="1455" />
-<TGConnectingPoint num="35" id="1456" />
-<TGConnectingPoint num="36" id="1457" />
-<TGConnectingPoint num="37" id="1458" />
-<TGConnectingPoint num="38" id="1459" />
-<TGConnectingPoint num="39" id="1460" />
+<TGConnectingPoint num="0" id="1575" />
+<TGConnectingPoint num="1" id="1576" />
+<TGConnectingPoint num="2" id="1577" />
+<TGConnectingPoint num="3" id="1578" />
+<TGConnectingPoint num="4" id="1579" />
+<TGConnectingPoint num="5" id="1580" />
+<TGConnectingPoint num="6" id="1581" />
+<TGConnectingPoint num="7" id="1582" />
+<TGConnectingPoint num="8" id="1583" />
+<TGConnectingPoint num="9" id="1584" />
+<TGConnectingPoint num="10" id="1585" />
+<TGConnectingPoint num="11" id="1586" />
+<TGConnectingPoint num="12" id="1587" />
+<TGConnectingPoint num="13" id="1588" />
+<TGConnectingPoint num="14" id="1589" />
+<TGConnectingPoint num="15" id="1590" />
+<TGConnectingPoint num="16" id="1591" />
+<TGConnectingPoint num="17" id="1592" />
+<TGConnectingPoint num="18" id="1593" />
+<TGConnectingPoint num="19" id="1594" />
+<TGConnectingPoint num="20" id="1595" />
+<TGConnectingPoint num="21" id="1596" />
+<TGConnectingPoint num="22" id="1597" />
+<TGConnectingPoint num="23" id="1598" />
+<TGConnectingPoint num="24" id="1599" />
+<TGConnectingPoint num="25" id="1600" />
+<TGConnectingPoint num="26" id="1601" />
+<TGConnectingPoint num="27" id="1602" />
+<TGConnectingPoint num="28" id="1603" />
+<TGConnectingPoint num="29" id="1604" />
+<TGConnectingPoint num="30" id="1605" />
+<TGConnectingPoint num="31" id="1606" />
+<TGConnectingPoint num="32" id="1607" />
+<TGConnectingPoint num="33" id="1608" />
+<TGConnectingPoint num="34" id="1609" />
+<TGConnectingPoint num="35" id="1610" />
+<TGConnectingPoint num="36" id="1611" />
+<TGConnectingPoint num="37" id="1612" />
+<TGConnectingPoint num="38" id="1613" />
+<TGConnectingPoint num="39" id="1614" />
 <extraparam>
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5104" id="1355" >
-<father id="1461" num="0" />
-<cdparam x="236" y="529" />
-<sizeparam width="124" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5103" id="1509" >
+<father id="1615" num="0" />
+<cdparam x="372" y="502" />
+<sizeparam width="141" height="20" minWidth="30" minHeight="1" 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()" />
-<TGConnectingPoint num="0" id="1345" />
-<TGConnectingPoint num="1" id="1346" />
-<TGConnectingPoint num="2" id="1347" />
-<TGConnectingPoint num="3" id="1348" />
-<TGConnectingPoint num="4" id="1349" />
-<TGConnectingPoint num="5" id="1350" />
-<TGConnectingPoint num="6" id="1351" />
-<TGConnectingPoint num="7" id="1352" />
-<TGConnectingPoint num="8" id="1353" />
-<TGConnectingPoint num="9" id="1354" />
+<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" />
+<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
+<TGConnectingPoint num="0" id="1499" />
+<TGConnectingPoint num="1" id="1500" />
+<TGConnectingPoint num="2" id="1501" />
+<TGConnectingPoint num="3" id="1502" />
+<TGConnectingPoint num="4" id="1503" />
+<TGConnectingPoint num="5" id="1504" />
+<TGConnectingPoint num="6" id="1505" />
+<TGConnectingPoint num="7" id="1506" />
+<TGConnectingPoint num="8" id="1507" />
+<TGConnectingPoint num="9" id="1508" />
 <accessibility />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5106" id="1396" >
-<father id="1461" num="1" />
-<cdparam x="194" y="437" />
-<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5104" id="1520" >
+<father id="1615" num="1" />
+<cdparam x="56" y="529" />
+<sizeparam width="141" 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" />
-<TGConnectingPoint num="0" id="1356" />
-<TGConnectingPoint num="1" id="1357" />
-<TGConnectingPoint num="2" id="1358" />
-<TGConnectingPoint num="3" id="1359" />
-<TGConnectingPoint num="4" id="1360" />
-<TGConnectingPoint num="5" id="1361" />
-<TGConnectingPoint num="6" id="1362" />
-<TGConnectingPoint num="7" id="1363" />
-<TGConnectingPoint num="8" id="1364" />
-<TGConnectingPoint num="9" id="1365" />
-<TGConnectingPoint num="10" id="1366" />
-<TGConnectingPoint num="11" id="1367" />
-<TGConnectingPoint num="12" id="1368" />
-<TGConnectingPoint num="13" id="1369" />
-<TGConnectingPoint num="14" id="1370" />
-<TGConnectingPoint num="15" id="1371" />
-<TGConnectingPoint num="16" id="1372" />
-<TGConnectingPoint num="17" id="1373" />
-<TGConnectingPoint num="18" id="1374" />
-<TGConnectingPoint num="19" id="1375" />
-<TGConnectingPoint num="20" id="1376" />
-<TGConnectingPoint num="21" id="1377" />
-<TGConnectingPoint num="22" id="1378" />
-<TGConnectingPoint num="23" id="1379" />
-<TGConnectingPoint num="24" id="1380" />
-<TGConnectingPoint num="25" id="1381" />
-<TGConnectingPoint num="26" id="1382" />
-<TGConnectingPoint num="27" id="1383" />
-<TGConnectingPoint num="28" id="1384" />
-<TGConnectingPoint num="29" id="1385" />
-<TGConnectingPoint num="30" id="1386" />
-<TGConnectingPoint num="31" id="1387" />
-<TGConnectingPoint num="32" id="1388" />
-<TGConnectingPoint num="33" id="1389" />
-<TGConnectingPoint num="34" id="1390" />
-<TGConnectingPoint num="35" id="1391" />
-<TGConnectingPoint num="36" id="1392" />
-<TGConnectingPoint num="37" id="1393" />
-<TGConnectingPoint num="38" id="1394" />
-<TGConnectingPoint num="39" id="1395" />
-<latencyCheck />
-<extraparam>
-</extraparam>
+<cdrectangleparam minX="0" maxX="450" minY="0" maxY="334" />
+<infoparam name="Send signal" value="pushCoffeeButton()" />
+<TGConnectingPoint num="0" id="1510" />
+<TGConnectingPoint num="1" id="1511" />
+<TGConnectingPoint num="2" id="1512" />
+<TGConnectingPoint num="3" id="1513" />
+<TGConnectingPoint num="4" id="1514" />
+<TGConnectingPoint num="5" id="1515" />
+<TGConnectingPoint num="6" id="1516" />
+<TGConnectingPoint num="7" id="1517" />
+<TGConnectingPoint num="8" id="1518" />
+<TGConnectingPoint num="9" id="1519" />
+<accessibility />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5100" id="1398" >
-<father id="1461" num="2" />
+<SUBCOMPONENT type="5100" id="1522" >
+<father id="1615" 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" />
-<TGConnectingPoint num="0" id="1397" />
+<TGConnectingPoint num="0" id="1521" />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5104" id="1409" >
-<father id="1461" num="3" />
-<cdparam x="56" y="529" />
-<sizeparam width="141" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5106" id="1563" >
+<father id="1615" num="3" />
+<cdparam x="194" y="437" />
+<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="450" minY="0" maxY="334" />
-<infoparam name="Send signal" value="pushCoffeeButton()" />
-<TGConnectingPoint num="0" id="1399" />
-<TGConnectingPoint num="1" id="1400" />
-<TGConnectingPoint num="2" id="1401" />
-<TGConnectingPoint num="3" id="1402" />
-<TGConnectingPoint num="4" id="1403" />
-<TGConnectingPoint num="5" id="1404" />
-<TGConnectingPoint num="6" id="1405" />
-<TGConnectingPoint num="7" id="1406" />
-<TGConnectingPoint num="8" id="1407" />
-<TGConnectingPoint num="9" id="1408" />
-<accessibility />
+<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" />
+<infoparam name="state0" value="WaitingForSelection" />
+<TGConnectingPoint num="0" id="1523" />
+<TGConnectingPoint num="1" id="1524" />
+<TGConnectingPoint num="2" id="1525" />
+<TGConnectingPoint num="3" id="1526" />
+<TGConnectingPoint num="4" id="1527" />
+<TGConnectingPoint num="5" id="1528" />
+<TGConnectingPoint num="6" id="1529" />
+<TGConnectingPoint num="7" id="1530" />
+<TGConnectingPoint num="8" id="1531" />
+<TGConnectingPoint num="9" id="1532" />
+<TGConnectingPoint num="10" id="1533" />
+<TGConnectingPoint num="11" id="1534" />
+<TGConnectingPoint num="12" id="1535" />
+<TGConnectingPoint num="13" id="1536" />
+<TGConnectingPoint num="14" id="1537" />
+<TGConnectingPoint num="15" id="1538" />
+<TGConnectingPoint num="16" id="1539" />
+<TGConnectingPoint num="17" id="1540" />
+<TGConnectingPoint num="18" id="1541" />
+<TGConnectingPoint num="19" id="1542" />
+<TGConnectingPoint num="20" id="1543" />
+<TGConnectingPoint num="21" id="1544" />
+<TGConnectingPoint num="22" id="1545" />
+<TGConnectingPoint num="23" id="1546" />
+<TGConnectingPoint num="24" id="1547" />
+<TGConnectingPoint num="25" id="1548" />
+<TGConnectingPoint num="26" id="1549" />
+<TGConnectingPoint num="27" id="1550" />
+<TGConnectingPoint num="28" id="1551" />
+<TGConnectingPoint num="29" id="1552" />
+<TGConnectingPoint num="30" id="1553" />
+<TGConnectingPoint num="31" id="1554" />
+<TGConnectingPoint num="32" id="1555" />
+<TGConnectingPoint num="33" id="1556" />
+<TGConnectingPoint num="34" id="1557" />
+<TGConnectingPoint num="35" id="1558" />
+<TGConnectingPoint num="36" id="1559" />
+<TGConnectingPoint num="37" id="1560" />
+<TGConnectingPoint num="38" id="1561" />
+<TGConnectingPoint num="39" id="1562" />
+<latencyCheck />
+<extraparam>
+</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5103" id="1420" >
-<father id="1461" num="4" />
-<cdparam x="372" y="502" />
-<sizeparam width="141" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<SUBCOMPONENT type="5104" id="1574" >
+<father id="1615" num="4" />
+<cdparam x="236" y="529" />
+<sizeparam width="124" height="20" minWidth="30" minHeight="1" 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)" />
-<TGConnectingPoint num="0" id="1410" />
-<TGConnectingPoint num="1" id="1411" />
-<TGConnectingPoint num="2" id="1412" />
-<TGConnectingPoint num="3" id="1413" />
-<TGConnectingPoint num="4" id="1414" />
-<TGConnectingPoint num="5" id="1415" />
-<TGConnectingPoint num="6" id="1416" />
-<TGConnectingPoint num="7" id="1417" />
-<TGConnectingPoint num="8" id="1418" />
-<TGConnectingPoint num="9" id="1419" />
+<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" />
+<infoparam name="Send signal" value="pushTeaButton()" />
+<TGConnectingPoint num="0" id="1564" />
+<TGConnectingPoint num="1" id="1565" />
+<TGConnectingPoint num="2" id="1566" />
+<TGConnectingPoint num="3" id="1567" />
+<TGConnectingPoint num="4" id="1568" />
+<TGConnectingPoint num="5" id="1569" />
+<TGConnectingPoint num="6" id="1570" />
+<TGConnectingPoint num="7" id="1571" />
+<TGConnectingPoint num="8" id="1572" />
+<TGConnectingPoint num="9" id="1573" />
 <accessibility />
 </SUBCOMPONENT>
 
 
 </AVATARStateMachineDiagramPanel>
 
-<AVATARStateMachineDiagramPanel name="TeaButton" minX="10" maxX="1400" minY="10" maxY="900" >
-<CONNECTOR type="5102" id="1468" >
-<cdparam x="363" y="193" />
+<AVATARStateMachineDiagramPanel name="CoffeeButton" minX="10" maxX="1400" minY="10" maxY="900" >
+<CONNECTOR type="5102" id="1622" >
+<cdparam x="177" y="199" />
 <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="1467" />
-<P1  x="363" y="204" id="1484" />
-<P2  x="362" y="257" id="1495" />
+<infoparam name="connector from start state to Send signal" value="null" />
+<TGConnectingPoint num="0" id="1621" />
+<P1  x="340" y="233" id="1728" />
+<P2  x="353" y="252" id="1730" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1466" >
-<father id="1468" num="0" />
-<cdparam x="380" y="228" />
-<sizeparam width="145" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1620" >
+<father id="1622" num="0" />
+<cdparam x="177" y="239" />
+<sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1462" />
-<TGConnectingPoint num="1" id="1463" />
-<TGConnectingPoint num="2" id="1464" />
-<TGConnectingPoint num="3" id="1465" />
+<TGConnectingPoint num="0" id="1616" />
+<TGConnectingPoint num="1" id="1617" />
+<TGConnectingPoint num="2" id="1618" />
+<TGConnectingPoint num="3" id="1619" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
-<afterMin value="mechanicalDelay" enabled="true"/>
+<afterMin value="" enabled="true"/>
 <afterMax value="" enabled="true"/>
 <computeMin value="" enabled="true"/>
 <computeMax value="" enabled="true"/>
@@ -2877,26 +2877,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1475" >
-<cdparam x="363" y="150" />
+<CONNECTOR type="5102" id="1629" >
+<cdparam x="322" y="69" />
 <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="1474" />
-<P1  x="363" y="150" id="1541" />
-<P2  x="363" y="174" id="1483" />
+<infoparam name="connector from start state to state0" value="null" />
+<TGConnectingPoint num="0" id="1628" />
+<P1  x="322" y="69" id="1726" />
+<P2  x="322" y="88" id="1686" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1473" >
-<father id="1475" num="0" />
-<cdparam x="363" y="190" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1627" >
+<father id="1629" num="0" />
+<cdparam x="322" y="109" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1469" />
-<TGConnectingPoint num="1" id="1470" />
-<TGConnectingPoint num="2" id="1471" />
-<TGConnectingPoint num="3" id="1472" />
+<TGConnectingPoint num="0" id="1623" />
+<TGConnectingPoint num="1" id="1624" />
+<TGConnectingPoint num="2" id="1625" />
+<TGConnectingPoint num="3" id="1626" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2907,26 +2907,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1482" >
-<cdparam x="362" y="101" />
+<CONNECTOR type="5102" id="1636" >
+<cdparam x="377" y="144" />
 <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="1481" />
-<P1  x="362" y="101" id="1576" />
-<P2  x="363" y="120" id="1536" />
+<infoparam name="connector from state0 to Send signal" value="null" />
+<TGConnectingPoint num="0" id="1635" />
+<P1  x="322" y="118" id="1691" />
+<P2  x="356" y="174" id="1742" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1480" >
-<father id="1482" num="0" />
-<cdparam x="362" y="141" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1634" >
+<father id="1636" num="0" />
+<cdparam x="377" y="184" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1476" />
-<TGConnectingPoint num="1" id="1477" />
-<TGConnectingPoint num="2" id="1478" />
-<TGConnectingPoint num="3" id="1479" />
+<TGConnectingPoint num="0" id="1630" />
+<TGConnectingPoint num="1" id="1631" />
+<TGConnectingPoint num="2" id="1632" />
+<TGConnectingPoint num="3" id="1633" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -2937,163 +2937,253 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<COMPONENT type="5103" id="1493" >
-<cdparam x="338" y="179" />
-<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<CONNECTOR type="5102" id="1643" >
+<cdparam x="377" y="187" />
+<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="1642" />
+<P1  x="353" y="282" id="1731" />
+<P2  x="399" y="352" id="1645" />
+<AutomaticDrawing  data="true" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1641" >
+<father id="1643" num="0" />
+<cdparam x="417" y="335" />
+<sizeparam width="145" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
-<infoparam name="Send signal" value="push()" />
-<TGConnectingPoint num="0" id="1483" />
-<TGConnectingPoint num="1" id="1484" />
-<TGConnectingPoint num="2" id="1485" />
-<TGConnectingPoint num="3" id="1486" />
-<TGConnectingPoint num="4" id="1487" />
-<TGConnectingPoint num="5" id="1488" />
-<TGConnectingPoint num="6" id="1489" />
-<TGConnectingPoint num="7" id="1490" />
-<TGConnectingPoint num="8" id="1491" />
-<TGConnectingPoint num="9" id="1492" />
-</COMPONENT>
+<infoparam name="List of all parameters of an Avatar SMD transition" value="" />
+<TGConnectingPoint num="0" id="1637" />
+<TGConnectingPoint num="1" id="1638" />
+<TGConnectingPoint num="2" id="1639" />
+<TGConnectingPoint num="3" id="1640" />
+<extraparam>
+<guard value="[ ]" enabled="true"/>
+<afterMin value="mechanicalDelay" enabled="true"/>
+<afterMax value="" enabled="true"/>
+<computeMin value="" enabled="true"/>
+<computeMax value="" enabled="true"/>
+<probability value="" enabled="true"/>
+</extraparam>
+</SUBCOMPONENT>
 
-<COMPONENT type="5106" id="1534" >
-<cdparam x="337" y="257" />
+<COMPONENT type="5106" id="1684" >
+<cdparam x="374" y="352" />
 <sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="1494" />
-<TGConnectingPoint num="1" id="1495" />
-<TGConnectingPoint num="2" id="1496" />
-<TGConnectingPoint num="3" id="1497" />
-<TGConnectingPoint num="4" id="1498" />
-<TGConnectingPoint num="5" id="1499" />
-<TGConnectingPoint num="6" id="1500" />
-<TGConnectingPoint num="7" id="1501" />
-<TGConnectingPoint num="8" id="1502" />
-<TGConnectingPoint num="9" id="1503" />
-<TGConnectingPoint num="10" id="1504" />
-<TGConnectingPoint num="11" id="1505" />
-<TGConnectingPoint num="12" id="1506" />
-<TGConnectingPoint num="13" id="1507" />
-<TGConnectingPoint num="14" id="1508" />
-<TGConnectingPoint num="15" id="1509" />
-<TGConnectingPoint num="16" id="1510" />
-<TGConnectingPoint num="17" id="1511" />
-<TGConnectingPoint num="18" id="1512" />
-<TGConnectingPoint num="19" id="1513" />
-<TGConnectingPoint num="20" id="1514" />
-<TGConnectingPoint num="21" id="1515" />
-<TGConnectingPoint num="22" id="1516" />
-<TGConnectingPoint num="23" id="1517" />
-<TGConnectingPoint num="24" id="1518" />
-<TGConnectingPoint num="25" id="1519" />
-<TGConnectingPoint num="26" id="1520" />
-<TGConnectingPoint num="27" id="1521" />
-<TGConnectingPoint num="28" id="1522" />
-<TGConnectingPoint num="29" id="1523" />
-<TGConnectingPoint num="30" id="1524" />
-<TGConnectingPoint num="31" id="1525" />
-<TGConnectingPoint num="32" id="1526" />
-<TGConnectingPoint num="33" id="1527" />
-<TGConnectingPoint num="34" id="1528" />
-<TGConnectingPoint num="35" id="1529" />
-<TGConnectingPoint num="36" id="1530" />
-<TGConnectingPoint num="37" id="1531" />
-<TGConnectingPoint num="38" id="1532" />
-<TGConnectingPoint num="39" id="1533" />
+<TGConnectingPoint num="0" id="1644" />
+<TGConnectingPoint num="1" id="1645" />
+<TGConnectingPoint num="2" id="1646" />
+<TGConnectingPoint num="3" id="1647" />
+<TGConnectingPoint num="4" id="1648" />
+<TGConnectingPoint num="5" id="1649" />
+<TGConnectingPoint num="6" id="1650" />
+<TGConnectingPoint num="7" id="1651" />
+<TGConnectingPoint num="8" id="1652" />
+<TGConnectingPoint num="9" id="1653" />
+<TGConnectingPoint num="10" id="1654" />
+<TGConnectingPoint num="11" id="1655" />
+<TGConnectingPoint num="12" id="1656" />
+<TGConnectingPoint num="13" id="1657" />
+<TGConnectingPoint num="14" id="1658" />
+<TGConnectingPoint num="15" id="1659" />
+<TGConnectingPoint num="16" id="1660" />
+<TGConnectingPoint num="17" id="1661" />
+<TGConnectingPoint num="18" id="1662" />
+<TGConnectingPoint num="19" id="1663" />
+<TGConnectingPoint num="20" id="1664" />
+<TGConnectingPoint num="21" id="1665" />
+<TGConnectingPoint num="22" id="1666" />
+<TGConnectingPoint num="23" id="1667" />
+<TGConnectingPoint num="24" id="1668" />
+<TGConnectingPoint num="25" id="1669" />
+<TGConnectingPoint num="26" id="1670" />
+<TGConnectingPoint num="27" id="1671" />
+<TGConnectingPoint num="28" id="1672" />
+<TGConnectingPoint num="29" id="1673" />
+<TGConnectingPoint num="30" id="1674" />
+<TGConnectingPoint num="31" id="1675" />
+<TGConnectingPoint num="32" id="1676" />
+<TGConnectingPoint num="33" id="1677" />
+<TGConnectingPoint num="34" id="1678" />
+<TGConnectingPoint num="35" id="1679" />
+<TGConnectingPoint num="36" id="1680" />
+<TGConnectingPoint num="37" id="1681" />
+<TGConnectingPoint num="38" id="1682" />
+<TGConnectingPoint num="39" id="1683" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1575" >
-<cdparam x="338" y="120" />
+<COMPONENT type="5106" id="1725" >
+<cdparam x="297" y="88" />
 <sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="1535" />
-<TGConnectingPoint num="1" id="1536" />
-<TGConnectingPoint num="2" id="1537" />
-<TGConnectingPoint num="3" id="1538" />
-<TGConnectingPoint num="4" id="1539" />
-<TGConnectingPoint num="5" id="1540" />
-<TGConnectingPoint num="6" id="1541" />
-<TGConnectingPoint num="7" id="1542" />
-<TGConnectingPoint num="8" id="1543" />
-<TGConnectingPoint num="9" id="1544" />
-<TGConnectingPoint num="10" id="1545" />
-<TGConnectingPoint num="11" id="1546" />
-<TGConnectingPoint num="12" id="1547" />
-<TGConnectingPoint num="13" id="1548" />
-<TGConnectingPoint num="14" id="1549" />
-<TGConnectingPoint num="15" id="1550" />
-<TGConnectingPoint num="16" id="1551" />
-<TGConnectingPoint num="17" id="1552" />
-<TGConnectingPoint num="18" id="1553" />
-<TGConnectingPoint num="19" id="1554" />
-<TGConnectingPoint num="20" id="1555" />
-<TGConnectingPoint num="21" id="1556" />
-<TGConnectingPoint num="22" id="1557" />
-<TGConnectingPoint num="23" id="1558" />
-<TGConnectingPoint num="24" id="1559" />
-<TGConnectingPoint num="25" id="1560" />
-<TGConnectingPoint num="26" id="1561" />
-<TGConnectingPoint num="27" id="1562" />
-<TGConnectingPoint num="28" id="1563" />
-<TGConnectingPoint num="29" id="1564" />
-<TGConnectingPoint num="30" id="1565" />
-<TGConnectingPoint num="31" id="1566" />
-<TGConnectingPoint num="32" id="1567" />
-<TGConnectingPoint num="33" id="1568" />
-<TGConnectingPoint num="34" id="1569" />
-<TGConnectingPoint num="35" id="1570" />
-<TGConnectingPoint num="36" id="1571" />
-<TGConnectingPoint num="37" id="1572" />
-<TGConnectingPoint num="38" id="1573" />
-<TGConnectingPoint num="39" id="1574" />
+<TGConnectingPoint num="0" id="1685" />
+<TGConnectingPoint num="1" id="1686" />
+<TGConnectingPoint num="2" id="1687" />
+<TGConnectingPoint num="3" id="1688" />
+<TGConnectingPoint num="4" id="1689" />
+<TGConnectingPoint num="5" id="1690" />
+<TGConnectingPoint num="6" id="1691" />
+<TGConnectingPoint num="7" id="1692" />
+<TGConnectingPoint num="8" id="1693" />
+<TGConnectingPoint num="9" id="1694" />
+<TGConnectingPoint num="10" id="1695" />
+<TGConnectingPoint num="11" id="1696" />
+<TGConnectingPoint num="12" id="1697" />
+<TGConnectingPoint num="13" id="1698" />
+<TGConnectingPoint num="14" id="1699" />
+<TGConnectingPoint num="15" id="1700" />
+<TGConnectingPoint num="16" id="1701" />
+<TGConnectingPoint num="17" id="1702" />
+<TGConnectingPoint num="18" id="1703" />
+<TGConnectingPoint num="19" id="1704" />
+<TGConnectingPoint num="20" id="1705" />
+<TGConnectingPoint num="21" id="1706" />
+<TGConnectingPoint num="22" id="1707" />
+<TGConnectingPoint num="23" id="1708" />
+<TGConnectingPoint num="24" id="1709" />
+<TGConnectingPoint num="25" id="1710" />
+<TGConnectingPoint num="26" id="1711" />
+<TGConnectingPoint num="27" id="1712" />
+<TGConnectingPoint num="28" id="1713" />
+<TGConnectingPoint num="29" id="1714" />
+<TGConnectingPoint num="30" id="1715" />
+<TGConnectingPoint num="31" id="1716" />
+<TGConnectingPoint num="32" id="1717" />
+<TGConnectingPoint num="33" id="1718" />
+<TGConnectingPoint num="34" id="1719" />
+<TGConnectingPoint num="35" id="1720" />
+<TGConnectingPoint num="36" id="1721" />
+<TGConnectingPoint num="37" id="1722" />
+<TGConnectingPoint num="38" id="1723" />
+<TGConnectingPoint num="39" id="1724" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5100" id="1577" >
-<cdparam x="355" y="81" />
+<COMPONENT type="5100" id="1727" >
+<cdparam x="315" y="49" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="1576" />
+<TGConnectingPoint num="0" id="1726" />
 </COMPONENT>
 
+<COMPONENT type="5106" id="1781" >
+<cdparam x="264" y="174" />
+<sizeparam width="184" height="130" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<enabled value="true" />
+<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
+<infoparam name="state0" value="state0" />
+<TGConnectingPoint num="0" id="1741" />
+<TGConnectingPoint num="1" id="1742" />
+<TGConnectingPoint num="2" id="1743" />
+<TGConnectingPoint num="3" id="1744" />
+<TGConnectingPoint num="4" id="1745" />
+<TGConnectingPoint num="5" id="1746" />
+<TGConnectingPoint num="6" id="1747" />
+<TGConnectingPoint num="7" id="1748" />
+<TGConnectingPoint num="8" id="1749" />
+<TGConnectingPoint num="9" id="1750" />
+<TGConnectingPoint num="10" id="1751" />
+<TGConnectingPoint num="11" id="1752" />
+<TGConnectingPoint num="12" id="1753" />
+<TGConnectingPoint num="13" id="1754" />
+<TGConnectingPoint num="14" id="1755" />
+<TGConnectingPoint num="15" id="1756" />
+<TGConnectingPoint num="16" id="1757" />
+<TGConnectingPoint num="17" id="1758" />
+<TGConnectingPoint num="18" id="1759" />
+<TGConnectingPoint num="19" id="1760" />
+<TGConnectingPoint num="20" id="1761" />
+<TGConnectingPoint num="21" id="1762" />
+<TGConnectingPoint num="22" id="1763" />
+<TGConnectingPoint num="23" id="1764" />
+<TGConnectingPoint num="24" id="1765" />
+<TGConnectingPoint num="25" id="1766" />
+<TGConnectingPoint num="26" id="1767" />
+<TGConnectingPoint num="27" id="1768" />
+<TGConnectingPoint num="28" id="1769" />
+<TGConnectingPoint num="29" id="1770" />
+<TGConnectingPoint num="30" id="1771" />
+<TGConnectingPoint num="31" id="1772" />
+<TGConnectingPoint num="32" id="1773" />
+<TGConnectingPoint num="33" id="1774" />
+<TGConnectingPoint num="34" id="1775" />
+<TGConnectingPoint num="35" id="1776" />
+<TGConnectingPoint num="36" id="1777" />
+<TGConnectingPoint num="37" id="1778" />
+<TGConnectingPoint num="38" id="1779" />
+<TGConnectingPoint num="39" id="1780" />
+<extraparam>
+</extraparam>
+</COMPONENT>
+<SUBCOMPONENT type="5100" id="1729" >
+<father id="1781" num="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" />
+<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="1728" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="5103" id="1740" >
+<father id="1781" num="1" />
+<cdparam x="328" y="257" />
+<sizeparam width="51" height="20" minWidth="30" 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()" />
+<TGConnectingPoint num="0" id="1730" />
+<TGConnectingPoint num="1" id="1731" />
+<TGConnectingPoint num="2" id="1732" />
+<TGConnectingPoint num="3" id="1733" />
+<TGConnectingPoint num="4" id="1734" />
+<TGConnectingPoint num="5" id="1735" />
+<TGConnectingPoint num="6" id="1736" />
+<TGConnectingPoint num="7" id="1737" />
+<TGConnectingPoint num="8" id="1738" />
+<TGConnectingPoint num="9" id="1739" />
+</SUBCOMPONENT>
+
 
 </AVATARStateMachineDiagramPanel>
 
-<AVATARStateMachineDiagramPanel name="CoffeeButton" minX="10" maxX="1400" minY="10" maxY="900" >
-<CONNECTOR type="5102" id="1584" >
-<cdparam x="177" y="199" />
+<AVATARStateMachineDiagramPanel name="TeaButton" minX="10" maxX="1400" minY="10" maxY="900" >
+<CONNECTOR type="5102" id="1788" >
+<cdparam x="363" y="193" />
 <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="1583" />
-<P1  x="340" y="233" id="1701" />
-<P2  x="353" y="252" id="1690" />
+<infoparam name="connector from Send signal to state0" value="null" />
+<TGConnectingPoint num="0" id="1787" />
+<P1  x="363" y="204" id="1804" />
+<P2  x="362" y="257" id="1815" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1582" >
-<father id="1584" num="0" />
-<cdparam x="177" y="239" />
-<sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1786" >
+<father id="1788" num="0" />
+<cdparam x="380" y="228" />
+<sizeparam width="145" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1578" />
-<TGConnectingPoint num="1" id="1579" />
-<TGConnectingPoint num="2" id="1580" />
-<TGConnectingPoint num="3" id="1581" />
+<TGConnectingPoint num="0" id="1782" />
+<TGConnectingPoint num="1" id="1783" />
+<TGConnectingPoint num="2" id="1784" />
+<TGConnectingPoint num="3" id="1785" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
-<afterMin value="" enabled="true"/>
+<afterMin value="mechanicalDelay" enabled="true"/>
 <afterMax value="" enabled="true"/>
 <computeMin value="" enabled="true"/>
 <computeMax value="" enabled="true"/>
@@ -3101,26 +3191,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1591" >
-<cdparam x="322" y="69" />
+<CONNECTOR type="5102" id="1795" >
+<cdparam x="363" y="150" />
 <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="1590" />
-<P1  x="322" y="69" id="1688" />
-<P2  x="322" y="88" id="1648" />
+<infoparam name="connector from state0 to Send signal" value="null" />
+<TGConnectingPoint num="0" id="1794" />
+<P1  x="363" y="150" id="1861" />
+<P2  x="363" y="174" id="1803" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1589" >
-<father id="1591" num="0" />
-<cdparam x="322" y="109" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1793" >
+<father id="1795" num="0" />
+<cdparam x="363" y="190" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1585" />
-<TGConnectingPoint num="1" id="1586" />
-<TGConnectingPoint num="2" id="1587" />
-<TGConnectingPoint num="3" id="1588" />
+<TGConnectingPoint num="0" id="1789" />
+<TGConnectingPoint num="1" id="1790" />
+<TGConnectingPoint num="2" id="1791" />
+<TGConnectingPoint num="3" id="1792" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -3131,26 +3221,26 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1598" >
-<cdparam x="377" y="144" />
+<CONNECTOR type="5102" id="1802" >
+<cdparam x="362" y="101" />
 <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="1597" />
-<P1  x="322" y="118" id="1653" />
-<P2  x="356" y="174" id="1704" />
+<infoparam name="connector from start state to state0" value="null" />
+<TGConnectingPoint num="0" id="1801" />
+<P1  x="362" y="101" id="1896" />
+<P2  x="363" y="120" id="1856" />
 <AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1596" >
-<father id="1598" num="0" />
-<cdparam x="377" y="184" />
+</CONNECTOR><SUBCOMPONENT type="-1" id="1800" >
+<father id="1802" num="0" />
+<cdparam x="362" y="141" />
 <sizeparam width="10" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1592" />
-<TGConnectingPoint num="1" id="1593" />
-<TGConnectingPoint num="2" id="1594" />
-<TGConnectingPoint num="3" id="1595" />
+<TGConnectingPoint num="0" id="1796" />
+<TGConnectingPoint num="1" id="1797" />
+<TGConnectingPoint num="2" id="1798" />
+<TGConnectingPoint num="3" id="1799" />
 <extraparam>
 <guard value="[ ]" enabled="true"/>
 <afterMin value="" enabled="true"/>
@@ -3161,225 +3251,135 @@
 </extraparam>
 </SUBCOMPONENT>
 
-<CONNECTOR type="5102" id="1605" >
-<cdparam x="377" y="187" />
-<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="1604" />
-<P1  x="353" y="282" id="1691" />
-<P2  x="399" y="352" id="1607" />
-<AutomaticDrawing  data="true" />
-</CONNECTOR><SUBCOMPONENT type="-1" id="1603" >
-<father id="1605" num="0" />
-<cdparam x="417" y="335" />
-<sizeparam width="145" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<COMPONENT type="5103" id="1813" >
+<cdparam x="338" y="179" />
+<sizeparam width="51" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
-<infoparam name="List of all parameters of an Avatar SMD transition" value="" />
-<TGConnectingPoint num="0" id="1599" />
-<TGConnectingPoint num="1" id="1600" />
-<TGConnectingPoint num="2" id="1601" />
-<TGConnectingPoint num="3" id="1602" />
-<extraparam>
-<guard value="[ ]" enabled="true"/>
-<afterMin value="mechanicalDelay" enabled="true"/>
-<afterMax value="" enabled="true"/>
-<computeMin value="" enabled="true"/>
-<computeMax value="" enabled="true"/>
-<probability value="" enabled="true"/>
-</extraparam>
-</SUBCOMPONENT>
+<infoparam name="Send signal" value="push()" />
+<TGConnectingPoint num="0" id="1803" />
+<TGConnectingPoint num="1" id="1804" />
+<TGConnectingPoint num="2" id="1805" />
+<TGConnectingPoint num="3" id="1806" />
+<TGConnectingPoint num="4" id="1807" />
+<TGConnectingPoint num="5" id="1808" />
+<TGConnectingPoint num="6" id="1809" />
+<TGConnectingPoint num="7" id="1810" />
+<TGConnectingPoint num="8" id="1811" />
+<TGConnectingPoint num="9" id="1812" />
+</COMPONENT>
 
-<COMPONENT type="5106" id="1646" >
-<cdparam x="374" y="352" />
+<COMPONENT type="5106" id="1854" >
+<cdparam x="337" y="257" />
 <sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="1606" />
-<TGConnectingPoint num="1" id="1607" />
-<TGConnectingPoint num="2" id="1608" />
-<TGConnectingPoint num="3" id="1609" />
-<TGConnectingPoint num="4" id="1610" />
-<TGConnectingPoint num="5" id="1611" />
-<TGConnectingPoint num="6" id="1612" />
-<TGConnectingPoint num="7" id="1613" />
-<TGConnectingPoint num="8" id="1614" />
-<TGConnectingPoint num="9" id="1615" />
-<TGConnectingPoint num="10" id="1616" />
-<TGConnectingPoint num="11" id="1617" />
-<TGConnectingPoint num="12" id="1618" />
-<TGConnectingPoint num="13" id="1619" />
-<TGConnectingPoint num="14" id="1620" />
-<TGConnectingPoint num="15" id="1621" />
-<TGConnectingPoint num="16" id="1622" />
-<TGConnectingPoint num="17" id="1623" />
-<TGConnectingPoint num="18" id="1624" />
-<TGConnectingPoint num="19" id="1625" />
-<TGConnectingPoint num="20" id="1626" />
-<TGConnectingPoint num="21" id="1627" />
-<TGConnectingPoint num="22" id="1628" />
-<TGConnectingPoint num="23" id="1629" />
-<TGConnectingPoint num="24" id="1630" />
-<TGConnectingPoint num="25" id="1631" />
-<TGConnectingPoint num="26" id="1632" />
-<TGConnectingPoint num="27" id="1633" />
-<TGConnectingPoint num="28" id="1634" />
-<TGConnectingPoint num="29" id="1635" />
-<TGConnectingPoint num="30" id="1636" />
-<TGConnectingPoint num="31" id="1637" />
-<TGConnectingPoint num="32" id="1638" />
-<TGConnectingPoint num="33" id="1639" />
-<TGConnectingPoint num="34" id="1640" />
-<TGConnectingPoint num="35" id="1641" />
-<TGConnectingPoint num="36" id="1642" />
-<TGConnectingPoint num="37" id="1643" />
-<TGConnectingPoint num="38" id="1644" />
-<TGConnectingPoint num="39" id="1645" />
+<TGConnectingPoint num="0" id="1814" />
+<TGConnectingPoint num="1" id="1815" />
+<TGConnectingPoint num="2" id="1816" />
+<TGConnectingPoint num="3" id="1817" />
+<TGConnectingPoint num="4" id="1818" />
+<TGConnectingPoint num="5" id="1819" />
+<TGConnectingPoint num="6" id="1820" />
+<TGConnectingPoint num="7" id="1821" />
+<TGConnectingPoint num="8" id="1822" />
+<TGConnectingPoint num="9" id="1823" />
+<TGConnectingPoint num="10" id="1824" />
+<TGConnectingPoint num="11" id="1825" />
+<TGConnectingPoint num="12" id="1826" />
+<TGConnectingPoint num="13" id="1827" />
+<TGConnectingPoint num="14" id="1828" />
+<TGConnectingPoint num="15" id="1829" />
+<TGConnectingPoint num="16" id="1830" />
+<TGConnectingPoint num="17" id="1831" />
+<TGConnectingPoint num="18" id="1832" />
+<TGConnectingPoint num="19" id="1833" />
+<TGConnectingPoint num="20" id="1834" />
+<TGConnectingPoint num="21" id="1835" />
+<TGConnectingPoint num="22" id="1836" />
+<TGConnectingPoint num="23" id="1837" />
+<TGConnectingPoint num="24" id="1838" />
+<TGConnectingPoint num="25" id="1839" />
+<TGConnectingPoint num="26" id="1840" />
+<TGConnectingPoint num="27" id="1841" />
+<TGConnectingPoint num="28" id="1842" />
+<TGConnectingPoint num="29" id="1843" />
+<TGConnectingPoint num="30" id="1844" />
+<TGConnectingPoint num="31" id="1845" />
+<TGConnectingPoint num="32" id="1846" />
+<TGConnectingPoint num="33" id="1847" />
+<TGConnectingPoint num="34" id="1848" />
+<TGConnectingPoint num="35" id="1849" />
+<TGConnectingPoint num="36" id="1850" />
+<TGConnectingPoint num="37" id="1851" />
+<TGConnectingPoint num="38" id="1852" />
+<TGConnectingPoint num="39" id="1853" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5106" id="1687" >
-<cdparam x="297" y="88" />
+<COMPONENT type="5106" id="1895" >
+<cdparam x="338" y="120" />
 <sizeparam width="50" height="30" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="state0" value="main" />
-<TGConnectingPoint num="0" id="1647" />
-<TGConnectingPoint num="1" id="1648" />
-<TGConnectingPoint num="2" id="1649" />
-<TGConnectingPoint num="3" id="1650" />
-<TGConnectingPoint num="4" id="1651" />
-<TGConnectingPoint num="5" id="1652" />
-<TGConnectingPoint num="6" id="1653" />
-<TGConnectingPoint num="7" id="1654" />
-<TGConnectingPoint num="8" id="1655" />
-<TGConnectingPoint num="9" id="1656" />
-<TGConnectingPoint num="10" id="1657" />
-<TGConnectingPoint num="11" id="1658" />
-<TGConnectingPoint num="12" id="1659" />
-<TGConnectingPoint num="13" id="1660" />
-<TGConnectingPoint num="14" id="1661" />
-<TGConnectingPoint num="15" id="1662" />
-<TGConnectingPoint num="16" id="1663" />
-<TGConnectingPoint num="17" id="1664" />
-<TGConnectingPoint num="18" id="1665" />
-<TGConnectingPoint num="19" id="1666" />
-<TGConnectingPoint num="20" id="1667" />
-<TGConnectingPoint num="21" id="1668" />
-<TGConnectingPoint num="22" id="1669" />
-<TGConnectingPoint num="23" id="1670" />
-<TGConnectingPoint num="24" id="1671" />
-<TGConnectingPoint num="25" id="1672" />
-<TGConnectingPoint num="26" id="1673" />
-<TGConnectingPoint num="27" id="1674" />
-<TGConnectingPoint num="28" id="1675" />
-<TGConnectingPoint num="29" id="1676" />
-<TGConnectingPoint num="30" id="1677" />
-<TGConnectingPoint num="31" id="1678" />
-<TGConnectingPoint num="32" id="1679" />
-<TGConnectingPoint num="33" id="1680" />
-<TGConnectingPoint num="34" id="1681" />
-<TGConnectingPoint num="35" id="1682" />
-<TGConnectingPoint num="36" id="1683" />
-<TGConnectingPoint num="37" id="1684" />
-<TGConnectingPoint num="38" id="1685" />
-<TGConnectingPoint num="39" id="1686" />
+<TGConnectingPoint num="0" id="1855" />
+<TGConnectingPoint num="1" id="1856" />
+<TGConnectingPoint num="2" id="1857" />
+<TGConnectingPoint num="3" id="1858" />
+<TGConnectingPoint num="4" id="1859" />
+<TGConnectingPoint num="5" id="1860" />
+<TGConnectingPoint num="6" id="1861" />
+<TGConnectingPoint num="7" id="1862" />
+<TGConnectingPoint num="8" id="1863" />
+<TGConnectingPoint num="9" id="1864" />
+<TGConnectingPoint num="10" id="1865" />
+<TGConnectingPoint num="11" id="1866" />
+<TGConnectingPoint num="12" id="1867" />
+<TGConnectingPoint num="13" id="1868" />
+<TGConnectingPoint num="14" id="1869" />
+<TGConnectingPoint num="15" id="1870" />
+<TGConnectingPoint num="16" id="1871" />
+<TGConnectingPoint num="17" id="1872" />
+<TGConnectingPoint num="18" id="1873" />
+<TGConnectingPoint num="19" id="1874" />
+<TGConnectingPoint num="20" id="1875" />
+<TGConnectingPoint num="21" id="1876" />
+<TGConnectingPoint num="22" id="1877" />
+<TGConnectingPoint num="23" id="1878" />
+<TGConnectingPoint num="24" id="1879" />
+<TGConnectingPoint num="25" id="1880" />
+<TGConnectingPoint num="26" id="1881" />
+<TGConnectingPoint num="27" id="1882" />
+<TGConnectingPoint num="28" id="1883" />
+<TGConnectingPoint num="29" id="1884" />
+<TGConnectingPoint num="30" id="1885" />
+<TGConnectingPoint num="31" id="1886" />
+<TGConnectingPoint num="32" id="1887" />
+<TGConnectingPoint num="33" id="1888" />
+<TGConnectingPoint num="34" id="1889" />
+<TGConnectingPoint num="35" id="1890" />
+<TGConnectingPoint num="36" id="1891" />
+<TGConnectingPoint num="37" id="1892" />
+<TGConnectingPoint num="38" id="1893" />
+<TGConnectingPoint num="39" id="1894" />
 <extraparam>
 </extraparam>
 </COMPONENT>
 
-<COMPONENT type="5100" id="1689" >
-<cdparam x="315" y="49" />
+<COMPONENT type="5100" id="1897" >
+<cdparam x="355" y="81" />
 <sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
 <infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="1688" />
-</COMPONENT>
-
-<COMPONENT type="5106" id="1743" >
-<cdparam x="264" y="174" />
-<sizeparam width="184" height="130" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<enabled value="true" />
-<cdrectangleparam minX="10" maxX="1400" minY="10" maxY="900" />
-<infoparam name="state0" value="state0" />
-<TGConnectingPoint num="0" id="1703" />
-<TGConnectingPoint num="1" id="1704" />
-<TGConnectingPoint num="2" id="1705" />
-<TGConnectingPoint num="3" id="1706" />
-<TGConnectingPoint num="4" id="1707" />
-<TGConnectingPoint num="5" id="1708" />
-<TGConnectingPoint num="6" id="1709" />
-<TGConnectingPoint num="7" id="1710" />
-<TGConnectingPoint num="8" id="1711" />
-<TGConnectingPoint num="9" id="1712" />
-<TGConnectingPoint num="10" id="1713" />
-<TGConnectingPoint num="11" id="1714" />
-<TGConnectingPoint num="12" id="1715" />
-<TGConnectingPoint num="13" id="1716" />
-<TGConnectingPoint num="14" id="1717" />
-<TGConnectingPoint num="15" id="1718" />
-<TGConnectingPoint num="16" id="1719" />
-<TGConnectingPoint num="17" id="1720" />
-<TGConnectingPoint num="18" id="1721" />
-<TGConnectingPoint num="19" id="1722" />
-<TGConnectingPoint num="20" id="1723" />
-<TGConnectingPoint num="21" id="1724" />
-<TGConnectingPoint num="22" id="1725" />
-<TGConnectingPoint num="23" id="1726" />
-<TGConnectingPoint num="24" id="1727" />
-<TGConnectingPoint num="25" id="1728" />
-<TGConnectingPoint num="26" id="1729" />
-<TGConnectingPoint num="27" id="1730" />
-<TGConnectingPoint num="28" id="1731" />
-<TGConnectingPoint num="29" id="1732" />
-<TGConnectingPoint num="30" id="1733" />
-<TGConnectingPoint num="31" id="1734" />
-<TGConnectingPoint num="32" id="1735" />
-<TGConnectingPoint num="33" id="1736" />
-<TGConnectingPoint num="34" id="1737" />
-<TGConnectingPoint num="35" id="1738" />
-<TGConnectingPoint num="36" id="1739" />
-<TGConnectingPoint num="37" id="1740" />
-<TGConnectingPoint num="38" id="1741" />
-<TGConnectingPoint num="39" id="1742" />
-<extraparam>
-</extraparam>
+<TGConnectingPoint num="0" id="1896" />
 </COMPONENT>
-<SUBCOMPONENT type="5103" id="1700" >
-<father id="1743" num="0" />
-<cdparam x="328" y="257" />
-<sizeparam width="51" height="20" minWidth="30" 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()" />
-<TGConnectingPoint num="0" id="1690" />
-<TGConnectingPoint num="1" id="1691" />
-<TGConnectingPoint num="2" id="1692" />
-<TGConnectingPoint num="3" id="1693" />
-<TGConnectingPoint num="4" id="1694" />
-<TGConnectingPoint num="5" id="1695" />
-<TGConnectingPoint num="6" id="1696" />
-<TGConnectingPoint num="7" id="1697" />
-<TGConnectingPoint num="8" id="1698" />
-<TGConnectingPoint num="9" id="1699" />
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5100" id="1702" >
-<father id="1743" num="1" />
-<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" />
-<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
-<infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="1701" />
-</SUBCOMPONENT>
 
 
 </AVATARStateMachineDiagramPanel>
diff --git a/src/main/java/avatartranslator/AvatarStateMachine.java b/src/main/java/avatartranslator/AvatarStateMachine.java
index cafd1aa4f816a3850c816f31eb89a313efd2d355..b109596a7eb33b88f5f68ef2260323353fc6563e 100644
--- a/src/main/java/avatartranslator/AvatarStateMachine.java
+++ b/src/main/java/avatartranslator/AvatarStateMachine.java
@@ -438,7 +438,7 @@ public class AvatarStateMachine extends AvatarElement {
 
     // Assumes no after clause on composite relation
     public void removeCompositeStates(AvatarBlock _block) {
-        //TraceManager.addDev("\n-------------- Remove composite states ---------------\n");
+        TraceManager.addDev("\n-------------- Remove composite states ---------------\n");
 
         /*LinkedList<AvatarState> lists =*/ removeAllInternalStartStates();
 
@@ -456,7 +456,7 @@ public class AvatarStateMachine extends AvatarElement {
             }
         }
 
-        // For each composite transition: Welink it to all the substates of the current state
+        // For each composite transition: We link it to all the substates of the current state
         AvatarState src;
         while (((at = getAvatarCompositeTransition()) != null)) {
             src = (AvatarState) (getPreviousElementOf(at));
@@ -480,6 +480,8 @@ public class AvatarStateMachine extends AvatarElement {
                 if ((elt instanceof AvatarState) && (elt.hasInUpperState(src))) {
                     AvatarTransition att = cloneCompositeTransition(at);
                     elt.addNext(att);
+                    att.setAsVerifiable(false);
+                    at.setAsVerifiable(false);
                 }
             }
 
@@ -487,118 +489,7 @@ public class AvatarStateMachine extends AvatarElement {
 
     }
 
-    public void removeCompositeStatesOld(AvatarBlock _block) {
-        //TraceManager.addDev("\n-------------- Remove composite states ---------------\n");
 
-        // Contains in odd index: composite state
-        // even index: new state replacing the start state
-
-        /*List<AvatarState> lists =*/ removeAllInternalStartStates();
-        //List<AvatarTransition> ats;
-        List<AvatarStateMachineElement> toRemove = new ArrayList<AvatarStateMachineElement>();
-        List<AvatarState> states = new ArrayList<AvatarState>();
-
-        AvatarTransition at;
-
-        //ats = getAllAvatarCompositeTransitions();
-
-        //at = getCompositeTransition();
-        while (((at = getAvatarCompositeTransition()) != null) && (!(toRemove.contains(at)))) {
-            TraceManager.addDev("*********************************** Found composite transition: " + at.toString());
-            //TraceManager.addDev(_block.toString());
-            if (!(toRemove.contains(getPreviousElementOf(at)))) {
-                toRemove.add(getPreviousElementOf(at));
-            }
-            toRemove.add(at);
-            AvatarTransition at2 = removeAfter(at, _block);
-            AvatarState state = (AvatarState) (getPreviousElementOf(at2));
-
-            if (!states.contains(state)) {
-                TraceManager.addDev("Working on internal elements of " + state);
-                states.add(state);
-                addFullInternalStates(state, at2);
-            }
-
-
-            for (int i = 0; i < elements.size(); i++) {
-                AvatarStateMachineElement element = elements.get(i);
-                if (element instanceof AvatarState) {
-                    if (element.hasInUpperState(state) == true) {
-                        AvatarTransition at3 = cloneCompositeTransition(at2);
-                        //addElement(at);
-                        element.addNext(at3);
-                    }
-                }
-            }
-
-            //removeCompositeTransition2(at, _block);
-        }
-
-        for (AvatarStateMachineElement asme : toRemove) {
-            removeElement(asme);
-        }
-
-        removeAllSuperStates();
-
-        /*if (at != null) {
-          TraceManager.addDev("********************************** Found composite transition: " + at.toString());
-          // Adding intermediate states in transitions : splitting transitions
-          }
-
-          LinkedList<AvatarStateMachineElement> toRemove = new LinkedList<AvatarStateMachineElement>();
-
-          while((at = getCompositeTransition()) != null) {
-          TraceManager.addDev("*********************************** Found composite transition: " + at.toString());
-          //TraceManager.addDev(_block.toString());
-          if (!(toRemove.contains(getPreviousElementOf(at)))) {
-          toRemove.add(getPreviousElementOf(at));
-          }
-          removeCompositeTransition(at, _block);
-
-          }*/
-
-
-
-        /*if (ats.size() > 0) {
-          LinkedList<AvatarStateMachineElement> toRemove = new LinkedList<AvatarStateMachineElement>();
-          ArrayList <AvatarTransition> ats2 = new ArrayList <AvatarTransition>();
-          ArrayList <AvatarState> states = new ArrayList <AvatarState>();
-          for(AvatarTransition at: ats) {
-          if (!(toRemove.contains(getPreviousElementOf(at)))) {
-          toRemove.add(getPreviousElementOf(at));
-          }
-
-          AvatarState state = (AvatarState)(getPreviousElementOf(_at));
-          AvatarTransition at = removeAfter(_at, _block);
-          // Put state after transition
-          modifyAvatarTransition(at);
-          ats2.add(at);
-
-
-          }
-
-
-
-
-          //removeStopStatesOf(state);
-
-          // Remove "after" and replace them with timers
-
-
-          remove
-
-          removeCompositeTransitions(ats, _block);
-
-
-          for(AvatarStateMachineElement asme: toRemove) {
-          removeElement(asme);
-          }
-          }*/
-
-        //TraceManager.addDev(_block.toString());
-
-
-    }
 
     private void modifyStateForCompositeSupport(AvatarState _state) {
         // Each time there is a transition with an after or more than one action, we must rework the transition
@@ -616,6 +507,7 @@ public class AvatarStateMachine extends AvatarElement {
                     if (previous.hasInUpperState(_state) == true) {
                         if (!(at.isEmpty())) {
                             v.add(at);
+                            at.setNotCheckable();
                         }
                     }
                 }
diff --git a/src/main/java/avatartranslator/AvatarStateMachineElement.java b/src/main/java/avatartranslator/AvatarStateMachineElement.java
index 90e69d16b2a05b13d94e840c7b2254d6aae9bdef..50e1eed4c09e439ab583db0e698049ef045ef396 100644
--- a/src/main/java/avatartranslator/AvatarStateMachineElement.java
+++ b/src/main/java/avatartranslator/AvatarStateMachineElement.java
@@ -92,6 +92,9 @@ public abstract class AvatarStateMachineElement extends AvatarElement {
     public void setCheckable() {
         this.isCheckable = true;
     }
+    public void setNotCheckable() {
+        this.isCheckable = false;
+    }
 
     public boolean isCheckable() {
         return this.isCheckable;
diff --git a/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java b/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java
index 2c11bfb1cfee16921b82a0029c97f94ab12b5c29..9fd7708873eb9f3bc0574b201c5a4be569401314 100644
--- a/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java
+++ b/src/main/java/avatartranslator/modelchecker/AvatarModelChecker.java
@@ -173,7 +173,7 @@ public class AvatarModelChecker implements Runnable, myutil.Graph {
         for (AvatarBlock block : spec.getListOfBlocks()) {
             for (AvatarStateMachineElement elt : block.getStateMachine().getListOfElements()) {
                 //TraceManager.addDev("null elt in state machine of block=" + block.getName());
-                if (elt.isChecked()) {
+                if (elt.canBeVerified() && elt.isChecked()) {
                     SpecificationReachability reach = new SpecificationReachability(elt, block);
                     reachabilities.add(reach);
                 }
diff --git a/src/main/java/tmltranslator/TMLSyntaxChecking.java b/src/main/java/tmltranslator/TMLSyntaxChecking.java
index 418e12b4a4d00adc4f3af22cd216910cdb797f11..354bd16f924f258c3ae942c34a401385a2088531 100755
--- a/src/main/java/tmltranslator/TMLSyntaxChecking.java
+++ b/src/main/java/tmltranslator/TMLSyntaxChecking.java
@@ -628,7 +628,7 @@ public class TMLSyntaxChecking {
             addError(t, elt, VARIABLE_ERROR + " in expression " + action, TMLError.ERROR_BEHAVIOR);
             return;
         } catch (TokenMgrError tke) {
-            TraceManager.addDev("TokenMgrError --------> Parse error in :" + parseCmd + " " + action);
+            TraceManager.addDev("TokenMgrError --------> Parse error in :" + parseCmd + " " + action + " modified action:" + modif);
             addError(t, elt, VARIABLE_ERROR + " in expression " + action, TMLError.ERROR_BEHAVIOR);
             return;
         }
diff --git a/src/main/java/ui/AvatarDesignPanelTranslator.java b/src/main/java/ui/AvatarDesignPanelTranslator.java
index b67b04277aa24cc85b915907756ee7488dfbdbb5..85eb6fbcbb517c8a8f8d37e4bda5af1a6fab7e78 100644
--- a/src/main/java/ui/AvatarDesignPanelTranslator.java
+++ b/src/main/java/ui/AvatarDesignPanelTranslator.java
@@ -50,6 +50,7 @@ import java.util.*;
 /**
  * Class AvatarDesignPanelTranslator
  * Creation: 18/05/2010
+ *
  * @author Ludovic APVRILLE
  */
 public class AvatarDesignPanelTranslator {
@@ -61,15 +62,15 @@ public class AvatarDesignPanelTranslator {
     //protected List <TDiagramPanel> panels;
     private Map<String, List<TAttribute>> typeAttributesMap;
     private Map<String, String> nameTypeMap;
-    
+
     public AvatarDesignPanelTranslator(AvatarDesignPanel _adp) {
         adp = _adp;
-     //   reinit();
-   // }
+        //   reinit();
+        // }
 
-    //public void reinit() {
-        checkingErrors = new LinkedList<CheckingError> ();
-        warnings = new LinkedList<CheckingError> ();
+        //public void reinit() {
+        checkingErrors = new LinkedList<CheckingError>();
+        warnings = new LinkedList<CheckingError>();
         listE = new CorrespondanceTGElement();
         //panels = new LinkedList <TDiagramPanel>();
     }
@@ -86,15 +87,15 @@ public class AvatarDesignPanelTranslator {
         return listE;
     }
 
-    public AvatarSpecification generateAvatarSpecification( List<AvatarBDStateMachineOwner> _blocks) {
+    public AvatarSpecification generateAvatarSpecification(List<AvatarBDStateMachineOwner> _blocks) {
         List<AvatarBDBlock> blocks = new LinkedList<AvatarBDBlock>();
         List<AvatarBDLibraryFunction> libraryFunctions = new LinkedList<AvatarBDLibraryFunction>();
 
-        for (AvatarBDStateMachineOwner owner: _blocks)
+        for (AvatarBDStateMachineOwner owner : _blocks)
             if (owner instanceof AvatarBDBlock)
-                blocks.add ((AvatarBDBlock) owner);
+                blocks.add((AvatarBDBlock) owner);
             else
-                libraryFunctions.add ((AvatarBDLibraryFunction) owner);
+                libraryFunctions.add((AvatarBDLibraryFunction) owner);
 
         AvatarSpecification as = new AvatarSpecification("avatarspecification", adp);
 
@@ -105,29 +106,25 @@ public class AvatarDesignPanelTranslator {
             }
         }
         typeAttributesMap = new HashMap<String, List<TAttribute>>();
-        nameTypeMap = new HashMap<String,String>();
-        createLibraryFunctions (as, libraryFunctions);
+        nameTypeMap = new HashMap<String, String>();
+        createLibraryFunctions(as, libraryFunctions);
         createBlocks(as, blocks);
         createRelationsBetweenBlocks(as, blocks);
         makeBlockStateMachines(as);
-        /*for (String s: nameTypeMap.keySet()){
-          System.out.println(s + " "+ nameTypeMap.get(s));
-          System.out.println(typeAttributesMap.get(nameTypeMap.get(s)).size());
-          } */
         createPragmas(as, blocks);
 
         //TraceManager.addDev("Removing else guards");
         as.removeElseGuards();
         //TraceManager.addDev("Removing else guards ... done");
         //System.out.println(as.toString());
-		adp.abdp.repaint();
+        adp.abdp.repaint();
         return as;
     }
 
     public class ErrorAccumulator extends avatartranslator.ErrorAccumulator {
         private TGComponent tgc;
         private TDiagramPanel tdp;
-       // private AvatarBlock ab;
+        // private AvatarBlock ab;
 
 //        public ErrorAccumulator (TGComponent tgc, TDiagramPanel tdp, AvatarBlock ab) {
 //            this.tgc = tgc;
@@ -135,34 +132,34 @@ public class AvatarDesignPanelTranslator {
 //            this.ab = ab;
 //        }
 
-        public ErrorAccumulator (TGComponent tgc, TDiagramPanel tdp) {
-        	this.tgc = tgc;
-        	this.tdp = tdp;
+        public ErrorAccumulator(TGComponent tgc, TDiagramPanel tdp) {
+            this.tgc = tgc;
+            this.tdp = tdp;
 //            this (tgc, tdp, null);
         }
 
         public CheckingError createError(String msg) {
-            UICheckingError ce = new UICheckingError (CheckingError.BEHAVIOR_ERROR, msg);
-            ce.setTGComponent (this.tgc);
-            ce.setTDiagramPanel (this.tdp);
+            UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, msg);
+            ce.setTGComponent(this.tgc);
+            ce.setTDiagramPanel(this.tdp);
 
             return ce;
         }
 
-        public void addWarning (CheckingError ce) {
-            AvatarDesignPanelTranslator.this.addWarning (ce);
+        public void addWarning(CheckingError ce) {
+            AvatarDesignPanelTranslator.this.addWarning(ce);
         }
 
-        public void addWarning (String msg) {
-            this.addWarning (this.createError (msg));
+        public void addWarning(String msg) {
+            this.addWarning(this.createError(msg));
         }
 
-        public void addError (CheckingError ce) {
-            AvatarDesignPanelTranslator.this.addCheckingError (ce);
+        public void addError(CheckingError ce) {
+            AvatarDesignPanelTranslator.this.addCheckingError(ce);
         }
 
-        public void addError (String msg) {
-            this.addError (this.createError (msg));
+        public void addError(String msg) {
+            this.addError(this.createError(msg));
         }
     }
 
@@ -172,18 +169,18 @@ public class AvatarDesignPanelTranslator {
         AvatarBDPragma tgcn;
         AvatarBDSafetyPragma tgsp;
         AvatarBDPerformancePragma tgpp;
-        String values [];
+        String values[];
         String tmp;
         List<AvatarPragma> pragmaList;
-        
-        while(iterator.hasNext()) {
+
+        while (iterator.hasNext()) {
             tgc = iterator.next();
             if (tgc instanceof AvatarBDPragma) {
-                ErrorAccumulator errorAcc = new ErrorAccumulator (tgc, adp.getAvatarBDPanel());
-                tgcn = (AvatarBDPragma)tgc;
-				tgcn.syntaxErrors.clear();
+                ErrorAccumulator errorAcc = new ErrorAccumulator(tgc, adp.getAvatarBDPanel());
+                tgcn = (AvatarBDPragma) tgc;
+                tgcn.syntaxErrors.clear();
                 values = tgcn.getValues();
-                for(int i=0; i<values.length; i++) {
+                for (int i = 0; i < values.length; i++) {
                     tmp = values[i].trim();
                     if ((tmp.startsWith("#") && (tmp.length() > 1))) {
                         tmp = tmp.substring(1, tmp.length()).trim();
@@ -193,384 +190,366 @@ public class AvatarDesignPanelTranslator {
 
                         //TraceManager.addDev("Reworked pragma =" + tmp);
 
-                        for (AvatarPragma tmpPragma: pragmaList){
-                            if (tmpPragma instanceof AvatarPragmaConstant){
+                        for (AvatarPragma tmpPragma : pragmaList) {
+                            if (tmpPragma instanceof AvatarPragmaConstant) {
                                 AvatarPragmaConstant apg = (AvatarPragmaConstant) tmpPragma;
-                                for (AvatarConstant ac: apg.getConstants()){
+                                for (AvatarConstant ac : apg.getConstants()) {
                                     _as.addConstant(ac);
                                 }
                             }
                             _as.addPragma(tmpPragma);
                             //TraceManager.addDev("Adding pragma:" + tmp);
                         }
-                    }
-                    else {
-                    	tgcn.syntaxErrors.add(values[i]);
+                    } else {
+                        tgcn.syntaxErrors.add(values[i]);
                     }
                 }
             }
             if (tgc instanceof AvatarBDSafetyPragma) {
-                tgsp = (AvatarBDSafetyPragma)tgc;
+                tgsp = (AvatarBDSafetyPragma) tgc;
                 values = tgsp.getValues();
                 tgsp.syntaxErrors.clear();
-                for (String s: values){
-					if (checkSafetyPragma(s, _blocks, _as, tgc)){
-						_as.addSafetyPragma(s);
-					}
-					else {
-						tgsp.syntaxErrors.add(s);
-
-					}
+                for (String s : values) {
+                    if (checkSafetyPragma(s, _blocks, _as, tgc)) {
+                        _as.addSafetyPragma(s);
+                    } else {
+                        tgsp.syntaxErrors.add(s);
+
+                    }
                 }
             }
-			if (tgc instanceof AvatarBDPerformancePragma) {
-				tgpp = (AvatarBDPerformancePragma)tgc;
+            if (tgc instanceof AvatarBDPerformancePragma) {
+                tgpp = (AvatarBDPerformancePragma) tgc;
                 values = tgpp.getValues();
-				for (String s: values){
-					AvatarPragmaLatency pragma = checkPerformancePragma(s, _blocks, _as, tgc);
-					if (pragma!=null){
-						_as.addLatencyPragma(pragma);
-					}
-					else {
-						tgpp.syntaxErrors.add(s);
-					}
-				}
-			}
+                for (String s : values) {
+                    AvatarPragmaLatency pragma = checkPerformancePragma(s, _blocks, _as, tgc);
+                    if (pragma != null) {
+                        _as.addLatencyPragma(pragma);
+                    } else {
+                        tgpp.syntaxErrors.add(s);
+                    }
+                }
+            }
         }
     }
-	
-    public AvatarPragmaLatency checkPerformancePragma(String _pragma, List<AvatarBDBlock> _blocks, AvatarSpecification as, TGComponent tgc){	
-		if (_pragma.contains("=") || (!_pragma.contains(">") && !_pragma.contains("<") && !_pragma.contains("?")) || !_pragma.contains("Latency(")){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "No latency expression found in pragma "+ _pragma);
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("No latency expression found in pragma "+ _pragma);
-			return null;
-		}
-
-		String pragma = _pragma.trim();
-		pragma = pragma.split("Latency\\(")[1];		
-		//Find first block.state
-		
-
-		String p1 = pragma.split(",")[0];
-		//Throw error if lack of '.' in block.signal
-		if (!p1.contains(".")){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid block.signal format in pragma " + _pragma);
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Invalid block.signal format in pragma " + _pragma);
-			return null;
-		}
-		String block1 = p1.split("\\.")[0];
-		String state1 = p1.split("\\.",-1)[1];
-		AvatarBlock bl1;
-		AvatarStateMachineElement st1=null;
-		List<String> id1= new ArrayList<String>();
-		bl1 = as.getBlockWithName(block1);
-		if (bl1==null){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Block " + block1 + " in pragma does not exist");
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Block " + block1 + " in pragma does not exist");
-			return null;
-		}
-		AvatarStateMachine asm = bl1.getStateMachine();
-		for (AvatarActionOnSignal aaos: asm.getAllAOSWithName(state1)){
-			if (aaos.getCheckLatency()){
-				id1.add((aaos.getSignal().isIn() ? "Receive signal" : "Send signal") +"-"+ aaos.getSignal().getName()+":"+aaos.getID());
-				st1= aaos;
-			}
-		}
-		AvatarState astate1 = asm.getStateWithName(state1);
-		if (astate1!=null){
-			if (astate1.getCheckLatency()){
-				id1.add("State-"+state1 + ":"+ astate1.getID());
-				st1= astate1;
-			}
-		}
-		
-		if (id1.size()==0){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot find checkable state " + block1+ "." + state1 + " in pragma");
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Cannot find checkable state " + block1+ "." + state1 + " in pragma");
-			return null;
-		}
-		
-		
-
-		
-		//Find second block.signal
-		//Throw error if lack of '.'
-
-
-		String p2 = pragma.split(",")[1].split("\\)")[0];
-		if (!p2.contains(".")){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid block.signal format in pragma "+ _pragma);
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Invalid block.signal format");
-			return null;
-		}
-
-		String block2 = p2.split("\\.")[0];
-		String state2 = p2.split("\\.",-1)[1];
-
-
-
-		AvatarBlock bl2;
-		AvatarStateMachineElement st2=null;
-
-		bl2 = as.getBlockWithName(block2);
-		if (bl2==null){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Block " + block2 + " in pragma does not exist");
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Block " + block2 + " in pragma does not exist");
-			return null;
-		}
-		asm = bl2.getStateMachine();
-
-		List<String> id2= new ArrayList<String>();
-		for (AvatarActionOnSignal aaos: asm.getAllAOSWithName(state2)){
-
-			if (aaos.getCheckLatency()){
-				id2.add((aaos.getSignal().isIn() ? "Receive signal" : "Send signal")+"-"+ aaos.getSignal().getName()+":"+aaos.getID());
-				st2=aaos;	
-			}
-		}
-		
-		AvatarState astate2 = asm.getStateWithName(state2);
-		if (astate2!=null){
-			if (astate2.getCheckLatency()){
-				id2.add("State-"+state2 + ":"+ astate2.getID());
-				st2= astate2;
-			}
-		}
-		
-		if (id2.size()==0){
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot find checkable state " + block2+ "." + state2 + " in pragma");
-		   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   	ce.setTGComponent(tgc);
-		   	addWarning(ce);
-			TraceManager.addDev("Cannot find checkable state " + block2+ "." + state2 + " in pragma");
-			return null;
-		}
-	
 
+    public AvatarPragmaLatency checkPerformancePragma(String _pragma, List<AvatarBDBlock> _blocks, AvatarSpecification as, TGComponent tgc) {
+        if (_pragma.contains("=") || (!_pragma.contains(">") && !_pragma.contains("<") && !_pragma.contains("?")) || !_pragma.contains("Latency(")) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "No latency expression found in pragma " + _pragma);
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("No latency expression found in pragma " + _pragma);
+            return null;
+        }
 
+        String pragma = _pragma.trim();
+        pragma = pragma.split("Latency\\(")[1];
+        //Find first block.state
 
 
-		String equation = pragma.split("\\)")[1];
-		equation = equation.replaceAll(" ","");
-		int symbolType=0;
-		int time=0;
-		if (equation.substring(0,1).equals("<")){
-			symbolType = AvatarPragmaLatency.lessThan;
-			try {
-				time= Integer.valueOf(equation.split("<")[1]);
-			}
-			catch (Exception e){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid number format in " + _pragma);
-		    	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    	ce.setTGComponent(tgc);
-		    	addWarning(ce);
-				TraceManager.addDev("Invalid number format");
-				return null;
-			}
-		}
-		else if (equation.substring(0,1).equals(">")){
-			symbolType = AvatarPragmaLatency.greaterThan;
-			try {
-			time= Integer.valueOf(equation.split(">")[1]);
-			} 
-			catch (Exception e){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid number format in " + _pragma);
-		    	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    	ce.setTGComponent(tgc);
-		    	addWarning(ce);
-				TraceManager.addDev("Invalid number format");
-				return null;
-			}
-		}
-		else if (equation.substring(0,1).equals("?")){
-			symbolType=AvatarPragmaLatency.query;
-		}
-		else {
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "no latency expression found in " + _pragma);
-		    ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    ce.setTGComponent(tgc);
-		    addWarning(ce);
-			TraceManager.addDev("No latency expression found");
-			return null;
-		}
-		return new AvatarPragmaLatency(_pragma, tgc, bl1, st1, bl2, st2, symbolType, time, id1, id2, _pragma);
-
-
-	}
-	
-	private boolean checkSafetyPragma(String _pragma, List<AvatarBDBlock> _blocks, AvatarSpecification as, TGComponent tgc){
+        String p1 = pragma.split(",")[0];
+        //Throw error if lack of '.' in block.signal
+        if (!p1.contains(".")) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid block.signal format in pragma " + _pragma);
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Invalid block.signal format in pragma " + _pragma);
+            return null;
+        }
+        String block1 = p1.split("\\.")[0];
+        String state1 = p1.split("\\.", -1)[1];
+        AvatarBlock bl1;
+        AvatarStateMachineElement st1 = null;
+        List<String> id1 = new ArrayList<String>();
+        bl1 = as.getBlockWithName(block1);
+        if (bl1 == null) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Block " + block1 + " in pragma does not exist");
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Block " + block1 + " in pragma does not exist");
+            return null;
+        }
+        AvatarStateMachine asm = bl1.getStateMachine();
+        for (AvatarActionOnSignal aaos : asm.getAllAOSWithName(state1)) {
+            if (aaos.getCheckLatency()) {
+                id1.add((aaos.getSignal().isIn() ? "Receive signal" : "Send signal") + "-" + aaos.getSignal().getName() + ":" + aaos.getID());
+                st1 = aaos;
+            }
+        }
+        AvatarState astate1 = asm.getStateWithName(state1);
+        if (astate1 != null) {
+            if (astate1.getCheckLatency()) {
+                id1.add("State-" + state1 + ":" + astate1.getID());
+                st1 = astate1;
+            }
+        }
+
+        if (id1.size() == 0) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot find checkable state " + block1 + "." + state1 + " in pragma");
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Cannot find checkable state " + block1 + "." + state1 + " in pragma");
+            return null;
+        }
+
+
+        //Find second block.signal
+        //Throw error if lack of '.'
+
+
+        String p2 = pragma.split(",")[1].split("\\)")[0];
+        if (!p2.contains(".")) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid block.signal format in pragma " + _pragma);
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Invalid block.signal format");
+            return null;
+        }
+
+        String block2 = p2.split("\\.")[0];
+        String state2 = p2.split("\\.", -1)[1];
+
+
+        AvatarBlock bl2;
+        AvatarStateMachineElement st2 = null;
+
+        bl2 = as.getBlockWithName(block2);
+        if (bl2 == null) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Block " + block2 + " in pragma does not exist");
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Block " + block2 + " in pragma does not exist");
+            return null;
+        }
+        asm = bl2.getStateMachine();
+
+        List<String> id2 = new ArrayList<String>();
+        for (AvatarActionOnSignal aaos : asm.getAllAOSWithName(state2)) {
+
+            if (aaos.getCheckLatency()) {
+                id2.add((aaos.getSignal().isIn() ? "Receive signal" : "Send signal") + "-" + aaos.getSignal().getName() + ":" + aaos.getID());
+                st2 = aaos;
+            }
+        }
+
+        AvatarState astate2 = asm.getStateWithName(state2);
+        if (astate2 != null) {
+            if (astate2.getCheckLatency()) {
+                id2.add("State-" + state2 + ":" + astate2.getID());
+                st2 = astate2;
+            }
+        }
+
+        if (id2.size() == 0) {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Cannot find checkable state " + block2 + "." + state2 + " in pragma");
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("Cannot find checkable state " + block2 + "." + state2 + " in pragma");
+            return null;
+        }
+
+
+        String equation = pragma.split("\\)")[1];
+        equation = equation.replaceAll(" ", "");
+        int symbolType = 0;
+        int time = 0;
+        if (equation.substring(0, 1).equals("<")) {
+            symbolType = AvatarPragmaLatency.lessThan;
+            try {
+                time = Integer.valueOf(equation.split("<")[1]);
+            } catch (Exception e) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid number format in " + _pragma);
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+                TraceManager.addDev("Invalid number format");
+                return null;
+            }
+        } else if (equation.substring(0, 1).equals(">")) {
+            symbolType = AvatarPragmaLatency.greaterThan;
+            try {
+                time = Integer.valueOf(equation.split(">")[1]);
+            } catch (Exception e) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Invalid number format in " + _pragma);
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+                TraceManager.addDev("Invalid number format");
+                return null;
+            }
+        } else if (equation.substring(0, 1).equals("?")) {
+            symbolType = AvatarPragmaLatency.query;
+        } else {
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "no latency expression found in " + _pragma);
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
+            TraceManager.addDev("No latency expression found");
+            return null;
+        }
+        return new AvatarPragmaLatency(_pragma, tgc, bl1, st1, bl2, st2, symbolType, time, id1, id2, _pragma);
+
+
+    }
+
+    private boolean checkSafetyPragma(String _pragma, List<AvatarBDBlock> _blocks, AvatarSpecification as, TGComponent tgc) {
         //Todo: check types
         //Todo: handle complex types
         _pragma = _pragma.trim();
 
-        if (_pragma.contains("=") && !(_pragma.contains("==") || _pragma.contains("<=") || _pragma.contains(">=") || _pragma.contains("!="))){
+        if (_pragma.contains("=") && !(_pragma.contains("==") || _pragma.contains("<=") || _pragma.contains(">=") || _pragma.contains("!="))) {
             //not a query
-			UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " cannot be parsed");
-		    ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    ce.setTGComponent(tgc);
-		    addWarning(ce);
+            UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " cannot be parsed");
+            ce.setTDiagramPanel(adp.getAvatarBDPanel());
+            ce.setTGComponent(tgc);
+            addWarning(ce);
             TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed");
             return false;
         }
 
         int indexOfWrongLeadsTo = _pragma.indexOf("->");
         if (indexOfWrongLeadsTo > 0) {
-        	if (_pragma.charAt(indexOfWrongLeadsTo -1) != '-') {
-				//not a query
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " uses an invalid operator(->). Maybe you wanted to use \"-->\" instead?");
-				ce.setTDiagramPanel(adp.getAvatarBDPanel());
-				ce.setTGComponent(tgc);
-				addWarning(ce);
-				TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed");
-				return false;
-			}
-		}
+            if (_pragma.charAt(indexOfWrongLeadsTo - 1) != '-') {
+                //not a query
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " uses an invalid operator(->). Maybe you wanted to use \"-->\" instead?");
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+                TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed");
+                return false;
+            }
+        }
 
 
         String header = _pragma.split(" ")[0];
-        if (_pragma.contains("-->")){
+        if (_pragma.contains("-->")) {
             //will be implies
-            _pragma = _pragma.replaceAll(" ","");
+            _pragma = _pragma.replaceAll(" ", "");
             String state1 = _pragma.split("-->")[0];
             String state2 = _pragma.split("-->")[1];
-        //    System.out.println("checking... " + state1 + " " + state2);
-            if (!state1.contains(".") || !state2.contains(".")){
+            //    System.out.println("checking... " + state1 + " " + state2);
+            if (!state1.contains(".") || !state2.contains(".")) {
                 TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed: missing '.'");
                 return false;
             }
-            if (!statementParser(state1, as, _pragma, tgc)){
+            if (!statementParser(state1, as, _pragma, tgc)) {
                 return false;
             }
             //check the second half of implies
-            if (!statementParser(state2,as, _pragma, tgc)){
+            if (!statementParser(state2, as, _pragma, tgc)) {
                 return false;
             }
-        }
-        else if (header.equals("E[]") || header.equals("E<>") || header.equals("A[]") || header.equals("A<>")){
-            String state = _pragma.replace("E[]","").replace("A[]","").replace("E<>","").replace("A<>","").replaceAll(" ","");
+        } else if (header.equals("E[]") || header.equals("E<>") || header.equals("A[]") || header.equals("A<>")) {
+            String state = _pragma.replace("E[]", "").replace("A[]", "").replace("E<>", "").replace("A<>", "").replaceAll(" ", "");
             state = state.trim();
-           // if (!state.contains("||") && !state.contains("&&")){
-                if (!statementParser(state, as, _pragma, tgc)){
-                    return false;
-                }
+            // if (!state.contains("||") && !state.contains("&&")){
+            if (!statementParser(state, as, _pragma, tgc)) {
+                return false;
+            }
             //}
 
-            
-        }
-        else {
+
+        } else {
             TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed");
             return false;
         }
         return true;
     }
-    
-    private boolean statementParser(String state, AvatarSpecification as, String _pragma, TGComponent tgc){
+
+    private boolean statementParser(String state, AvatarSpecification as, String _pragma, TGComponent tgc) {
         //check the syntax of a single statement
-       
+
 
         //Divide into simple statements
-        
+
         String[] split = state.split("[|&]+");
-   //     System.out.println("split " + split[0]);
-        if (split.length >1){
+        //     System.out.println("split " + split[0]);
+        if (split.length > 1) {
             boolean validity = true;
-            for (String fragment: split){
-                if (fragment.length()>2){
+            for (String fragment : split) {
+                if (fragment.length() > 2) {
                     validity = validity && statementParser(fragment, as, _pragma, tgc);
                 }
             }
             return validity;
         }
-        String number= "[0-9]+";
+        String number = "[0-9]+";
         String bo = "(?i)true|false";
-        if (state.contains("=") || state.contains("<") || state.contains(">")){
+        if (state.contains("=") || state.contains("<") || state.contains(">")) {
             String state1 = state.split("==|>(=)?|!=|<(=)?")[0];
             String state2 = state.split("==|>(=)?|!=|<(=)?")[1];
-            if (!state1.contains(".")){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " cannot be parsed: missing '.'");
-			    ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    ce.setTGComponent(tgc);
-			    addWarning(ce);
- 
-	            TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed: missing '.'");
-            	return false;
+            if (!state1.contains(".")) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Pragma " + _pragma + " cannot be parsed: missing '.'");
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+
+                TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed: missing '.'");
+                return false;
             }
-            String block1 = state1.split("\\.",2)[0];
-            String attr1 = state1.split("\\.",2)[1];
-           	if (attr1.contains(".")){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex UPPAAL Pragma attribute " + attr1 + " must contain __ and not .");
-			    ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    ce.setTGComponent(tgc);
-			    addWarning(ce);
- 
-           		TraceManager.addDev("Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
-           		return false;
-           	}
-
-            attr1 = attr1.replace(".","__");
-            AvatarType p1Type= AvatarType.UNDEFINED;
+            String block1 = state1.split("\\.", 2)[0];
+            String attr1 = state1.split("\\.", 2)[1];
+            if (attr1.contains(".")) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex UPPAAL Pragma attribute " + attr1 + " must contain __ and not .");
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+
+                TraceManager.addDev("Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
+                return false;
+            }
+
+            attr1 = attr1.replace(".", "__");
+            AvatarType p1Type = AvatarType.UNDEFINED;
             AvatarBlock bl1 = as.getBlockWithName(block1);
-            if (bl1 !=null){
+            if (bl1 != null) {
                 //AvatarStateMachine asm = bl1.getStateMachine();
-                if (bl1.getIndexOfAvatarAttributeWithName(attr1)==-1){
-					UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute name " + attr1);
-			    	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    	ce.setTGComponent(tgc);
-			    	addWarning(ce);
+                if (bl1.getIndexOfAvatarAttributeWithName(attr1) == -1) {
+                    UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute name " + attr1);
+                    ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                    ce.setTGComponent(tgc);
+                    addWarning(ce);
                     TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid attribute name " + attr1);
                     return false;
-                }
-                else {
+                } else {
                     int ind = bl1.getIndexOfAvatarAttributeWithName(attr1);
                     AvatarAttribute attr = bl1.getAttribute(ind);
                     p1Type = attr.getType();
                 }
-            }
-            else {
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid block name " + block1);
-			   	ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    ce.setTGComponent(tgc);
-			    addWarning(ce);
+            } else {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid block name " + block1);
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
                 TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid block name " + block1);
                 return false;
             }
-            if (state2.contains(".")){
-                String block2 = state2.split("\\.",2)[0];
-                String attr2= state2.split("\\.",2)[1];
-                	if (attr2.contains(".")){
-						UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex UPPAAL Pragma attribute " + attr2 + " must contain __ and not .");
-			   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    		ce.setTGComponent(tgc);
-			    		addWarning(ce);
-           				TraceManager.addDev("Complex Safety Pragma attribute " + attr2 + " must contain __ and not .");
-           				return false;
-           			}
+            if (state2.contains(".")) {
+                String block2 = state2.split("\\.", 2)[0];
+                String attr2 = state2.split("\\.", 2)[1];
+                if (attr2.contains(".")) {
+                    UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex UPPAAL Pragma attribute " + attr2 + " must contain __ and not .");
+                    ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                    ce.setTGComponent(tgc);
+                    addWarning(ce);
+                    TraceManager.addDev("Complex Safety Pragma attribute " + attr2 + " must contain __ and not .");
+                    return false;
+                }
 
                 AvatarBlock bl2 = as.getBlockWithName(block2);
-                if (bl2!=null){
-                    if (bl2.getIndexOfAvatarAttributeWithName(attr2)==-1){
-						UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute name " + attr2);
-			   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			    		ce.setTGComponent(tgc);
-			    		addWarning(ce);
+                if (bl2 != null) {
+                    if (bl2.getIndexOfAvatarAttributeWithName(attr2) == -1) {
+                        UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute name " + attr2);
+                        ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                        ce.setTGComponent(tgc);
+                        addWarning(ce);
                         TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid attribute name " + attr2);
                         return false;
                     }
@@ -578,346 +557,103 @@ public class AvatarDesignPanelTranslator {
                     AvatarAttribute attr = bl2.getAttribute(ind);
                     p1Type = attr.getType();
 
-                }
-                else {
-					UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Safety Pragma " + _pragma + " contains invalid block name " + block2);
-			   		ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			   		ce.setTGComponent(tgc);
-			    	addWarning(ce);
+                } else {
+                    UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Safety Pragma " + _pragma + " contains invalid block name " + block2);
+                    ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                    ce.setTGComponent(tgc);
+                    addWarning(ce);
                     TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid block name " + block2);
                     return false;
                 }
-            }
-            else {
-                if (state2.matches(number)){
-                    if (p1Type != AvatarType.INTEGER){
-						UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " has incompatible types");
-			   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			   			ce.setTGComponent(tgc);
-			    		addWarning(ce);
+            } else {
+                if (state2.matches(number)) {
+                    if (p1Type != AvatarType.INTEGER) {
+                        UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " has incompatible types");
+                        ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                        ce.setTGComponent(tgc);
+                        addWarning(ce);
                         TraceManager.addDev("Safety Pragma " + _pragma + " has incompatible types");
                         return false;
                     }
-                }
-                else if (state2.matches(bo)){
-                    if (p1Type != AvatarType.BOOLEAN){
-						UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " has incompatible types");
-			   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			   			ce.setTGComponent(tgc);
-			    		addWarning(ce);
+                } else if (state2.matches(bo)) {
+                    if (p1Type != AvatarType.BOOLEAN) {
+                        UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " has incompatible types");
+                        ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                        ce.setTGComponent(tgc);
+                        addWarning(ce);
                         TraceManager.addDev("Safety Pragma " + _pragma + " has incompatible types");
                         return false;
                     }
-                }
-                else {
-					UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " cannot be parsed");
-			   		ce.setTDiagramPanel(adp.getAvatarBDPanel());
-			   		ce.setTGComponent(tgc);
-			    	addWarning(ce);
+                } else {
+                    UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " cannot be parsed");
+                    ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                    ce.setTGComponent(tgc);
+                    addWarning(ce);
                     TraceManager.addDev("Safety Pragma " + _pragma + " cannot be parsed");
                     return false;
                 }
             }
-        }
-        else {
-        	if (!state.contains(".")){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Safety Pragma " + _pragma + " cannot be parsed: missing '.'");
-		   		ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		   		ce.setTGComponent(tgc);
-		    	addWarning(ce);
-	        	TraceManager.addDev("UPPAAL Pragma " + _pragma + " improperly formatted");
-        		return false;
-        	}
-            String block1 = state.split("\\.",2)[0];
-            String attr1 = state.split("\\.",2)[1];
-           	if (attr1.contains(".")){
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
-	   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-	    		ce.setTGComponent(tgc);
-	    		addWarning(ce);
-       			TraceManager.addDev("Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
-         		return false;
-           	}
+        } else {
+            if (!state.contains(".")) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Safety Pragma " + _pragma + " cannot be parsed: missing '.'");
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+                TraceManager.addDev("UPPAAL Pragma " + _pragma + " improperly formatted");
+                return false;
+            }
+            String block1 = state.split("\\.", 2)[0];
+            String attr1 = state.split("\\.", 2)[1];
+            if (attr1.contains(".")) {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
+                TraceManager.addDev("Complex Safety Pragma attribute " + attr1 + " must contain __ and not .");
+                return false;
+            }
             AvatarBlock bl1 = as.getBlockWithName(block1);
-            if (bl1 !=null){
+            if (bl1 != null) {
                 AvatarStateMachine asm = bl1.getStateMachine();
-                if (bl1.getIndexOfAvatarAttributeWithName(attr1)==-1 && asm.getStateWithName(attr1)==null){
-					UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute or state name " + attr1);
-		   			ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    		ce.setTGComponent(tgc);
-		    		addWarning(ce);
-   
+                if (bl1.getIndexOfAvatarAttributeWithName(attr1) == -1 && asm.getStateWithName(attr1) == null) {
+                    UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid attribute or state name " + attr1);
+                    ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                    ce.setTGComponent(tgc);
+                    addWarning(ce);
+
                     TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid attribute or state name " + attr1);
                     return false;
                 }
-                
+
                 int ind = bl1.getIndexOfAvatarAttributeWithName(attr1);
-                if (ind !=-1){
+                if (ind != -1) {
                     AvatarAttribute attr = bl1.getAttribute(ind);
-                    if (attr.getType()!=AvatarType.BOOLEAN){
-						UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR,"UPPAAL Pragma " + _pragma + " performs query on non-boolean attribute");
-		   				ce.setTDiagramPanel(adp.getAvatarBDPanel());
-		    			ce.setTGComponent(tgc);
-		    			addWarning(ce);
+                    if (attr.getType() != AvatarType.BOOLEAN) {
+                        UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " performs query on non-boolean attribute");
+                        ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                        ce.setTGComponent(tgc);
+                        addWarning(ce);
                         TraceManager.addDev("Safety Pragma " + _pragma + " performs query on non-boolean attribute");
                         return false;
                     }
                 }
-            }
-            else {
-				UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR,"UPPAAL Pragma " + _pragma + " contains invalid block name " + block1);
-   				ce.setTDiagramPanel(adp.getAvatarBDPanel());
-    			ce.setTGComponent(tgc);
-    			addWarning(ce);
+            } else {
+                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "UPPAAL Pragma " + _pragma + " contains invalid block name " + block1);
+                ce.setTDiagramPanel(adp.getAvatarBDPanel());
+                ce.setTGComponent(tgc);
+                addWarning(ce);
                 TraceManager.addDev("Safety Pragma " + _pragma + " contains invalid block name " + block1);
                 return false;
             }
         }
         return true;
     }
-//    public String reworkPragma(String _pragma, LinkedList<AvatarBDBlock> _blocks) {
-//        String ret = "";
-//        int i;
-//
-//        // Identify first keyword
-//        _pragma = _pragma.trim();
-//
-//        int index = _pragma.indexOf(" ");
-//
-//        if (index == -1) {
-//            return null;
-//        }
-//
-//        String header = _pragma.substring(0, index).trim();
-//
-//        for(i=0; i<AvatarPragma.PRAGMAS.length; i++) {
-//            if (header.compareTo(AvatarPragma.PRAGMAS[i]) == 0) {
-//                break;
-//            }
-//        }
-//
-//        // Invalid header?
-//        if (i == AvatarPragma.PRAGMAS.length) {
-//            TraceManager.addDev("Invalid Pragma " + 0);
-//            return null;
-//        }
-//
-//
-//
-//        ret = AvatarPragma.PRAGMAS_TRANSLATION[i] + " ";
-//
-//        // Checking for arguments
-//
-//
-//        boolean b = ret.startsWith("Authenticity ");
-//        boolean b1 = ret.startsWith("PrivatePublicKeys ");
-//        String arguments [] = _pragma.substring(index+1, _pragma.length()).trim().split(" ");
-//        String tmp;
-//        String blockName, stateName, paramName = "";
-//        boolean found = false;
-//        LinkedList<TAttribute> types;
-//        AvatarBDBlock block;
-//        TAttribute ta;
-//     //   AvatarBlock ab;
-//        String myBlockName = "";
-//
-//
-//
-//
-//        for(i=0; i<arguments.length; i++) {
-//            tmp = arguments[i];
-//            TraceManager.addDev("arguments #=" + arguments.length + " pragma=" + _pragma + " tmp=" + tmp);
-//
-//            if (b1) {
-//
-//                // Private Public keys?
-//                if (i == 0) {
-//                    // Must be a block name
-//                    // Look for at least a block
-//                    found = false;
-//                    for(Object o: _blocks) {
-//                        block = (AvatarBDBlock)o;
-//                        //TraceManager.addDev("Comparing " + block.getBlockName() + " with " + tmp);
-//                        if (block.getBlockName().compareTo(tmp) ==0) {
-//                            myBlockName = block.getBlockName();
-//                            found = true;
-//                            ret = ret + tmp;
-//                            break;
-//                        }
-//                        /*for(Object oo: block.getAttributeList()) {
-//                          ta = (TAttribute)oo;
-//                          if (ta.getId().compareTo(tmp) == 0) {
-//                          found = true;
-//
-//                          if ((ta.getType() == TAttribute.NATURAL) || (ta.getType() == TAttribute.INTEGER) || (ta.getType() == TAttribute.BOOLEAN)) {
-//                          ret = ret  + tmp + " ";
-//                          } else if (ta.getType() == TAttribute.OTHER) {
-//                          // Must find all subsequent types
-//                          types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
-//                          if (types == null) {
-//                          TraceManager.addDev("Invalid Pragma " + 1);
-//                          return null;
-//
-//                          } else {
-//                          for(int j=0; j<types.size(); j++) {
-//                          ret = ret + tmp + "__" + ((TAttribute)(types.elementAt(j))).getId() + " ";
-//                          }
-//                          }
-//                          }
-//
-//                          }
-//                          }*/
-//                    }
-//                    if (found == false) {
-//                        TraceManager.addDev("Invalid Pragma " + 2);
-//                        return null;
-//                    }
-//
-//                } else if ((i == 1) || (i == 2)) {
-//                    // Shall be an attribute
-//                    TraceManager.addDev("i= " + i);
-//                    for(Object o: _blocks) {
-//                        block = (AvatarBDBlock)o;
-//                        TraceManager.addDev("block= " + block.getBlockName() + " my block name=" + myBlockName);
-//                        if (block.getBlockName().compareTo(myBlockName) == 0) {
-//                            TraceManager.addDev("Found the block " + ret);
-//                            for(Object oo: block.getAttributeList()) {
-//                                ta = (TAttribute)oo;
-//                                TraceManager.addDev("Attribute: " + ta.getId());
-//                                if (ta.getId().compareTo(tmp) == 0) {
-//                                    paramName = ta.getId();
-//                                    found = true;
-//                                    TraceManager.addDev("Pragma " + ret + " found=" + found);
-//                                    if ((ta.getType() == TAttribute.NATURAL) || (ta.getType() == TAttribute.INTEGER) || (ta.getType() == TAttribute.BOOLEAN)) {
-//                                        ret = ret  + " " + paramName + " ";
-//                                    } else if (ta.getType() == TAttribute.OTHER) {
-//                                        // Must find all subsequent types
-//                                        types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
-//                                        if (types == null) {
-//                                            TraceManager.addDev("Invalid Pragma " + 3);
-//                                            return null;
-//                                        } else {
-//                                            TraceManager.addDev("Pragma " + ret + " types size=" + types.size());
-//                                            for (TAttribute type: types)
-//                                                ret = ret  + " " + paramName + "__" + type.getId() + " ";
-//                                        }
-//
-//                                    } else {
-//                                        TraceManager.addDev("Invalid Pragma " + 4);
-//                                        return null;
-//                                    }
-//
-//                                    break;
-//                                }
-//                            }
-//                        }
-//                    }
-//                } else {
-//                    // Badly formatted
-//                    TraceManager.addDev("Invalid Pragma " + 5);
-//                    return null;
-//                }
-//
-//                // Other than PrivatePublicKeys
-//            } else {
-//                index = tmp.indexOf(".");
-//                if (index == -1) {
-//                    return null;
-//                }
-//                blockName = tmp.substring(0, index);
-//
-//                //TraceManager.addDev("blockName=" + blockName);
-//                // Search for the block
-//                for(Object o: _blocks) {
-//                    block = (AvatarBDBlock)o;
-//                    if (block.getBlockName().compareTo(blockName) == 0) {
-//
-//                        if (b) {
-//                            // Authenticity
-//                            stateName = tmp.substring(index+1, tmp.length());
-//                            //TraceManager.addDev("stateName=" + stateName);
-//                            index = stateName.indexOf(".");
-//                            if (index == -1) {
-//                                return null;
-//                            }
-//                            paramName = stateName.substring(index+1, stateName.length());
-//                            stateName = stateName.substring(0, index);
-//
-//                            for(Object oo: block.getAttributeList()) {
-//                                ta = (TAttribute)oo;
-//                                if (ta.getId().compareTo(paramName) == 0) {
-//                                    found = true;
-//
-//                                    if ((ta.getType() == TAttribute.NATURAL) || (ta.getType() == TAttribute.INTEGER) || (ta.getType() == TAttribute.BOOLEAN)) {
-//                                        ret = ret + blockName + "." + stateName + "." + paramName + " ";
-//                                    } else if (ta.getType() == TAttribute.OTHER) {
-//                                        // Must find all subsequent types
-//                                        types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
-//                                        if (types == null) {
-//                                            return null;
-//                                        } else {
-//                                            for (TAttribute type: types)
-//                                                ret = ret + blockName + "." + stateName + "." + paramName + "__" + type.getId() + " ";
-//                                        }
-//
-//                                    } else {
-//                                        return null;
-//                                    }
-//
-//                                    break;
-//                                }
-//                            }
-//
-//                        } else {
-//                            // Other: confidentiality, initial system knowledge, initial session knowledge, constant
-//
-//                            paramName = tmp.substring(index+1, tmp.length());
-//                            for(Object oo: block.getAttributeList()) {
-//                                ta = (TAttribute)oo;
-//                                if (ta.getId().compareTo(paramName) == 0) {
-//                                    found = true;
-//
-//                                    if ((ta.getType() == TAttribute.NATURAL) || (ta.getType() == TAttribute.INTEGER) || (ta.getType() == TAttribute.BOOLEAN)) {
-//                                        ret = ret + blockName + "." + paramName + " ";
-//                                    } else if (ta.getType() == TAttribute.OTHER) {
-//                                        // Must find all subsequent types
-//                                        types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
-//                                        if (types == null) {
-//                                            return null;
-//                                        } else {
-//                                            for (TAttribute type: types)
-//                                                ret = ret + blockName + "." + paramName + "__" + type.getId() + " ";
-//                                        }
-//
-//                                    } else {
-//                                        return null;
-//                                    }
-//
-//                                    break;
-//                                }
-//                            }
-//
-//                        }
-//                    }
-//                }
-//            }
-//
-//            if (!found) {
-//                return null;
-//            }
-//
-//        }
-//
-//        TraceManager.addDev("Reworked pragma: " + ret);
-//
-//        return ret.trim();
-//    }
 
-    private AvatarAttribute createRegularAttribute (AvatarStateMachineOwner _ab, TAttribute _a, String _preName) {
+    private AvatarAttribute createRegularAttribute(AvatarStateMachineOwner _ab, TAttribute _a, String _preName) {
         AvatarType type = AvatarType.UNDEFINED;
-        if (_a.getType() == TAttribute.INTEGER){
+        if (_a.getType() == TAttribute.INTEGER) {
             type = AvatarType.INTEGER;
-        } else if (_a.getType() == TAttribute.NATURAL){
+        } else if (_a.getType() == TAttribute.NATURAL) {
             type = AvatarType.INTEGER;
         } else if (_a.getType() == TAttribute.BOOLEAN) {
             type = AvatarType.BOOLEAN;
@@ -931,26 +667,26 @@ public class AvatarDesignPanelTranslator {
     }
 
     private void addRegularAttribute(AvatarBlock _ab, TAttribute _a, String _preName) {
-        _ab.addAttribute(this.createRegularAttribute (_ab, _a, _preName));
+        _ab.addAttribute(this.createRegularAttribute(_ab, _a, _preName));
     }
 
-    private void createLibraryFunctions (AvatarSpecification _as, List<AvatarBDLibraryFunction> _libraryFunctions) {
-        for (AvatarBDLibraryFunction libraryFunction: _libraryFunctions) {
-            AvatarLibraryFunction alf = new AvatarLibraryFunction (libraryFunction.getFunctionName (), _as, libraryFunction);
-            _as.addLibraryFunction (alf);
+    private void createLibraryFunctions(AvatarSpecification _as, List<AvatarBDLibraryFunction> _libraryFunctions) {
+        for (AvatarBDLibraryFunction libraryFunction : _libraryFunctions) {
+            AvatarLibraryFunction alf = new AvatarLibraryFunction(libraryFunction.getFunctionName(), _as, libraryFunction);
+            _as.addLibraryFunction(alf);
             listE.addCor(alf, libraryFunction);
             libraryFunction.setAVATARID(alf.getID());
 
             // Create parameters
-            for (TAttribute attr: libraryFunction.getParameters ())
+            for (TAttribute attr : libraryFunction.getParameters())
                 if (attr.getType() == TAttribute.INTEGER
-                    || attr.getType() == TAttribute.NATURAL
-                    || attr.getType() == TAttribute.BOOLEAN
-                    || attr.getType() == TAttribute.TIMER)
-                    alf.addParameter (this.createRegularAttribute (alf, attr, ""));
+                        || attr.getType() == TAttribute.NATURAL
+                        || attr.getType() == TAttribute.BOOLEAN
+                        || attr.getType() == TAttribute.TIMER)
+                    alf.addParameter(this.createRegularAttribute(alf, attr, ""));
                 else {
                     // other
-                    List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (attr.getTypeOther ());
+                    List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(attr.getTypeOther());
                     if (types == null) {
                         UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + attr.getTypeOther() + " used in " + alf.getName());
                         // TODO: adapt
@@ -958,112 +694,112 @@ public class AvatarDesignPanelTranslator {
                         addCheckingError(ce);
                         return;
                     } else {
-                        if (types.isEmpty ()) {
+                        if (types.isEmpty()) {
                             UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Data type definition must contain at least one attribute:  " + alf.getName());
                             ce.setTDiagramPanel(adp.getAvatarBDPanel());
                             addCheckingError(ce);
                         } else {
-                            nameTypeMap.put (libraryFunction.getFunctionName()+"."+attr.getId(), attr.getTypeOther());
-                            typeAttributesMap.put (attr.getTypeOther(), types);
-                            for (TAttribute type: types)
-                                alf.addParameter (this.createRegularAttribute (alf, type, attr.getId() + "__"));
+                            nameTypeMap.put(libraryFunction.getFunctionName() + "." + attr.getId(), attr.getTypeOther());
+                            typeAttributesMap.put(attr.getTypeOther(), types);
+                            for (TAttribute type : types)
+                                alf.addParameter(this.createRegularAttribute(alf, type, attr.getId() + "__"));
                         }
                     }
                 }
 
             // Create return values
-            for (TAttribute attr: libraryFunction.getReturnAttributes ())
+            for (TAttribute attr : libraryFunction.getReturnAttributes())
                 if (attr.getType() == TAttribute.INTEGER
-                    || attr.getType() == TAttribute.NATURAL
-                    || attr.getType() == TAttribute.BOOLEAN
-                    || attr.getType() == TAttribute.TIMER)
-                    alf.addReturnAttribute (this.createRegularAttribute (alf, attr, ""));
+                        || attr.getType() == TAttribute.NATURAL
+                        || attr.getType() == TAttribute.BOOLEAN
+                        || attr.getType() == TAttribute.TIMER)
+                    alf.addReturnAttribute(this.createRegularAttribute(alf, attr, ""));
                 else {
                     // other
-                    List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (attr.getTypeOther ());
+                    List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(attr.getTypeOther());
                     if (types == null) {
                         UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + attr.getTypeOther() + " used in " + alf.getName());
                         ce.setTDiagramPanel(adp.getAvatarBDPanel());
                         addCheckingError(ce);
                         return;
                     } else {
-                        if (types.isEmpty ()) {
+                        if (types.isEmpty()) {
                             UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Data type definition must contain at least one attribute:  " + alf.getName());
                             ce.setTDiagramPanel(adp.getAvatarBDPanel());
                             addCheckingError(ce);
                         } else {
-                            nameTypeMap.put (libraryFunction.getFunctionName()+"."+attr.getId(), attr.getTypeOther());
-                            typeAttributesMap.put (attr.getTypeOther(), types);
-                            for (TAttribute type: types)
-                                alf.addReturnAttribute (this.createRegularAttribute (alf, type, attr.getId() + "__"));
+                            nameTypeMap.put(libraryFunction.getFunctionName() + "." + attr.getId(), attr.getTypeOther());
+                            typeAttributesMap.put(attr.getTypeOther(), types);
+                            for (TAttribute type : types)
+                                alf.addReturnAttribute(this.createRegularAttribute(alf, type, attr.getId() + "__"));
                         }
                     }
                 }
 
             // Create attributes
-            for (TAttribute attr: libraryFunction.getAttributes ())
+            for (TAttribute attr : libraryFunction.getAttributes())
                 if (attr.getType() == TAttribute.INTEGER
-                    || attr.getType() == TAttribute.NATURAL
-                    || attr.getType() == TAttribute.BOOLEAN
-                    || attr.getType() == TAttribute.TIMER)
-                    alf.addAttribute (this.createRegularAttribute (alf, attr, ""));
+                        || attr.getType() == TAttribute.NATURAL
+                        || attr.getType() == TAttribute.BOOLEAN
+                        || attr.getType() == TAttribute.TIMER)
+                    alf.addAttribute(this.createRegularAttribute(alf, attr, ""));
                 else {
                     // other
-                    List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (attr.getTypeOther ());
+                    List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(attr.getTypeOther());
                     if (types == null) {
                         UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + attr.getTypeOther() + " used in " + alf.getName());
                         ce.setTDiagramPanel(adp.getAvatarBDPanel());
                         addCheckingError(ce);
                         return;
                     } else {
-                        if (types.isEmpty ()) {
+                        if (types.isEmpty()) {
                             UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Data type definition must contain at least one attribute:  " + alf.getName());
                             ce.setTDiagramPanel(adp.getAvatarBDPanel());
                             addCheckingError(ce);
                         } else {
-                            nameTypeMap.put (libraryFunction.getFunctionName()+"."+attr.getId(), attr.getTypeOther());
-                            typeAttributesMap.put (attr.getTypeOther(), types);
-                            for (TAttribute type: types)
-                                alf.addAttribute (this.createRegularAttribute (alf, type, attr.getId() + "__"));
+                            nameTypeMap.put(libraryFunction.getFunctionName() + "." + attr.getId(), attr.getTypeOther());
+                            typeAttributesMap.put(attr.getTypeOther(), types);
+                            for (TAttribute type : types)
+                                alf.addAttribute(this.createRegularAttribute(alf, type, attr.getId() + "__"));
                         }
                     }
                 }
 
             // Create methods
-            for (ui.AvatarMethod uiam: libraryFunction.getMethods ()) {
-                avatartranslator.AvatarMethod atam = new avatartranslator.AvatarMethod (uiam.getId (), uiam);
-                atam.setImplementationProvided (uiam.isImplementationProvided());
-                alf.addMethod (atam);
-                this.makeParameters (alf, atam, uiam);
-                this.makeReturnParameters (alf, libraryFunction, atam, uiam);
+            for (ui.AvatarMethod uiam : libraryFunction.getMethods()) {
+                avatartranslator.AvatarMethod atam = new avatartranslator.AvatarMethod(uiam.getId(), uiam);
+                atam.setImplementationProvided(uiam.isImplementationProvided());
+                alf.addMethod(atam);
+                this.makeParameters(alf, atam, uiam);
+                this.makeReturnParameters(alf, libraryFunction, atam, uiam);
             }
 
             // Create signals
-            for ( AvatarSignal uias: libraryFunction.getSignals ()) {
+            for (AvatarSignal uias : libraryFunction.getSignals()) {
                 avatartranslator.AvatarSignal atas;
                 if (uias.getInOut() == AvatarSignal.IN)
                     atas = new avatartranslator.AvatarSignal(uias.getId(), avatartranslator.AvatarSignal.IN, uias);
                 else
                     atas = new avatartranslator.AvatarSignal(uias.getId(), avatartranslator.AvatarSignal.OUT, uias);
 
-                alf.addSignal (atas);
-                this.makeParameters (alf, atas, uias);
+                alf.addSignal(atas);
+                this.makeParameters(alf, atas, uias);
             }
         }
     }
 
     private void createBlocks(AvatarSpecification _as, List<AvatarBDBlock> _blocks) {
-        for(AvatarBDBlock block: _blocks) {
+        for (AvatarBDBlock block : _blocks) {
             AvatarBlock ab = new AvatarBlock(block.getBlockName(), _as, block);
             _as.addBlock(ab);
             listE.addCor(ab, block);
             block.setAVATARID(ab.getID());
 
             // Create attributes
-            for (TAttribute a: block.getAttributeList ()) {
-                if (a.getType() == TAttribute.INTEGER){
+            for (TAttribute a : block.getAttributeList()) {
+                if (a.getType() == TAttribute.INTEGER) {
                     addRegularAttribute(ab, a, "");
-                } else if (a.getType() == TAttribute.NATURAL){
+                } else if (a.getType() == TAttribute.NATURAL) {
                     addRegularAttribute(ab, a, "");
                 } else if (a.getType() == TAttribute.BOOLEAN) {
                     addRegularAttribute(ab, a, "");
@@ -1079,14 +815,14 @@ public class AvatarDesignPanelTranslator {
                         addCheckingError(ce);
                         return;
                     } else {
-                        if (types.size() ==0) {
+                        if (types.size() == 0) {
                             UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Data type definition must contain at least one attribute:  " + ab.getName());
                             ce.setTDiagramPanel(adp.getAvatarBDPanel());
                             addCheckingError(ce);
                         } else {
-                            nameTypeMap.put(block.getBlockName()+"."+a.getId(), a.getTypeOther());
+                            nameTypeMap.put(block.getBlockName() + "." + a.getId(), a.getTypeOther());
                             typeAttributesMap.put(a.getTypeOther(), types);
-                            for (TAttribute type: types)
+                            for (TAttribute type : types)
                                 addRegularAttribute(ab, type, a.getId() + "__");
                         }
                     }
@@ -1095,7 +831,7 @@ public class AvatarDesignPanelTranslator {
             }
 
             // Create methods
-            for (ui.AvatarMethod uiam: block.getMethodList ()) {
+            for (ui.AvatarMethod uiam : block.getMethodList()) {
                 avatartranslator.AvatarMethod atam = new avatartranslator.AvatarMethod(uiam.getId(), uiam);
                 atam.setImplementationProvided(uiam.isImplementationProvided());
                 ab.addMethod(atam);
@@ -1104,7 +840,7 @@ public class AvatarDesignPanelTranslator {
             }
 
             // Create signals
-            for (ui.AvatarSignal uias: block.getSignalList ()) {
+            for (ui.AvatarSignal uias : block.getSignalList()) {
                 avatartranslator.AvatarSignal atas;
                 if (uias.getInOut() == AvatarSignal.IN) {
                     atas = new avatartranslator.AvatarSignal(uias.getId(), avatartranslator.AvatarSignal.IN, uias);
@@ -1121,7 +857,7 @@ public class AvatarDesignPanelTranslator {
         }
 
         // Make block hierarchy
-        for(AvatarBlock block: _as.getListOfBlocks()) {
+        for (AvatarBlock block : _as.getListOfBlocks()) {
             TGComponent tgc1 = listE.getTG(block);
             if ((tgc1 != null) && (tgc1.getFather() != null)) {
                 TGComponent tgc2 = tgc1.getFather();
@@ -1135,12 +871,12 @@ public class AvatarDesignPanelTranslator {
 
     private void makeBlockStateMachines(AvatarSpecification _as) {
         // Make state machine of blocks
-        for(AvatarBlock block: _as.getListOfBlocks())
+        for (AvatarBlock block : _as.getListOfBlocks())
             this.makeStateMachine(_as, block);
 
         // Make state machine of library functions
-        for (AvatarLibraryFunction libraryFunction: _as.getListOfLibraryFunctions ())
-            this.makeStateMachine (_as, libraryFunction);
+        for (AvatarLibraryFunction libraryFunction : _as.getListOfLibraryFunctions())
+            this.makeStateMachine(_as, libraryFunction);
     }
 
     private void makeReturnParameters(AvatarStateMachineOwner _ab, AvatarBDStateMachineOwner _block, avatartranslator.AvatarMethod _atam, ui.AvatarMethod _uiam) {
@@ -1165,8 +901,8 @@ public class AvatarDesignPanelTranslator {
                 addCheckingError(ce);
                 return;
             } else {
-                int j=0;
-                for (TAttribute ta: types) {
+                int j = 0;
+                for (TAttribute ta : types) {
                     if (ta.getType() == TAttribute.INTEGER)
                         type = AvatarType.INTEGER;
                     else if (ta.getType() == TAttribute.NATURAL)
@@ -1187,7 +923,7 @@ public class AvatarDesignPanelTranslator {
         String typeIds[] = _uiam.getTypeIds();
         String types[] = _uiam.getTypes();
 
-        for(int i=0; i<types.length; i++) {
+        for (int i = 0; i < types.length; i++) {
             List<TAttribute> v = adp.getAvatarBDPanel().getAttributesOfDataType(types[i]);
             if (v == null) {
                 if (AvatarType.getType(types[i]) == AvatarType.UNDEFINED) {
@@ -1200,11 +936,11 @@ public class AvatarDesignPanelTranslator {
                 AvatarAttribute aa = new AvatarAttribute(typeIds[i], AvatarType.getType(types[i]), _block, _uiam);
                 _atam.addParameter(aa);
             } else {
-                for (TAttribute ta: v) {
+                for (TAttribute ta : v) {
                     AvatarType type = AvatarType.UNDEFINED;
-                    if (ta.getType() == TAttribute.INTEGER){
+                    if (ta.getType() == TAttribute.INTEGER) {
                         type = AvatarType.INTEGER;
-                    } else if (ta.getType() == TAttribute.NATURAL){
+                    } else if (ta.getType() == TAttribute.NATURAL) {
                         type = AvatarType.INTEGER;
                     } else if (ta.getType() == TAttribute.BOOLEAN) {
                         type = AvatarType.BOOLEAN;
@@ -1218,8 +954,8 @@ public class AvatarDesignPanelTranslator {
         }
     }
 
-    private void manageAttribute (String _name, AvatarStateMachineOwner _ab, AvatarActionOnSignal _aaos, TDiagramPanel _tdp, TGComponent _tgc, String _idOperator) {
-        TAttribute ta =  adp.getAvatarBDPanel().getAttribute(_name, _ab.getName());
+    private void manageAttribute(String _name, AvatarStateMachineOwner _ab, AvatarActionOnSignal _aaos, TDiagramPanel _tdp, TGComponent _tgc, String _idOperator) {
+        TAttribute ta = adp.getAvatarBDPanel().getAttribute(_name, _ab.getName());
         if (ta == null) {
             UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed parameter: " + _name + " in signal expression: " + _idOperator);
             // TODO: adapt
@@ -1228,21 +964,21 @@ public class AvatarDesignPanelTranslator {
             ce.setTGComponent(_tgc);
             addCheckingError(ce);
             TraceManager.addDev("not found");
-            return ;
+            return;
         }
 
         //TraceManager.addDev("Found: " + ta.getId());
 
-        List<String> v = new LinkedList<String> ();
+        List<String> v = new LinkedList<String>();
 
         if (ta.getType() == TAttribute.OTHER)
-            for (TAttribute tatmp: adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther()))
+            for (TAttribute tatmp : adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther()))
                 v.add(_name + "__" + tatmp.getId());
         else
             v.add(_name);
 
         //TraceManager.addDev("Size of vector:" + v.size());
-        for (String name: v) {
+        for (String name : v) {
             AvatarAttribute aa = _ab.getAvatarAttributeWithName(name);
             if (aa == null) {
                 UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed parameter: " + _name + " in signal expression: " + _idOperator);
@@ -1251,401 +987,398 @@ public class AvatarDesignPanelTranslator {
                 ce.setTDiagramPanel(_tdp);
                 ce.setTGComponent(_tgc);
                 addCheckingError(ce);
-                return ;
+                return;
             }// else {
-                //TraceManager.addDev("-> Adding attr in action on signal in block " + _ab.getName() + ":" + _name + "__" + tatmp.getId());
+            //TraceManager.addDev("-> Adding attr in action on signal in block " + _ab.getName() + ":" + _name + "__" + tatmp.getId());
             _aaos.addValue(name);
             //}
         }
     }
 
-    private void translateAvatarSMDSendSignal (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDSendSignal asmdss) throws CheckingError {
-    	AvatarStateMachine asm = _ab.getStateMachine ();
-    	avatartranslator.AvatarSignal atas = _ab.getAvatarSignalWithName (asmdss.getSignalName ());
-    	if (atas == null)
-    		throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Unknown signal: " + asmdss.getSignalName());
-
-    	// Get relation of that signal
-    	if (_ab instanceof AvatarBlock) {
-    		// Note that for library functions, signals are just placeholders so they don't need to be connected to anything
-    		AvatarRelation ar = _as.getAvatarRelationWithSignal (atas);
-    		if (ar == null) {
-    			if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
-    				//TraceManager.addDev("Send/ Setting as attached " + atas);
-    				((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = false;
-    			}
-    			//TraceManager.addDev("Spec:" + _as.toString());
-    			throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Signal used for sending in " + asmdss.getValue() + " is not connected to a channel");
-    		}
-    		if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
-    			//TraceManager.addDev("Send/ Setting as attached " + atas);
-    			((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
-    		}
-    	}
+    private void translateAvatarSMDSendSignal(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDSendSignal asmdss) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
+        avatartranslator.AvatarSignal atas = _ab.getAvatarSignalWithName(asmdss.getSignalName());
+        if (atas == null)
+            throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Unknown signal: " + asmdss.getSignalName());
+
+        // Get relation of that signal
+        if (_ab instanceof AvatarBlock) {
+            // Note that for library functions, signals are just placeholders so they don't need to be connected to anything
+            AvatarRelation ar = _as.getAvatarRelationWithSignal(atas);
+            if (ar == null) {
+                if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
+                    //TraceManager.addDev("Send/ Setting as attached " + atas);
+                    ((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = false;
+                }
+                //TraceManager.addDev("Spec:" + _as.toString());
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Signal used for sending in " + asmdss.getValue() + " is not connected to a channel");
+            }
+            if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
+                //TraceManager.addDev("Send/ Setting as attached " + atas);
+                ((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
+            }
+        }
         final AvatarStateMachineElement element;
         final String name = "action_on_signal";
-        
-        if ( asmdss.isEnabled() ) {
-        	element = new AvatarActionOnSignal( name, atas, asmdss );
-        	
-        	final AvatarActionOnSignal aaos = (AvatarActionOnSignal) element;
-	    	if (asmdss.hasCheckedAccessibility())
-	    		aaos.setCheckable();
-	
-	    	if (asmdss.hasCheckedAccessibility())
-	    		aaos.setChecked();
-	
-	    	if (aaos.isReceiving ())
-	    		throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "A receiving signal is used for sending: " + asmdss.getValue());
-	
-	    	if (asmdss.getNbOfValues() == -1)
-	    		throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal: " + asmdss.getValue());
-	
-	    	for(int i=0; i<asmdss.getNbOfValues(); i++) {
-	    		String tmp = asmdss.getValue(i);
-	    		if (tmp.isEmpty ())
-	    			throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Empty parameter in signal expression: " + asmdss.getValue());
-	
-	    		this.manageAttribute (tmp, _ab, aaos, tdp, asmdss, asmdss.getValue());
-	    	}
-	
-	    	if (aaos.getNbOfValues () != atas.getListOfAttributes ().size ())
-	    		throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Badly formed signal sending: " + asmdss.getValue() + " -> nb of parameters does not match definition");
-	
-	    	// Checking expressions passed as parameter
-	    	for (int i=0; i<aaos.getNbOfValues(); i++) {
-	    		String theVal = aaos.getValue(i);
-	    		if (atas.getListOfAttributes ().get (i).isInt ()) {
-	    			if (AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, theVal) < 0)
-	    				throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdss.getValue() + " -> value at index #" + i + " does not match definition");
-	    		} else {
-	    			// We assume it is a bool attribute
-	    			if (AvatarSyntaxChecker.isAValidBoolExpr(_as, _ab, theVal) < 0)
-	    				throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdss.getValue() + " -> value at index #" + i + " does not match definition");
-	    		}
-	    	}
-	    	
-	    	if (asmdss.getCheckLatency()){
-	    		aaos.setCheckLatency( true );
-	    		_as.checkedIDs.add(asmdss.getName()+"-"+ asmdss.getSignalName()+":"+aaos.getID());
-	    	}
-        }
-        else {
-        	element = new AvatarDummyState( name + ":" + atas.getName(), asmdss );
-        }
-
-    	listE.addCor(element, asmdss);
-    	asmdss.setAVATARID (element.getID());
-    	asm.addElement(element);
+
+        if (asmdss.isEnabled()) {
+            element = new AvatarActionOnSignal(name, atas, asmdss);
+
+            final AvatarActionOnSignal aaos = (AvatarActionOnSignal) element;
+            if (asmdss.hasCheckedAccessibility())
+                aaos.setCheckable();
+
+            if (asmdss.hasCheckedAccessibility())
+                aaos.setChecked();
+
+            if (aaos.isReceiving())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "A receiving signal is used for sending: " + asmdss.getValue());
+
+            if (asmdss.getNbOfValues() == -1)
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal: " + asmdss.getValue());
+
+            for (int i = 0; i < asmdss.getNbOfValues(); i++) {
+                String tmp = asmdss.getValue(i);
+                if (tmp.isEmpty())
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Empty parameter in signal expression: " + asmdss.getValue());
+
+                this.manageAttribute(tmp, _ab, aaos, tdp, asmdss, asmdss.getValue());
+            }
+
+            if (aaos.getNbOfValues() != atas.getListOfAttributes().size())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal sending: " + asmdss.getValue() + " -> nb of parameters does not match definition");
+
+            // Checking expressions passed as parameter
+            for (int i = 0; i < aaos.getNbOfValues(); i++) {
+                String theVal = aaos.getValue(i);
+                if (atas.getListOfAttributes().get(i).isInt()) {
+                    if (AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, theVal) < 0)
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdss.getValue() + " -> value at index #" + i + " does not match definition");
+                } else {
+                    // We assume it is a bool attribute
+                    if (AvatarSyntaxChecker.isAValidBoolExpr(_as, _ab, theVal) < 0)
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdss.getValue() + " -> value at index #" + i + " does not match definition");
+                }
+            }
+
+            if (asmdss.getCheckLatency()) {
+                aaos.setCheckLatency(true);
+                _as.checkedIDs.add(asmdss.getName() + "-" + asmdss.getSignalName() + ":" + aaos.getID());
+            }
+        } else {
+            element = new AvatarDummyState(name + ":" + atas.getName(), asmdss);
+        }
+
+        listE.addCor(element, asmdss);
+        asmdss.setAVATARID(element.getID());
+        asm.addElement(element);
     }
 
-    private void translateAvatarSMDLibraryFunctionCall (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDLibraryFunctionCall asmdlfc) throws CheckingError {
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void translateAvatarSMDLibraryFunctionCall(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDLibraryFunctionCall asmdlfc) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
 
         /* Get Function corresponding to this call */
-        AvatarBDLibraryFunction libraryFunction = asmdlfc.getLibraryFunction ();
+        AvatarBDLibraryFunction libraryFunction = asmdlfc.getLibraryFunction();
         if (libraryFunction == null)
-            throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Should define a library function for this call");
+            throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Should define a library function for this call");
 
         /* Get Avatar representation of this function */
-        AvatarLibraryFunction aLibraryFunction = listE.getAvatarLibraryFunction (libraryFunction);
+        AvatarLibraryFunction aLibraryFunction = listE.getAvatarLibraryFunction(libraryFunction);
         if (aLibraryFunction == null)
-            throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Unknown library function '" + libraryFunction.getFunctionName () + "'");
+            throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Unknown library function '" + libraryFunction.getFunctionName() + "'");
 
         /* create Avatar representation of the function call */
         final AvatarStateMachineElement element;
         final String name = "library_function_call";
 
-        if ( asmdlfc.isEnabled() ) {
-	        /* create Avatar representation of the function call */
-        	element = new AvatarLibraryFunctionCall( name, aLibraryFunction, asmdlfc );
-        	AvatarLibraryFunctionCall alfc = (AvatarLibraryFunctionCall) element;
+        if (asmdlfc.isEnabled()) {
+            /* create Avatar representation of the function call */
+            element = new AvatarLibraryFunctionCall(name, aLibraryFunction, asmdlfc);
+            AvatarLibraryFunctionCall alfc = (AvatarLibraryFunctionCall) element;
 //        AvatarLibraryFunctionCall alfc = new AvatarLibraryFunctionCall ("library_function_call", aLibraryFunction, asmdlfc);
 
 	        /* Get the list of parameters passed to the function */
-	        List<TAttribute> parameters = asmdlfc.getParameters ();
+            List<TAttribute> parameters = asmdlfc.getParameters();
 	        /* If the number of parameters does not match raise an error */
-	        if (parameters.size () != libraryFunction.getParameters ().size ())
-	            throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName () + " requires " + libraryFunction.getParameters ().size () + "parameters (" + parameters.size () + " provided)");
+            if (parameters.size() != libraryFunction.getParameters().size())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName() + " requires " + libraryFunction.getParameters().size() + "parameters (" + parameters.size() + " provided)");
 	
 	        /* Loop through the parameters */
-	        int i=0;
-	        for (TAttribute ta: parameters) {
-	            i ++;
+            int i = 0;
+            for (TAttribute ta : parameters) {
+                i++;
 	            /* If parameter has not be filled in raise an error */
-	            if (ta == null)
-	                throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Missing parameter #" + i + " when calling library function " + libraryFunction.getFunctionName ());
+                if (ta == null)
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Missing parameter #" + i + " when calling library function " + libraryFunction.getFunctionName());
 	
 	            /* Check if type of parameter matches what's expected */
-	            TAttribute returnTA = libraryFunction.getParameters ().get (i-1);
-	            if (!ta.hasSameType (returnTA))
-	                throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Type of parameter #" + i + " when calling library function " + libraryFunction.getFunctionName () + " does not match");
+                TAttribute returnTA = libraryFunction.getParameters().get(i - 1);
+                if (!ta.hasSameType(returnTA))
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Type of parameter #" + i + " when calling library function " + libraryFunction.getFunctionName() + " does not match");
 	
 	            /* Creates all the parameters corresponding to this parameter */
-	            List<String> parameterNames = new LinkedList<String> ();
-	            if (ta.getType() == TAttribute.INTEGER
-	                || ta.getType() == TAttribute.NATURAL
-	                || ta.getType() == TAttribute.BOOLEAN
-	                || ta.getType() == TAttribute.TIMER)
-	                parameterNames.add (ta.getId ());
-	            else {
-	                List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (ta.getTypeOther ());
-	                if (types == null || types.isEmpty ())
-	                    throw new CheckingError (CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + ta.getTypeOther () + " when calling " + libraryFunction.getFunctionName ());
-	
-	                for (TAttribute type: types)
-	                    parameterNames.add (ta.getId () + "__" + type.getId ());
-	            }
+                List<String> parameterNames = new LinkedList<String>();
+                if (ta.getType() == TAttribute.INTEGER
+                        || ta.getType() == TAttribute.NATURAL
+                        || ta.getType() == TAttribute.BOOLEAN
+                        || ta.getType() == TAttribute.TIMER)
+                    parameterNames.add(ta.getId());
+                else {
+                    List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
+                    if (types == null || types.isEmpty())
+                        throw new CheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + ta.getTypeOther() + " when calling " + libraryFunction.getFunctionName());
+
+                    for (TAttribute type : types)
+                        parameterNames.add(ta.getId() + "__" + type.getId());
+                }
 	
 	            /* Add flattened parameters */
-	            for (String parameterName: parameterNames) {
+                for (String parameterName : parameterNames) {
 	                /* Try to get the corresponding attribute */
-	                AvatarAttribute attr = _ab.getAvatarAttributeWithName (parameterName);
+                    AvatarAttribute attr = _ab.getAvatarAttributeWithName(parameterName);
 	                /* If it does not exist raise an error */
-	                if (attr == null)
-	                    throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Parameter '" + ta.getId () + "' passed when calling library function " + libraryFunction.getFunctionName () + " does not exist");
-	                alfc.addParameter (attr);
-	            }
-	        }
+                    if (attr == null)
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Parameter '" + ta.getId() + "' passed when calling library function " + libraryFunction.getFunctionName() + " does not exist");
+                    alfc.addParameter(attr);
+                }
+            }
 	
 	        /* Get the list of signals mapped to the function's placeholders */
-	        List<ui.AvatarSignal> signals = asmdlfc.getSignals ();
+            List<ui.AvatarSignal> signals = asmdlfc.getSignals();
 	        /* If the number of signals does not match raise an error */
-	        if (signals.size () != libraryFunction.getSignals ().size ())
-	            throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName () + " requires " + libraryFunction.getSignals ().size () + " signals (" + signals.size () + " mapped)");
+            if (signals.size() != libraryFunction.getSignals().size())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName() + " requires " + libraryFunction.getSignals().size() + " signals (" + signals.size() + " mapped)");
 	
 	        /* Loop through the signals */
-	        i=0;
-	        for (ui.AvatarSignal uias: signals) {
-	            i ++;
+            i = 0;
+            for (ui.AvatarSignal uias : signals) {
+                i++;
 	            /* If signal has not be filled in raise an error */
-	            if (uias == null)
-	                throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Missing mapping for signal #" + i + " when calling library function " + libraryFunction.getFunctionName ());
+                if (uias == null)
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Missing mapping for signal #" + i + " when calling library function " + libraryFunction.getFunctionName());
 	
 	            /* Check if prototype of signal matches what's expected */
-	            ui.AvatarSignal expectedSig = libraryFunction.getSignals ().get (i-1);
-	            if (!expectedSig.hasSamePrototype (uias))
-	                throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Prototype of signal #" + i + " when calling library function " + libraryFunction.getFunctionName () + " does not match");
+                ui.AvatarSignal expectedSig = libraryFunction.getSignals().get(i - 1);
+                if (!expectedSig.hasSamePrototype(uias))
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Prototype of signal #" + i + " when calling library function " + libraryFunction.getFunctionName() + " does not match");
 	
 	            /* Try to get the corresponding signal */
-	            avatartranslator.AvatarSignal sig = _ab.getAvatarSignalWithName (uias.getId ());
+                avatartranslator.AvatarSignal sig = _ab.getAvatarSignalWithName(uias.getId());
 	            /* If it does not exist raise an error */
-	            if (sig == null)
-	                throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Signal '" + uias.getId () + "' mapped when calling library function " + libraryFunction.getFunctionName () + " does not exist");
-	            alfc.addSignal (sig);
-	        }
+                if (sig == null)
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Signal '" + uias.getId() + "' mapped when calling library function " + libraryFunction.getFunctionName() + " does not exist");
+                alfc.addSignal(sig);
+            }
 	
 	        /* Get the list of return attributes passed to the function */
-	        List<TAttribute> returnAttributes = asmdlfc.getReturnAttributes ();
+            List<TAttribute> returnAttributes = asmdlfc.getReturnAttributes();
 	        /* If the number of return attributes is greater that what the function can return raise an error */
-	        if (returnAttributes.size () > libraryFunction.getReturnAttributes ().size ())
-	            throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName () + " can only return " + libraryFunction.getReturnAttributes ().size () + " values (" + returnAttributes.size () + " expected)");
+            if (returnAttributes.size() > libraryFunction.getReturnAttributes().size())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Calling library function " + libraryFunction.getFunctionName() + " can only return " + libraryFunction.getReturnAttributes().size() + " values (" + returnAttributes.size() + " expected)");
 	
 	        /* Loop through the return attributes */
-	        i=0;
-	        for (TAttribute ta: returnAttributes) {
-	            List<AvatarAttribute> attrs = new LinkedList<AvatarAttribute> ();
+            i = 0;
+            for (TAttribute ta : returnAttributes) {
+                List<AvatarAttribute> attrs = new LinkedList<AvatarAttribute>();
 	            /* If return attribute has not be filled in, add a dummy one */
-	            if (ta == null) {
-	                TAttribute returnTA = libraryFunction.getReturnAttributes ().get (i);
-	                String dummyName = "__dummy_return_attribute_" + returnTA.getId ();
+                if (ta == null) {
+                    TAttribute returnTA = libraryFunction.getReturnAttributes().get(i);
+                    String dummyName = "__dummy_return_attribute_" + returnTA.getId();
 	
 	                /* Creates all the attributes corresponding to this return attribute */
-	                if (returnTA.getType() == TAttribute.INTEGER
-	                    || returnTA.getType() == TAttribute.NATURAL
-	                    || returnTA.getType() == TAttribute.BOOLEAN
-	                    || returnTA.getType() == TAttribute.TIMER) {
-	                    AvatarAttribute attr = _ab.getAvatarAttributeWithName (dummyName);
-	                    if (attr == null) {
-	                        attr = this.createRegularAttribute (_ab, returnTA, "__dummy_return_attribute_");
-	                        _ab.addAttribute (attr);
-	                    }
-	                    attrs.add (attr);
-	                } else {
-	                    List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (returnTA.getTypeOther ());
-	                    if (types == null || types.isEmpty ())
-	                        throw new CheckingError (CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + returnTA.getTypeOther () + " when calling " + libraryFunction.getFunctionName ());
-	
-	                    for (TAttribute type: types) {
-	                        String attributeName = dummyName + "__" + type.getId ();
-	                        AvatarAttribute attr = _ab.getAvatarAttributeWithName (attributeName);
-	                        if (attr == null) {
-	                            attr = this.createRegularAttribute (_ab, type, dummyName + "__");
-	                            _ab.addAttribute (attr);
-	                        }
-	                        attrs.add (attr);
-	                    }
-	                }
-	            } else {
+                    if (returnTA.getType() == TAttribute.INTEGER
+                            || returnTA.getType() == TAttribute.NATURAL
+                            || returnTA.getType() == TAttribute.BOOLEAN
+                            || returnTA.getType() == TAttribute.TIMER) {
+                        AvatarAttribute attr = _ab.getAvatarAttributeWithName(dummyName);
+                        if (attr == null) {
+                            attr = this.createRegularAttribute(_ab, returnTA, "__dummy_return_attribute_");
+                            _ab.addAttribute(attr);
+                        }
+                        attrs.add(attr);
+                    } else {
+                        List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(returnTA.getTypeOther());
+                        if (types == null || types.isEmpty())
+                            throw new CheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + returnTA.getTypeOther() + " when calling " + libraryFunction.getFunctionName());
+
+                        for (TAttribute type : types) {
+                            String attributeName = dummyName + "__" + type.getId();
+                            AvatarAttribute attr = _ab.getAvatarAttributeWithName(attributeName);
+                            if (attr == null) {
+                                attr = this.createRegularAttribute(_ab, type, dummyName + "__");
+                                _ab.addAttribute(attr);
+                            }
+                            attrs.add(attr);
+                        }
+                    }
+                } else {
 	                /* Check if type of return attribute matches what's expected */
-	                TAttribute returnTA = libraryFunction.getReturnAttributes ().get (i);
-	                if (!ta.hasSameType (returnTA))
-	                    throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Type of return attribute #" + (i+1) + " when calling library function " + libraryFunction.getFunctionName () + " does not match");
+                    TAttribute returnTA = libraryFunction.getReturnAttributes().get(i);
+                    if (!ta.hasSameType(returnTA))
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Type of return attribute #" + (i + 1) + " when calling library function " + libraryFunction.getFunctionName() + " does not match");
 	
 	                /* Creates all the attributes corresponding to this return attribute */
-	                List<String> attributeNames = new LinkedList<String> ();
-	                if (ta.getType() == TAttribute.INTEGER
-	                    || ta.getType() == TAttribute.NATURAL
-	                    || ta.getType() == TAttribute.BOOLEAN
-	                    || ta.getType() == TAttribute.TIMER)
-	                    attributeNames.add (ta.getId ());
-	                else {
-	                    List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (ta.getTypeOther ());
-	                    if (types == null || types.isEmpty ())
-	                        throw new CheckingError (CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + ta.getTypeOther () + " when calling " + libraryFunction.getFunctionName ());
-	
-	                    for (TAttribute type: types)
-	                        attributeNames.add (ta.getId () + "__" + type.getId ());
-	                }
+                    List<String> attributeNames = new LinkedList<String>();
+                    if (ta.getType() == TAttribute.INTEGER
+                            || ta.getType() == TAttribute.NATURAL
+                            || ta.getType() == TAttribute.BOOLEAN
+                            || ta.getType() == TAttribute.TIMER)
+                        attributeNames.add(ta.getId());
+                    else {
+                        List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther());
+                        if (types == null || types.isEmpty())
+                            throw new CheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + ta.getTypeOther() + " when calling " + libraryFunction.getFunctionName());
+
+                        for (TAttribute type : types)
+                            attributeNames.add(ta.getId() + "__" + type.getId());
+                    }
 	
 	                /* Add flattened parameters */
-	                for (String attributeName: attributeNames) {
-	                    AvatarAttribute attr = _ab.getAvatarAttributeWithName (attributeName);
+                    for (String attributeName : attributeNames) {
+                        AvatarAttribute attr = _ab.getAvatarAttributeWithName(attributeName);
 	                    /* If a return attribute was given but we can't find the corresponding one raise an error */
-	                    if (attr == null)
-	                        throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Attribute '" + ta.getId () + "' expected to hold return value #" + (i+1) + " when calling library function " + libraryFunction.getFunctionName () + " does not exist");
-	                    attrs.add (attr);
-	                }
-	            }
-	
-	            for (AvatarAttribute attr: attrs)
-	                alfc.addReturnAttribute (attr);
-	            i ++;
-	        }
+                        if (attr == null)
+                            throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Attribute '" + ta.getId() + "' expected to hold return value #" + (i + 1) + " when calling library function " + libraryFunction.getFunctionName() + " does not exist");
+                        attrs.add(attr);
+                    }
+                }
+
+                for (AvatarAttribute attr : attrs)
+                    alfc.addReturnAttribute(attr);
+                i++;
+            }
 	
 	        /* If there were missing return attributes, add dummies ones */
-	        for (; i<libraryFunction.getReturnAttributes ().size (); i++) {
-	            TAttribute returnTA = libraryFunction.getReturnAttributes ().get (i);
-	            String dummyName = "__dummy_return_attribute_" + returnTA.getId ();
-	
-	            List<AvatarAttribute> attrs = new LinkedList<AvatarAttribute> ();
+            for (; i < libraryFunction.getReturnAttributes().size(); i++) {
+                TAttribute returnTA = libraryFunction.getReturnAttributes().get(i);
+                String dummyName = "__dummy_return_attribute_" + returnTA.getId();
+
+                List<AvatarAttribute> attrs = new LinkedList<AvatarAttribute>();
 	            /* Creates all the attributes corresponding to this return attribute */
-	            if (returnTA.getType() == TAttribute.INTEGER
-	                || returnTA.getType() == TAttribute.NATURAL
-	                || returnTA.getType() == TAttribute.BOOLEAN
-	                || returnTA.getType() == TAttribute.TIMER) {
-	                AvatarAttribute attr = _ab.getAvatarAttributeWithName (dummyName);
-	                if (attr == null) {
-	                    attr = this.createRegularAttribute (_ab, returnTA, "__dummy_return_attribute_");
-	                    _ab.addAttribute (attr);
-	                }
-	                attrs.add (attr);
-	            } else {
-	                List<TAttribute> types = adp.getAvatarBDPanel ().getAttributesOfDataType (returnTA.getTypeOther ());
-	                if (types == null || types.isEmpty ())
-	                    throw new CheckingError (CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + returnTA.getTypeOther () + " when calling " + libraryFunction.getFunctionName ());
-	
-	                for (TAttribute type: types) {
-	                    String attributeName = dummyName + "__" + type.getId ();
-	                    AvatarAttribute attr = _ab.getAvatarAttributeWithName (attributeName);
-	                    if (attr == null) {
-	                        attr = this.createRegularAttribute (_ab, type, dummyName + "__");
-	                        _ab.addAttribute (attr);
-	                    }
-	                    attrs.add (attr);
-	                }
-	            }
-	
-	            for (AvatarAttribute attr: attrs)
-	                alfc.addReturnAttribute (attr);
-	        }
-        }
-        else {
-        	element = new AvatarDummyState( name + ":" + aLibraryFunction.getName(), asmdlfc );
+                if (returnTA.getType() == TAttribute.INTEGER
+                        || returnTA.getType() == TAttribute.NATURAL
+                        || returnTA.getType() == TAttribute.BOOLEAN
+                        || returnTA.getType() == TAttribute.TIMER) {
+                    AvatarAttribute attr = _ab.getAvatarAttributeWithName(dummyName);
+                    if (attr == null) {
+                        attr = this.createRegularAttribute(_ab, returnTA, "__dummy_return_attribute_");
+                        _ab.addAttribute(attr);
+                    }
+                    attrs.add(attr);
+                } else {
+                    List<TAttribute> types = adp.getAvatarBDPanel().getAttributesOfDataType(returnTA.getTypeOther());
+                    if (types == null || types.isEmpty())
+                        throw new CheckingError(CheckingError.STRUCTURE_ERROR, "Unknown data type:  " + returnTA.getTypeOther() + " when calling " + libraryFunction.getFunctionName());
+
+                    for (TAttribute type : types) {
+                        String attributeName = dummyName + "__" + type.getId();
+                        AvatarAttribute attr = _ab.getAvatarAttributeWithName(attributeName);
+                        if (attr == null) {
+                            attr = this.createRegularAttribute(_ab, type, dummyName + "__");
+                            _ab.addAttribute(attr);
+                        }
+                        attrs.add(attr);
+                    }
+                }
+
+                for (AvatarAttribute attr : attrs)
+                    alfc.addReturnAttribute(attr);
+            }
+        } else {
+            element = new AvatarDummyState(name + ":" + aLibraryFunction.getName(), asmdlfc);
         }
 
-        listE.addCor( element, asmdlfc );
-        asmdlfc.setAVATARID( element.getID() );
-        asm.addElement( element );
+        listE.addCor(element, asmdlfc);
+        asmdlfc.setAVATARID(element.getID());
+        asm.addElement(element);
     }
 
-    private void translateAvatarSMDReceiveSignal (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDReceiveSignal asmdrs) throws CheckingError {
-    	AvatarStateMachine asm = _ab.getStateMachine ();
-    	avatartranslator.AvatarSignal atas = _ab.getAvatarSignalWithName (asmdrs.getSignalName ());
-    	if (atas == null)
-    		throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Unknown signal: " + asmdrs.getSignalName());
-
-    	// Get relation of that signal
-    	if (_ab instanceof AvatarBlock) {
-    		// Note that for library functions, signals are just placeholders so they don't need to be connected to anything
-    		AvatarRelation ar = _as.getAvatarRelationWithSignal (atas);
-    		if (ar == null) {
-    			if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
-    				//TraceManager.addDev("Receive/ Setting as attached " + atas);
-    				((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = false;
-    			}
-    			throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Signal used for receiving in " + asmdrs.getValue() + " is not connected to a channel");
-    		}
-    		if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
-    			//TraceManager.addDev("Receive/ Setting as attached " + atas);
-    			((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
-    		}
-    	}
-    	if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
-    		((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
-    	}
-        
-    	final AvatarStateMachineElement element;
+    private void translateAvatarSMDReceiveSignal(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDReceiveSignal asmdrs) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
+        avatartranslator.AvatarSignal atas = _ab.getAvatarSignalWithName(asmdrs.getSignalName());
+        if (atas == null)
+            throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Unknown signal: " + asmdrs.getSignalName());
+
+        // Get relation of that signal
+        if (_ab instanceof AvatarBlock) {
+            // Note that for library functions, signals are just placeholders so they don't need to be connected to anything
+            AvatarRelation ar = _as.getAvatarRelationWithSignal(atas);
+            if (ar == null) {
+                if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
+                    //TraceManager.addDev("Receive/ Setting as attached " + atas);
+                    ((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = false;
+                }
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Signal used for receiving in " + asmdrs.getValue() + " is not connected to a channel");
+            }
+            if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
+                //TraceManager.addDev("Receive/ Setting as attached " + atas);
+                ((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
+            }
+        }
+        if (atas.getReferenceObject() instanceof ui.AvatarSignal) {
+            ((ui.AvatarSignal) atas.getReferenceObject()).attachedToARelation = true;
+        }
+
+        final AvatarStateMachineElement element;
         final String name = "action_on_signal";
-        
-        if ( asmdrs.isEnabled() ) {
-        	element = new AvatarActionOnSignal( name, atas, asmdrs );
-        	
-        	final AvatarActionOnSignal aaos = (AvatarActionOnSignal) element;
-
-	    	if (asmdrs.hasCheckableAccessibility())
-	    		aaos.setCheckable();
-	
-	    	if (asmdrs.hasCheckedAccessibility())
-	    		aaos.setChecked();
-	
-	    	if (aaos.isSending())
-	    		throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "A sending signal is used for receiving: " + asmdrs.getValue());
-	
-	    	if (asmdrs.getNbOfValues() == -1)
-	    		throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal: " + asmdrs.getValue());
-	
-	    	for(int i=0; i<asmdrs.getNbOfValues(); i++) {
-	    		String tmp = asmdrs.getValue(i);
-	    		if (tmp.isEmpty ())
-	    			throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Empty parameter in signal expression: " + asmdrs.getValue());
-	
-	    		this.manageAttribute (tmp, _ab, aaos, tdp, asmdrs, asmdrs.getValue());
-	    	}
-	
-	    	if (aaos.getNbOfValues () != atas.getListOfAttributes ().size ())
-	    		throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> nb of parameters does not match definition");
-	
-	    	// Checking expressions passed as parameter
-	    	for (int i=0; i<aaos.getNbOfValues(); i++) {
-	    		String theVal = aaos.getValue(i);
-	    		if (atas.getListOfAttributes ().get (i).isInt ()) {
-	    			if (AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, theVal) < 0)
-	    				throw new CheckingError (CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> value at index #" + i + " does not match definition");
-	    		} else {
-	    			// We assume it is a bool attribute
-	    			if (AvatarSyntaxChecker.isAValidBoolExpr(_as, _ab, theVal) < 0)
-	    				throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> value at index #" + i + " does not match definition");
-	    		}
-	    	}
-
-	    	if (asmdrs.getCheckLatency()){
-	    		aaos.setCheckLatency(true);
-	    		_as.checkedIDs.add(asmdrs.getName()+"-"+asmdrs.getSignalName()+":"+aaos.getID());
-	    	}
-        }
-        else {
-        	element = new AvatarDummyState( name + ":" + atas.getName(), asmdrs );
-        }
-
-        this.listE.addCor( element, asmdrs );
-        asmdrs.setAVATARID( element.getID() );
-        asm.addElement( element );
+
+        if (asmdrs.isEnabled()) {
+            element = new AvatarActionOnSignal(name, atas, asmdrs);
+
+            final AvatarActionOnSignal aaos = (AvatarActionOnSignal) element;
+
+            if (asmdrs.hasCheckableAccessibility())
+                aaos.setCheckable();
+
+            if (asmdrs.hasCheckedAccessibility())
+                aaos.setChecked();
+
+            if (aaos.isSending())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "A sending signal is used for receiving: " + asmdrs.getValue());
+
+            if (asmdrs.getNbOfValues() == -1)
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal: " + asmdrs.getValue());
+
+            for (int i = 0; i < asmdrs.getNbOfValues(); i++) {
+                String tmp = asmdrs.getValue(i);
+                if (tmp.isEmpty())
+                    throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Empty parameter in signal expression: " + asmdrs.getValue());
+
+                this.manageAttribute(tmp, _ab, aaos, tdp, asmdrs, asmdrs.getValue());
+            }
+
+            if (aaos.getNbOfValues() != atas.getListOfAttributes().size())
+                throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> nb of parameters does not match definition");
+
+            // Checking expressions passed as parameter
+            for (int i = 0; i < aaos.getNbOfValues(); i++) {
+                String theVal = aaos.getValue(i);
+                if (atas.getListOfAttributes().get(i).isInt()) {
+                    if (AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, theVal) < 0)
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> value at index #" + i + " does not match definition");
+                } else {
+                    // We assume it is a bool attribute
+                    if (AvatarSyntaxChecker.isAValidBoolExpr(_as, _ab, theVal) < 0)
+                        throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed signal receiving: " + asmdrs.getValue() + " -> value at index #" + i + " does not match definition");
+                }
+            }
+
+            if (asmdrs.getCheckLatency()) {
+                aaos.setCheckLatency(true);
+                _as.checkedIDs.add(asmdrs.getName() + "-" + asmdrs.getSignalName() + ":" + aaos.getID());
+            }
+        } else {
+            element = new AvatarDummyState(name + ":" + atas.getName(), asmdrs);
+        }
+
+        this.listE.addCor(element, asmdrs);
+        asmdrs.setAVATARID(element.getID());
+        asm.addElement(element);
     }
 
-    private void translateAvatarSMDState (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDState tgc) throws CheckingError {
-        AvatarStateMachine stateMachine = _ab.getStateMachine ();
-        AvatarStateElement stateElement = createState( stateMachine, tgc );
+    private void translateAvatarSMDState(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDState tgc) throws CheckingError {
+        AvatarStateMachine stateMachine = _ab.getStateMachine();
+        AvatarStateElement stateElement = createState(stateMachine, tgc);
         //AvatarState astate = asm.getStateWithName(tgc.getValue());
 //        if (astate == null) {
 //            astate = new AvatarState (tgc.getValue(), tgc);
@@ -1653,107 +1386,104 @@ public class AvatarDesignPanelTranslator {
 //            asm.addElement (astate);
 //        }
 
-        if (tgc.hasCheckableAccessibility ())
-        	stateElement.setCheckable ();
+        if (tgc.hasCheckableAccessibility())
+            stateElement.setCheckable();
 
         if (tgc.hasCheckedAccessibility())
-        	stateElement.setChecked();
-    	
+            stateElement.setChecked();
+
         // Issue #69
-    	if ( tgc.isEnabled() ) {
-       		final AvatarState state =  (AvatarState) stateElement;
+        if (tgc.isEnabled()) {
+            final AvatarState state = (AvatarState) stateElement;
 
-	        // Executable code
-       		state.addEntryCode(tgc.getEntryCode());
-	
-			if (tgc.getCheckLatency()){
-				state.setCheckLatency(true);
-				_as.checkedIDs.add(tgc.getName()+"-"+tgc.getValue()+":"+state.getID());
-			}
-    	}
-
-    	listE.addCor(stateElement, tgc);
-    	stateElement.addReferenceObject (tgc);
+            // Executable code
+            state.addEntryCode(tgc.getEntryCode());
+
+            if (tgc.getCheckLatency()) {
+                state.setCheckLatency(true);
+                _as.checkedIDs.add(tgc.getName() + "-" + tgc.getValue() + ":" + state.getID());
+            }
+        }
+
+        listE.addCor(stateElement, tgc);
+        stateElement.addReferenceObject(tgc);
         tgc.setAVATARID(stateElement.getID());
     }
-    
-    private AvatarStateElement createState( final AvatarStateMachine stateMachine,
-    										final AvatarSMDState diagramState ) {
-    	AvatarStateElement stateElement = stateMachine.getStateWithName( diagramState.getValue() );
-        
-        if ( stateElement == null ) {
-        	final String name = diagramState.getValue();
-        	
-        	// Issue #69
-        	if ( diagramState.isEnabled() ) {
-        		stateElement = new AvatarState( name, diagramState );
-                stateElement.setAsVerifiable( true );
-        	}
-        	else {
-        		if ( diagramState.getOutputConnectors().isEmpty() ) {
-        			stateElement = new AvatarStopState( name + "_state_converted_to_stop", diagramState );
-        		}
-        		else {
-        			stateElement = new AvatarDummyState( name, diagramState );
-        		}
-        	}
-        	
-            stateMachine.addElement( stateElement );
-        }
-        
+
+    private AvatarStateElement createState(final AvatarStateMachine stateMachine,
+                                           final AvatarSMDState diagramState) {
+        AvatarStateElement stateElement = stateMachine.getStateWithName(diagramState.getValue());
+
+        if (stateElement == null) {
+            final String name = diagramState.getValue();
+
+            // Issue #69
+            if (diagramState.isEnabled()) {
+                stateElement = new AvatarState(name, diagramState);
+                stateElement.setAsVerifiable(true);
+            } else {
+                if (diagramState.getOutputConnectors().isEmpty()) {
+                    stateElement = new AvatarStopState(name + "_state_converted_to_stop", diagramState);
+                } else {
+                    stateElement = new AvatarDummyState(name, diagramState);
+                }
+            }
+
+            stateMachine.addElement(stateElement);
+        }
+
         return stateElement;
     }
 
-    private void translateAvatarSMDRandom (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDRandom asmdrand) throws CheckingError {
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void translateAvatarSMDRandom(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDRandom asmdrand) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
 
         final AvatarStateMachineElement element;
         final String name = "random";
-        
-        if ( asmdrand.isEnabled() ) {
-        	element = new AvatarRandom( name, asmdrand );
-        	
-        	final AvatarRandom arandom =  (AvatarRandom) element;
-
-        	String tmp1 = modifyString (asmdrand.getMinValue());
-        	int error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp1);
-        
-        	if (error < 0) {
-        		makeError (error, tdp, _ab, asmdrand, "min value of random", tmp1);
-        	}
-
-        	String tmp2 = modifyString(asmdrand.getMaxValue());
-        	error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp2);
-        	
-        	if (error < 0) {
-        		makeError (error, tdp, _ab, asmdrand, "max value of random", tmp2);
-        	}
-
-	        arandom.setValues (tmp1, tmp2);
-	        arandom.setFunctionId (asmdrand.getFunctionId());
-	
-	        tmp1 = modifyString(asmdrand.getVariable());
-	        AvatarAttribute aa = _ab.getAvatarAttributeWithName (tmp1);
-	
-	        if (aa == null)
-	            this.makeError (-3, tdp, _ab, asmdrand, "random", tmp1);
-	        // Checking type of variable -> must be an int
-	        else if (!(aa.isInt()))
-	            this.makeError (error, tdp, _ab, asmdrand, ": variable of random must be of type \"int\"", tmp2);
-	
-	        arandom.setVariable(tmp1);
-        }
-        else {
-        	element = new AvatarDummyState( name, asmdrand );
+
+        if (asmdrand.isEnabled()) {
+            element = new AvatarRandom(name, asmdrand);
+
+            final AvatarRandom arandom = (AvatarRandom) element;
+
+            String tmp1 = modifyString(asmdrand.getMinValue());
+            int error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp1);
+
+            if (error < 0) {
+                makeError(error, tdp, _ab, asmdrand, "min value of random", tmp1);
+            }
+
+            String tmp2 = modifyString(asmdrand.getMaxValue());
+            error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp2);
+
+            if (error < 0) {
+                makeError(error, tdp, _ab, asmdrand, "max value of random", tmp2);
+            }
+
+            arandom.setValues(tmp1, tmp2);
+            arandom.setFunctionId(asmdrand.getFunctionId());
+
+            tmp1 = modifyString(asmdrand.getVariable());
+            AvatarAttribute aa = _ab.getAvatarAttributeWithName(tmp1);
+
+            if (aa == null)
+                this.makeError(-3, tdp, _ab, asmdrand, "random", tmp1);
+                // Checking type of variable -> must be an int
+            else if (!(aa.isInt()))
+                this.makeError(error, tdp, _ab, asmdrand, ": variable of random must be of type \"int\"", tmp2);
+
+            arandom.setVariable(tmp1);
+        } else {
+            element = new AvatarDummyState(name, asmdrand);
         }
 
-        asm.addElement (element);
-        listE.addCor( element, asmdrand );
-        asmdrand.setAVATARID( element.getID() );
+        asm.addElement(element);
+        listE.addCor(element, asmdrand);
+        asmdrand.setAVATARID(element.getID());
     }
 
-    private void translateAvatarSMDSetTimer (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDSetTimer asmdst) throws CheckingError {
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void translateAvatarSMDSetTimer(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDSetTimer asmdst) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
         String tmp = asmdst.getTimerName();
         AvatarAttribute aa = _ab.getAvatarAttributeWithName(tmp);
         if (aa == null)
@@ -1762,23 +1492,22 @@ public class AvatarDesignPanelTranslator {
         if (aa.getType() != AvatarType.TIMER)
             throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed parameter: " + tmp + " in timer setting: shall be a parameter of type \"Timer\"");
 
-        tmp = this.modifyString (asmdst.getTimerValue ());
-        int error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp);
+        tmp = this.modifyString(asmdst.getTimerValue());
+        int error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp);
         if (error < 0)
             this.makeError(error, tdp, _ab, asmdst, "value of the timer setting", tmp);
 
         final AvatarStateMachineElement element;
         final String name = "settimer__" + aa.getName();
-        
-        if ( asmdst.isEnabled() ) {
-        	element = new AvatarSetTimer( name, asmdst );
-        	
-        	final AvatarSetTimer asettimer = (AvatarSetTimer) element;
-	        asettimer.setTimer( aa );
-	        asettimer.setTimerValue( tmp );
-        }
-        else {
-        	element = new AvatarDummyState( name, asmdst );
+
+        if (asmdst.isEnabled()) {
+            element = new AvatarSetTimer(name, asmdst);
+
+            final AvatarSetTimer asettimer = (AvatarSetTimer) element;
+            asettimer.setTimer(aa);
+            asettimer.setTimerValue(tmp);
+        } else {
+            element = new AvatarDummyState(name, asmdst);
         }
 
         asm.addElement(element);
@@ -1786,10 +1515,10 @@ public class AvatarDesignPanelTranslator {
         asmdst.setAVATARID(element.getID());
     }
 
-    private void translateAvatarSMDResetTimer (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDResetTimer asmdrt) throws CheckingError {
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void translateAvatarSMDResetTimer(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDResetTimer asmdrt) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
         String tmp = asmdrt.getTimerName();
-        AvatarAttribute aa = _ab.getAvatarAttributeWithName (tmp);
+        AvatarAttribute aa = _ab.getAvatarAttributeWithName(tmp);
         if (aa == null)
             throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed timer parameter: " + tmp + " in timer reset");
 
@@ -1798,24 +1527,23 @@ public class AvatarDesignPanelTranslator {
 
         final AvatarStateMachineElement element;
         final String name = "resettimer__" + aa.getName();
-        
-        if ( asmdrt.isEnabled() ) {
-        	element= new AvatarResetTimer( name, asmdrt );
-        	( (AvatarResetTimer) element ).setTimer( aa );
-        }
-        else {
-        	element = new AvatarDummyState( name, asmdrt );
-        }
-        
-        asm.addElement( element );
-        listE.addCor( element, asmdrt );
-        asmdrt.setAVATARID( element.getID() );
+
+        if (asmdrt.isEnabled()) {
+            element = new AvatarResetTimer(name, asmdrt);
+            ((AvatarResetTimer) element).setTimer(aa);
+        } else {
+            element = new AvatarDummyState(name, asmdrt);
+        }
+
+        asm.addElement(element);
+        listE.addCor(element, asmdrt);
+        asmdrt.setAVATARID(element.getID());
     }
 
-    private void translateAvatarSMDExpireTimer (TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDExpireTimer asmdet) throws CheckingError {
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void translateAvatarSMDExpireTimer(TDiagramPanel tdp, AvatarSpecification _as, AvatarStateMachineOwner _ab, AvatarSMDExpireTimer asmdet) throws CheckingError {
+        AvatarStateMachine asm = _ab.getStateMachine();
         String tmp = asmdet.getTimerName();
-        AvatarAttribute aa = _ab.getAvatarAttributeWithName (tmp);
+        AvatarAttribute aa = _ab.getAvatarAttributeWithName(tmp);
         if (aa == null)
             throw new CheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed timer parameter: " + tmp + " in timer expiration");
 
@@ -1824,181 +1552,175 @@ public class AvatarDesignPanelTranslator {
 
         final AvatarStateMachineElement avatarElement;
         final String name = "expiretimer__" + aa.getName();
-        
-        if ( asmdet.isEnabled() ) {
-        	avatarElement = new AvatarExpireTimer( name, asmdet );
-            ( ( AvatarExpireTimer) avatarElement ).setTimer(aa);
-        }
-        else {
-        	avatarElement = new AvatarDummyState( name, asmdet );
+
+        if (asmdet.isEnabled()) {
+            avatarElement = new AvatarExpireTimer(name, asmdet);
+            ((AvatarExpireTimer) avatarElement).setTimer(aa);
+        } else {
+            avatarElement = new AvatarDummyState(name, asmdet);
         }
 
-        asm.addElement( avatarElement );
-        this.listE.addCor( avatarElement, asmdet );
-        asmdet.setAVATARID( avatarElement.getID() );
+        asm.addElement(avatarElement);
+        this.listE.addCor(avatarElement, asmdet);
+        asmdet.setAVATARID(avatarElement.getID());
 //        AvatarExpireTimer aexpiretimer = new AvatarExpireTimer("expiretimer__" + aa.getName(), asmdet);
 //        aexpiretimer.setTimer(aa);
 //        asm.addElement(aexpiretimer);
 //        this.listE.addCor(aexpiretimer, asmdet);
 //        asmdet.setAVATARID(aexpiretimer.getID());
     }
-    
-    private void createGuard( 	final AvatarTransition transition,
-    							final AvatarSMDConnector connector ) {
-    	final AvatarStateMachineOwner block = transition.getBlock();
-    	final String guardStr = modifyString( connector.getEffectiveGuard() );
-        final AvatarGuard guard = AvatarGuard.createFromString( block, guardStr );
+
+    private void createGuard(final AvatarTransition transition,
+                             final AvatarSMDConnector connector) {
+        final AvatarStateMachineOwner block = transition.getBlock();
+        final String guardStr = modifyString(connector.getEffectiveGuard());
+        final AvatarGuard guard = AvatarGuard.createFromString(block, guardStr);
         final int error;
-        
-        if ( guard.isElseGuard() ) {
-        	error = 0;
-        }
-        else {
-        	error = AvatarSyntaxChecker.isAValidGuard( block.getAvatarSpecification(), block, guardStr );
-        }
-        
-        if ( error < 0 ) {
-            makeError( error, connector.tdp, block, connector, "transition guard", guardStr );
+
+        if (guard.isElseGuard()) {
+            error = 0;
+        } else {
+            error = AvatarSyntaxChecker.isAValidGuard(block.getAvatarSpecification(), block, guardStr);
         }
-        else {
-        	transition.setGuard( guard );
+
+        if (error < 0) {
+            makeError(error, connector.tdp, block, connector, "transition guard", guardStr);
+        } else {
+            transition.setGuard(guard);
         }
     }
-    
-    private void createAfterDelay( 	final AvatarTransition transition,
-	    							final AvatarSMDConnector connector ) {
-    	final AvatarStateMachineOwner block = transition.getBlock();
-    	final AvatarSpecification spec = block.getAvatarSpecification();
-    	
-    	String afterMinDelayStr = modifyString( connector.getEffectiveAfterMinDelay() );
-        int error = AvatarSyntaxChecker.isAValidIntExpr( spec, block, afterMinDelayStr );
-        
-        if ( error < 0 ) {
-            makeError( error, connector.tdp, block, connector, "after min delay", afterMinDelayStr );
+
+    private void createAfterDelay(final AvatarTransition transition,
+                                  final AvatarSMDConnector connector) {
+        final AvatarStateMachineOwner block = transition.getBlock();
+        final AvatarSpecification spec = block.getAvatarSpecification();
+
+        String afterMinDelayStr = modifyString(connector.getEffectiveAfterMinDelay());
+        int error = AvatarSyntaxChecker.isAValidIntExpr(spec, block, afterMinDelayStr);
+
+        if (error < 0) {
+            makeError(error, connector.tdp, block, connector, "after min delay", afterMinDelayStr);
             afterMinDelayStr = null;
         }
-        
-    	String afterMaxDelayStr = modifyString( connector.getEffectiveAfterMaxDelay() );
-        error = AvatarSyntaxChecker.isAValidIntExpr( spec, block, afterMaxDelayStr );
-        
-        if ( error < 0 ) {
-            makeError(error, connector.tdp, block, connector, "after max delay", afterMaxDelayStr );
+
+        String afterMaxDelayStr = modifyString(connector.getEffectiveAfterMaxDelay());
+        error = AvatarSyntaxChecker.isAValidIntExpr(spec, block, afterMaxDelayStr);
+
+        if (error < 0) {
+            makeError(error, connector.tdp, block, connector, "after max delay", afterMaxDelayStr);
             afterMaxDelayStr = null;
         }
 
-        if ( afterMinDelayStr != null && afterMaxDelayStr != null ) {
-        	transition.setDelays( afterMinDelayStr, afterMaxDelayStr );
+        if (afterMinDelayStr != null && afterMaxDelayStr != null) {
+            transition.setDelays(afterMinDelayStr, afterMaxDelayStr);
         }
     }
-    
-    private void createComputeDelay( 	final AvatarTransition transition,
-		    							final AvatarSMDConnector connector ) {
-    	final AvatarStateMachineOwner block = transition.getBlock();
-    	final AvatarSpecification spec = block.getAvatarSpecification();
-
-    	String computeMinDelayStr = modifyString( connector.getEffectiveComputeMinDelay() );
-    	int error = AvatarSyntaxChecker.isAValidIntExpr( spec, block, computeMinDelayStr );
-        
+
+    private void createComputeDelay(final AvatarTransition transition,
+                                    final AvatarSMDConnector connector) {
+        final AvatarStateMachineOwner block = transition.getBlock();
+        final AvatarSpecification spec = block.getAvatarSpecification();
+
+        String computeMinDelayStr = modifyString(connector.getEffectiveComputeMinDelay());
+        int error = AvatarSyntaxChecker.isAValidIntExpr(spec, block, computeMinDelayStr);
+
         if (error < 0) {
-            makeError( error, connector.tdp, block, connector, "compute min ", computeMinDelayStr );
+            makeError(error, connector.tdp, block, connector, "compute min ", computeMinDelayStr);
             computeMinDelayStr = null;
         }
-        
-    	String computeMaxDelayStr = modifyString( connector.getEffectiveComputeMaxDelay() );
-        error = AvatarSyntaxChecker.isAValidIntExpr( spec, block, computeMaxDelayStr );
-        
+
+        String computeMaxDelayStr = modifyString(connector.getEffectiveComputeMaxDelay());
+        error = AvatarSyntaxChecker.isAValidIntExpr(spec, block, computeMaxDelayStr);
+
         if (error < 0) {
-            makeError( error, connector.tdp, block, connector, "compute max ", computeMaxDelayStr );
+            makeError(error, connector.tdp, block, connector, "compute max ", computeMaxDelayStr);
             computeMaxDelayStr = null;
         }
 
-        if ( computeMinDelayStr != null && computeMaxDelayStr != null) {
-        	transition.setComputes( computeMinDelayStr, computeMaxDelayStr );
+        if (computeMinDelayStr != null && computeMaxDelayStr != null) {
+            transition.setComputes(computeMinDelayStr, computeMaxDelayStr);
         }
     }
-    
-    private void createProbability( final AvatarTransition transition,
-    								final AvatarSMDConnector connector ) {
-    	final AvatarStateMachineOwner block = transition.getBlock();
-    	final AvatarSpecification spec = block.getAvatarSpecification();
-    	final String probabilityStr = connector.getEffectiveProbability() ;
-        final int error = AvatarSyntaxChecker.isAValidProbabilityExpr( spec, block, probabilityStr );
-        
-        if ( error < 0 ) {
-            makeError( error, connector.tdp, block, connector, "probability ", probabilityStr );
-        }
-
-        if ( probabilityStr != null && !probabilityStr.isEmpty() ) {
-        	//TraceManager.addDev("Probability=" + probabilityStr);
-        	transition.setProbability( Double.parseDouble( probabilityStr ) );
+
+    private void createProbability(final AvatarTransition transition,
+                                   final AvatarSMDConnector connector) {
+        final AvatarStateMachineOwner block = transition.getBlock();
+        final AvatarSpecification spec = block.getAvatarSpecification();
+        final String probabilityStr = connector.getEffectiveProbability();
+        final int error = AvatarSyntaxChecker.isAValidProbabilityExpr(spec, block, probabilityStr);
+
+        if (error < 0) {
+            makeError(error, connector.tdp, block, connector, "probability ", probabilityStr);
+        }
+
+        if (probabilityStr != null && !probabilityStr.isEmpty()) {
+            //TraceManager.addDev("Probability=" + probabilityStr);
+            transition.setProbability(Double.parseDouble(probabilityStr));
         }
     }
-    
-    private void createActions( final AvatarTransition transition,
-					    		final AvatarSMDConnector connector ) {
-    	final AvatarStateMachineOwner block = transition.getBlock();
-    	int error = 0;
-
-    	for( String actionText : connector.getEffectiveActions() ) {
-    		if ( actionText.trim().length() > 0 ) {
-    			actionText = modifyString( actionText.trim() );
-
-    			// Variable assignment or method call?
-    			if ( !isAVariableAssignation( actionText ) ) {
-    				// Method call
-    				int index2 = actionText.indexOf( ";" );
-
-    				if ( index2 != -1 ) {
-    					makeError( error, connector.tdp, block, connector, "transition action", actionText );
-    				}
-
-    				actionText = modifyStringMethodCall( actionText, block.getName() );
-
-    				if ( !AvatarBlock.isAValidMethodCall( block, actionText ) ) {
-    					UICheckingError ce = new UICheckingError( CheckingError.BEHAVIOR_ERROR, "Badly formed transition method call: " + actionText );
-    					// TODO: adapt
-    					// ce.setAvatarBlock(_ab);
-    					ce.setTDiagramPanel( connector.tdp );
-    					ce.setTGComponent( connector );
-    					addCheckingError(ce);
-    				}
-    				else {
-    					transition.addAction( actionText );
-    				}
-    			}
-    			else {
-    				// Variable assignment
+
+    private void createActions(final AvatarTransition transition,
+                               final AvatarSMDConnector connector) {
+        final AvatarStateMachineOwner block = transition.getBlock();
+        int error = 0;
+
+        for (String actionText : connector.getEffectiveActions()) {
+            if (actionText.trim().length() > 0) {
+                actionText = modifyString(actionText.trim());
+
+                // Variable assignment or method call?
+                if (!isAVariableAssignation(actionText)) {
+                    // Method call
+                    int index2 = actionText.indexOf(";");
+
+                    if (index2 != -1) {
+                        makeError(error, connector.tdp, block, connector, "transition action", actionText);
+                    }
+
+                    actionText = modifyStringMethodCall(actionText, block.getName());
+
+                    if (!AvatarBlock.isAValidMethodCall(block, actionText)) {
+                        UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed transition method call: " + actionText);
+                        // TODO: adapt
+                        // ce.setAvatarBlock(_ab);
+                        ce.setTDiagramPanel(connector.tdp);
+                        ce.setTGComponent(connector);
+                        addCheckingError(ce);
+                    } else {
+                        transition.addAction(actionText);
+                    }
+                } else {
+                    // Variable assignment
 
                     //TraceManager.addDev("Action:" + actionText);
-    				error = AvatarSyntaxChecker.isAValidVariableExpr( block.getAvatarSpecification(), block, actionText);
-
-    				if ( error < 0 ) {
-    					makeError( error, connector.tdp, block, connector, "transition action", actionText );
-    				}
-    				else {
-    					transition.addAction( actionText );
-    				}
-    			}
-    		}
-    	}
+                    error = AvatarSyntaxChecker.isAValidVariableExpr(block.getAvatarSpecification(), block, actionText);
+
+                    if (error < 0) {
+                        makeError(error, connector.tdp, block, connector, "transition action", actionText);
+                    } else {
+                        transition.addAction(actionText);
+                    }
+                }
+            }
+        }
     }
-    
-    private void createTransitionInfo( 	final AvatarTransition transition,
-    									final AvatarSMDConnector connector ) {
-        createGuard( transition,connector );
 
-        createAfterDelay( transition, connector);
+    private void createTransitionInfo(final AvatarTransition transition,
+                                      final AvatarSMDConnector connector) {
+        createGuard(transition, connector);
+
+        createAfterDelay(transition, connector);
+
+        createComputeDelay(transition, connector);
 
-        createComputeDelay( transition, connector );
-        
-        createProbability( transition, connector );
+        createProbability(transition, connector);
 
-        createActions( transition, connector );
+        createActions(transition, connector);
     }
 
-    private void makeStateMachine (AvatarSpecification _as, AvatarStateMachineOwner _ab) {
-        AvatarBDStateMachineOwner block = (AvatarBDStateMachineOwner) listE.getTG (_ab);
-        AvatarStateMachine asm = _ab.getStateMachine ();
+    private void makeStateMachine(AvatarSpecification _as, AvatarStateMachineOwner _ab) {
+        AvatarBDStateMachineOwner block = (AvatarBDStateMachineOwner) listE.getTG(_ab);
+        AvatarStateMachine asm = _ab.getStateMachine();
 
         if (block == null) {
             UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "No corresponding graphical block for " + _ab.getName());
@@ -2019,15 +1741,39 @@ public class AvatarDesignPanelTranslator {
 
         //TDiagramPanel tdp = asmdp;
 
+        // Search for composite AvatarStates: they cannot be checked for reachability and liveness
+         for (TGComponent tgc : asmdp.getComponentList()) {
+             if (tgc instanceof AvatarSMDState) {
+                 AvatarSMDState sta = (AvatarSMDState)tgc;
+                 if (sta.isACompositeState()) {
+                     if (sta.accessibility) {
+                         UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "The reachability/liveness of a composite state cannot be studied. It has therefore been removed in state \"" + sta.getValue() + "\" of block \"" + _ab.getName() + "\"");
+                         ce.setTDiagramPanel(asmdp);
+                         addWarning(ce);
+                         sta.accessibility = false;
+                     }
+
+                     // We must also test all elements getting out of this state until a state is met
+
+
+                 }
+             }
+         }
+
+
+
+
+
+
         // search for start state
         AvatarSMDStartState tss = null;
-        for (TGComponent tgc: asmdp.getComponentList ())
+        for (TGComponent tgc : asmdp.getComponentList())
             if (tgc instanceof AvatarSMDStartState) {
                 if (tss == null)
                     tss = (AvatarSMDStartState) tgc;
                 else {
                     UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "More than one start state in the state machine diagram of " + name);
-                    ce.setTDiagramPanel( asmdp );
+                    ce.setTDiagramPanel(asmdp);
                     addCheckingError(ce);
                     return;
                 }
@@ -2035,72 +1781,72 @@ public class AvatarDesignPanelTranslator {
 
         if (tss == null) {
             UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "No start state in the state machine diagram of " + name);
-            ce.setTDiagramPanel( asmdp );
+            ce.setTDiagramPanel(asmdp);
             addCheckingError(ce);
             return;
         }
 
         // This shall also be true for all composite state: at most one start state!
-        if (checkForStartStateOfCompositeStates (asmdp) != null) {
+        if (checkForStartStateOfCompositeStates(asmdp) != null) {
             UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "More than one start state in composite state");
-            ce.setTDiagramPanel( asmdp );
+            ce.setTDiagramPanel(asmdp);
             addCheckingError(ce);
             return;
         }
 
         int choiceID = 0;
         // First pass: creating AVATAR components, but no interconnection between them
-    	// Issue #69:
+        // Issue #69:
         final FindAvatarSMDComponentsToBeTranslatedVisitor componentsToBeTranslatedVisitor = new FindAvatarSMDComponentsToBeTranslatedVisitor();
-        tss.acceptForward( componentsToBeTranslatedVisitor );
+        tss.acceptForward(componentsToBeTranslatedVisitor);
         final Set<TGComponent> componentsToBeTranslated = componentsToBeTranslatedVisitor.getComponentsToBeTranslated();
 
-        for (TGComponent tgc: componentsToBeTranslated/*asmdp.getAllComponentList ()*/)
+        for (TGComponent tgc : componentsToBeTranslated/*asmdp.getAllComponentList ()*/)
             try {
                 // Receive signal
                 if (tgc instanceof AvatarSMDReceiveSignal)
-                    this.translateAvatarSMDReceiveSignal ( asmdp, _as, _ab, (AvatarSMDReceiveSignal) tgc);
-                // Send signals
+                    this.translateAvatarSMDReceiveSignal(asmdp, _as, _ab, (AvatarSMDReceiveSignal) tgc);
+                    // Send signals
                 else if (tgc instanceof AvatarSMDSendSignal)
-                    this.translateAvatarSMDSendSignal ( asmdp, _as, _ab, (AvatarSMDSendSignal) tgc);
-                // Library Function Call
+                    this.translateAvatarSMDSendSignal(asmdp, _as, _ab, (AvatarSMDSendSignal) tgc);
+                    // Library Function Call
                 else if (tgc instanceof AvatarSMDLibraryFunctionCall)
-                    this.translateAvatarSMDLibraryFunctionCall ( asmdp, _as, _ab, (AvatarSMDLibraryFunctionCall) tgc);
-                // State
+                    this.translateAvatarSMDLibraryFunctionCall(asmdp, _as, _ab, (AvatarSMDLibraryFunctionCall) tgc);
+                    // State
                 else if (tgc instanceof AvatarSMDState)
-                    this.translateAvatarSMDState ( asmdp, _as, _ab, (AvatarSMDState) tgc);
-                // Choice
+                    this.translateAvatarSMDState(asmdp, _as, _ab, (AvatarSMDState) tgc);
+                    // Choice
                 else if (tgc instanceof AvatarSMDChoice) {
-                    AvatarState astate = new AvatarState ("choice__" + choiceID, tgc);
-                    choiceID ++;
-                    asm.addElement (astate);
-                    listE.addCor (astate, tgc);
-                    tgc.setAVATARID (astate.getID());
+                    AvatarState astate = new AvatarState("choice__" + choiceID, tgc);
+                    choiceID++;
+                    asm.addElement(astate);
+                    listE.addCor(astate, tgc);
+                    tgc.setAVATARID(astate.getID());
                 }
                 // Random
                 else if (tgc instanceof AvatarSMDRandom)
-                    this.translateAvatarSMDRandom ( asmdp, _as, _ab, (AvatarSMDRandom) tgc);
-                // Set timer
+                    this.translateAvatarSMDRandom(asmdp, _as, _ab, (AvatarSMDRandom) tgc);
+                    // Set timer
                 else if (tgc instanceof AvatarSMDSetTimer)
-                    this.translateAvatarSMDSetTimer ( asmdp, _as, _ab, (AvatarSMDSetTimer) tgc);
-                // Reset timer
+                    this.translateAvatarSMDSetTimer(asmdp, _as, _ab, (AvatarSMDSetTimer) tgc);
+                    // Reset timer
                 else if (tgc instanceof AvatarSMDResetTimer)
-                    this.translateAvatarSMDResetTimer ( asmdp, _as, _ab, (AvatarSMDResetTimer) tgc);
-                // Expire timer
+                    this.translateAvatarSMDResetTimer(asmdp, _as, _ab, (AvatarSMDResetTimer) tgc);
+                    // Expire timer
                 else if (tgc instanceof AvatarSMDExpireTimer)
-                    this.translateAvatarSMDExpireTimer ( asmdp, _as, _ab, (AvatarSMDExpireTimer) tgc);
-                // Start state
+                    this.translateAvatarSMDExpireTimer(asmdp, _as, _ab, (AvatarSMDExpireTimer) tgc);
+                    // Start state
                 else if (tgc instanceof AvatarSMDStartState) {
                     AvatarStartState astart = new AvatarStartState("start", tgc);
-                    this.listE.addCor (astart, tgc);
-                    tgc.setAVATARID (astart.getID());
+                    this.listE.addCor(astart, tgc);
+                    tgc.setAVATARID(astart.getID());
                     asm.addElement(astart);
                     astart.setAsVerifiable(true);
                     if (tgc.getFather() == null)
                         asm.setStartState(astart);
                     // Stop state
                 } else if (tgc instanceof AvatarSMDStopState) {
-                    AvatarStopState astop = new AvatarStopState ("stop", tgc);
+                    AvatarStopState astop = new AvatarStopState("stop", tgc);
                     astop.setAsVerifiable(true);
                     this.listE.addCor(astop, tgc);
                     tgc.setAVATARID(astop.getID());
@@ -2110,10 +1856,10 @@ public class AvatarDesignPanelTranslator {
                 // TODO: adapt
                 // ce.setAvatarBlock (_ab);
                 UICheckingError uice = new UICheckingError(ce);
-                uice.setTDiagramPanel ( asmdp );
-                uice.setTGComponent (tgc);
-                uice.addMessagePrefix ("State Machine of " + name + ": ");
-                this.addCheckingError (uice);
+                uice.setTDiagramPanel(asmdp);
+                uice.setTGComponent(tgc);
+                uice.addMessagePrefix("State Machine of " + name + ": ");
+                this.addCheckingError(uice);
             }
 
         if (checkingErrors.size() != size)
@@ -2123,13 +1869,13 @@ public class AvatarDesignPanelTranslator {
         asm.removeAllInternalStartStates();
 
         // Make hierachy between states and elements
-        for (TGComponent tgc: componentsToBeTranslated/*asmdp.getAllComponentList ()*/) {
+        for (TGComponent tgc : componentsToBeTranslated/*asmdp.getAllComponentList ()*/) {
             if (tgc != null && tgc.getFather() != null) {
-                AvatarStateMachineElement element1 = (AvatarStateMachineElement)(listE.getObject(tgc));
-                AvatarStateMachineElement element2 = (AvatarStateMachineElement)(listE.getObject(tgc.getFather()));
-                
+                AvatarStateMachineElement element1 = (AvatarStateMachineElement) (listE.getObject(tgc));
+                AvatarStateMachineElement element2 = (AvatarStateMachineElement) (listE.getObject(tgc.getFather()));
+
                 if (element1 != null && /*element2 != null && */element2 instanceof AvatarState) {
-                    element1.setState ((AvatarState) element2);
+                    element1.setState((AvatarState) element2);
                 }
             }
         }
@@ -2137,167 +1883,166 @@ public class AvatarDesignPanelTranslator {
         // Make next: handle transitions
         final Set<TGConnector> prunedConectors = componentsToBeTranslatedVisitor.getPrunedConnectors();
 
-        for ( final TGConnector connector : asmdp.getConnectors() ) {
-        	//        for (TGComponent tgc: asmdp.getAllComponentList ()) {
-        	//            if (tgc instanceof AvatarSMDConnector) {
-        	//                AvatarSMDConnector asmdco = (AvatarSMDConnector) tgc;
-        	// Issue #69
-        	if ( !prunedConectors.contains( connector ) ) {
-        		FindNextEnabledAvatarSMDConnectingPointVisitor visitor = new FindNextEnabledAvatarSMDConnectingPointVisitor( prunedConectors, componentsToBeTranslated );
-        		connector.getTGConnectingPointP1().acceptBackward( visitor );
-        		final TGConnectingPoint conPoint1 = visitor.getEnabledComponentPoint();
-
-        		if ( conPoint1 != null ) {
-        			visitor = new FindNextEnabledAvatarSMDConnectingPointVisitor( prunedConectors, componentsToBeTranslated );
-        			connector.getTGConnectingPointP2().acceptForward( visitor );
-        			final TGConnectingPoint conPoint2 = visitor.getEnabledComponentPoint();
-
-        			if ( conPoint2 != null ) {
-        				final TGComponent tgc1 = (TGComponent) conPoint1.getFather();//tdp.getComponentToWhichBelongs( connector.getTGConnectingPointP1() );
-        				final TGComponent tgc2 = (TGComponent) conPoint2.getFather();//tdp.getComponentToWhichBelongs( connector.getTGConnectingPointP2() );
-        				//                TGComponent tgc1 = asmdp.getComponentToWhichBelongs (asmdco.getTGConnectingPointP1());
-        				//                TGComponent tgc2 = asmdp.getComponentToWhichBelongs (asmdco.getTGConnectingPointP2());
-        				if (tgc1 == null || tgc2 == null) {
-        					TraceManager.addDev("Tgcs null in Avatar translation");
-        				}
-        				else {
-        					final AvatarStateMachineElement element1 = (AvatarStateMachineElement)(listE.getObject(tgc1));
-        					final AvatarStateMachineElement element2 = (AvatarStateMachineElement)(listE.getObject(tgc2));
-
-        					if ( element1 != null && element2 != null ) {
-        						final AvatarSMDConnector avatarSmdConnector = (AvatarSMDConnector) connector;
-
-        						if ( asm.findEmptyTransition( element1, element2 ) == null ) {
-        							final AvatarTransition at = new AvatarTransition( _ab, "avatar transition", connector );
-        							createTransitionInfo( at, avatarSmdConnector );
-        							//                        AvatarTransition at = new AvatarTransition (_ab, "avatar transition", tgc);
-        							//
-        							//                        // Guard
-        							//                        String tmp = modifyString (asmdco.getGuard());
-        							//                        AvatarGuard guard = AvatarGuard.createFromString (_ab, tmp);
-        							//                        if (guard.isElseGuard())
-        							//                            at.setGuard(guard);
-        							//                        else {
-        							//                            int error = AvatarSyntaxChecker.isAValidGuard (_as, _ab, tmp);
-        							//                            if (error < 0)
-        							//                                this.makeError (error, tdp, _ab, tgc, "transition guard", tmp);
-        							//                            else
-        							//                                at.setGuard (guard);
-        							//                        }
-        							//
-        							//                        // Delays
-        							//                        String tmp1 = modifyString (asmdco.getAfterMinDelay ());
-        							//                        int error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp1);
-        							//                        if (error < 0) {
-        							//                            this.makeError (error, tdp, _ab, tgc, "after min delay", tmp1);
-        							//                            tmp1 = null;
-        							//                        }
-        							//                        String tmp2 = modifyString (asmdco.getAfterMaxDelay ());
-        							//                        error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp2);
-        							//                        if (error < 0) {
-        							//                            this.makeError(error, tdp, _ab, tgc, "after max delay", tmp2);
-        							//                            tmp2 = null;
-        							//                        }
-        							//
-        							//                        if (tmp1 != null && tmp2 != null)
-        							//                            at.setDelays(tmp1, tmp2);
-
-        							// Compute min and max
-        							//                        tmp1 = modifyString (asmdco.getComputeMinDelay ());
-        							//                        error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp1);
-        							//                        if (error < 0) {
-        							//                            this.makeError (error, tdp, _ab, tgc, "compute min ", tmp1);
-        							//                            tmp1 = null;
-        							//                        }
-        							//                        tmp2 = modifyString(asmdco.getComputeMaxDelay());
-        							//                        error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp2);
-        							//                        if (error < 0) {
-        							//                            this.makeError (error, tdp, _ab, tgc, "compute max ", tmp2);
-        							//                            tmp2 = null;
-        							//                        }
-        							//
-        							//                        if (tmp1 != null && tmp2 != null)
-        							//                            at.setComputes(tmp1, tmp2);
-
-        							// Probability
-        							//                        tmp1 = asmdco.getProbability ();
-        							//                        if ((tmp1 != null) && (tmp1.length()>0)) {
-        							//                            error = AvatarSyntaxChecker.isAValidProbabilityExpr(_as, _ab, tmp1);
-        							//                            if (error < 0) {
-        							//                                this.makeError(error, tdp, _ab, tgc, "probability ", tmp1);
-        							//                                tmp1 = null;
-        							//                            }
-        							//                            if (tmp1 != null) {
-        							//                                at.setProbability(new Double(tmp1).doubleValue());
-        							//                            }
-        							//                        }
-        							//
-        							//                        // Actions
-        							//                        for(String s: asmdco.getActions())
-        							//                            if (s.trim().length() > 0) {
-        							//                                s = modifyString(s.trim());
-        							//
-        							//                                // Variable assignation or method call?
-        							//                                if (!isAVariableAssignation(s)) {
-        							//                                    // Method call
-        							//                                    int index2 = s.indexOf(";");
-        							//                                    if (index2 != -1)
-        							//                                        this.makeError(error, tdp, _ab, tgc, "transition action", s);
-        							//
-        							//                                    s = modifyStringMethodCall(s, _ab.getName());
-        							//                                    if (!AvatarBlock.isAValidMethodCall (_ab, s)) {
-        							//                                        UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed transition method call: " + s);
-        							//                                        // TODO: adapt
-        							//                                        // ce.setAvatarBlock(_ab);
-        							//                                        ce.setTDiagramPanel(tdp);
-        							//                                        ce.setTGComponent(tgc);
-        							//                                        addCheckingError(ce);
-        							//                                    } else
-        							//                                        at.addAction(s);
-        							//                                } else {
-        							//                                    // Variable assignation
-        							//                                    error = AvatarSyntaxChecker.isAValidVariableExpr (_as, _ab, s);
-        							//                                    if (error < 0)
-        							//                                        this.makeError (error, tdp, _ab, tgc, "transition action", s);
-        							//                                    else
-        							//                                        at.addAction (s);
-        							//                                }
-        							//                            }
-
-        							element1.addNext( at );
-        							at.addNext( element2 );
-        							listE.addCor( at, connector );
-        							connector.setAVATARID( at.getID() );
-        							asm.addElement( at );
-
-        							// Check for after on composite transitions
-        							if (at.hasDelay() && element1 instanceof AvatarState && asm.isACompositeTransition(at)) {
-        								UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "After clause cannot be used on composite transitions. Use timers instead.");
-        								// TODO: adapt
-        								// ce.setAvatarBlock(_ab);
-        								ce.setTDiagramPanel( asmdp );
-        								ce.setTGComponent( connector );
-        								addCheckingError( ce );
-        							}
-        						}
-        					}
-        				}
-        			}
-        		}
-        	}
+        for (final TGConnector connector : asmdp.getConnectors()) {
+            //        for (TGComponent tgc: asmdp.getAllComponentList ()) {
+            //            if (tgc instanceof AvatarSMDConnector) {
+            //                AvatarSMDConnector asmdco = (AvatarSMDConnector) tgc;
+            // Issue #69
+            if (!prunedConectors.contains(connector)) {
+                FindNextEnabledAvatarSMDConnectingPointVisitor visitor = new FindNextEnabledAvatarSMDConnectingPointVisitor(prunedConectors, componentsToBeTranslated);
+                connector.getTGConnectingPointP1().acceptBackward(visitor);
+                final TGConnectingPoint conPoint1 = visitor.getEnabledComponentPoint();
+
+                if (conPoint1 != null) {
+                    visitor = new FindNextEnabledAvatarSMDConnectingPointVisitor(prunedConectors, componentsToBeTranslated);
+                    connector.getTGConnectingPointP2().acceptForward(visitor);
+                    final TGConnectingPoint conPoint2 = visitor.getEnabledComponentPoint();
+
+                    if (conPoint2 != null) {
+                        final TGComponent tgc1 = (TGComponent) conPoint1.getFather();//tdp.getComponentToWhichBelongs( connector.getTGConnectingPointP1() );
+                        final TGComponent tgc2 = (TGComponent) conPoint2.getFather();//tdp.getComponentToWhichBelongs( connector.getTGConnectingPointP2() );
+                        //                TGComponent tgc1 = asmdp.getComponentToWhichBelongs (asmdco.getTGConnectingPointP1());
+                        //                TGComponent tgc2 = asmdp.getComponentToWhichBelongs (asmdco.getTGConnectingPointP2());
+                        if (tgc1 == null || tgc2 == null) {
+                            TraceManager.addDev("Tgcs null in Avatar translation");
+                        } else {
+                            final AvatarStateMachineElement element1 = (AvatarStateMachineElement) (listE.getObject(tgc1));
+                            final AvatarStateMachineElement element2 = (AvatarStateMachineElement) (listE.getObject(tgc2));
+
+                            if (element1 != null && element2 != null) {
+                                final AvatarSMDConnector avatarSmdConnector = (AvatarSMDConnector) connector;
+
+                                if (asm.findEmptyTransition(element1, element2) == null) {
+                                    final AvatarTransition at = new AvatarTransition(_ab, "avatar transition", connector);
+                                    createTransitionInfo(at, avatarSmdConnector);
+                                    //                        AvatarTransition at = new AvatarTransition (_ab, "avatar transition", tgc);
+                                    //
+                                    //                        // Guard
+                                    //                        String tmp = modifyString (asmdco.getGuard());
+                                    //                        AvatarGuard guard = AvatarGuard.createFromString (_ab, tmp);
+                                    //                        if (guard.isElseGuard())
+                                    //                            at.setGuard(guard);
+                                    //                        else {
+                                    //                            int error = AvatarSyntaxChecker.isAValidGuard (_as, _ab, tmp);
+                                    //                            if (error < 0)
+                                    //                                this.makeError (error, tdp, _ab, tgc, "transition guard", tmp);
+                                    //                            else
+                                    //                                at.setGuard (guard);
+                                    //                        }
+                                    //
+                                    //                        // Delays
+                                    //                        String tmp1 = modifyString (asmdco.getAfterMinDelay ());
+                                    //                        int error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp1);
+                                    //                        if (error < 0) {
+                                    //                            this.makeError (error, tdp, _ab, tgc, "after min delay", tmp1);
+                                    //                            tmp1 = null;
+                                    //                        }
+                                    //                        String tmp2 = modifyString (asmdco.getAfterMaxDelay ());
+                                    //                        error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp2);
+                                    //                        if (error < 0) {
+                                    //                            this.makeError(error, tdp, _ab, tgc, "after max delay", tmp2);
+                                    //                            tmp2 = null;
+                                    //                        }
+                                    //
+                                    //                        if (tmp1 != null && tmp2 != null)
+                                    //                            at.setDelays(tmp1, tmp2);
+
+                                    // Compute min and max
+                                    //                        tmp1 = modifyString (asmdco.getComputeMinDelay ());
+                                    //                        error = AvatarSyntaxChecker.isAValidIntExpr (_as, _ab, tmp1);
+                                    //                        if (error < 0) {
+                                    //                            this.makeError (error, tdp, _ab, tgc, "compute min ", tmp1);
+                                    //                            tmp1 = null;
+                                    //                        }
+                                    //                        tmp2 = modifyString(asmdco.getComputeMaxDelay());
+                                    //                        error = AvatarSyntaxChecker.isAValidIntExpr(_as, _ab, tmp2);
+                                    //                        if (error < 0) {
+                                    //                            this.makeError (error, tdp, _ab, tgc, "compute max ", tmp2);
+                                    //                            tmp2 = null;
+                                    //                        }
+                                    //
+                                    //                        if (tmp1 != null && tmp2 != null)
+                                    //                            at.setComputes(tmp1, tmp2);
+
+                                    // Probability
+                                    //                        tmp1 = asmdco.getProbability ();
+                                    //                        if ((tmp1 != null) && (tmp1.length()>0)) {
+                                    //                            error = AvatarSyntaxChecker.isAValidProbabilityExpr(_as, _ab, tmp1);
+                                    //                            if (error < 0) {
+                                    //                                this.makeError(error, tdp, _ab, tgc, "probability ", tmp1);
+                                    //                                tmp1 = null;
+                                    //                            }
+                                    //                            if (tmp1 != null) {
+                                    //                                at.setProbability(new Double(tmp1).doubleValue());
+                                    //                            }
+                                    //                        }
+                                    //
+                                    //                        // Actions
+                                    //                        for(String s: asmdco.getActions())
+                                    //                            if (s.trim().length() > 0) {
+                                    //                                s = modifyString(s.trim());
+                                    //
+                                    //                                // Variable assignation or method call?
+                                    //                                if (!isAVariableAssignation(s)) {
+                                    //                                    // Method call
+                                    //                                    int index2 = s.indexOf(";");
+                                    //                                    if (index2 != -1)
+                                    //                                        this.makeError(error, tdp, _ab, tgc, "transition action", s);
+                                    //
+                                    //                                    s = modifyStringMethodCall(s, _ab.getName());
+                                    //                                    if (!AvatarBlock.isAValidMethodCall (_ab, s)) {
+                                    //                                        UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "Badly formed transition method call: " + s);
+                                    //                                        // TODO: adapt
+                                    //                                        // ce.setAvatarBlock(_ab);
+                                    //                                        ce.setTDiagramPanel(tdp);
+                                    //                                        ce.setTGComponent(tgc);
+                                    //                                        addCheckingError(ce);
+                                    //                                    } else
+                                    //                                        at.addAction(s);
+                                    //                                } else {
+                                    //                                    // Variable assignation
+                                    //                                    error = AvatarSyntaxChecker.isAValidVariableExpr (_as, _ab, s);
+                                    //                                    if (error < 0)
+                                    //                                        this.makeError (error, tdp, _ab, tgc, "transition action", s);
+                                    //                                    else
+                                    //                                        at.addAction (s);
+                                    //                                }
+                                    //                            }
+
+                                    element1.addNext(at);
+                                    at.addNext(element2);
+                                    listE.addCor(at, connector);
+                                    connector.setAVATARID(at.getID());
+                                    asm.addElement(at);
+
+                                    // Check for after on composite transitions
+                                    if (at.hasDelay() && element1 instanceof AvatarState && asm.isACompositeTransition(at)) {
+                                        UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "After clause cannot be used on composite transitions. Use timers instead.");
+                                        // TODO: adapt
+                                        // ce.setAvatarBlock(_ab);
+                                        ce.setTDiagramPanel(asmdp);
+                                        ce.setTGComponent(connector);
+                                        addCheckingError(ce);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
         }
 
         asm.handleUnfollowedStartState(_ab);
 
         // Investigate all states -> put warnings for all empty transitions from a state to the same one (infinite loop)
-      //  int nb;
-        for (AvatarStateMachineElement asmee: asm.getListOfElements()) {
-            if (asmee instanceof AvatarState && ((AvatarState)asmee).hasEmptyTransitionsOnItself(asm) > 0) {
+        //  int nb;
+        for (AvatarStateMachineElement asmee : asm.getListOfElements()) {
+            if (asmee instanceof AvatarState && ((AvatarState) asmee).hasEmptyTransitionsOnItself(asm) > 0) {
                 UICheckingError ce = new UICheckingError(CheckingError.BEHAVIOR_ERROR, "State(s) " + asmee.getName() + " has empty transitions on itself");
                 // TODO: adapt
                 // ce.setAvatarBlock(_ab);
-                ce.setTDiagramPanel( asmdp );
-                ce.setTGComponent((TGComponent)(asmee.getReferenceObject()));
+                ce.setTDiagramPanel(asmdp);
+                ce.setTGComponent((TGComponent) (asmee.getReferenceObject()));
                 addWarning(ce);
             }
         }
@@ -2325,18 +2070,18 @@ public class AvatarDesignPanelTranslator {
     private TGComponent checkForStartStateOfCompositeStates(AvatarSMDPanel _panel) {
         TGComponent tgc;
         Iterator<TGComponent> iterator = _panel.getComponentList().listIterator();
-        
-        while(iterator.hasNext()) {
+
+        while (iterator.hasNext()) {
             tgc = iterator.next();
-            
+
             if (tgc instanceof AvatarSMDState) {
-                tgc = (((AvatarSMDState)(tgc)).checkForStartStateOfCompositeStates());
+                tgc = (((AvatarSMDState) (tgc)).checkForStartStateOfCompositeStates());
                 if (tgc != null) {
                     return tgc;
                 }
             }
         }
-        
+
         return null;
     }
 
@@ -2354,11 +2099,11 @@ public class AvatarDesignPanelTranslator {
         AvatarBlock b1, b2;
         avatartranslator.AvatarSignal atas1, atas2;
 
-        while(iterator.hasNext()) {
+        while (iterator.hasNext()) {
             tgc = iterator.next();
-           
+
             if (tgc instanceof AvatarBDPortConnector) {
-                port = (AvatarBDPortConnector)tgc;
+                port = (AvatarBDPortConnector) tgc;
                 block1 = port.getAvatarBDBlock1();
                 block2 = port.getAvatarBDBlock2();
 
@@ -2367,13 +2112,13 @@ public class AvatarDesignPanelTranslator {
                 b2 = _as.getBlockWithName(block2.getBlockName());
 
                 if ((b1 != null) && (b2 != null)) {
-		    //TraceManager.addDev("B1 and B2 are not null");
+                    //TraceManager.addDev("B1 and B2 are not null");
                     r = new AvatarRelation("relation", b1, b2, tgc);
                     // Signals of l1
                     l1 = port.getListOfSignalsOrigin();
                     l2 = port.getListOfSignalsDestination();
 
-                    for(i=0; i<l1.size(); i++) {
+                    for (i = 0; i < l1.size(); i++) {
                         name1 = AvatarSignal.getSignalNameFromFullSignalString(l1.get(i));
                         name2 = AvatarSignal.getSignalNameFromFullSignalString(l2.get(i));
                         //TraceManager.addDev("Searching signal with name " + name1 +  " in block " + b1.getName());
@@ -2381,23 +2126,23 @@ public class AvatarDesignPanelTranslator {
                         atas2 = b2.getAvatarSignalWithName(name2);
 
                         if ((atas1 != null) && (atas2 != null)) {
-						    if(atas1.isCompatibleWith(atas2)) {
-							//TraceManager.addDev("Signals " + atas1 + " and " + atas2 + " are compatible");
-							r.addSignals(atas1, atas2);
-						    } else {
-							//TraceManager.addDev("Signals " + atas1 + " and " + atas2 + " are NOT compatible");
-							UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Wrong signal association betwen " + atas1 + " and " + atas2);
-						    // TODO: adapt
-						    // ce.setAvatarBlock(_ab);
-							ce.setTDiagramPanel(tgc.getTDiagramPanel());
-						    ce.setTGComponent(tgc);
-						    addCheckingError(ce);
-						    }
-						} else {
-						    TraceManager.addDev("Null signals in AVATAR relation: " + name1 + " " + name2);
-						}
+                            if (atas1.isCompatibleWith(atas2)) {
+                                //TraceManager.addDev("Signals " + atas1 + " and " + atas2 + " are compatible");
+                                r.addSignals(atas1, atas2);
+                            } else {
+                                //TraceManager.addDev("Signals " + atas1 + " and " + atas2 + " are NOT compatible");
+                                UICheckingError ce = new UICheckingError(CheckingError.STRUCTURE_ERROR, "Wrong signal association betwen " + atas1 + " and " + atas2);
+                                // TODO: adapt
+                                // ce.setAvatarBlock(_ab);
+                                ce.setTDiagramPanel(tgc.getTDiagramPanel());
+                                ce.setTGComponent(tgc);
+                                addCheckingError(ce);
+                            }
+                        } else {
+                            TraceManager.addDev("Null signals in AVATAR relation: " + name1 + " " + name2);
+                        }
                     }
-		    
+
                     // Attribute of the relation
                     r.setBlocking(port.isBlocking());
                     r.setAsynchronous(port.isAsynchronous());
@@ -2418,14 +2163,14 @@ public class AvatarDesignPanelTranslator {
 //        if (checkingErrors == null) {
 //            checkingErrors = new LinkedList<CheckingError> ();
 //        }
-        checkingErrors.add (ce);
+        checkingErrors.add(ce);
     }
 
     private void addWarning(CheckingError ce) {
 //        if (warnings == null) {
 //            warnings = new LinkedList<CheckingError> ();
 //        }
-        warnings.add (ce);
+        warnings.add(ce);
     }
 
     private String modifyString(String _input) {
@@ -2442,8 +2187,8 @@ public class AvatarDesignPanelTranslator {
         }
 
 
-        String s = _input.substring(index0+1, index1).trim();
-       // String output = "";
+        String s = _input.substring(index0 + 1, index1).trim();
+        // String output = "";
 
         if (s.length() == 0) {
             return _input;
@@ -2451,16 +2196,16 @@ public class AvatarDesignPanelTranslator {
 
         //TraceManager.addDev("-> -> Analyzing method call " + s);
 
-        String [] actions = s.split(",");
+        String[] actions = s.split(",");
         s = "";
-        for(int i=0; i<actions.length; i++) {
+        for (int i = 0; i < actions.length; i++) {
             TAttribute ta = adp.getAvatarBDPanel().getAttribute(actions[i].trim(), _blockName);
             if (ta == null) {
                 s = s + actions[i].trim();
             } else {
                 if (ta.getType() == TAttribute.OTHER) {
                     boolean first = true;
-                    for (TAttribute tatmp: adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther())) {
+                    for (TAttribute tatmp : adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther())) {
                         if (first)
                             first = false;
                         else
@@ -2471,12 +2216,12 @@ public class AvatarDesignPanelTranslator {
                     s = s + actions[i].trim();
                 }
             }
-            if (i != actions.length-1) {
+            if (i != actions.length - 1) {
                 s = s + ", ";
             }
         }
 
-        s  = _input.substring(0, index0) + "(" + s + ")";
+        s = _input.substring(0, index0) + "(" + s + ")";
 
         // Managing output parameters
         index0 = s.indexOf("=");
@@ -2490,7 +2235,7 @@ public class AvatarDesignPanelTranslator {
                 if (ta.getType() == TAttribute.OTHER) {
                     String newparams = "";
                     boolean first = true;
-                    for (TAttribute tatmp: adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther())) {
+                    for (TAttribute tatmp : adp.getAvatarBDPanel().getAttributesOfDataType(ta.getTypeOther())) {
                         if (first)
                             first = false;
                         else
@@ -2511,14 +2256,14 @@ public class AvatarDesignPanelTranslator {
         return s;
     }
 
-   private boolean isAVariableAssignation (String _input) {
+    private boolean isAVariableAssignation(String _input) {
         int index = _input.indexOf('=');
         if (index == -1) {
             return false;
         }
 
         // Must check whether what follows the '=' is a function or not.
-        String tmp = _input.substring(index+1, _input.length()).trim();
+        String tmp = _input.substring(index + 1, _input.length()).trim();
 
         index = tmp.indexOf('(');
         if (index == -1) {
diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java
index 2725c648b94e8839d80c2343be550a6bf6e606a1..ea5ad6faa4e0d4ddd6ed286b3875e6b8b3bd64c1 100644
--- a/src/main/java/ui/GTURTLEModeling.java
+++ b/src/main/java/ui/GTURTLEModeling.java
@@ -535,9 +535,11 @@ public class GTURTLEModeling {
         if (tmap != null) {
             TMLMappingTextSpecification<TGComponent> spec = new TMLMappingTextSpecification<>(_title);
             spec.toTextFormat(tmap);    //TMLMapping
+            String XMLSpec = tmap.toXML();
             try {
                 //TraceManager.addDev( "*** " + ConfigurationTTool.TMLCodeDirectory + File.separator );
                 spec.saveFile(SpecConfigTTool.TMLCodeDirectory, "spec");
+                FileUtils.saveFile(SpecConfigTTool.TMLCodeDirectory + "spec.xml", XMLSpec);
             } catch (Exception e) {
                 TraceManager.addError("Files could not be saved: " + e.getMessage());
                 return false;
diff --git a/src/main/java/ui/avatarsmd/AvatarSMDState.java b/src/main/java/ui/avatarsmd/AvatarSMDState.java
index c7494c3a45106c18d560904546a9018e8368f6b2..1937354331848bef0495652b8d754a1583f5a812 100644
--- a/src/main/java/ui/avatarsmd/AvatarSMDState.java
+++ b/src/main/java/ui/avatarsmd/AvatarSMDState.java
@@ -157,7 +157,7 @@ public class AvatarSMDState extends TGCScalableWithInternalComponent implements
 
         name = tdp.findAvatarSMDStateName("state");
         setValue(name);
-        name = "State";
+        //name = "State";
         oldValue = value;
 
         currentFontSize = maxFontSize;