diff --git a/OneM2M_Functions.ttcn b/OneM2M_Functions.ttcn
index 9b08ae0837a9baa8c4d73c6cdb9df74c9fafabbb..c2c6ad1d8f30d0f9772b524b0521c4359089f0ea 100644
--- a/OneM2M_Functions.ttcn
+++ b/OneM2M_Functions.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Functions.ttcn $
- *              $Id: OneM2M_Functions.ttcn 76 2016-04-29 14:15:01Z berge $
+ *              $Id: OneM2M_Functions.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Module containing functions for oneM2M
  *
  */
@@ -46,24 +46,34 @@ module OneM2M_Functions {
 	
 	group preambleFunctions {
 
-		function f_preamble_registerAe(in template (value) XSD.String p_name, in template (value) AccessControlOperations p_allowedOperations) runs on M2M {
+		function f_preamble_registerAe(in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M {//c_CRUDNDi
 		
 			var RequestPrimitive v_request;
 			var M2MResponsePrimitive v_response;
-			var XSD.ID v_acpId;
-		
+			var XSD.ID v_acpId := "0";
 		
-			v_acpId := f_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
+			if(PX_ACP_SUPPORT){
+				v_acpId := f_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
+			}
 			
-			mcaPort.send(m_request(m_createAeAux(p_name, {v_acpId})));
+			if(v_acpId != "0") {
+				mcaPort.send(m_request(m_createAeAux({v_acpId})));
+				//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName})));
+			} else {
+				mcaPort.send(m_request(m_createAeAux()));
+			}
 			tc_ac.start;
 			alt {
 				[] mcaPort.receive(mw_responseOK) -> value v_response {
 					tc_ac.stop;
 					log("Preamble: Application registered successfuly");
 					if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].AE)) {
-						vc_ae := v_response.responsePrimitive_.primitiveContent.any_1[0].AE;
-						f_sendAcPrimitive("AE-ID_changed", vc_ae.aE_ID);
+						vc_aeAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AE;
+						if(ispresent(vc_aeAux.aE_ID)){
+							f_sendAcPrimitive("AE-ID_changed", vc_aeAux.aE_ID);
+						} else {
+							f_sendAcPrimitive("AE-ID_changed", "0");
+						}	
 					}
 				}
 				[] mcaPort.receive(mw_responseKO) {
@@ -88,12 +98,20 @@ module OneM2M_Functions {
 	
 	group postambleFunctions {
 
-		function f_postamble_deleteResources(in template (value) XSD.String p_aeName) runs on M2M {
+		function f_postamble_deleteResources() runs on M2M {
 		
 			var M2MResponsePrimitive v_response;
+			var RequestPrimitive v_request;
 			
 			if (PX_RUN_POSTAMBLE) {
-				mcaPort.send(m_request(m_deleteAe(PX_URI_CSE & PX_CSE_NAME & "/" & valueof(p_aeName))));
+				if(PX_UNSTRUCTURED)
+				{
+					v_request := m_deleteAe("/" & vc_aeAux.aE_ID);
+					v_request.from_ := vc_aeAux.aE_ID;
+					mcaPort.send(m_request(v_request));
+				} else {
+					mcaPort.send(m_request(m_deleteAe(PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName)));
+				}
 				tc_ac.start;
 				alt {
 					[] mcaPort.receive(mw_responseOK) {
@@ -108,23 +126,32 @@ module OneM2M_Functions {
 						log("Postamble: No answer while deleting resource");
 					}	
 				}	
-    		
-				mcaPort.send(m_request(m_deleteAcp(PX_URI_CSE & PX_CSE_NAME & "/MyAcp")));
-				tc_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) {
-						tc_ac.stop;
-						log("Postamble: ACP Resource deleted");
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						tc_ac.stop;
-						log("Postamble: Error while deleting resource");
-					}
-					[] tc_ac.timeout {
-						log("Postamble: No answer while deleting resource");
-					}	
-				}
 				
+				if(PX_ACP_SUPPORT){
+        		
+    				if(PX_UNSTRUCTURED)
+    				{
+    					v_request := m_deleteAcp("/" & vc_acpAux.resourceID);
+    					v_request.from_ := PX_AE_ID_STEM;
+    					mcaPort.send(m_request(v_request));
+    				} else {
+    					mcaPort.send(m_request(m_deleteAcp(PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName)));
+    				}
+    				tc_ac.start;
+    				alt {
+    					[] mcaPort.receive(mw_responseOK) {
+    						tc_ac.stop;
+    						log("Postamble: ACP Resource deleted");
+    					}
+    					[] mcaPort.receive(mw_responseKO) {
+    						tc_ac.stop;
+    						log("Postamble: Error while deleting resource");
+    					}
+    					[] tc_ac.timeout {
+    						log("Postamble: No answer while deleting resource");
+    					}	
+    				}
+				}
 
 			}
 		
@@ -171,12 +198,28 @@ module OneM2M_Functions {
 			
 			} 
 			if (p_resourceType == int9) {//group
-				p_request.primitiveContent.any_1[0].Group_create := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & vc_ae.resourceID}, omit);
+				if(PX_UNSTRUCTURED) {
+					p_request.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {"/" & vc_aeAux.resourceID}, omit);
+				} else {
+					p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {PX_CSE_ID & "/" & PX_CSE_NAME & "/" & c_aeAuxName};//vc_aeAux.resourceID
+				}
 			}
 		
 			if (p_resourceType == int15) {//pollingChannel
-				p_request.from_ := vc_ae.aE_ID;
+				p_request.from_ := vc_aeAux.aE_ID;
 			} 
+			
+			if (p_resourceType == int23) {//subscription
+				if(PX_FROM_IS_AE_ID) {
+					if(PX_UNSTRUCTURED){
+						p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {vc_aeAux.aE_ID};
+					} else {
+						p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {PX_CSE_ID & "/" & vc_aeAux.aE_ID};
+					}
+				} else {
+					p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & c_aeAuxName};
+				}
+			}
 		
 			return valueof(p_request);
 		}
@@ -214,8 +257,23 @@ module OneM2M_Functions {
 
 		function f_getResourceId(PrimitiveContent p_contentResource) return XSD.ID {
 				
-			if(ischosen(p_contentResource.any_1[0].AccessControlPolicy)) {
-				return p_contentResource.any_1[0].AccessControlPolicy.resourceID;
+			if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) {
+				return p_contentResource.any_1[0].AccessControlPolicy_optional.resourceID;
+			}
+			if(ischosen(p_contentResource.any_1[0].Container_optional)) {
+				return p_contentResource.any_1[0].Container_optional.resourceID;
+			}
+			if(ischosen(p_contentResource.any_1[0].Schedule_optional)) {
+				return p_contentResource.any_1[0].Schedule_optional.resourceID;
+			}
+			if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) {
+				return p_contentResource.any_1[0].PollingChannel_optional.resourceID;
+			}
+			if(ischosen(p_contentResource.any_1[0].Subscription_optional)) {
+				return p_contentResource.any_1[0].Subscription_optional.resourceID;
+			}
+			if(ischosen(p_contentResource.any_1[0].Group_optional)) {
+				return p_contentResource.any_1[0].Group_optional.resourceID;
 			}
 			return "1";
   
@@ -242,6 +300,7 @@ module OneM2M_Functions {
 		
 			var M2MResponsePrimitive v_response;
 			var RequestPrimitive v_request;
+			var XSD.ID v_resourceId;
 			
 			v_request := f_getCreateRequestPrimitive(p_resourceType,p_parentResourceAddress, omit, p_requestPrimitive);
 		
@@ -251,6 +310,7 @@ module OneM2M_Functions {
 				[] mcaPort.receive(mw_responseOK) -> value v_response {
 					tc_ac.stop;
 					setverdict(pass, "f_createResource: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
+					vc_resourceId := f_getResourceId(v_response.responsePrimitive_.primitiveContent);
 				}
 				[] mcaPort.receive(mw_responseKO) {
 					tc_ac.stop;
@@ -281,6 +341,7 @@ module OneM2M_Functions {
 					tc_ac.stop;
 					setverdict(pass, "f_createAccessControlPolicy: Resource type " & int2str(1) & " created successfuly");
 					v_acpId := f_getResourceId(v_response.responsePrimitive_.primitiveContent);
+					vc_acpAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AccessControlPolicy_optional;
 					return v_acpId;
 				}
 				[] mcaPort.receive(mw_responseKO) {
@@ -310,8 +371,8 @@ module OneM2M_Functions {
 			v_acpId := f_createAccessControlPolicyAux(p_acpName := "MyAcp_2");
 			
 			v_request := valueof(m_createContainerBase);
-			v_request.primitiveContent.any_1[0].Container_create.accessControlPolicyIDs := {v_acpId};
-			v_request.primitiveContent.any_1[0].Container_create.resourceName := "MyContainerAux";
+			v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {v_acpId};
+			v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux";
 			
 			f_createResource(int3, p_parentResourceAddress, v_request );
 			
@@ -325,9 +386,9 @@ module OneM2M_Functions {
 			v_request := valueof(m_updateAcpBase);
 			
 			v_request.to_ := p_acpAddress;
-			v_request.primitiveContent.any_1[0].ACP_update.privileges.accessControlRule_list := {
+			v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {
     			{
-    				accessControlOriginators := {"admin:admin"},
+    				accessControlOriginators := {"*"}, //{"admin:admin"}
     				accessControlOperations := p_allowedOperations,
     				accessControlContexts_list := omit
     			}
@@ -339,7 +400,6 @@ module OneM2M_Functions {
 				[] mcaPort.receive(mw_responseOK)  {
 					tc_ac.stop;
 					setverdict(pass, "f_updateAcpAuxResource: " & p_acpAddress & " resource updated successfuly");
-					//TODO: Check that name attribute is provided
 				}
 				[] mcaPort.receive(mw_responseKO) {
 					tc_ac.stop;
@@ -358,7 +418,6 @@ module OneM2M_Functions {
 			
 		}
 		
-		
 	}//end group helpingFunctions	
 
 
diff --git a/OneM2M_Pixits.ttcn b/OneM2M_Pixits.ttcn
index 7d62acc00646ca1f516f9608314f62a505dc923d..71223c52650b49141299447b1367157de22f3e67 100644
--- a/OneM2M_Pixits.ttcn
+++ b/OneM2M_Pixits.ttcn
@@ -7,13 +7,14 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Pixits.ttcn $
- *              $Id: OneM2M_Pixits.ttcn 49 2016-04-25 08:29:23Z reinaortega $
+ *              $Id: OneM2M_Pixits.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Module containing Pixits for oneM2M
  *
  */
 module OneM2M_Pixits {
 	
 	import from XSD all;
+	import from OneM2M_Types all;
 
 	modulepar boolean PX_DELETE_CREATED_RESOURCES := true;
 	
@@ -27,7 +28,9 @@ module OneM2M_Pixits {
 	
 	modulepar charstring PX_CSE_NAME := "in-cse";
 	
-	modulepar charstring PX_URI_CSE := "/~/in-cse/";
+	modulepar charstring PX_URI_CSE := "/~/in-cse";
+	
+	modulepar boolean PX_UNSTRUCTURED := false;
 	
 	modulepar charstring PX_AE_ID_STEM := "admin:admin";
 	
@@ -35,8 +38,16 @@ module OneM2M_Pixits {
 	
 	modulepar boolean PX_RUN_POSTAMBLE := true;
 	
+	modulepar ListOfURIs PX_ACOR := {"*"};
+	
 	modulepar charstring PX_SERIALIZATION := "JSON";
 	
 	modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
 	
+	modulepar boolean PX_ACP_SUPPORT := true;
+	
+	modulepar charstring PX_CSE_ID := "/in-cse";
+	
+	modulepar boolean PX_FROM_IS_AE_ID := false;
+	
 }  // end of module
diff --git a/OneM2M_Templates.ttcn b/OneM2M_Templates.ttcn
index 4f351f7faecbecd5eebc9bed169c892c6f9590bb..0c3d4d31e4fde1bce23acec09f87e11530493b75 100644
--- a/OneM2M_Templates.ttcn
+++ b/OneM2M_Templates.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Templates.ttcn $
- *              $Id: OneM2M_Templates.ttcn 69 2016-04-28 07:49:58Z reinaortega $
+ *              $Id: OneM2M_Templates.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Module containing templates for oneM2M
  *
  */
@@ -20,6 +20,12 @@ module OneM2M_Templates {
 	//import from OneM2M_AdditionalTypes all;
 	import from OneM2M_Pixits all;
 
+		
+	function f_rnd(in integer p_lower, in integer p_upper) return charstring {
+		
+		return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);	
+	}
+
 
 	/* Templates */
 	/** 
@@ -47,8 +53,8 @@ module OneM2M_Templates {
         		operation := int2,
         		to_ := c_uri_cse,
         		from_ := "admin:admin",
-        		requestIdentifier := "m_retrieveCseBase",
-        		resourceType := int5,
+        		requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000),
+        		resourceType := omit,
 				primitiveContent := omit,
 				role := omit,
 				originatingTimestamp := omit,
@@ -65,12 +71,12 @@ module OneM2M_Templates {
         		discoveryResultType := omit	
         	};
         	
-			template (value) RequestPrimitive m_retrieveResource(ResourceType p_resourceType, XSD.ID p_targetResourceAddress) := {
+			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress) := {
 				operation := int2,
 				to_ := p_targetResourceAddress,
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_retrieveResource",
-				resourceType := p_resourceType,
+				requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent := omit,
 				role := omit,
 				originatingTimestamp := omit,
@@ -87,12 +93,12 @@ module OneM2M_Templates {
 				discoveryResultType := omit	
 			};
         	
-        	template (value) RequestPrimitive m_retrieveResourceAttributeToOption(ResourceType p_resourceType,XSD.ID p_targetResourceAddress) := {
+        	template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress) := {
         		operation := int2,
         		to_ := p_targetResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_retrieveResourceAttributeOptionTo",
-        		resourceType := p_resourceType,
+        		requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
+        		resourceType := omit,
 				primitiveContent := omit, 
 				role := omit,
 				originatingTimestamp := omit,
@@ -109,12 +115,12 @@ module OneM2M_Templates {
 				discoveryResultType := omit	
         	};
         	
-			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(ResourceType p_resourceType,XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList) := {
+			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList) := {
 				operation := int2,
 				to_ := p_targetResourceAddress,
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_retrieveResourceAttributeContentOption",
-				resourceType := p_resourceType,
+				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent := {
 					any_1 := {{AttributeList := p_attributeList}}
 				},
@@ -139,10 +145,10 @@ module OneM2M_Templates {
         		operation := int3,
         		to_ := p_targetResourceAddress,
         		from_ := "admin:admin",
-        		requestIdentifier := "m_updateContentInstance",
-        		resourceType := int4,
+        		requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000),
+        		resourceType := omit,
         		primitiveContent := {
-        			any_1 := {{ContentInstance_update := m_contentUpdateContentInstance(p_primitiveContent)}}
+        			any_1 := {{ContentInstance_optional := m_contentUpdateContentInstance(p_primitiveContent)}}
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -163,10 +169,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateContainer",
-				resourceType := int1,
+				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{Container_update := m_contentUpdateContainer}}
+							any_1 := {{Container_optional := m_contentUpdateContainer}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -187,10 +193,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := p_targetResourceAddress,
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateContainer",
-				resourceType := int1,
+				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{Container_update := m_contentUpdateContainer}}
+							any_1 := {{Container_optional := m_contentUpdateContainer}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -212,10 +218,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateAcp",
-				resourceType := int1,
+				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{ACP_update := m_contentUpdateAcp}}
+							any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcp}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -237,10 +243,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateGroup",
-				resourceType := int1,
+				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{Group_update := m_contentUpdateGroup}}
+							any_1 := {{Group_optional := m_contentUpdateGroup}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -262,10 +268,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateSchedule",
-				resourceType := int1,
+				requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{Schedule_update := m_contentUpdateSchedule}}
+							any_1 := {{Schedule_optional := m_contentUpdateSchedule}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -287,10 +293,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updatePollingChannel",
-				resourceType := int1,
+				requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{PollingChannel_update := m_contentUpdatePollingChannel}}
+							any_1 := {{PollingChannel_optional := m_contentUpdatePollingChannel}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -312,10 +318,10 @@ module OneM2M_Templates {
 				operation := int3,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_updateSubscription",
-				resourceType := int1,
+				requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
+				resourceType := omit,
 				primitiveContent:= {
-							any_1 := {{Subscription_update := m_contentUpdateSubscription}}
+							any_1 := {{Subscription_optional := m_contentUpdateSubscription}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -366,14 +372,14 @@ module OneM2M_Templates {
         		discoveryResultType := omit
         	};*/
         	
-        	template (value) RequestPrimitive m_createAeAux(in template (value)  XSD.String p_name, template (omit) AcpType p_accessControlPolicyIDs ) := {
+        	template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := {
         		operation := int1,
         		to_ := PX_URI_CSE & PX_CSE_NAME,
-        		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createAe",
+        		from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
+        		requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
         		resourceType := int2,
         		primitiveContent := {
-        			any_1 := {{AE_create := m_contentCreateAe(p_name, p_accessControlPolicyIDs)}}	
+        			any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs)}}	
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -395,10 +401,10 @@ module OneM2M_Templates {
 				operation := int1,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createAcp",
+				requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
 				resourceType := int1,
 				primitiveContent := {
-					any_1 := {{ACP_create := m_contentCreateAcp ()}}
+					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp ()}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -416,14 +422,14 @@ module OneM2M_Templates {
 
 			};
 				
-        	template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (value) AccessControlOperations p_allowedOperations := int63) := {
+        	template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) := {
         		operation := int1,
         		to_ := p_parentResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createAcp",
+        		requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
         		resourceType := int1,
         		primitiveContent := {
-					any_1 := {{ACP_create := m_contentCreateAcp (p_name, p_allowedOperations)}}
+					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}}
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -441,14 +447,14 @@ module OneM2M_Templates {
 
         	};
         	
-        	template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := "MyAcp", in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
+        	template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
         		operation := int1,
         		to_ := PX_URI_CSE & PX_CSE_NAME,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createAcp",
+        		requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
         		resourceType := int1,
         		primitiveContent := {
-        			any_1 := {{ACP_create := m_contentCreateAcp (p_acpName, p_allowedOperations)}}	
+        			any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}}	
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -470,11 +476,11 @@ module OneM2M_Templates {
 				operation := int1,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createContainer",
+				requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
 				resourceType := int3,
 				primitiveContent := {
 					
-					any_1 := {{Container_create := m_contentCreateContainer}}
+					any_1 := {{Container_optional := m_contentCreateContainer}}
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -496,10 +502,10 @@ module OneM2M_Templates {
     			operation := int1,
     			to_ := p_parentResourceAddress,
     			from_ := PX_AE_ID_STEM,
-    			requestIdentifier := "m_createContainer",
+    			requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
     			resourceType := int3,
     			primitiveContent := {
-    				any_1 := {{Container_create := m_contentCreateContainer}}
+    				any_1 := {{Container_optional := m_contentCreateContainer}}
     			},
 				role := omit,
 				originatingTimestamp := omit,
@@ -521,10 +527,10 @@ module OneM2M_Templates {
     			operation := int1,
     			to_ := p_parentResourceAddress,
     			from_ := "admin:admin",
-    			requestIdentifier := "m_createContentInstance",
+    			requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
     			resourceType := int4,
     			primitiveContent := {
-    				any_1 := {{ContentInstance_create := m_contentCreateContentInstance(p_primitiveContent)}}	
+    				any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}}	
     			},
 				role := omit,
 				originatingTimestamp := omit,
@@ -546,10 +552,10 @@ module OneM2M_Templates {
 				operation := int1,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createGroup",
+				requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
 				resourceType := int9,
 				primitiveContent := {
-					any_1 := {{Group_create := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & "NotInitialized"}, omit)}}	//TODO: p_resourceId
+					any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & "NotInitialized"}, omit)}}	//TODO: p_resourceId
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -571,10 +577,10 @@ module OneM2M_Templates {
         		operation := int1,
         		to_ := p_parentResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createGroup",
+        		requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
         		resourceType := int9,
         		primitiveContent := {
-        			any_1 := {{Group_create := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}}	//TODO: p_resourceId
+        			any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}}	//TODO: p_resourceId
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -596,10 +602,10 @@ module OneM2M_Templates {
 				operation := int1,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createPollingChannel",
+				requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
 				resourceType := int15,
 				primitiveContent := {
-					any_1 := {{PollingChannel_create := m_contentCreatePollingChannel (omit)}}	
+					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (omit)}}	
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -621,10 +627,10 @@ module OneM2M_Templates {
         		operation := int1,
         		to_ := p_parentResourceAddress,
         		from_ := p_originatorId,
-        		requestIdentifier := "m_createPollingChannel",
+        		requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
         		resourceType := int15,
         		primitiveContent := {
-        			any_1 := {{PollingChannel_create := m_contentCreatePollingChannel (p_accessControlPolicyIDs)}}	
+        			any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (p_accessControlPolicyIDs)}}	
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -648,10 +654,10 @@ module OneM2M_Templates {
         		operation := int1,
         		to_ := "NotInitialized",
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createSchedule",
+        		requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
         		resourceType := int18,
         		primitiveContent := {
-        			any_1 := {{Schedule_create := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}	
+        			any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}	
         		},
 				role := omit,
         		originatingTimestamp := omit,
@@ -673,10 +679,10 @@ module OneM2M_Templates {
         		operation := int1,
         		to_ := p_parentResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createSchedule",
+        		requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
         		resourceType := int18,
         		primitiveContent := {
-        			any_1 := {{Schedule_create := m_contentCreateSchedule (p_scheduleElement)}}	
+        			any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}}	
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -698,10 +704,10 @@ module OneM2M_Templates {
 				operation := int1,
 				to_ := "NotInitialized",
 				from_ := PX_AE_ID_STEM,
-				requestIdentifier := "m_createSubscription",
+				requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
 				resourceType := int23,
 				primitiveContent := {
-					any_1 := {{Subscription_create := m_contentCreateSubscription ({"/in-cse/ae_test"})}}	
+					any_1 := {{Subscription_optional := m_contentCreateSubscription ({"Not Initialized"})}}	
 				},
 				role := omit,
 				originatingTimestamp := omit,
@@ -723,10 +729,10 @@ module OneM2M_Templates {
         		operation := int1,
         		to_ := p_parentResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_createSubscription",
+        		requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
         		resourceType := int23,
         		primitiveContent := {
-					any_1 := {{Subscription_create := m_contentCreateSubscription (p_notificationURI)}}	
+					any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI)}}	
         		},
 				role := omit,
 				originatingTimestamp := omit,
@@ -751,7 +757,7 @@ module OneM2M_Templates {
         		operation := int4,
         		to_ := p_aeResourceAddress,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_deleteAe",
+        		requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
         		resourceType := omit,
         		primitiveContent := omit, 
         		role := omit,
@@ -774,7 +780,7 @@ module OneM2M_Templates {
         		operation := int4,
         		to_ := p_resourceId,
         		from_ := PX_AE_ID_STEM,
-        		requestIdentifier := "m_deleteAcp",
+        		requestIdentifier := "m_deleteAcp" & f_rnd(1, 1000000),
         		resourceType := omit,
         		primitiveContent := omit,
 				role := omit,
@@ -797,534 +803,876 @@ module OneM2M_Templates {
 	
 	group ContentCreate {
 		
-    	template (value) AE_create m_contentCreateAe (in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs) := {
-			resourceName := p_name,
-			labels := omit,
-			accessControlPolicyIDs := p_accessControlPolicyIDs,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			appName := omit,
-			app_ID := PX_APP_ID,
-			pointOfAccess := omit,
-			ontologyRef := omit,
-			requestReachability := false
-    	};
+    	template (value) AE_optional m_contentCreateAe (in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs) := {
+    		resourceName := p_name,//O
+    		resourceType := omit,//NP
+    		resourceID := omit,//NP
+    		parentID := omit,//NP
+    		creationTime := omit,//NP
+    		lastModifiedTime := omit,//NP
+    		labels := omit,//O
+    		accessControlPolicyIDs := p_accessControlPolicyIDs,//O
+    		expirationTime := omit,//O
+    		announceTo := omit,//O
+    		announcedAttribute := omit,//O
+    		appName := omit,//O
+    		app_ID := PX_APP_ID,//M
+    		aE_ID := omit,//NP
+    		pointOfAccess := {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
+    		ontologyRef := omit,//O
+    		nodeLink := omit,//NP
+    		requestReachability := false,//M
+    		contentSerialization := omit,//O
+    		choice := omit//NP
+    	};	
     	
-    	template (value) ACP_create m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
-			resourceName := p_name,
-			labels := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
+    	template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
+			resourceName := p_name,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
 			privileges := {
 				accessControlRule_list := {
 					{
-        				accessControlOriginators := {"admin:admin"},
-        				accessControlOperations := p_allowedOperations,
+						accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
+						accessControlOperations := p_allowedOperations,
 						accessControlContexts_list := omit
 					}
 				}
-			},
+			},//M
 			selfPrivileges := {
 				accessControlRule_list := {
 					{
-        				accessControlOriginators := {"admin:admin"},
-        				accessControlOperations := int63,
+						accessControlOriginators := p_acor, //{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
+						accessControlOperations := int63,
 						accessControlContexts_list := omit
 					}
-    			}
-			}
+				}
+			},//M
+			choice := omit //NP
 		};
     	
-    	template (value) Group_create m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
+    	template (value) Group_optional m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
     												in template (value) ListOfURIs p_memberIds,
     												in template (omit) AcpType p_accessControlPolicyIDs) := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-			accessControlPolicyIDs := p_accessControlPolicyIDs,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			creator := omit, 
-			memberType := int2,//TODO: To be set to omit,
-			maxNrOfMembers := p_maxNrOfMembers,
-			memberIDs := p_memberIds,
-			membersAccessControlPolicyIDs := omit,
-			consistencyStrategy := omit,
-			groupName := omit
-    	};
+			resourceName := c_defaultResourceName,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := p_accessControlPolicyIDs,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			creator := omit,//O
+			memberType := int2,//TODO: To be set to omit //O
+			currentNrOfMembers := omit,//NP
+			maxNrOfMembers := p_maxNrOfMembers,//M
+			memberIDs := p_memberIds,//M
+			membersAccessControlPolicyIDs := omit,//O
+			memberTypeValidated := omit,//NP
+			consistencyStrategy := omit,//O
+			groupName := omit,//O
+			fanOutPoint := omit,//NP
+			choice := omit//NP
+    	};    	
     	
-    	template (value) PollingChannel_create m_contentCreatePollingChannel (	in template (omit) AcpType p_accessControlPolicyIDs) := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-			accessControlPolicyIDs := p_accessControlPolicyIDs,
-			expirationTime := omit,
-			pollingChannelURI := omit
-    	};
+    	template (value) PollingChannel_optional m_contentCreatePollingChannel (	in template (omit) AcpType p_accessControlPolicyIDs) := {
+			resourceName := c_defaultResourceName,//O
+            resourceType := omit,//NP
+            resourceID := omit,//NP
+            parentID := omit,//NP
+            creationTime := omit,//NP
+            lastModifiedTime := omit,//NP
+            labels := omit,//O
+            accessControlPolicyIDs := p_accessControlPolicyIDs,//O
+            expirationTime := omit,//O
+            pollingChannelURI := omit//NP
+    	};    	
     	
-    	template (value) Schedule_create m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement) := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-            expirationTime := omit,
-            announceTo := omit,
-            announcedAttribute := omit,
-            scheduleElement := p_scheduleElement
-    	};
+    	template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement) := {
+			resourceName := c_defaultResourceName,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			scheduleElement := p_scheduleElement,//M
+			choice := omit//NP
+    	};    	
     	
-    	template (value) Subscription_create m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI) := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-            eventNotificationCriteria := omit,
-            expirationCounter := omit,
-            notificationURI := p_notificationURI,
-            groupID := omit,
-            notificationForwardingURI := omit,
-            batchNotify := omit,
-            rateLimit := omit,
-            preSubscriptionNotify := omit,
-            pendingNotification := omit,
-            notificationStoragePriority := omit,
-            latestNotify := omit,
-            notificationContentType := omit,
-            notificationEventCat := omit,
-            creator := omit,
-            subscriberURI := omit
-    	};
+    	template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI) := {
+			resourceName := c_defaultResourceName,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			eventNotificationCriteria := omit,//O
+			expirationCounter := omit,//O
+			notificationURI := p_notificationURI,//M
+			groupID := omit,//O
+			notificationForwardingURI := omit,//O
+			batchNotify := omit,//O
+			rateLimit := omit,//O
+			preSubscriptionNotify := omit,//O
+			pendingNotification := omit,//O
+			notificationStoragePriority := omit,//O
+			latestNotify := omit,//O
+			notificationContentType := int1, //TODO Set to omit once xsd is fixed,//O
+			notificationEventCat := omit,//O
+			creator := omit,//O
+			subscriberURI := omit,//O
+			choice := omit//NP
+    	};   	
     	
-    	template (value) ContentInstance_create m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-            announceTo := omit,
-			contentInfo := "a",
-            contentSize := omit,
-            ontologyRef := omit,
-    		content_ := { 
-    			embed_values := {p_primitiveContent},
-    			attr := omit,
-    			elem_list := {}  
-    		}
+    	template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
+			resourceName := c_defaultResourceName,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			stateTag := omit,//NP
+			creator := omit,//O
+			contentInfo := "a",//O
+			contentSize := omit,//NP
+			ontologyRef := omit,//O
+			content := { 
+				embed_values := {p_primitiveContent},
+				attr := omit,
+				elem_list := {}  
+			}//M
 		};
 		
-    	template (value) Container_create m_contentCreateContainer := {
-			resourceName := c_defaultResourceName,
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			creator := omit,
-			maxNrOfInstances := omit,
-			maxByteSize := omit,
-			maxInstanceAge := omit,
-			locationID := omit,
-			ontologyRef := omit
+    	template (value) Container_optional m_contentCreateContainer := {
+			resourceName := c_defaultResourceName,//O
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			stateTag := omit,//NP
+			creator := omit,//O
+			maxNrOfInstances := omit,//O
+			maxByteSize := omit,//O
+			maxInstanceAge := omit,//O
+			currentNrOfInstances := omit,//NP
+			currentByteSize := omit,//NP
+			locationID := omit,//O
+			ontologyRef := omit,//O
+			latest := omit,//NP
+			oldest := omit,//NP
+			choice := omit//NP
     	};
+    	
 	}//end group ContentCreate
 	
 	group ContentUpdate {
 		
-		template (value) AE_update m_contentUpdateAe := {
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			appName := omit,
-			pointOfAccess := omit,
-			ontologyRef := omit,
-			requestReachability := omit
-		};
+		template (value) AE_optional m_contentUpdateAe := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			appName := omit,//O
+			app_ID := omit,//NP
+			aE_ID := omit,//NP
+			pointOfAccess := omit,//O
+			ontologyRef := omit,//O
+			nodeLink := omit,//NP
+			requestReachability := omit,//O
+			contentSerialization := omit,//O
+			choice := omit//NP
+		};	
     	
-		template (value) ACP_update m_contentUpdateAcp := {
-		 	labels := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			privileges := omit,
-			selfPrivileges := omit
+		template (value) AccessControlPolicy_optional m_contentUpdateAcp := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			privileges := omit,//O
+			selfPrivileges := omit,//O
+			choice := omit //NP
 		};
     	
-		template (value) Group_update m_contentUpdateGroup := {
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			maxNrOfMembers := omit,
-			memberIDs := omit,
-			membersAccessControlPolicyIDs := omit,
-			groupName := omit
+		template (value) Group_optional m_contentUpdateGroup := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			creator := omit,//NP
+			memberType := omit,//NP
+			currentNrOfMembers := omit,//NP
+			maxNrOfMembers := omit,//O
+			memberIDs := omit,//O
+			membersAccessControlPolicyIDs := omit,//O
+			memberTypeValidated := omit,//NP
+			consistencyStrategy := omit,//NP
+			groupName := omit,//O
+			fanOutPoint := omit,//NP
+			choice := omit//NP
+
 		};
     	
-		template (value) PollingChannel_update m_contentUpdatePollingChannel := {
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			pollingChannelURI := omit
+		template (value) PollingChannel_optional m_contentUpdatePollingChannel := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			pollingChannelURI := omit//NP
 		};
     	
-		template (value) Schedule_update m_contentUpdateSchedule := {
-			labels := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			scheduleElement := omit
+		template (value) Schedule_optional m_contentUpdateSchedule := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			scheduleElement := omit,//O
+			choice := omit//NP
 		};
     	
-		template (value) Subscription_update m_contentUpdateSubscription := {
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			eventNotificationCriteria := omit,
-			expirationCounter := omit,
-			notificationURI := omit,
-			groupID := omit,
-			notificationForwardingURI := omit,
-			batchNotify := omit,
-			rateLimit := omit,
-			pendingNotification := omit,
-			notificationStoragePriority := omit,
-			latestNotify := omit,
-			notificationContentType := omit,
-			notificationEventCat := omit
+		template (value) Subscription_optional m_contentUpdateSubscription := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			eventNotificationCriteria := omit,//O
+			expirationCounter := omit,//O
+			notificationURI := omit,//O
+			groupID := omit,//O
+			notificationForwardingURI := omit,//O
+			batchNotify := omit,//O
+			rateLimit := omit,//O
+			preSubscriptionNotify := omit,//NP
+			pendingNotification := omit,//O
+			notificationStoragePriority := omit,//O
+			latestNotify := omit,//O
+			notificationContentType := omit,//O
+			notificationEventCat := omit,//O
+			creator := omit,//NP
+			subscriberURI := omit,//NP
+			choice := omit//NP
 		};
-    	
-    	template (value) ContentInstance_update m_contentUpdateContentInstance(XSD.String p_primitiveContent) := {
-			labels := omit,
-            announceTo := omit,
-			contentInfo := omit,
-            contentSize := omit,
-            ontologyRef := omit,
-    		content_ := { 
-    			embed_values := {p_primitiveContent},
-    			attr := omit,
-    			elem_list := {}  
-    		}
+		
+		template (value) ContentInstance_optional m_contentUpdateContentInstance(XSD.String p_primitiveContent) := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			stateTag := omit,//NP
+			creator := omit,//O
+			contentInfo := omit,//O
+			contentSize := omit,//NP
+			ontologyRef := omit,//O
+			content := { 
+				embed_values := {p_primitiveContent},
+				attr := omit,
+				elem_list := {}  
+			}//O
 		};
 		
-		template (value) Container_update m_contentUpdateContainer := {
-			labels := omit,
-			accessControlPolicyIDs := omit,
-			expirationTime := omit,
-			announceTo := omit,
-			announcedAttribute := omit,
-			maxNrOfInstances := omit,
-			maxByteSize := omit,
-			maxInstanceAge := omit,
-			locationID := omit,
-			ontologyRef := omit
+		template (value) Container_optional m_contentUpdateContainer := {
+			resourceName := omit,//NP
+			resourceType := omit,//NP
+			resourceID := omit,//NP
+			parentID := omit,//NP
+			creationTime := omit,//NP
+			lastModifiedTime := omit,//NP
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//O
+			announceTo := omit,//O
+			announcedAttribute := omit,//O
+			stateTag := omit,//NP
+			creator := omit,//NP
+			maxNrOfInstances := omit,//O
+			maxByteSize := omit,//O
+			maxInstanceAge := omit,//O
+			currentNrOfInstances := omit,//NP
+			currentByteSize := omit,//NP
+			locationID := omit,//O
+			ontologyRef := omit,//O
+			latest := omit,//NP
+			oldest := omit,//NP
+			choice := omit//NP
 		};
 	}//end group ContentUpdate
 
 	group responseContent {
 		
-		template AE mw_contentAeBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			accessControlPolicyIDs := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			appName := *,
-			app_ID := ?,
-			aE_ID := ?,
-			pointOfAccess := *,
-			ontologyRef := *,
-			nodeLink := *,
-			requestReachability := ?,
-			contentSerialization := *,
-			choice := *
+		template AE_optional mw_contentAeBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			accessControlPolicyIDs := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := ?,//M
+			appName := *,//O
+			app_ID := ?,//M
+			aE_ID := ?,//M
+			pointOfAccess := *,//O
+			ontologyRef := *,//O
+			nodeLink := *,//O
+			requestReachability := ?,//M
+			contentSerialization := *,//O
+			choice := *//O
 		};
     	
-		template AccessControlPolicy mw_contentAcpBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			privileges := ?,
-			selfPrivileges := ?,
-			choice := *
+		template AccessControlPolicy_optional mw_contentAcpBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := *,//O
+			privileges := ?,//M
+			selfPrivileges := ?,//M
+			choice := *//O
 		};
 		
-		template AccessControlPolicy mw_contentAcp_rc1 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_allOmit modifies mw_contentAcpBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			privileges := omit,//M
+			selfPrivileges := omit,//M
+			choice := omit//O
 		}
 		
-		//TODO
-		template AccessControlPolicy mw_contentAcp_rc2 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_rc1 modifies mw_contentAcpBase := {
+			choice := omit	//O
 		}
 		
-		template AccessControlPolicy mw_contentAcp_rc3 modifies mw_contentAcpBase := {
-			choice := omit	
+		//TODO
+		template XSD.AnyURI mw_contentAcp_rc2 := ?;
+		
+		template AccessControlPolicy_optional mw_contentAcp_rc3 modifies mw_contentAcpBase := {
+			choice := omit	//O
 		}
 		
-		template AccessControlPolicy mw_contentAcp_rc4 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_rc4 modifies mw_contentAcpBase := {
+			choice := {subscription_list := ?}	//O
 		}
 		
-		template AccessControlPolicy mw_contentAcp_rc5 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_rc5 modifies mw_contentAcpBase := {
+			choice := {childResource_list := ?}	//O
 		}
 		
-		template AccessControlPolicy mw_contentAcp_rc6 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_rc6 modifies mw_contentAcpBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			privileges := omit,//M
+			selfPrivileges := omit,//M
+			choice := {childResource_list := ?}//O
 		}
 		
-		template AccessControlPolicy mw_contentAcp_rc7 modifies mw_contentAcpBase := {
-			choice := omit	
+		template AccessControlPolicy_optional mw_contentAcp_rc7 modifies mw_contentAcpBase := {
+			
 		}
     	
-		template Group mw_contentGroupBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			accessControlPolicyIDs := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			creator := *,
-			memberType := ?,
-			currentNrOfMembers := ?,
-			maxNrOfMembers := ?,
-			memberIDs := ?,
-			membersAccessControlPolicyIDs := *,
-			memberTypeValidated := ?,
-			consistencyStrategy := *,
-			groupName := *,
-			fanOutPoint := ?,
-			choice := *
+		template Group_optional mw_contentGroupBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			accessControlPolicyIDs := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := *,//O
+			creator := *,//O
+			memberType := ?,//M
+			currentNrOfMembers := ?,//M
+			maxNrOfMembers := ?,//M
+			memberIDs := ?,//M
+			membersAccessControlPolicyIDs := *,//O
+			memberTypeValidated := *,//O
+			consistencyStrategy := *,//O
+			groupName := *,//O
+			fanOutPoint := omit,//M
+			choice := *//O
 		};
 		
-		template Group mw_contentGroup_rc1 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_allOmit modifies mw_contentGroupBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			creator := omit,//O
+			memberType := omit,//M
+			currentNrOfMembers := omit,//M
+			maxNrOfMembers := omit,//M
+			memberIDs := omit,//M
+			membersAccessControlPolicyIDs := omit,//O
+			memberTypeValidated := omit,//M
+			consistencyStrategy := omit,//O
+			groupName := omit,//O
+			fanOutPoint := omit,//M
+			choice := omit//O
 		}
 		
-		template Group mw_contentGroup_rc2 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_rc1 modifies mw_contentGroupBase := {
+			choice := omit	//O
 		}
 		
-		template Group mw_contentGroup_rc3 modifies mw_contentGroupBase := {
-			choice := omit	
+		template XSD.AnyURI mw_contentGroup_rc2 := ?; 
+		
+		template Group_optional  mw_contentGroup_rc3 modifies mw_contentGroupBase := {
+			choice := omit	//O
 		}
 		
-		template Group mw_contentGroup_rc4 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_rc4 modifies mw_contentGroupBase := {
+			choice := {subscription_list := ?}	//O
 		}
 		
-		template Group mw_contentGroup_rc5 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_rc5 modifies mw_contentGroupBase := {
+			choice := {childResource_list := ?}	//O
 		}
 		
-		template Group mw_contentGroup_rc6 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_rc6 modifies mw_contentGroupBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			creator := omit,//O
+			memberType := omit,//M
+			currentNrOfMembers := omit,//M
+			maxNrOfMembers := omit,//M
+			memberIDs := omit,//M
+			membersAccessControlPolicyIDs := omit,//O
+			memberTypeValidated := omit,//M
+			consistencyStrategy := omit,//O
+			groupName := omit,//O
+			fanOutPoint := omit,//M
+			choice := {childResource_list := ?}//O
 		}
 		
-		template Group mw_contentGroup_rc7 modifies mw_contentGroupBase := {
-			choice := omit	
+		template Group_optional mw_contentGroup_rc7 modifies mw_contentGroupBase := {
+			
 		}
     	
-		template PollingChannel mw_contentPollingChannelBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			accessControlPolicyIDs := *,
-			expirationTime := ?,
-			pollingChannelURI := ?
+		template PollingChannel_optional mw_contentPollingChannelBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			accessControlPolicyIDs := *,//O
+			expirationTime := ?,//M
+			pollingChannelURI := ?//M
+		};
+		
+		template PollingChannel_optional mw_contentPollingChannel_allOmit := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			pollingChannelURI := omit//M
 		};
 		
-		template Schedule mw_contentScheduleBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			scheduleElement := ?,
-			choice := *
+		template Schedule_optional mw_contentScheduleBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := *,//O
+			scheduleElement := ?,//M
+			choice := *//O
 		};
 		
-		template Schedule mw_contentSchedule_rc1 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_allOmit modifies mw_contentScheduleBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			scheduleElement := omit,//M
+			choice := omit//O
 		}
 		
-		template Schedule mw_contentSchedule_rc2 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_rc1 modifies mw_contentScheduleBase := {
+			choice := omit	//O
 		}
 		
-		template Schedule mw_contentSchedule_rc3 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template XSD.AnyURI mw_contentSchedule_rc2 := ?; 
+		
+		template Schedule_optional mw_contentSchedule_rc3 modifies mw_contentScheduleBase := {
+			choice := omit	//O
 		}
 		
-		template Schedule mw_contentSchedule_rc4 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_rc4 modifies mw_contentScheduleBase := {
+			choice := {choice_list := ?}	//O
 		}
 		
-		template Schedule mw_contentSchedule_rc5 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_rc5 modifies mw_contentScheduleBase := {
+			choice := {childResource_list := ?}	//O
 		}
 		
-		template Schedule mw_contentSchedule_rc6 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_rc6 modifies mw_contentScheduleBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			scheduleElement := omit,//M
+			choice := {childResource_list := ?}//O
 		}
 		
-		template Schedule mw_contentSchedule_rc7 modifies mw_contentScheduleBase := {
-			choice := omit	
+		template Schedule_optional mw_contentSchedule_rc7 modifies mw_contentScheduleBase := {
+			
 		}
     	
-		template Subscription mw_contentSubscriptionBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			accessControlPolicyIDs := *,
-			expirationTime := ?,
-			eventNotificationCriteria := *,
-			expirationCounter := *,
-			notificationURI := ?,
-			groupID := *,
-			notificationForwardingURI := *,
-			batchNotify := *,
-			rateLimit := *,
-			preSubscriptionNotify := *,
-			pendingNotification := *,
-			notificationStoragePriority := *,
-			latestNotify := *,
-			notificationContentType := ?,
-			notificationEventCat := *,
-			creator := *,
-			subscriberURI := *,
-			choice := *
+		template Subscription_optional mw_contentSubscriptionBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			accessControlPolicyIDs := *,//O
+			expirationTime := ?,//M
+			eventNotificationCriteria := *,//O
+			expirationCounter := *,//O
+			notificationURI := ?,//M
+			groupID := *,//O
+			notificationForwardingURI := *,//O
+			batchNotify := *,//O
+			rateLimit := *,//O
+			preSubscriptionNotify := *,//O
+			pendingNotification := *,//O
+			notificationStoragePriority := *,//O
+			latestNotify := *,//O
+			notificationContentType := *,//O
+			notificationEventCat := *,//O
+			creator := *,//O
+			subscriberURI := *,//O
+			choice := *//O
 		};
-		
-		template Subscription mw_contentSubscription_rc1 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_allOmit modifies mw_contentSubscriptionBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			eventNotificationCriteria := omit,//O
+			expirationCounter := omit,//O
+			notificationURI := omit,//M
+			groupID := omit,//O
+			notificationForwardingURI := omit,//O
+			batchNotify := omit,//O
+			rateLimit := omit,//O
+			preSubscriptionNotify := omit,//O
+			pendingNotification := omit,//O
+			notificationStoragePriority := omit,//O
+			latestNotify := omit,//O
+			notificationContentType := omit,//M
+			notificationEventCat := omit,//O
+			creator := omit,//O
+			subscriberURI := omit,//O
+			choice := omit//O
 		}
 		
-		template Subscription mw_contentSubscription_rc2 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_rc1 modifies mw_contentSubscriptionBase := {
+			choice := omit	//O
 		}
 		
-		template Subscription mw_contentSubscription_rc3 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template XSD.AnyURI mw_contentSubscription_rc2 := ?;  
+		
+		template Subscription_optional mw_contentSubscription_rc3 modifies mw_contentSubscriptionBase := {
+			choice := omit	//O
 		}
 		
-		template Subscription mw_contentSubscription_rc4 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_rc4 modifies mw_contentSubscriptionBase := {
+			choice := {schedule := ?}	//O
 		}
 		
-		template Subscription mw_contentSubscription_rc5 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_rc5 modifies mw_contentSubscriptionBase := {
+			choice := {childResource := ?}	//O
 		}
 		
-		template Subscription mw_contentSubscription_rc6 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_rc6 modifies mw_contentSubscriptionBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			eventNotificationCriteria := omit,//O
+			expirationCounter := omit,//O
+			notificationURI := omit,//M
+			groupID := omit,//O
+			notificationForwardingURI := omit,//O
+			batchNotify := omit,//O
+			rateLimit := omit,//O
+			preSubscriptionNotify := omit,//O
+			pendingNotification := omit,//O
+			notificationStoragePriority := omit,//O
+			latestNotify := omit,//O
+			notificationContentType := omit,//M
+			notificationEventCat := omit,//O
+			creator := omit,//O
+			subscriberURI := omit,//O
+			choice := {childResource := ?}//O
 		}
 		
-		template Subscription mw_contentSubscription_rc7 modifies mw_contentSubscriptionBase := {
-			choice := omit	
+		template Subscription_optional mw_contentSubscription_rc7 modifies mw_contentSubscriptionBase := {
+			
 		}
     	
-		template ContentInstance mw_contentContentInstanceBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			stateTag := ?,
-			creator := *,
-			contentInfo := *,
-			contentSize := ?,
-			ontologyRef := *,
-			content := ?
+		template ContentInstance_optional mw_contentContentInstanceBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := *,//O
+			stateTag := ?,//M
+			creator := *,//O
+			contentInfo := *,//O
+			contentSize := ?,//M
+			ontologyRef := *,//O
+			content := ?//M
 		};
 		
-		template Container mw_contentContainerBase := {
-			resourceName := ?,
-			resourceType := ?,
-			resourceID := ?,
-			parentID := ?,
-			creationTime := ?,
-			lastModifiedTime := ?,
-			labels := *,
-			accessControlPolicyIDs := *,
-			expirationTime := ?,
-			announceTo := *,
-			announcedAttribute := ?,
-			stateTag := ?,
-			creator := ?,
-			maxNrOfInstances := *,
-			maxByteSize := *,
-			maxInstanceAge := *,
-			currentNrOfInstances := ?,
-			currentByteSize := ?,
-			locationID := *,
-			ontologyRef := *,
-			latest := ?,
-			oldest := ?,
-			choice := *
+		template Container_optional mw_contentContainerBase := {
+			resourceName := ?,//M
+			resourceType := ?,//M
+			resourceID := ?,//M
+			parentID := ?,//M
+			creationTime := ?,//M
+			lastModifiedTime := ?,//M
+			labels := *,//O
+			accessControlPolicyIDs := *,//O
+			expirationTime := ?,//M
+			announceTo := *,//O
+			announcedAttribute := *,//O
+			stateTag := ?,//M
+			creator := *,//O
+			maxNrOfInstances := *,//O
+			maxByteSize := *,//O
+			maxInstanceAge := *,//O
+			currentNrOfInstances := ?,//M
+			currentByteSize := ?,//M
+			locationID := *,//O
+			ontologyRef := *,//O
+			latest := omit,//M
+			oldest := omit,//M
+			choice := *//O
 		};
 		
-		template Container mw_contentContainer_rc1 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_allOmit modifies mw_contentContainerBase := {
+			resourceName := omit,//M
+			resourceType := omit,//M
+			resourceID := omit,//M
+			parentID := omit,//M
+			creationTime := omit,//M
+			lastModifiedTime := omit,//M
+			labels := omit,//O
+			accessControlPolicyIDs := omit,//O
+			expirationTime := omit,//M
+			announceTo := omit,//O
+			announcedAttribute := omit,//M
+			stateTag := omit,//M
+			creator := omit,//M
+			maxNrOfInstances := omit,//O
+			maxByteSize := omit,//O
+			maxInstanceAge := omit,//O
+			currentNrOfInstances := omit,//M
+			currentByteSize := omit,//M
+			locationID := omit,//O
+			ontologyRef := omit,//O
+			latest := omit,//M
+			oldest := omit,//M
+			choice := omit//O
 		}
 		
-		template Container mw_contentContainer_rc2 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_rc1 modifies mw_contentContainerBase := {
+			choice := omit	//O
 		}
 		
-		template Container mw_contentContainer_rc3 modifies mw_contentContainerBase := {
-			choice := omit	
+		template XSD.AnyURI mw_contentContainer_rc2 := ?;
+		
+		template Container_optional mw_contentContainer_rc3 modifies mw_contentContainerBase := {
+			choice := omit	//O
 		}
 		
-		template Container mw_contentContainer_rc4 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_rc4 modifies mw_contentContainerBase := {
+			choice := {choice_list := ?}	//O
 		}
 		
-		template Container mw_contentContainer_rc5 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_rc5 modifies mw_contentContainerBase := {
+			choice := {childResource_list := ?}	//O
 		}
 		
-		template Container mw_contentContainer_rc6 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_rc6 modifies mw_contentContainerBase := {
+			resourceName := omit,//M
+            resourceType := omit,//M
+            resourceID := omit,//M
+            parentID := omit,//M
+            creationTime := omit,//M
+            lastModifiedTime := omit,//M
+            labels := omit,//O
+            accessControlPolicyIDs := omit,//O
+            expirationTime := omit,//M
+            announceTo := omit,//O
+            announcedAttribute := omit,//M
+            stateTag := omit,//M
+            creator := omit,//M
+            maxNrOfInstances := omit,//O
+            maxByteSize := omit,//O
+            maxInstanceAge := omit,//O
+            currentNrOfInstances := omit,//M
+            currentByteSize := omit,//M
+            locationID := omit,//O
+            ontologyRef := omit,//O
+            latest := omit,//M
+            oldest := omit,//M
+            choice := {childResource_list := ?}//O
 		}
 		
-		template Container mw_contentContainer_rc7 modifies mw_contentContainerBase := {
-			choice := omit	
+		template Container_optional mw_contentContainer_rc7 modifies mw_contentContainerBase := {
+		
 		}
 	}//end group responseContent
 	
@@ -1345,9 +1693,9 @@ module OneM2M_Templates {
     	
 		template (value) ACP_update_invalid m_contentUpdateAcp_invalid := {
 			labels := omit,
+			expirationTime := omit,
 			creationTime := omit,
 			expirationCounter := omit,
-			expirationTime := omit,
 			announceTo := omit,
 			announcedAttribute := omit,
 			privileges := omit,
diff --git a/OneM2M_TestControl.ttcn b/OneM2M_TestControl.ttcn
index 4a8991f9f0dfb5a34cdcceb43eaec243593a3275..14a4aa85dac1f059c1a915a1bf36d8f968c2ca41 100644
--- a/OneM2M_TestControl.ttcn
+++ b/OneM2M_TestControl.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestControl.ttcn $
- *              $Id: OneM2M_TestControl.ttcn 23 2016-03-17 10:02:44Z reinaortega $
+ *              $Id: OneM2M_TestControl.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Test control module for oneM2M
  *
  */
@@ -17,9 +17,7 @@ module OneM2M_TestControl {
 	import from OneM2M_Testcases all;	
 
 	control {
-		execute(TC_RETRIEVE_CSEBASE());
-		execute(TC_REGISTER_AE());
-		execute(TC_UPDATE_CONTENT());	  
+  
 	}
 
 }  // end of module
diff --git a/OneM2M_TestSystem.ttcn b/OneM2M_TestSystem.ttcn
index 98a0c997f6ec45e330ba8335930fff4b43d31a3c..236721bc4f9672cd36a66221afa8915c9bdbb67f 100644
--- a/OneM2M_TestSystem.ttcn
+++ b/OneM2M_TestSystem.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestSystem.ttcn $
- *              $Id: OneM2M_TestSystem.ttcn 76 2016-04-29 14:15:01Z berge $
+ *              $Id: OneM2M_TestSystem.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Test System module for oneM2M
  *
  */
@@ -16,6 +16,7 @@ module OneM2M_TestSystem {
 	import from OneM2M_Types all;
 	import from OneM2M_TypesAndValues all;
 	import from LibCommon_Time {modulepar all};
+	import from XSD all;
 	
 	/* Ports */
 	type port OneM2MPort message {
@@ -41,9 +42,9 @@ module OneM2M_TestSystem {
 		timer tc_ac := PX_TAC;
 		timer tc_wait;
 		//global variables
-		var AE vc_ae;
-		var anytype vc_contentCreate;
-		var anytype vc_contentUpdate;
+		var AE vc_aeAux;
+		var AccessControlPolicy_optional vc_acpAux;
+		var XSD.ID vc_resourceId := "0";//TODO Clean it, I put it here cause the function f_createResource was already returning another value
 	}
 			
 	type component M2MSystem {
diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn
index 896019053a7e92f68955235b833825e1ec9e483a..ff1ba254b9c783c0a105b37cce206a62ed84a217 100644
--- a/OneM2M_Testcases.ttcn
+++ b/OneM2M_Testcases.ttcn
@@ -7,10 +7,11 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
- *              $Id: OneM2M_Testcases.ttcn 69 2016-04-28 07:49:58Z reinaortega $
+ *              $Id: OneM2M_Testcases.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Module containing test cases for oneM2M
  *
  */
+ //Test
 
 module OneM2M_Testcases {
 
@@ -27,228 +28,14 @@ module OneM2M_Testcases {
 	//Demos used for validation purposes
 	group oneM2M_demos {
 	
-		group oneM2M_demo_real_IUT {
-		
-			/* Test cases */
-			testcase TC_RETRIEVE_CSEBASE() runs on M2M system M2MSystem {
-				
-				timer t_ac := 5.0;
-				map(self:mcaPort, system:mcaPort); 
-				
-				// Preamble
-				
-				// Test Body	 
-				mcaPort.send(m_request(m_retrieveCseBase));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) {
-						t_ac.stop;
-						setverdict(pass);
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						t_ac.stop;
-						setverdict(fail);
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc);
-					}
-					[] t_ac.timeout {
-						setverdict(inconc);
-					}
-				}	
-				
-				// Postamble
-				unmap(self:mcaPort, system:mcaPort); 
-				stop;
-			}
-			
-			testcase TC_REGISTER_AE() runs on M2M system M2MSystem {
-				
-				timer t_ac := 5.0;
-				var M2MResponsePrimitive v_response;
-				var boolean v_deleteResource := false;
-				map(self:mcaPort, system:mcaPort); 
-
-					 
-				// Preamble
-				
-				// Test Body	 
-				mcaPort.send(m_request(m_createAeAux("ae_test", omit)));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) -> value v_response {
-						t_ac.stop;
-						setverdict(pass, "Application registered successfuly");
-						v_deleteResource := PX_DELETE_CREATED_RESOURCES;
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						t_ac.stop;
-						setverdict(fail, "Error while registering application");
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc, "Unexpected message received");
-					}
-					[] t_ac.timeout {
-						setverdict(inconc, "No answer while registering application");
-					}
-				}	
-		
-				// Postamble
-				if(v_deleteResource == true) {
-					mcaPort.send(m_request(m_deleteAe("/" & c_cse_name & "/ae_test")));
-					t_ac.start;
-					alt {
-						[] mcaPort.receive(mw_responseOK) {
-							t_ac.stop;
-							log("Postamble: Resource deleted");
-						}
-						[] mcaPort.receive(mw_responseKO) {
-							t_ac.stop;
-							log("Postamble: Error while deleting resource");
-						}
-						[] mcaPort.receive {
-							t_ac.stop;
-							log("Postamble: Unexpected message received");
-						}
-						[] t_ac.timeout {
-							log("Postamble: No answer while deleting resource");
-						}	
-					}	
-				}
-				
-				unmap(self:mcaPort, system:mcaPort); 
-				stop;
-			}
-		
-			testcase TC_UPDATE_CONTENT() runs on M2M system M2MSystem {
-				 
-				timer t_ac := 5.0;
-				var M2MResponsePrimitive v_response;
-				var XSD.ID v_resourceId_content;
-				var boolean v_deleteAe := false;
-				map(self:mcaPort, system:mcaPort);
-				
-				// Preamble	 
-				// Register Application
-				mcaPort.send(m_request(m_createAeAux("ae_test", omit)));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) -> value v_response {
-						t_ac.stop;
-						log("Preamble: Application registered successfuly");
-						v_deleteAe := PX_DELETE_CREATED_RESOURCES;
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Error while registering application");
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Unexpected message received");
-					}
-					[] t_ac.timeout {
-						setverdict(inconc, "Postamble: No answer while registering resource");
-					}
-				}	
-				
-				// Create container
-				mcaPort.send(m_request(m_createContainer("/" & c_cse_name & "/ae_test", "myContainer")));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) -> value v_response {
-						t_ac.stop;
-						log("Preamble: Container created successfuly");
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Error while creating container");
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Unexpected message received");
-					}
-					[] t_ac.timeout {
-						setverdict(inconc, "Postamble: No answer while creating container");
-					}
-				}	
-				
-				// Create content instance
-				mcaPort.send(m_request(m_createContentInstance("/" & c_cse_name & "/ae_test/myContainer", "0")));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) -> value v_response {
-						t_ac.stop;
-						log("Preamble: Content created successfuly");
-					}
-					[] mcaPort.receive(mw_responseKO) {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Error while creating content");
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc, "Preamble: Unexpected message received");
-					}
-					[] t_ac.timeout {
-						setverdict(inconc, "Postamble: No answer while creating resource");
-					}
-				}
-				
-				// Test Body
-				mcaPort.send(m_request(m_updateContentInstance("/" & c_cse_name & "/ae_test/myContainer/myContent", "2")));
-				t_ac.start;
-				alt {
-					[] mcaPort.receive(mw_responseOK) -> value v_response {
-						t_ac.stop;
-						setverdict(fail, "Content updated incorrectly");
-					}
-					[] mcaPort.receive(mw_response(int4005)) {
-						t_ac.stop;
-						setverdict(pass, "Content not updated");
-					}
-					[] mcaPort.receive {
-						t_ac.stop;
-						setverdict(inconc, "Unexpected message received");
-					}
-					[] t_ac.timeout {
-						setverdict(inconc, "No answer while updating resource");
-					}
-				}	
-		
-				// Postamble
-				if(v_deleteAe == true) {
-					mcaPort.send(m_request(m_deleteAe("/" & c_cse_name & "/ae_test")));
-					t_ac.start;
-					alt {
-						[] mcaPort.receive(mw_responseOK) {
-							t_ac.stop;
-							log("Postamble: Resource deleted");
-						}
-						[] mcaPort.receive(mw_responseKO) {
-							t_ac.stop;
-							log("Postamble: Error while deleting resource");
-						}
-						[] mcaPort.receive {
-							t_ac.stop;
-							log("Postamble: Unexpected message received");
-						}
-						[] t_ac.timeout {
-							log("Postamble: No answer while deleting resource");
-						}	
-					}	
-				}
-				
-				unmap(self:mcaPort, system:mcaPort); 
-				stop;
-			}	
+		group helpingTestCases {//These are not part of the test suite, just for verification purposes
 			
 			testcase TC_DELETE_AE() runs on M2M system M2MSystem {
 				
 				timer t_ac := 5.0;
 				map(self:mcaPort, system:mcaPort); 
 		
-				mcaPort.send(m_request(m_deleteAe("/" & c_cse_name & PX_RESOURCE_TO_BE_DELETED)));
+				mcaPort.send(m_request(m_deleteAe(PX_URI_CSE & PX_CSE_NAME & "/" & PX_RESOURCE_TO_BE_DELETED)));
 				t_ac.start;
 				alt {
 					[] mcaPort.receive(mw_responseOK) {
@@ -283,7 +70,7 @@ module OneM2M_Testcases {
 				map(self:mcaPort, system:mcaPort); 
 					
 				for (i:=0; i<lengthof(PX_RESOURCES_TO_BE_DELETED); i:= i+1) {  
-					mcaPort.send(m_request(m_deleteAe("/" & c_cse_name & PX_RESOURCES_TO_BE_DELETED[i])));
+					mcaPort.send(m_request(m_deleteAe(PX_URI_CSE & PX_CSE_NAME & "/" & PX_RESOURCES_TO_BE_DELETED[i])));
 					t_ac.start;
 					alt {
 						[] mcaPort.receive(mw_responseOK) {
@@ -365,8 +152,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -376,11 +162,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int0;//Nothing
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -403,7 +200,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_001
     				
@@ -415,7 +212,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc1;
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
 					                        
 					f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -424,7 +221,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc1;
+					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
 					
 					f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -433,7 +230,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc1;
+					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
 						
 					f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -442,7 +239,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc1;
+					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
 						
 					f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -451,7 +248,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -460,7 +257,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc1;
+					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
 
 					f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -470,8 +267,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -481,11 +277,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -508,7 +315,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_002
     				
@@ -520,7 +327,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc2;
+					v_contentResponse.any_1[0].AnyURI := mw_contentContainer_rc2;
 					                        
 					f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -529,7 +336,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc2;
+					v_contentResponse.any_1[0].AnyURI := mw_contentGroup_rc2;
 					
 					f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -538,7 +345,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc2;
+					v_contentResponse.any_1[0].AnyURI := mw_contentAcp_rc2;
 						
 					f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -547,7 +354,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc2;
+					v_contentResponse.any_1[0].AnyURI := mw_contentSchedule_rc2;
 						
 					f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -556,7 +363,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -565,7 +372,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc2;
+					v_contentResponse.any_1[0].AnyURI := mw_contentSubscription_rc2;
 
 					f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -575,8 +382,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -586,22 +392,33 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int2;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
 					alt {
 						[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
 							tc_ac.stop;
-							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
+							setverdict(pass, testcasename() & ": Only hierarchical address provided with RC set to 2");
 						}
 						[] mcaPort.receive(mw_responseOK()) -> value v_response {
 							tc_ac.stop;
-							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
+							setverdict(fail, testcasename() & ": Not only hierarchical address provided with RC set to 2");
 						}
 						[] mcaPort.receive(mw_responseKO) {
 							tc_ac.stop;
@@ -613,7 +430,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_003
     				
@@ -625,7 +442,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc3;
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc3;
 					                        
 					f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -634,7 +451,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc3;
+					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc3;
 					
 					f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -643,7 +460,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc3;
+					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc3;
 						
 					f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -652,7 +469,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc3;
+					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc3;
 						
 					f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -661,7 +478,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -670,7 +487,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc3;
+					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc3;
 
 					f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -680,8 +497,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -691,11 +507,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -718,7 +545,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_004
     				
@@ -730,7 +557,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc4;
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4;
 					                        
 					f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -739,7 +566,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc4;
+					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4;
 					
 					f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -748,7 +575,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc4;
+					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4;
 						
 					f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -757,7 +584,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc4;
+					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4;
 						
 					f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -766,7 +593,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -775,7 +602,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc4;
+					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4;
 
 					f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -785,8 +612,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -796,11 +622,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -823,7 +660,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_005
     				
@@ -835,7 +672,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc5;
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5;
 					                        
 					f_CSE_DMR_BV_006(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -844,7 +681,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc5;
+					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5;
 					
 					f_CSE_DMR_BV_006(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -853,7 +690,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc5;
+					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc5;
 						
 					f_CSE_DMR_BV_006(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -862,7 +699,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc5;
+					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc5;
 						
 					f_CSE_DMR_BV_006(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -871,7 +708,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_006(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -880,7 +717,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc5;
+					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc5;
 
 					f_CSE_DMR_BV_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -890,8 +727,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -901,11 +737,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -928,7 +775,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_006
     				
@@ -940,7 +787,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Container := mw_contentContainer_rc6;
+					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc6;
 					                        
 					f_CSE_DMR_BV_007(int3, m_createContainerBase, v_contentResponse);//Container
 				}
@@ -949,7 +796,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Group := mw_contentGroup_rc6;
+					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc6;
 					
 					f_CSE_DMR_BV_007(int9, m_createGroupBase, v_contentResponse);//Group
 				}
@@ -958,7 +805,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].AccessControlPolicy := mw_contentAcp_rc6;
+					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc6;
 						
 					f_CSE_DMR_BV_007(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
 				}
@@ -967,7 +814,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Schedule := mw_contentSchedule_rc6;
+					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc6;
 						
 					f_CSE_DMR_BV_007(int18, m_createScheduleBase, v_contentResponse);//Schedule
 				}
@@ -976,7 +823,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].PollingChannel := mw_contentPollingChannelBase;//FIXME
+					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
 						
 					f_CSE_DMR_BV_007(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 				}
@@ -985,7 +832,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var template PrimitiveContent v_contentResponse;
 					
-					v_contentResponse.any_1[0].Subscription := mw_contentSubscription_rc6;
+					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc6;
 
 					f_CSE_DMR_BV_007(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 				}
@@ -995,8 +842,7 @@ module OneM2M_Testcases {
 					// Local variables
 					var M2MResponsePrimitive v_response;
 					var RequestPrimitive v_request;
-					var XSD.String v_aeName := "ae_test";
-					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 					// Test control
     				
@@ -1006,11 +852,22 @@ module OneM2M_Testcases {
 					// Test adapter configuration
     				
 					// Preamble
-					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+					f_preamble_registerAe();//c_CRUDNDi);
+					
+					//Unstructured 
+					if(PX_UNSTRUCTURED) {
+						v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					}
+					    
+					// AE_ID
+					if(PX_FROM_IS_AE_ID == true) {
+						p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					}	
+					
 					f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 					// Test Body
-					v_request := m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName);
+					v_request := m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName);
 					v_request.resultContent := int1;//Attributes
 					mcaPort.send(m_request(v_request));
 					tc_ac.start;
@@ -1033,7 +890,7 @@ module OneM2M_Testcases {
 					}	
     								
 					// Postamble
-					f_postamble_deleteResources(v_aeName);
+					f_postamble_deleteResources();
     				
 				}//end f_CSE_DMR_BV_007
     				
@@ -1048,14 +905,14 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createContainerBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Container_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].Container_optional.resourceName := omit;
                         
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, m_createContainerBase);//Container
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int3, v_createRequest);//Container
 						
 						log(v_responsePrimitive);
                         
                         if(getverdict == pass){
-                            if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container.resourceName)){
+                            if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){
                             	setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
                             }
                         }
@@ -1066,12 +923,12 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Group_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].Group_optional.resourceName := omit;
 						
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int9, m_createGroupBase);//Group
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int9, v_createRequest);//Group
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
 							}
 						}
@@ -1082,12 +939,12 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].ACP_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName := omit;
 	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int1, m_createAcpBase);//AccessControlPolicy
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int1, v_createRequest);//AccessControlPolicy
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
 							}
 						}
@@ -1098,12 +955,12 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createScheduleBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Schedule_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].Schedule_optional.resourceName := omit;
 	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int18, m_createScheduleBase);//Schedule
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int18, v_createRequest);//Schedule
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
 							}
 						}
@@ -1114,12 +971,12 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].PollingChannel_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.resourceName := omit;
 	
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int15, m_createPollingChannelBase);//PollingChannel
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int15, v_createRequest);//PollingChannel
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
 							}
 						}
@@ -1130,12 +987,12 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Subscription_create.resourceName := omit;
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.resourceName := omit;
 
-						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int23, m_createSubscriptionBase);//Subscription
+						v_responsePrimitive := f_CSE_DMR_CRE_BV_001(int23, v_createRequest);//Subscription
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
 							}
 						}
@@ -1146,8 +1003,7 @@ module OneM2M_Testcases {
     					// Local variables
     					var M2MResponsePrimitive v_response;
     					var RequestPrimitive v_request;
-    					var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+    					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
     					// Test control
     				
@@ -1157,7 +1013,17 @@ module OneM2M_Testcases {
     					// Test adapter configuration
     				
     					// Preamble
-    					f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi); 				
+    					f_preamble_registerAe();//c_CRUDNDi); 
+    					
+						//Unstructured 
+					    if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					    }
+					    
+					    // AE_ID
+					    if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+					    }				
     									
     					// Test Body
     					
@@ -1180,7 +1046,7 @@ module OneM2M_Testcases {
     					}	
     								
     					// Postamble
-    					f_postamble_deleteResources(v_aeName);
+    					f_postamble_deleteResources();
     					
     					return v_response.responsePrimitive_;
     					    				
@@ -1198,8 +1064,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int3, m_createContainerBase);//container
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1211,8 +1081,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int9, m_createGroupBase);//group
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1224,8 +1098,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int1, m_createAcpBase );//accessControlPolicy
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1237,8 +1115,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int18, m_createScheduleBase);//Schedule
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1249,8 +1131,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int15, m_createPollingChannelBase);//Pollingchannel
 
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1262,8 +1148,12 @@ module OneM2M_Testcases {
 						v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int23, m_createSubscriptionBase);//Subscription
 						
 						if(getverdict == pass){
-							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription.resourceName)){
+							if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){
 								setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
+							} else {
+								if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName != c_defaultResourceName){
+									setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
+								}
 							}
 						}
 					}
@@ -1273,8 +1163,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_parentResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 										   
 						// Test control
 				
@@ -1284,10 +1173,21 @@ module OneM2M_Testcases {
 						// Test adapter configuration
 				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi); 				
+						f_preamble_registerAe();//c_CRUDNDi); 
+						
+						//Unstructured 
+					    if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+					    }
+							
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}				
 									
 						// Test Body
-						v_request := f_getCreateRequestPrimitive(p_resourceType, v_parentResourceAddress, omit, p_requestPrimitive);
+						v_request := f_getCreateRequestPrimitive(p_resourceType, v_aeResourceAddress, omit, p_requestPrimitive);
 						
 						mcaPort.send(m_request(v_request));
 						tc_ac.start;
@@ -1306,7 +1206,7 @@ module OneM2M_Testcases {
 						}	
 								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
 				
@@ -1358,8 +1258,7 @@ module OneM2M_Testcases {
     					// Local variables
     					var M2MResponsePrimitive v_response;
     					var RequestPrimitive v_request;
-    					var XSD.String v_aeName := "ae_test";
-    					var XSD.String v_parentResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+    					var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
     					// Test control
     				
@@ -1369,9 +1268,20 @@ module OneM2M_Testcases {
     					// Test adapter configuration
     				
     					// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
-    					v_request := f_createResource(p_resourceType, v_parentResourceAddress, p_requestPrimitive); 				
-    									
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+  					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
+    					v_request := f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
+  					    						    									
     					// Test Body
 						v_request.requestIdentifier := "Existing resource";
     					
@@ -1396,7 +1306,7 @@ module OneM2M_Testcases {
     					}	
     								
     					// Postamble
-    					f_postamble_deleteResources(v_aeName);
+    					f_postamble_deleteResources();
     				
     				}//end f_CSE_DMR_CRE_BV_003
     				
@@ -1445,8 +1355,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 						// Test control
     				
@@ -1457,11 +1366,21 @@ module OneM2M_Testcases {
     				
 						// Preamble
 						if (p_resourceType != int23) {
-							f_preamble_registerAe(v_aeName, int62);//c_RUDNDi);
+							f_preamble_registerAe(int62);//c_RUDNDi);
 						} else {
-							f_preamble_registerAe(v_aeName, int60);//c_UDNDi);
+							f_preamble_registerAe(int60);//c_UDNDi);
 						}	 				
-    									
+    								
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+							
 						// Test Body
 						if(p_resourceType == int15) {
 							v_request := valueof(m_createPollingChannel(v_aeResourceAddress, PX_AE_ID_STEM, omit));
@@ -1490,7 +1409,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_CRE_BV_004
     				
@@ -1506,88 +1425,75 @@ module OneM2M_Testcases {
 					testcase TC_CSE_DMR_RET_BV_001_01() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
-                        
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int3, m_createContainerBase);//Container
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
+						    
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int3, m_createContainerBase, v_contentResponse);//Container
 						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
 					}
 
 					testcase TC_CSE_DMR_RET_BV_001_02() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
                         
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int9, m_createGroupBase);//Group
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int9, m_createGroupBase, v_contentResponse);//Group
 						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_001_03() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
 							
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int1, m_createAcpBase);//AccessControlPolicy
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy
 						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
 					}
 				
 					testcase TC_CSE_DMR_RET_BV_001_04() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
 						
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int18, m_createScheduleBase);//Schedule
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int18, m_createScheduleBase, v_contentResponse);//Schedule
 						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_001_05() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;
 						
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int15, m_createPollingChannelBase);//PollingChannel
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_001_06() runs on M2M system M2MSystem {
 						// Local variables
 						var ResponsePrimitive v_responsePrimitive;
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
 						
-						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int23, m_createSubscriptionBase);//Subscription
-						
-						if( getverdict == pass) {
-							if(not ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription)) {
-								setverdict(fail, testcasename(), ": Error, resource not provided in the response");
-							}
-						}
+						v_responsePrimitive := f_CSE_DMR_RET_BV_001(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
+					
 					}
 				
-					function f_CSE_DMR_RET_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M return ResponsePrimitive {
+					function f_CSE_DMR_RET_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M return ResponsePrimitive {
     				
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 						// Test control
     				
@@ -1597,17 +1503,36 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName)));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResource("/" & vc_resourceId)));
+						} else {
+							mcaPort.send(m_request(m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName)));
+						}
 						tc_ac.start;
 						alt {
-							[] mcaPort.receive(mw_responseOK) -> value v_response {
+							[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
 								tc_ac.stop;
 								setverdict(pass, testcasename() & ": Response OK for retrieving");
 							}
+							[] mcaPort.receive(mw_responseOK) -> value v_response {
+								tc_ac.stop;
+								setverdict(fail, testcasename() & ": Error, resource elements provided not matching expected resource elements");
+							}
 							[] mcaPort.receive(mw_responseKO) -> value v_response {
 								tc_ac.stop;
 								setverdict(fail, testcasename() & ": Error while retrieving resource");
@@ -1618,7 +1543,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
     				
@@ -1633,8 +1558,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 						// Test control
     				
@@ -1644,10 +1568,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi); 				
-    									
+						f_preamble_registerAe();//c_CRUDNDi); 		
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+  					   				
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResource(int3, v_aeResourceAddress & "/" & c_defaultResourceName)));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResource("/" & vc_resourceId)));
+						} else {
+							mcaPort.send(m_request(m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName)));
+						}
 						tc_ac.start;
 						alt {
 							[] mcaPort.receive(mw_response(int4004)) -> value v_response {
@@ -1668,7 +1601,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BO_002
     				
@@ -1692,7 +1625,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var template RequestPrimitive v_requestPrimitive := m_createAcpBase;
 						
-						v_requestPrimitive.primitiveContent.any_1[0].ACP_create.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61;
+						v_requestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int61;
 						
 						f_CSE_DMR_RET_BO_003(int1, v_requestPrimitive);//AccessControlPolicy
 					}
@@ -1720,9 +1653,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_resourceName := "myResource";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 						var XSD.ID v_acpId;
     										   
 						// Test control
@@ -1733,14 +1664,31 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi;
+						f_preamble_registerAe();//c_CRUDNDi;
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
 										
  						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 	
- 								
-						f_updateAcpAuxResource(PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName, int61); //c_CUDNDi
+ 						if(PX_UNSTRUCTURED){
+							f_updateAcpAuxResource("/" & vc_acpAux.resourceID, int61); //c_CUDNDi
+ 						} else {
+ 							f_updateAcpAuxResource(PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName, int61); //c_CUDNDi
+ 						}
 								
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResource(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName)));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResource("/" & vc_resourceId)));
+						} else {
+							mcaPort.send(m_request(m_retrieveResource(v_aeResourceAddress & "/" & c_defaultResourceName)));
+						}
 						tc_ac.start;
 						alt {
 							[] mcaPort.receive(mw_response(int4103)) -> value v_response {
@@ -1761,7 +1709,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BO_003
     				
@@ -1772,47 +1720,70 @@ module OneM2M_Testcases {
 					
 					testcase TC_CSE_DMR_RET_BV_004_01() runs on M2M system M2MSystem {
 						// Local variables
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Container_optional := mw_contentContainer_allOmit;
+						v_contentResponse.any_1[0].Container_optional.parentID := ?;
                         
-						f_CSE_DMR_RET_BV_004(int3, m_createContainerBase);//Container
+						f_CSE_DMR_RET_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
 					}
 
 					testcase TC_CSE_DMR_RET_BV_004_02() runs on M2M system M2MSystem {
 						// Local variables
-						
-						f_CSE_DMR_RET_BV_004(int9, m_createGroupBase);//Group
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Group_optional := mw_contentGroup_allOmit;
+						v_contentResponse.any_1[0].Group_optional.parentID := ?;
+												
+						f_CSE_DMR_RET_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_004_03() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_004(int1, m_createAcpBase);//AccessControlPolicy
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_allOmit;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?;
+							
+						f_CSE_DMR_RET_BV_004(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy
 					}
 				
 					testcase TC_CSE_DMR_RET_BV_004_04() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_004(int18, m_createScheduleBase);//Schedule
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_allOmit;
+						v_contentResponse.any_1[0].Schedule_optional.parentID := ?;
+							
+						f_CSE_DMR_RET_BV_004(int18, m_createScheduleBase,v_contentResponse);//Schedule
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_004_05() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_004(int15, m_createPollingChannelBase);//PollingChannel
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannel_allOmit;
+						v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?;
+							
+						f_CSE_DMR_RET_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_004_06() runs on M2M system M2MSystem {
-							// Local variables
-	
-						f_CSE_DMR_RET_BV_004(int23, m_createSubscriptionBase);//Subscription
+						// Local variables
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_allOmit;
+						v_contentResponse.any_1[0].Subscription_optional.parentID := ?;
+							
+						f_CSE_DMR_RET_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 					}
 				
-					function f_CSE_DMR_RET_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {
+					function f_CSE_DMR_RET_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
     				
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 						var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved
     										   
 						// Test control
@@ -1823,25 +1794,35 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeToOption(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName & v_attribute)));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResourceAttributeToOption("/" & vc_resourceId & v_attribute)));
+						} else {
+							mcaPort.send(m_request(m_retrieveResourceAttributeToOption(v_aeResourceAddress & "/" & c_defaultResourceName & v_attribute)));
+						}
 						tc_ac.start;
 						alt {
+							[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly");
+							}
 							[] mcaPort.receive(mw_responseOK) -> value v_response {
 								tc_ac.stop;
-								//FIXME To double check which type response content shall contain
-								if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList)){
-									if(isbound(f_getAttribute(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList, "parentID"))) {
-										setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly");
-									} else {
-										setverdict(fail, testcasename() & ": Requested attribute not retrieved");
-									}
-								} else {
-									setverdict(fail, testcasename() & ": Requested attribute not retrieved");
-								}
+								setverdict(fail, testcasename() & ": Error, not only requested attribute retrieved");
 							}
 							[] mcaPort.receive(mw_responseKO) {
 								tc_ac.stop;
@@ -1853,7 +1834,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BV_004
     				
@@ -1864,48 +1845,71 @@ module OneM2M_Testcases {
 					
 					testcase TC_CSE_DMR_RET_BV_005_01() runs on M2M system M2MSystem {
 						// Local variables
-                        
-						f_CSE_DMR_RET_BV_005(int3, m_createContainerBase);//Container
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Container_optional := mw_contentContainer_allOmit;
+						v_contentResponse.any_1[0].Container_optional.parentID := ?;
+						                       
+						f_CSE_DMR_RET_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
 					}
 
 					testcase TC_CSE_DMR_RET_BV_005_02() runs on M2M system M2MSystem {
 						// Local variables
-						
-						f_CSE_DMR_RET_BV_005(int9, m_createGroupBase);//Group
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Group_optional := mw_contentGroup_allOmit;
+						v_contentResponse.any_1[0].Group_optional.parentID := ?;
+																		
+						f_CSE_DMR_RET_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_005_03() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_005(int1, m_createAcpBase);//AccessControlPolicy
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_allOmit;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?;
+							
+						f_CSE_DMR_RET_BV_005(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy
 					}
 				
 					testcase TC_CSE_DMR_RET_BV_005_04() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_005(int18, m_createScheduleBase);//Schedule
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_allOmit;
+						v_contentResponse.any_1[0].Schedule_optional.parentID := ?;
+								
+						f_CSE_DMR_RET_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_005_05() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_005(int15, m_createPollingChannelBase);//PollingChannel
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannel_allOmit;
+						v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?;
+								
+						f_CSE_DMR_RET_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_005_06() runs on M2M system M2MSystem {
-							// Local variables
-	
-						f_CSE_DMR_RET_BV_005(int23, m_createSubscriptionBase);//Subscription
+						// Local variables
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_allOmit;
+						v_contentResponse.any_1[0].Subscription_optional.parentID := ?;
+								
+						f_CSE_DMR_RET_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 						}
 
 					
-					function f_CSE_DMR_RET_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {
+					function f_CSE_DMR_RET_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
     				
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 						var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved
     										   
 						// Test control
@@ -1916,26 +1920,35 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName, 
-																						{"parentID"})));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption("/" & vc_resourceId,	{"pi"})));
+						} else {
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(v_aeResourceAddress & "/" & c_defaultResourceName,	{"pi"})));
+						}
 						tc_ac.start;
 						alt {
+							[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly");
+							}
 							[] mcaPort.receive(mw_responseOK) -> value v_response {
 								tc_ac.stop;
-								//FIXME To double check which type response content shall contain
-								if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList)){
-									if(isbound(f_getAttribute(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList, "parentID"))) {
-										setverdict(pass, testcasename() & ": Requested attribute retrieved successfuly");
-									} else {
-										setverdict(fail, testcasename() & ": Requested attribute not retrieved");
-									}
-								} else {
-									setverdict(fail, testcasename() & ": Requested attribute not retrieved");
-								}
+								setverdict(fail, testcasename() & ": Error, not only requested attribute retrieved");
 							}
 							[] mcaPort.receive(mw_responseKO) -> value v_response {
 								tc_ac.stop;
@@ -1947,7 +1960,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BV_005
     				
@@ -1958,48 +1971,77 @@ module OneM2M_Testcases {
 					
 					testcase TC_CSE_DMR_RET_BV_006_01() runs on M2M system M2MSystem {
 						// Local variables
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Container_optional := mw_contentContainer_allOmit;
+						v_contentResponse.any_1[0].Container_optional.parentID := ?;
+						v_contentResponse.any_1[0].Container_optional.creationTime := ?;
                         
-						f_CSE_DMR_RET_BV_006(int3, m_createContainerBase);//Container
+						f_CSE_DMR_RET_BV_006(int3, m_createContainerBase, v_contentResponse);//Container
 					}
 
 					testcase TC_CSE_DMR_RET_BV_006_02() runs on M2M system M2MSystem {
 						// Local variables
-						
-						f_CSE_DMR_RET_BV_006(int9, m_createGroupBase);//Group
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Group_optional := mw_contentGroup_allOmit;
+						v_contentResponse.any_1[0].Group_optional.parentID := ?;
+						v_contentResponse.any_1[0].Group_optional.creationTime := ?;
+												
+						f_CSE_DMR_RET_BV_006(int9, m_createGroupBase, v_contentResponse);//Group
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_006_03() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_006(int1, m_createAcpBase);//AccessControlPolicy
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_allOmit;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.parentID := ?;
+						v_contentResponse.any_1[0].AccessControlPolicy_optional.creationTime := ?;
+							
+						f_CSE_DMR_RET_BV_006(int1, m_createAcpBase, v_contentResponse);//AccessControlPolicy
 					}
 				
 					testcase TC_CSE_DMR_RET_BV_006_04() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_006(int18, m_createScheduleBase);//Schedule
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_allOmit;
+						v_contentResponse.any_1[0].Schedule_optional.parentID := ?;
+						v_contentResponse.any_1[0].Schedule_optional.creationTime := ?;
+							
+						f_CSE_DMR_RET_BV_006(int18, m_createScheduleBase, v_contentResponse);//Schedule
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_006_05() runs on M2M system M2MSystem {
 						// Local variables
-	
-						f_CSE_DMR_RET_BV_006(int15, m_createPollingChannelBase);//PollingChannel
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannel_allOmit;
+						v_contentResponse.any_1[0].PollingChannel_optional.parentID := ?;
+						v_contentResponse.any_1[0].PollingChannel_optional.creationTime := ?;
+							
+						f_CSE_DMR_RET_BV_006(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
 					}
 					
 					testcase TC_CSE_DMR_RET_BV_006_06() runs on M2M system M2MSystem {
-							// Local variables
-	
-						f_CSE_DMR_RET_BV_006(int23, m_createSubscriptionBase);//Subscription
+						// Local variables
+						var template PrimitiveContent v_contentResponse;
+					
+						v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_allOmit;
+						v_contentResponse.any_1[0].Subscription_optional.parentID := ?;
+						v_contentResponse.any_1[0].Subscription_optional.creationTime := ?;
+							
+						f_CSE_DMR_RET_BV_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
 						}
 
 					
-					function f_CSE_DMR_RET_BV_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {
+					function f_CSE_DMR_RET_BV_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
     				
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     										   
 						// Test control
     				
@@ -2009,27 +2051,36 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName, 
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption("/" & vc_resourceId, {"parentID", "creationTime"})));
+						} else {
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(v_aeResourceAddress & "/" & c_defaultResourceName,
 																						{"parentID", "creationTime"})));
+						}
 						tc_ac.start;
 						alt {
+							[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
+								tc_ac.stop;
+								setverdict(pass, testcasename() & ": Requested attributes retrieved successfuly");
+							}
 							[] mcaPort.receive(mw_responseOK) -> value v_response {
 								tc_ac.stop;
-								//FIXME To double check which type response content shall contain
-								if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList)){
-									if((isbound(f_getAttribute(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList, "parentID"))) and 
-									  (isbound(f_getAttribute(v_response.responsePrimitive_.primitiveContent.any_1[0].MyAttributeList, "creationTime")))) {
-										setverdict(pass, testcasename() & ": Requested attributes retrieved successfuly");
-									} else {
-										setverdict(fail, testcasename() & ": Requested attributes not retrieved");
-									}
-								} else {
-									setverdict(fail, testcasename() & ": Requested attributes not retrieved");
-								}
+								setverdict(fail, testcasename() & ": Error, not only requested attributes retrieved");
 							}
 							[] mcaPort.receive(mw_responseKO) {
 								tc_ac.stop;
@@ -2041,7 +2092,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BV_006
     				
@@ -2092,8 +2143,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 											   
 						// Test control
     				
@@ -2103,12 +2153,27 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress,  p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName, 
-																						{"labels"})));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption("/" & vc_resourceId, {"lbl"})));
+						} else {
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(v_aeResourceAddress & "/" & c_defaultResourceName,
+																						{"lbl"})));
+						}
 						tc_ac.start;
 						alt {
 							[] mcaPort.receive(mw_response(int4004)) -> value v_response {
@@ -2128,7 +2193,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BO_007
     				
@@ -2179,8 +2244,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 											   
 						// Test control
     				
@@ -2190,12 +2254,27 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_requestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_requestPrimitive); 				
     									
 						// Test Body
-						mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(p_resourceType, v_aeResourceAddress & "/" & c_defaultResourceName, 
-																						{"labels", "announceTo"})));
+						if(PX_UNSTRUCTURED){
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption("/" & vc_resourceId, {"labels", "announceTo"})));
+						} else {
+							mcaPort.send(m_request(m_retrieveResourceAttributeContentOption(v_aeResourceAddress & "/" & c_defaultResourceName,
+																						{"lbl", "at"})));
+						}
 						tc_ac.start;
 						alt {
 							[] mcaPort.receive(mw_response(int4004)) -> value v_response {
@@ -2215,7 +2294,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     				
 					}//end f_CSE_DMR_RET_BO_008
     				
@@ -2235,8 +2314,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createContainerBase;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						
-						v_createRequest.primitiveContent.any_1[0].Container_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Container_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2;
 						
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int3, v_createRequest, v_updateRequest);//Container
 						
@@ -2261,8 +2340,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_createRequest.primitiveContent.any_1[0].Group_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Group_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2;
 
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int9, v_createRequest, v_updateRequest);//Group
 						
@@ -2286,8 +2365,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_createRequest.primitiveContent.any_1[0].ACP_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2;
 
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int1, v_createRequest, v_updateRequest);//ACP
 						
@@ -2312,8 +2391,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_createRequest.primitiveContent.any_1[0].Schedule_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2;
 
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int18, v_createRequest, v_updateRequest);//Schedule
 						
@@ -2338,8 +2417,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_createRequest.primitiveContent.any_1[0].PollingChannel_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;
 
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int15, v_createRequest, v_updateRequest);//PollingChannel
 						
@@ -2363,8 +2442,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_createRequest.primitiveContent.any_1[0].Subscription_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2;
 
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_001(int23, v_createRequest, v_updateRequest);//Subscription
 						
@@ -2386,8 +2465,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -2398,7 +2476,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
     									
 						// Test Body
@@ -2421,7 +2511,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
     					    				
@@ -2437,7 +2527,7 @@ module OneM2M_Testcases {
                         var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].Container_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
                         
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int3, m_createContainerBase, v_updateRequest);//Container
 						
@@ -2459,7 +2549,7 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].Group_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;
 						
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int9, m_createGroupBase, v_updateRequest);//Group
 						
@@ -2481,7 +2571,7 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;
 							
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int1, m_createAcpBase,v_updateRequest);//AccessControlPolicy
 						
@@ -2503,7 +2593,7 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1;
 						
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int18, m_createScheduleBase,v_updateRequest);//Schedule
 						
@@ -2525,7 +2615,7 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;
 						
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int15, m_createPollingChannelBase,v_updateRequest);//PollingChannel
 						
@@ -2547,7 +2637,7 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
 
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;
 						
 						v_responsePrimitive := f_CSE_DMR_UPD_BV_002(int23, m_createSubscriptionBase,v_updateRequest);//Subscription
 						
@@ -2568,8 +2658,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
     					var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -2580,7 +2669,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
     									
 						// Test Body
@@ -2603,7 +2704,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
     					    				
@@ -2622,8 +2723,8 @@ module OneM2M_Testcases {
                         var template RequestPrimitive v_createRequest := m_createContainerBase;
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 						
-						v_createRequest.primitiveContent.any_1[0].Container_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Container_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
                         
@@ -2633,7 +2734,7 @@ module OneM2M_Testcases {
 							//Check attribute 1
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container)) {
-        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container.labels)){
+        							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container.labels)){ // FIXME: CHECK: labels set to empty 
         								setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
         							}
 								}
@@ -2650,8 +2751,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createGroupBase;
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 
-						v_createRequest.primitiveContent.any_1[0].Group_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Group_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
 						
@@ -2678,8 +2779,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createAcpBase;
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 
-						v_createRequest.primitiveContent.any_1[0].ACP_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
 							
@@ -2706,8 +2807,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createScheduleBase;
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
 
-						v_createRequest.primitiveContent.any_1[0].Schedule_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
 						
@@ -2734,8 +2835,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 
-						v_createRequest.primitiveContent.any_1[0].PollingChannel_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
 						
@@ -2762,8 +2863,8 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 
-						v_createRequest.primitiveContent.any_1[0].Subscription_create.labels := v_labels_1;
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels := v_labels_2;
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2;
 						
 						v_nullFields := {"labels"};
 						
@@ -2786,8 +2887,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -2798,7 +2898,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
     									
 						// Test Body
@@ -2821,7 +2933,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
     					    				
@@ -2840,10 +2952,10 @@ module OneM2M_Testcases {
 						var ResponsePrimitive v_responsePrimitive;
 						var AttributeList_1 v_nullFields;
 
-						v_createRequest.primitiveContent.any_1[0].Container_create.labels := v_labels_1;//Attribute 3
-						v_updateRequest.primitiveContent.any_1[0].Container_update.expirationTime := "20001231T012345";//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Container_update.maxNrOfInstances := 5;//Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].Container_update.labels := v_labels_2;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;//Attribute 3
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime := "20301231T012345";//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances := 5;//Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
 						
@@ -2853,11 +2965,11 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container)) {
         							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_update.expirationTime)){
+        							if(v_responsePrimitive.primitiveContent.any_1[0].Container.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){
         								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
         							}
         							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Container.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_update.maxNrOfInstances)){
+        							if(v_responsePrimitive.primitiveContent.any_1[0].Container.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){
         								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
         							}
         							//Check attribute 3
@@ -2882,11 +2994,11 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Group_create.groupName:= v_groupName_1;//Attribute 1
-						v_createRequest.primitiveContent.any_1[0].Group_create.labels := v_labels_1;//Attribute 3
-						v_updateRequest.primitiveContent.any_1[0].Group_update.groupName:= v_groupName_2;//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Group_update.accessControlPolicyIDs := v_acp;//Attribute 2 //TODO Check another attribute
-						v_updateRequest.primitiveContent.any_1[0].Group_update.labels := v_labels_2;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_1;//Attribute 1
+						v_createRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;//Attribute 3
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName:= v_groupName_2;//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := v_acp;//Attribute 2 //TODO Check another attribute
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
                         
@@ -2896,11 +3008,11 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group)) {
         							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Group.groupName != valueof(v_updateRequest.primitiveContent.any_1[0].Group_update.groupName)){
+        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){
         								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
         							}
         							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Group.accessControlPolicyIDs != valueof(v_updateRequest.primitiveContent.any_1[0].Group_update.accessControlPolicyIDs)){
+        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs))){
         								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
         							}
         							//Check attribute 3
@@ -2939,10 +3051,10 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].ACP_create.privileges := v_privileges_1;//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.privileges := v_privileges_2; //Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.announceTo := {PX_URI_CSE};//Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.labels := v_labels_2;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges := v_privileges_1;//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges := v_privileges_2; //Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := {PX_URI_CSE};//Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
       							
@@ -2952,11 +3064,11 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy)) {
         							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.privileges != valueof(v_updateRequest.primitiveContent.any_1[0].ACP_update.privileges)){
+        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.privileges, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges))){
         								setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly")
         							}
         							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].ACP_update.announceTo)){
+        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){
         								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
         							}
         							//Check attribute 3
@@ -2977,10 +3089,10 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Schedule_create.scheduleElement := {{"0,0,0 1 2,1,1,*"}};//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.scheduleElement := {{"1,1,1 1 2,1,1,*"}}; //Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.announceTo := {PX_URI_CSE};//Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.labels := v_labels_2;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement := {{"0,0,0 1 2,1,1,*"}};//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement := {{"1,1,1 1 2,1,1,*"}}; //Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo := {PX_URI_CSE};//Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_2;//Attribute 3
                 						
 						v_nullFields := {"labels"};
 						
@@ -2990,11 +3102,11 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule)) {
         							//Check attribute 1
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_update.scheduleElement)){
+        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){
         								setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
         							}
         							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_update.announceTo)){
+        							if(v_responsePrimitive.primitiveContent.any_1[0].Schedule.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){
         								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
         							}
         							//Check attribute 3
@@ -3016,10 +3128,10 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].PollingChannel_create.labels := v_labels_1;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;//Attribute 3
 						//No Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.accessControlPolicyIDs := v_acp;//Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.labels := v_labels_2;//Attribute 3
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs := v_acp;//Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;//Attribute 3
 						
 						v_nullFields := {"labels"};
       						
@@ -3031,8 +3143,8 @@ module OneM2M_Testcases {
         							//Check attribute 1
         							
         							//Check attribute 2
-        							if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel.accessControlPolicyIDs != valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.accessControlPolicyIDs)){
-        								setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
+        							if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){
+        								setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly")
         							}
         							//Check attribute 3
         							if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel.labels)){
@@ -3053,11 +3165,11 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 						var ResponsePrimitive v_responsePrimitive;
 						
-						v_createRequest.primitiveContent.any_1[0].Subscription_create.labels := v_labels_1;//Attribute 1
-						v_createRequest.primitiveContent.any_1[0].Subscription_create.expirationCounter := 5;//Attribute 3
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels := v_labels_2;//Attribute 1
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.accessControlPolicyIDs := v_acp; //Attribute 2
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.expirationCounter := 1;//Attribute 3
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;//Attribute 1
+						v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 5;//Attribute 3
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_2;//Attribute 1
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := v_acp; //Attribute 2
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 1;//Attribute 3
 						
 						v_nullFields := {"expirationCounter"};
       							
@@ -3067,11 +3179,11 @@ module OneM2M_Testcases {
 							if(ispresent(v_responsePrimitive.primitiveContent)) {
 								if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription)) {
             						//Check attribute 1
-            						if(v_responsePrimitive.primitiveContent.any_1[0].Subscription.labels != valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels)){
+            						if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){
             							setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly")
             						}
             						//Check attribute 2
-            						if(v_responsePrimitive.primitiveContent.any_1[0].Subscription.accessControlPolicyIDs != valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_update.accessControlPolicyIDs)){
+            						if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs))){
             							setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly")
             						}
             						//Check attribute 3
@@ -3088,8 +3200,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName ;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName ;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -3100,7 +3211,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
     									
 						// Test Body
@@ -3123,7 +3246,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
 						
 						return v_response.responsePrimitive_;
     					    				
@@ -3210,8 +3333,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName ;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName ;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -3222,8 +3344,18 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
-										
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}	
+																
 						// Test Body
 						v_request := f_getUpdateRequestPrimitive(p_resourceType, v_targetResourceAddress, p_updateRequestPrimitive);
 						
@@ -3248,7 +3380,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     					    				
 					}//end f_CSE_DMR_UPD_BO_005
     				
@@ -3261,7 +3393,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_1 := {"VALUE_1"};
 						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
 
-						v_updateRequest.primitiveContent.any_1[0].Container_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1;
 						
 						f_CSE_DMR_UPD_BO_006(int3, m_createContainerBase, v_updateRequest);//Container
 					}
@@ -3271,7 +3403,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_1 := {"VALUE_1"};
 						var template RequestPrimitive v_updateRequest := m_updateGroupBase;
 
-						v_updateRequest.primitiveContent.any_1[0].Group_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.labels := v_labels_1;
 						
 						f_CSE_DMR_UPD_BO_006(int9, m_createGroupBase, v_updateRequest);//Group
 					}
@@ -3282,9 +3414,9 @@ module OneM2M_Testcases {
 						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
 						var template RequestPrimitive v_requestPrimitive := m_createAcpBase;
 						
-						v_requestPrimitive.primitiveContent.any_1[0].ACP_create.selfPrivileges.accessControlRule_list[0].accessControlOperations := int59;
+						v_requestPrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.selfPrivileges.accessControlRule_list[0].accessControlOperations := int59;
 
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.labels := v_labels_1;
 								
 						f_CSE_DMR_UPD_BO_006(int1, v_requestPrimitive, v_updateRequest);//AccessControlPolicy
 					}
@@ -3294,7 +3426,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_1 := {"VALUE_1"};
 						var template RequestPrimitive v_updateRequest := m_updateScheduleBase;
 
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.labels := v_labels_1;
 										
 						f_CSE_DMR_UPD_BO_006(int18, m_createScheduleBase, v_updateRequest);//Schedule
 					}
@@ -3304,7 +3436,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_1 := {"VALUE_1"};
 						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
 
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;
 							
 						f_CSE_DMR_UPD_BO_006(int15, m_createPollingChannelBase, v_updateRequest);//PollingChannel
 					}
@@ -3314,7 +3446,7 @@ module OneM2M_Testcases {
 						var Labels v_labels_1 := {"VALUE_1"};
 						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
 
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.labels := v_labels_1;
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels := v_labels_1;
 								
 						f_CSE_DMR_UPD_BO_006(int23, m_createSubscriptionBase, v_updateRequest);//Subscription
 						}
@@ -3324,8 +3456,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName ;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName ;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -3336,7 +3467,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int59);//c_CRDNDi);
+						f_preamble_registerAe(int59);//c_CRDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
 																
 						// Test Body
@@ -3363,7 +3506,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     					    				
 					}//end f_CSE_DMR_UPD_BO_006
     				
@@ -3443,8 +3586,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName ;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName ;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -3455,7 +3597,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
 																
 						// Test Body
@@ -3482,7 +3636,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     					    				
 					}//end f_CSE_DMR_UPD_BO_007
     				
@@ -3498,7 +3652,7 @@ module OneM2M_Testcases {
 						
 						v_nullFields := {"expirationTime"};
 
-						v_updateRequest.primitiveContent.any_1[0].Container_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime := v_expirationTime;
 						
 						f_CSE_DMR_UPD_BO_008(int3, m_createContainerBase, v_updateRequest, v_nullFields);//Container
 					}
@@ -3511,7 +3665,7 @@ module OneM2M_Testcases {
 
 						v_nullFields := {"expirationTime"};
 						
-						v_updateRequest.primitiveContent.any_1[0].Group_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].Group_optional.expirationTime := v_expirationTime;
 						
 						f_CSE_DMR_UPD_BO_008(int9, m_createGroupBase, v_updateRequest, v_nullFields);//Group
 					}
@@ -3524,7 +3678,7 @@ module OneM2M_Testcases {
 
 						v_nullFields := {"expirationTime"};
 						
-						v_updateRequest.primitiveContent.any_1[0].ACP_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.expirationTime := v_expirationTime;
 								
 						f_CSE_DMR_UPD_BO_008(int1, m_createAcpBase, v_updateRequest, v_nullFields);//AccessControlPolicy
 					}
@@ -3537,7 +3691,7 @@ module OneM2M_Testcases {
 
 						v_nullFields := {"expirationTime"};
 						
-						v_updateRequest.primitiveContent.any_1[0].Schedule_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].Schedule_optional.expirationTime := v_expirationTime;
 										
 						f_CSE_DMR_UPD_BO_008(int18, m_createScheduleBase, v_updateRequest, v_nullFields);//Schedule
 					}
@@ -3550,7 +3704,7 @@ module OneM2M_Testcases {
 
 						v_nullFields := {"expirationTime"};
 						
-						v_updateRequest.primitiveContent.any_1[0].PollingChannel_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.expirationTime := v_expirationTime;
 							
 						f_CSE_DMR_UPD_BO_008(int15, m_createPollingChannelBase, v_updateRequest, v_nullFields);//PollingChannel
 					}
@@ -3563,7 +3717,7 @@ module OneM2M_Testcases {
 
 						v_nullFields := {"expirationTime"};
 						
-						v_updateRequest.primitiveContent.any_1[0].Subscription_update.expirationTime := v_expirationTime;
+						v_updateRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := v_expirationTime;
 								
 						f_CSE_DMR_UPD_BO_008(int23, m_createSubscriptionBase, v_updateRequest, v_nullFields);//Subscription
 						}
@@ -3573,8 +3727,7 @@ module OneM2M_Testcases {
 						// Local variables
 						var M2MResponsePrimitive v_response;
 						var RequestPrimitive v_request;
-						var XSD.String v_aeName := "ae_test";
-						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & v_aeName ;
+						var XSD.String v_aeResourceAddress := PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName ;
 						var XSD.String v_targetResourceAddress := v_aeResourceAddress & "/" & c_defaultResourceName;
     										   
 						// Test control
@@ -3585,7 +3738,19 @@ module OneM2M_Testcases {
 						// Test adapter configuration
     				
 						// Preamble
-						f_preamble_registerAe(v_aeName, int63);//c_CRUDNDi);
+						f_preamble_registerAe();//c_CRUDNDi);
+						
+						//Unstructured 
+						if(PX_UNSTRUCTURED) {
+							v_aeResourceAddress := "/" & vc_aeAux.aE_ID;							
+						}
+					    
+						// AE_ID
+						if(PX_FROM_IS_AE_ID == true) {
+							p_createRequestPrimitive.from_ := vc_aeAux.aE_ID;
+							p_updateRequestPrimitive.from_ := vc_aeAux.aE_ID;
+						}
+						
 						f_createResource(p_resourceType, v_aeResourceAddress, p_createRequestPrimitive); 				
 																
 						// Test Body
@@ -3612,7 +3777,7 @@ module OneM2M_Testcases {
 						}	
     								
 						// Postamble
-						f_postamble_deleteResources(v_aeName);
+						f_postamble_deleteResources();
     					    				
 					}//end f_CSE_DMR_UPD_BO_008
     				
diff --git a/OneM2M_Types.ttcn b/OneM2M_Types.ttcn
index 8f8056ec61bef62bf33a314d4318a466c0cc57b2..bcbe03adf62e1f0ec9390eff3ee503ad8c728092 100644
--- a/OneM2M_Types.ttcn
+++ b/OneM2M_Types.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Types.ttcn $
- *              $Id: OneM2M_Types.ttcn 69 2016-04-28 07:49:58Z reinaortega $
+ *              $Id: OneM2M_Types.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Test System module for oneM2M
  *
  */
@@ -872,7 +872,7 @@ module OneM2M_Types {
 
 
 
-	type XSD.String Timestamp (pattern "\d#(4)(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|30|31)T([01]\d|2[0-3])[0-5]\d[0-5]\d(,\d#(1,6))#(0,1)")
+	type XSD.String Timestamp //(pattern "\d#(4)(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|30|31)T([01]\d|2[0-3])[0-5]\d[0-5]\d(,\d#(1,6))#(0,1)")
 	with {
 	  variant "name as uncapitalized";
 	};
@@ -3999,215 +3999,261 @@ module OneM2M_Types {
 
 
 /* Additional types */
-	
-group contentCreateTypes {
-	// Partial content for resource creation
-   type record AE_create {
-	   XSD.NCName resourceName optional,
-	   Labels labels optional,
-	   AcpType accessControlPolicyIDs optional,
-	   Timestamp expirationTime optional,
-	   ListOfURIs announceTo optional,
-	   record of XSD.Token announcedAttribute optional,
-	   XSD.String appName optional,
-	   XSD.String app_ID,
-	   PoaList pointOfAccess optional,
-	   XSD.AnyURI ontologyRef optional,
-	   XSD.Boolean requestReachability 
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-       
-   type record ACP_create {
-	   XSD.NCName resourceName optional,
-	   Labels labels optional,
-	   Timestamp expirationTime optional,
-	   ListOfURIs announceTo optional,
-	   record of XSD.Token announcedAttribute optional,
-	   SetOfAcrs privileges,
-	   SetOfAcrs selfPrivileges 
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-    
-   type record ContentInstance_create {
-   	   XSD.NCName resourceName optional,
-   	   Labels labels optional,
-	   ListOfURIs announceTo optional,
-	   ContentInfo contentInfo,
-	   XSD.NonNegativeInteger contentSize optional,
-	   XSD.AnyURI ontologyRef optional,
-	   XSD.AnyType content_
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-
-   type record Container_create {
-       XSD.NCName resourceName optional,
-       Labels labels optional,
-       AcpType accessControlPolicyIDs optional,
-       Timestamp expirationTime optional,
-       ListOfURIs announceTo optional,
-       record of XSD.Token announcedAttribute optional,
-       XSD.ID creator optional,
-       XSD.NonNegativeInteger maxNrOfInstances optional,
-       XSD.NonNegativeInteger maxByteSize optional,
-       XSD.NonNegativeInteger maxInstanceAge optional,
-       XSD.AnyURI locationID optional,
-       XSD.AnyURI ontologyRef optional
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-       
-   type record Group_create {
+
+group optionalResourceTypes {
+
+	type record AE_optional
+	{
 		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
 		ListOfURIs announceTo optional,
-		record of XSD.Token announcedAttribute optional,
-		XSD.ID creator optional,
-		MemberType memberType optional,
-		XSD.NonNegativeInteger maxNrOfMembers,
-		ListOfURIs memberIDs,
-		ListOfURIs membersAccessControlPolicyIDs optional,
-		ConsistencyStrategy consistencyStrategy optional,
-		XSD.String groupName optional
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-       
-   type record PollingChannel_create {
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.String appName optional,
+		XSD.String app_ID optional,
+		XSD.ID aE_ID optional,
+		PoaList pointOfAccess optional,
+		XSD.AnyURI ontologyRef optional,
+		XSD.AnyURI nodeLink optional,
+		XSD.Boolean requestReachability optional,
+		Serializations contentSerialization optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				Container container,
+				Group group_,
+				AccessControlPolicy accessControlPolicy,
+				Subscription subscription,
+				PollingChannel pollingChannel,
+				Schedule schedule
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (app_ID) "name as 'App-ID'";
+	  variant (aE_ID) "name as 'AE-ID'";
+	  //variant (requestReachability) "text 'true' as '1'";
+	  //variant (requestReachability) "text 'false' as '0'";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	  variant (choice.choice_list[-].group_) "name as 'group'";
+	};
+
+	type record AccessControlPolicy_optional
+	{
 		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
-		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
-		XSD.AnyURI pollingChannelURI optional //TODO: To be double checked
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-       
-   type record Schedule_create {
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		SetOfAcrs privileges optional,
+		SetOfAcrs selfPrivileges optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of Subscription subscription_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.subscription_list) "untagged";
+	  variant (choice.subscription_list[-]) "name as 'subscription'";
+	};
+
+	type record ContentInstance_optional
+	{
 		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		Timestamp expirationTime optional,
 		ListOfURIs announceTo optional,
-		record of XSD.Token announcedAttribute optional,
-		ScheduleEntries scheduleElement
-   }
-   with {
-	 variant (resourceName) "attribute";
-   };
-       
-   type record Subscription_create {
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.NonNegativeInteger stateTag optional,
+		XSD.ID creator optional,
+		ContentInfo contentInfo optional,
+		XSD.NonNegativeInteger contentSize optional,
+		XSD.AnyURI ontologyRef optional,
+		XSD.AnyType content optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	};
+
+	type record Container_optional
+	{
 		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
-		EventNotificationCriteria eventNotificationCriteria optional,
-		XSD.PositiveInteger expirationCounter optional,
-		ListOfURIs notificationURI,
-		XSD.AnyURI groupID optional,
-		XSD.AnyURI notificationForwardingURI optional,
-		BatchNotify batchNotify optional,
-		RateLimit rateLimit optional,
-		XSD.PositiveInteger preSubscriptionNotify optional,
-		PendingNotification pendingNotification optional,
-		XSD.PositiveInteger notificationStoragePriority optional,
-		XSD.Boolean latestNotify optional,
-		NotificationContentType notificationContentType optional,
-		EventCat notificationEventCat optional,
+		ListOfURIs announceTo optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.NonNegativeInteger stateTag optional,
 		XSD.ID creator optional,
-		XSD.AnyURI subscriberURI optional
+		XSD.NonNegativeInteger maxNrOfInstances optional,
+		XSD.NonNegativeInteger maxByteSize optional,
+		XSD.NonNegativeInteger maxInstanceAge optional,
+		XSD.NonNegativeInteger currentNrOfInstances optional,
+		XSD.NonNegativeInteger currentByteSize optional,
+		XSD.AnyURI locationID optional,
+		XSD.AnyURI ontologyRef optional,
+		XSD.AnyURI latest optional,
+		XSD.AnyURI oldest optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				ContentInstance contentInstance,
+				Container container,
+				Subscription subscription
+			} choice_list
+		} choice optional
 	}
 	with {
+	  variant "name as uncapitalized";
+	  variant "element";
 	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
 	};
-       
-   //End Partial content for creation
-}//end group contentCreateTypes
 	
-group contentUpdateTypes {
-	// Partial content for resource update
-   type record AE_update {
-	   Labels labels optional,
-	   AcpType accessControlPolicyIDs optional,
-	   Timestamp expirationTime optional,
-	   ListOfURIs announceTo optional,
-	   record of XSD.Token announcedAttribute optional,
-	   XSD.String appName optional,
-	   PoaList pointOfAccess optional,
-	   XSD.AnyURI ontologyRef optional,
-	   XSD.Boolean requestReachability optional
-   };
-       
-   type record ACP_update {
-	   Labels labels optional,
-	   Timestamp expirationTime optional,
-	   ListOfURIs announceTo optional,
-	   record of XSD.Token announcedAttribute optional,
-	   SetOfAcrs privileges optional,
-	   SetOfAcrs selfPrivileges optional 
-   }
-    
-    	
-   type record Container_update {
-	   Labels labels optional,
-	   AcpType accessControlPolicyIDs optional,
-	   Timestamp expirationTime optional,
-	   ListOfURIs announceTo optional,
-	   record of XSD.Token announcedAttribute optional,
-	   XSD.NonNegativeInteger maxNrOfInstances optional,
-	   XSD.NonNegativeInteger maxByteSize optional,
-	   XSD.NonNegativeInteger maxInstanceAge optional,
-	   XSD.AnyURI locationID optional,
-	   XSD.AnyURI ontologyRef optional
-   }
-	   
-   //TODO To double check
-   type record ContentInstance_update {
-	   Labels labels optional,
-	   ListOfURIs announceTo optional,
-	   ContentInfo contentInfo optional,
-	   XSD.NonNegativeInteger contentSize optional,
-	   XSD.AnyURI ontologyRef optional,
-	   XSD.AnyType content_ optional
-   }
-       
-   type record Group_update {
+	type record Group_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
 		ListOfURIs announceTo optional,
-		record of XSD.Token announcedAttribute optional,
-		XSD.NonNegativeInteger maxNrOfMembers optional,
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		XSD.ID creator optional,
+		MemberType memberType optional,
+		XSD.PositiveInteger currentNrOfMembers optional,
+		XSD.PositiveInteger maxNrOfMembers optional,
 		ListOfURIs memberIDs optional,
 		ListOfURIs membersAccessControlPolicyIDs optional,
-		XSD.String groupName optional
-   }
-       
-   type record PollingChannel_update {
+		XSD.Boolean memberTypeValidated optional,
+		ConsistencyStrategy consistencyStrategy optional,
+		XSD.String groupName optional,
+		XSD.AnyURI fanOutPoint optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of Subscription subscription_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  //variant (memberTypeValidated) "text 'true' as '1'";
+	  //variant (memberTypeValidated) "text 'false' as '0'";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.subscription_list) "untagged";
+	  variant (choice.subscription_list[-]) "name as 'subscription'";
+	};
+	
+	type record PollingChannel_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
-		XSD.AnyURI pollingChannelURI optional //TODO: To be double checked
-   }
-       
-   type record Schedule_update {
+		XSD.AnyURI pollingChannelURI optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	};
+	
+	type record Schedule_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		Timestamp expirationTime optional,
 		ListOfURIs announceTo optional,
-		record of XSD.Token announcedAttribute optional,
-		ScheduleEntries scheduleElement optional
-   }
-       
-   type record Subscription_update {
+		record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
+		ScheduleEntries scheduleElement optional,
+		union {
+			record length(1 .. infinity) of ChildResourceRef childResource_list,
+			record length(1 .. infinity) of union {
+				Subscription subscription
+			} choice_list
+		} choice optional
+	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  variant (announcedAttribute) "list";
+	  variant (choice) "untagged";
+	  variant (choice.childResource_list) "untagged";
+	  variant (choice.childResource_list[-]) "name as 'childResource'";
+	  variant (choice.choice_list) "untagged";
+	  variant (choice.choice_list[-]) "untagged";
+	};
+	
+	type record Subscription_optional
+	{
+		XSD.NCName resourceName optional,
+		ResourceType resourceType optional,
+		XSD.ID resourceID optional,
+		NhURI parentID optional,
+		Timestamp creationTime optional,
+		Timestamp lastModifiedTime optional,
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
 		Timestamp expirationTime optional,
@@ -4218,13 +4264,33 @@ group contentUpdateTypes {
 		XSD.AnyURI notificationForwardingURI optional,
 		BatchNotify batchNotify optional,
 		RateLimit rateLimit optional,
+		XSD.PositiveInteger preSubscriptionNotify optional,
 		PendingNotification pendingNotification optional,
 		XSD.PositiveInteger notificationStoragePriority optional,
 		XSD.Boolean latestNotify optional,
 		NotificationContentType notificationContentType optional,
-		EventCat notificationEventCat optional
+		EventCat notificationEventCat optional,
+		XSD.ID creator optional,
+		XSD.AnyURI subscriberURI optional,
+		union {
+			ChildResourceRef childResource,
+			Schedule schedule
+		} choice optional
 	}
+	with {
+	  variant "name as uncapitalized";
+	  variant "element";
+	  variant (resourceName) "attribute";
+	  //variant (latestNotify) "text 'true' as '1'";
+	  //variant (latestNotify) "text 'false' as '0'";
+	  variant (choice) "untagged";
+	};
 	
+
+}
+	
+group invalidTypes {
+		
 	type record AE_update_invalid {
 		Labels labels optional,
 		AcpType accessControlPolicyIDs optional,
@@ -4329,8 +4395,7 @@ group contentUpdateTypes {
 		 EventCat notificationEventCat optional
 	 }
        
-   //End Partial content for update
-}//end group contentUpdateTypes
+}//end group invalidTypes
 
 	group otherTypes {
 		
@@ -4346,5 +4411,5 @@ with {
   encode "XML";
   variant "namespace as 'http://www.onem2m.org/xml/protocols' prefix 'm2m'";
   variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
-  extension "anytype AttributeList, AE, AccessControlPolicy, ACP_create, ACP_update, ACP_update_invalid, AE_create, AE_update_invalid, AE_update_invalid,Container_create, Container_update, Container_update_invalid, ContentInstance_create, ContentInstance_update, ContentInstance_update_invalid, Group_create, Group_update, Group_update_invalid, Schedule_create, Schedule_update, Schedule_update_invalid, Subscription_create, Subscription_update, Subscription_update_invalid, PollingChannel_create, PollingChannel_update, PollingChannel_update_invalid"
+  extension "anytype charstring, AttributeList, AE, AccessControlPolicy, AccessControlPolicy_optional, ACP_update_invalid, AE_optional, AE_update_invalid,Container_optional, Container_update_invalid, ContentInstance_optional, ContentInstance_update_invalid, Group_optional, Group_update_invalid, Schedule_optional, Schedule_update_invalid, Subscription_optional, Subscription_update_invalid, PollingChannel_optional, PollingChannel_update_invalid"
 }
diff --git a/OneM2M_TypesAndValues.ttcn b/OneM2M_TypesAndValues.ttcn
index 7eaeeae84d199f65bd21c2eb387a03619edaa571..f3aa536de80892e1b9f32cbe9a313e2e934d12b6 100644
--- a/OneM2M_TypesAndValues.ttcn
+++ b/OneM2M_TypesAndValues.ttcn
@@ -7,7 +7,7 @@
  *  
  *  @author     ETSI
  *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TypesAndValues.ttcn $
- *              $Id: OneM2M_TypesAndValues.ttcn 69 2016-04-28 07:49:58Z reinaortega $
+ *              $Id: OneM2M_TypesAndValues.ttcn 97 2016-06-01 15:38:10Z reinaortega $
  *  @desc       Module containing types and values for oneM2M
  *
  */
@@ -20,6 +20,7 @@ module OneM2M_TypesAndValues {
 	const charstring c_uri_cse := "/~/in-cse/";
 	const charstring c_cse_name := "in-cse";
 	const XSD.String c_defaultResourceName := "MyResource";
+	const charstring c_aeAuxName := "MyAe";
 	const XSD.String c_acpAuxName := "MyAcp";
 	
 	//AccessControlOperations