diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn
index 3eb7d0c89f19e223de497c67b9822d736e2ad5a3..ffe032fcf5cd0824a88aaffea082587b69a3a81b 100644
--- a/LibOneM2M/OneM2M_Functions.ttcn
+++ b/LibOneM2M/OneM2M_Functions.ttcn
@@ -987,19 +987,6 @@ module OneM2M_Functions {
 	
 		group PreambleFunctions {
 
-			/**
-			 * @desc Creation of auxiliar resources ACP for correct execution of the test case
-			 * @param p_allowedOperations Allowed operations for the auxiliar AE resource
-			 * @return Internal ACP resource index
-			 * @verdict 
-			 */
-			function f_cse_preamble_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu return integer {//c_CRUDNDi
-			
-				return f_cse_createAccessControlPolicyAux(p_acpName, -, p_allowedOperations);
-			
-			}
-
-	
 			/**
 			 * @desc Creation of auxiliar resource AE for correct execution of the test case
 			 * @param p_accessControlPolicyIDs AccessControlPolicyIDs for the auxiliar AE resource
@@ -1072,12 +1059,12 @@ module OneM2M_Functions {
 				f_cse_activateDefaults_ae();		
 				
 				if(PICS_ACP_SUPPORT){
-					vc_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
+					f_cse_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
 				}
 				
-				if(vc_acpAuxIndex != -1) {
-					vc_resourcesIndexToBeDeleted := {vc_acpAuxIndex};//TODO Not needed
-					v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -));
+				if(vc_acpIndex != -1) {
+					vc_resourcesIndexToBeDeleted := {vc_acpIndex};//TODO Not needed
+					v_request := valueof(m_createAe(p_appId, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -));
 					
 					//Set CSEBase IUT as target
 					v_request.to_ := f_getResourceAddress();
@@ -1463,8 +1450,8 @@ module OneM2M_Functions {
 				//Activate defaults when running on a PTC
 				f_cse_activateDefaults_ae();
 				
-				if(vc_acpAuxIndex != -1) {
-					p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpAuxIndex].resource.accessControlPolicy.resourceID});
+				if(vc_acpIndex != -1) {
+					p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 				}		
 				
 				v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, p_parentIndex);
@@ -1477,14 +1464,12 @@ module OneM2M_Functions {
 			 * @desc Creation of the auxiliar ACP resource
 			 * @param p_acpName ACP name
 			 * @param p_allowedOperations Allowed operations
-			 * @return Internal resource index of the created auxiliar ACP resource
 			 * @verdict 
 			 */
-			function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu return integer{				
+			function f_cse_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := c_defaultAcpResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) runs on AeSimu {				
 				var RequestPrimitive v_request;
-				var integer v_acpAuxIndex := -1;
 				
-				v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_acor := p_acor, p_allowedOperations := p_allowedOperations));
+				v_request := valueof(m_createAcp(p_acpName, p_acor, p_allowedOperations));
 				
 				v_request := f_getCreateRequestPrimitive(int1, v_request, -1);
 								
@@ -1495,8 +1480,7 @@ module OneM2M_Functions {
 						tc_ac.stop;
 						setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(1) & " created successfuly");
 						f_checkAttributesToBeSaved(int1, v_request, vc_response.primitive.responsePrimitive);
-						v_acpAuxIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, int1);
-						vc_acpAuxIndex := v_acpAuxIndex;
+						vc_acpIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, int1);
 					}
 					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
 						tc_ac.stop;
@@ -1513,8 +1497,6 @@ module OneM2M_Functions {
 				
 				f_checkAeSimuStatus();
 			
-				return v_acpAuxIndex;
-	
 			}
 							
 			/**
@@ -1734,8 +1716,8 @@ module OneM2M_Functions {
 				
 				v_request.requestIdentifier := valueof(v_request.requestIdentifier) & f_rnd(1, 1000000);
 				
-				v_request.to_ := f_getResourceAddress(vc_acpAuxIndex);
-				v_request.from_ := f_getOriginator(vc_acpAuxIndex);
+				v_request.to_ := f_getResourceAddress(vc_acpIndex);
+				v_request.from_ := f_getOriginator(vc_acpIndex);
 				v_request.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {valueof(m_createAcr(PX_ACOR, p_allowedOperations))};
 							
 				f_send(e_mca_port, m_request(v_request));
@@ -4148,8 +4130,8 @@ module OneM2M_Functions {
 					p_request.primitiveContent.container.locationID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);//resourceID of the locationPolicy
 				}	
 				if(ispresent(p_request.primitiveContent.container.accessControlPolicyIDs)) {
-					if((match(valueof(p_request.primitiveContent.container.accessControlPolicyIDs), v_defaultAcpIDs )) and (isbound(vc_acpAuxIndex))){
-						p_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
+					if((match(valueof(p_request.primitiveContent.container.accessControlPolicyIDs), v_defaultAcpIDs )) and (isbound(vc_acpIndex))){
+						p_request.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)};
 					}	
 				}  
 			} else if (p_resourceType == int15) {//pollingChannel
@@ -4171,7 +4153,7 @@ module OneM2M_Functions {
 				//accessControlPolicyIds
 				if(ispresent(p_request.primitiveContent.subscription.accessControlPolicyIDs)) {
 					if(match(valueof(p_request.primitiveContent.subscription.accessControlPolicyIDs), v_defaultAcpIDs )){
-						p_request.primitiveContent.subscription.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
+						p_request.primitiveContent.subscription.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)};
 					}	
 				}  
 			} else if (p_resourceType == int4) {//contentInstance
diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn
index e11599f2f13a0240cec3d9c1976844f5e5a7bd07..9274cc412243d415137cb6f0074028cc67496b82 100644
--- a/LibOneM2M/OneM2M_Templates.ttcn
+++ b/LibOneM2M/OneM2M_Templates.ttcn
@@ -853,8 +853,7 @@ module OneM2M_Templates {
 				primitiveContent := {accessControlPolicyAnnc := m_contentCreateAcpAnnc ()}
 			};
 				
-        	template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
-        		to_ := p_parentResourceAddress,
+        	template (value) RequestPrimitive m_createAcp(in template (omit)  XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
 				requestIdentifier := testcasename() & "-m_createAcp",
         		resourceType := int1,
         		primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}
@@ -877,23 +876,7 @@ module OneM2M_Templates {
 				resourceType := int10016,
 				primitiveContent := {remoteCSEAnnc := mw_contentCreateRemoteCSEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
 			};
-       	
-			/**
-			 * @desc Base CREATE request primitive for AccessControlPolicy resource (AUX)
-			 */
-        	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 ) modifies m_create := {
-				requestIdentifier := testcasename() & "-m_createAcpAux",
-        		resourceType := int1,
-        		primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}
-        	};
-        	
-			/*template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
-				from_ := PX_SUPER_USER,
-				requestIdentifier := testcasename() & "-m_createCSE" & f_rnd(1, 1000000),
-				resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
-				primitiveContent := {cSEBase := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}
-			};*/
-			
+       				
 			/**
 			 * @desc Base CREATE request primitive for CSEBase resource
 			 */
diff --git a/LibOneM2M/OneM2M_TestSystem.ttcn b/LibOneM2M/OneM2M_TestSystem.ttcn
index b481fc485b831cb53961b335fdda0dde78c957a8..02698923b09f1c8950fcd6622811acca3f357314 100644
--- a/LibOneM2M/OneM2M_TestSystem.ttcn
+++ b/LibOneM2M/OneM2M_TestSystem.ttcn
@@ -15,75 +15,88 @@ module OneM2M_TestSystem {
 	import from LibCommon_Time all;
 	import from OneM2M_Ports all;
 
-/* ***************************************
- * 		Test System Components 
- * ***************************************
- */	
+	/* ***************************************
+ 	* 		Test System Components 
+ 	* ***************************************
+ 	*/	
   
-  type enumerated InterfaceIds {
-  	e_mca_port    (0),
-  	e_mca_in_port (1),
-    e_mcc_port    (2),
-    e_mcc_in_port (3)
-  }
+	type enumerated InterfaceIds {
+  		e_mca_port    (0),
+  		e_mca_in_port (1),
+    	e_mcc_port    (2),
+    	e_mcc_in_port (3)
+	}
   
-  type record Interface {
-	  OneM2MPort myPort,
-	  charstring myHost,
-	  charstring myProtocolBinding,
-	  charstring mySerialization
-  }
+	type record Interface {
+		OneM2MPort myPort,
+		charstring myHost,
+		charstring myProtocolBinding,
+		charstring mySerialization
+	}
   
-  type record of Interface Interfaces;
+	type record of Interface Interfaces;
   
 	type component Tester {
+		//Common Ports
 		port AdapterControlPort acPort;
 		port InfoPort infoPort;
 		port UpperTesterPort utPort;
-		//timers
+		//Common timers
 		timer tc_ac := PX_TAC;
 		timer tc_wait := PX_TWAIT;
 		timer tc_done := PX_TDONE;
 		//global variables
+		//About configuration of the component
 		var Configurations vc_config;
 		var TestSystemRole vc_testSystemRole;
-		var MyResourcesList vc_resourcesList;
-		var IntegerList vc_resourcesIndexToBeDeleted := {};
-		var integer vc_acpAuxIndex := -1;
-		var MsgIn vc_request;
-		var MsgIn vc_response;
+		//Default behaviour
 		var default vc_aeSimu := null;
 		var default vc_cseSimu := null;
-		var PrimitiveContent vc_primitiveContentRetrievedResource;
+		//Interfaces
 		var Interfaces vc_myInterfaces := {};
+		//In/Out messages
+		var MsgIn vc_request;
+		var MsgIn vc_response;
+		var PrimitiveContent vc_primitiveContentRetrievedResource;
+		//Resources list
+		var MyResourcesList vc_resourcesList;
+		//Resource index
+		var IntegerList vc_resourcesIndexToBeDeleted := {};
+		var integer vc_acpIndex := -1;
 	};
 	
 	type component AeSimu extends Tester {
+		//Attached components depending on config
 		var AeSimu vc_ae2;
+		var CseSimu vc_cse1;//For CF02 when AeSimu is master
+		//Ports
 		port OneM2MPort mcaPort;
 		port OneM2MPort mcaPortIn;
-	
 		//global variables
-		//var PrimitiveContent vc_primitiveContentRetrievedResource;
-
-		var CseSimu vc_cse1;//For CF02 when AeSimu is master
+		//About configuration of the component
+		//Resource Index
+		var integer vc_aeIndex := -1;
+		//Status of attached component
 		var boolean vc_auxiliaryAe2Up := false;
-		var integer vc_aeIndex := -1;//Specific to AeSimu
 	};
 		
 	type component CseSimu extends Tester {
+		//Attached components depending on config
+		var AeSimu vc_ae1;//For CF02 when CseSimu is master
+		//Ports
 		port OneM2MPort mcaPort;
 		port OneM2MPort mcaPortIn;
 		port OneM2MPort mccPort;
 		port OneM2MPort mccPortIn;
-
 		//global variables
+		//About configuration of the component
+		var CseTypeID vc_cseType;	//cseType of the simulated CSE. IN =1, MN = 2
+		//Resources list
 		var MyResourcesList vc_localResourcesList := {};
-		var AeSimu vc_ae1;//For CF02 when CseSimu is master
-		var integer vc_localRemoteCseIndex := -1;
+		//Resource index
 		var integer vc_cSEBaseIndex := -1;	//Index of the CSEBase resource of the Tester inside vc_localResourcesList
-		var CseTypeID vc_cseType;	//cseType of the simulated CSE. IN =1, MN = 2
 		var integer vc_remoteCseIndex := -1;//Specific to CseSimu
+		var integer vc_localRemoteCseIndex := -1;
 	};
 	
 	type component InCseSimu extends CseSimu {
@@ -108,10 +121,6 @@ module OneM2M_TestSystem {
 		port UpperTesterPort utPort;
 	}		
 	
-			
-	
-	
-
 }// end of module
 with {
 	extension "anytype charstring"
diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn
index 7fde55657a284683b0d0a396e07c3a0f53631013..5664761d31a4844f73b79530b3c8d60e29075eb5 100644
--- a/LibOneM2M/OneM2M_TypesAndValues.ttcn
+++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn
@@ -43,7 +43,7 @@ module OneM2M_TypesAndValues {
 	const XSD.String c_defaultGenericInterworkingServiceResourceName := "MyGenericInterworkingServiceResource"; //<genericInterworkingService>
 	const XSD.String c_defaultAe1ResourceName := "MyAe1";
 	const XSD.String c_defaultAe2ResourceName := "MyAe2";
-	const XSD.String c_acpAuxName := "MyAcp";
+	const XSD.String c_defaultAcpResourceName := "MyAcp";
 	const charstring c_invalid_location_update_period	:= "-PT30M10S" ;//duration set to invalid value  (minus value)
 	const XSD.ID c_resourceShortNameLatest := "la";		//<latest>
 	const XSD.ID c_resourceShortNameOldest := "ol";		//<oldest>
diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn
index 48c69a2551a7792a8900f20b8fece599682affcb..c9abdac3b15bc90de486d75bd4b8078ed4a0217b 100644
--- a/OneM2M_PermutationFunctions.ttcn
+++ b/OneM2M_PermutationFunctions.ttcn
@@ -2510,8 +2510,7 @@ module OneM2M_PermutationFunctions {
 					var integer v_parentIndex := -1;
 					var integer v_resourceIndex := -1;
 					var integer v_ae2Index := -1;
-					var integer v_acpAuxIndex := -1;
-					var PoaList v_poaList := { f_getCompletePoA(PX_TS_AE2.mcaPortIn) };
+					var template RequestPrimitive v_parentRequestPrimitive;
 					
 					// Test control
 				
@@ -2523,33 +2522,26 @@ module OneM2M_PermutationFunctions {
 					// Preamble
 					
 					if(ispresent(p_parentRequestPrimitive)) {
+						v_parentRequestPrimitive := p_parentRequestPrimitive;
 						if(match(int23, p_parentRequestPrimitive.resourceType)){
-							vc_ae2.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
-							f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
-							
-							vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, v_poaList), -1)); // AE2 is registred
-							f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
-							
-							v_ae2Index := f_getResourceFromAeSimu(vc_ae2);
-							p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
-							vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
+							f_cse_preamble_subscriptionVerification(v_ae2Index, v_parentRequestPrimitive, int23, -);
 						}
-						if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){
-						
+						if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)) {
 							f_cse_preamble_registerAe();
-						
 						}
-						v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex);
-						
+						v_parentIndex := f_cse_createResource(valueof(v_parentRequestPrimitive.resourceType), v_parentRequestPrimitive, v_parentIndex);
 						
+						if(vc_ae2.running) {
+							vc_ae2.stop;
+						}
 						
 					} else {//Resource under CSEBase
 					
 						if(p_resourceType != int1) {
 												
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 											
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						
 						if(ischosen(p_requestPrimitive.primitiveContent.group_)){
@@ -2561,15 +2553,8 @@ module OneM2M_PermutationFunctions {
 					}															
 									
 					// Test Body
-					
 					if(match(int23, p_requestPrimitive.resourceType)){
-						vc_ae2.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
-						f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
-						vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, v_poaList), -1)); // AE2 is registred
-						f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
-						v_ae2Index := f_getResourceFromAeSimu(vc_ae2);
-						p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; 
-						vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
+						f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, int23, -);
 					}
 					
 					v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
@@ -2623,7 +2608,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_parentIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae1Index := -1;
-						var integer v_acpAuxIndex := -1;
 						var PoaList v_poaList := { f_getCompletePoA(PX_TS_AE1.mcaPortIn) };
 										   
 						// Test control
@@ -2637,7 +2621,7 @@ module OneM2M_PermutationFunctions {
 						vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
 						
 						if(match(int23, p_resourceType)){
-							vc_ae1.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
+							vc_ae1.start(f_cse_createAccessControlPolicyAux("SubscriptionVerificationAcp", -, int63));
 							f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
 							vc_ae1.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE1.appId, -, PX_TS_AE1.aeIdStem, "MyAe", v_poaList), -1)); // AE1 is registered
 							f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
@@ -2829,7 +2813,6 @@ module OneM2M_PermutationFunctions {
 						// Local variables
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
-						var integer v_acpAuxIndex := -1;
 						var integer v_aeIndex := -1;
 											   
 						// Test control
@@ -2845,12 +2828,12 @@ module OneM2M_PermutationFunctions {
     				
 						// Preamble
 						if (p_resourceType != int23) {
-							v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int62);//c_RUDNDi)
+							f_cse_createAccessControlPolicyAux(-, -, int62);//c_RUDNDi)
 						} else {
-							v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int60);//c_UDNDi);
+							f_cse_createAccessControlPolicyAux(-, -, int60);//c_UDNDi);
 						}	
 												
-						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);
+						v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);
 						
 						// Test Body
 						v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
@@ -3143,7 +3126,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_containerIndex := -1;
 						var integer v_parentIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var integer v_ae2Index := -1;
 						const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs";
 						var integer v_resourceIndex := -1;
@@ -3164,7 +3146,7 @@ module OneM2M_PermutationFunctions {
 
 						// Preamble
 						if (v_myOptionalAttribute == c_accessControlPolicyIDs) {
-							v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi)
+							f_cse_createAccessControlPolicyAux();//c_CRUDNDi)
 						}     				
 						
 						v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi); 
@@ -3923,7 +3905,6 @@ module OneM2M_PermutationFunctions {
 						// Local variables
 						var MsgIn v_response;
 						var integer v_aeIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
     										   
@@ -3940,8 +3921,8 @@ module OneM2M_PermutationFunctions {
     				
 						// Preamble
 						if(p_resourceType != int1) {
-							v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CRUDNDi)
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
+							f_cse_createAccessControlPolicyAux(-, -, int61);//c_CRUDNDi)
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});
 						}
 						
 						v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi;
@@ -4286,7 +4267,7 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
 							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpIndex].resource.accessControlPolicy.resourceID});
 						}
@@ -4352,7 +4333,6 @@ module OneM2M_PermutationFunctions {
 						// Local variables
 						var MsgIn v_response;
 						var integer v_aeIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
 											   
@@ -4379,9 +4359,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, int61);
+							f_cse_createAccessControlPolicyAux(-, -, int61);
 					
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 					
 					
@@ -4443,7 +4423,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 						    										   
 						// Test control
     				
@@ -4463,9 +4442,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
 							
@@ -4525,7 +4504,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 						    										   
 						// Test control
     				
@@ -4545,9 +4523,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
 	
@@ -4606,7 +4584,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 						    										   
 						// Test control
     				
@@ -4626,9 +4603,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
 	
@@ -4688,7 +4665,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 																	   
 						// Test control
     				
@@ -4708,9 +4684,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
 	
@@ -4766,7 +4742,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 																	   
 						// Test control
     				
@@ -4786,9 +4761,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
 	
@@ -5480,7 +5455,6 @@ module OneM2M_PermutationFunctions {
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
     										   
@@ -5496,14 +5470,14 @@ module OneM2M_PermutationFunctions {
 						// Test adapter configuration
     				
 						// Preamble
-						v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int59);//c_CRDNDi)
+						f_cse_createAccessControlPolicyAux(-, -, int59);//c_CRDNDi)
 						
 						v_aeIndex := f_cse_preamble_registerAe(-, -);
 						
 						f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
 						
 						if(p_resourceType != int1) {
-							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//c_CRDNDi);
+							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});//c_CRDNDi);
 						}
 						
 						v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); 				
@@ -5869,7 +5843,6 @@ module OneM2M_PermutationFunctions {
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
-						var integer v_acpAuxIndex := -1;
 						var integer v_acpIndex := -1;
 						   
 						// Test control
@@ -5890,9 +5863,9 @@ module OneM2M_PermutationFunctions {
 
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 						
 						if(p_secondAcp) {//A second ACP is required
@@ -5961,7 +5934,6 @@ module OneM2M_PermutationFunctions {
 						 var integer v_aeIndex := -1;
 						 var integer v_resourceIndex := -1;
 						 var integer v_ae2Index := -1;
-						 var integer v_acpAuxIndex := -1;
 							   
 						 // Test control
 
@@ -5981,9 +5953,9 @@ module OneM2M_PermutationFunctions {
 						
 						if(p_resourceType != int1) {
 							
-							v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, -, -);
+							f_cse_createAccessControlPolicyAux(-, -, -);
 						
-							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[v_acpAuxIndex].resource.accessControlPolicy.resourceID});
+							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});
 						}
 												 
 						if (p_resourceType!=int16){	//ResourceType != RemoteCSE
@@ -6521,7 +6493,6 @@ module OneM2M_PermutationFunctions {
 						var MsgIn v_response;
 						var RequestPrimitive v_request;
 						var RequestPrimitive v_updateRequest;
-						var integer v_acpAuxIndex := -1;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
 						var integer v_ae2Index := -1;
@@ -6539,7 +6510,7 @@ module OneM2M_PermutationFunctions {
                 
 						// Preamble
 						v_aeIndex := f_cse_preamble_registerAe(-, -);//c_CRUNDi);
-						v_acpAuxIndex := f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int55);//c_CRDNDi);
+						f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int55);//c_CRDNDi);
 						
 						f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
                 		
@@ -6547,7 +6518,7 @@ module OneM2M_PermutationFunctions {
 						if(p_resourceType == int1) {
 							p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55)};
 						} else {
-							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
+							p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});
 						}
                 		
 						//Creation of resource
@@ -7015,7 +6986,7 @@ module OneM2M_PermutationFunctions {
 						var integer i;
 						var ListOfURIs v_memberIDs;
 						var AcpType v_membersAcpIds;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+						var template RequestPrimitive v_createAcp := m_createAcpBase;
 			
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7091,7 +7062,7 @@ module OneM2M_PermutationFunctions {
 						var integer v_groupIndex := -1;
 						var ListOfURIs v_memberIDs;
 						var ListOfURIs v_membersAcpIds;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, p_accessControlOperations);
+						var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations);
 	
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7157,7 +7128,7 @@ module OneM2M_PermutationFunctions {
 						var integer i;
 						var ListOfURIs v_memberIDs;
 						var ListOfURIs v_acpIds;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+						var template RequestPrimitive v_createAcp := m_createAcpBase;
 						
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7233,7 +7204,7 @@ module OneM2M_PermutationFunctions {
 						var integer v_groupIndex := -1;
 						var ListOfURIs v_memberIDs;
 						var AcpType v_acpIDs;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, p_accessControlOperations);
+						var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations);
 	
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7299,7 +7270,7 @@ module OneM2M_PermutationFunctions {
 						var ListOfURIs v_memberIDs;
 						var AcpType v_acpIds;
 						var integer i;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "PermissionForEveryone", -, -);
+						var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -);
 						
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7389,7 +7360,7 @@ module OneM2M_PermutationFunctions {
 						var integer i;
 						var ListOfURIs v_memberIDs;
 						var AcpType v_acpIds;
-						var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "PermissionForEveryone", -, -);
+						var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -);
 						
 						// Test control
 						if(not(PICS_ACP_SUPPORT)) {
@@ -7717,7 +7688,7 @@ module OneM2M_PermutationFunctions {
 							var integer v_aeIndex := -1;
 							var integer v_acpIndex1 := -1;
 							var integer v_acpIndex2 := -1;
-							var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+							var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
 							var RequestPrimitive v_updateRequest;
 							var AccessControlRule v_accessControlRule_1;
 							var SetOfAcrs v_setOfArcs;
@@ -7796,7 +7767,7 @@ module OneM2M_PermutationFunctions {
 							// Test adapter configuration
 	
 							// Preamble
-							v_createRequest := valueof(m_createAcp(f_getResourceAddress(), -, {"testDomain"}));
+							v_createRequest := valueof(m_createAcp( -, {"testDomain"}, -));
 							v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
 							
 							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
@@ -7929,9 +7900,9 @@ module OneM2M_PermutationFunctions {
 							v_currentTime := fx_generateTimestamp();
 							v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " * *"}, omit, omit}};
 							v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
-							vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+							vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
 							
-							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -);
+							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);
 			
 							// Test Body
 							p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
@@ -7999,9 +7970,9 @@ module OneM2M_PermutationFunctions {
 							}
 							v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " * *"}, omit, omit}};
 							v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
-							vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+							vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
 							
-							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -);
+							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);
 			
 							// Test Body
 							p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
@@ -8176,9 +8147,9 @@ module OneM2M_PermutationFunctions {
 							v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
 							v_accessControlRule.accessControlContexts_list := {{{}, {{f_getIpv4Address(PX_TS_AE1.mcaPortIn)}, omit}, omit}};
 							v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
-							vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+							vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
 							
-							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, {f_getCompletePoA(PX_TS_AE1.mcaPortIn)});
+							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getCompletePoA(PX_TS_AE1.mcaPortIn)});
 			
 							// Test Body
 							p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
@@ -8237,9 +8208,9 @@ module OneM2M_PermutationFunctions {
 							v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
 							v_accessControlRule.accessControlContexts_list := {{{}, {{"240.0.0.0"}, omit}, omit}};
 							v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
-							vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
+							vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
 							
-							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, {f_getCompletePoA(PX_TS_AE1.mcaPortIn)});
+							v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getCompletePoA(PX_TS_AE1.mcaPortIn)});
 			
 							// Test Body
 							p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
@@ -9036,7 +9007,7 @@ module OneM2M_PermutationFunctions {
 					var integer v_resourceIndex;
 					var template RequestPrimitive v_createAE := m_createAe(PX_TS_AE1.appId, omit, omit);
 					var template RequestPrimitive v_createAEAnnc := m_createAEAnnc(omit, omit, omit, PX_TS_CSE1.cseId, PX_TS_CSE1.cseId);
-					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyAcp", -, int61);
+					var template RequestPrimitive v_createAcp := m_createAcp(-, -, int61);
 					var integer v_aeAnncIndex;
 					var integer v_resourceAnncIndex;
 					var integer v_acpIndex;
@@ -9099,7 +9070,7 @@ module OneM2M_PermutationFunctions {
 					var integer v_resourceIndex;
 					var template RequestPrimitive v_createAE := m_createAe(PX_TS_AE1.appId, omit, omit);
 					var template RequestPrimitive v_createAEAnnc := m_createAEAnnc(omit, omit, omit, PX_TS_CSE1.cseId, PX_TS_CSE1.cseId);
-					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyAcp", -, int61);
+					var template RequestPrimitive v_createAcp := m_createAcp(-, -, int61);
 					var integer v_aeAnncIndex;
 					var integer v_resourceAnncIndex;
 					var integer v_acpIndex;
@@ -10154,7 +10125,6 @@ module OneM2M_PermutationFunctions {
 				var integer v_aeIndex1 := -1;
 				var integer v_aeIndex2 := -1;
 				var integer v_resourceIndex := -1;
-				var integer v_acpAuxIndex := -1;
 				var RequestPrimitive v_request;
 				var MsgIn v_response;
 				var RequestPrimitive v_requestNotify;
@@ -10167,11 +10137,11 @@ module OneM2M_PermutationFunctions {
 				// Test adapter configuration
 
 				// Preamble
-				v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int63);//c_CUDNDi)
+				f_cse_createAccessControlPolicyAux(-, -, int63);//c_CUDNDi)
     
-				v_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi);
+				v_aeIndex1 := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//c_CRDNDi);
 	
-				vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred
+				vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred
 				f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
 					
 				v_aeIndex2 := f_getResourceFromAeSimu(vc_ae2);
@@ -10217,7 +10187,6 @@ module OneM2M_PermutationFunctions {
 					var RequestPrimitive v_request;
 					var integer v_aeIndex := -1;
 					var integer v_resourceIndex := -1;
-					var integer v_acpAuxIndex := -1;
 						   
 					// Test control
 					if(not(PICS_BLOCKING_REQUEST)){
@@ -10288,7 +10257,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
-						var integer v_acpAuxIndex := -1;
 							   
 						// Test control
 						if(PICS_NON_BLOCKING_REQUEST_SYNCH){
@@ -10422,7 +10390,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var template PrimitiveContent v_contentResponseUri;
 						var template PrimitiveContent v_contentResponseRequestResource;
 						var RequestStatus v_requestStatus;
@@ -10703,7 +10670,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var template PrimitiveContent v_contentResponse;
 	   
 						// Test control
@@ -10777,7 +10743,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex := -1;
 						var integer v_resourceIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var template PrimitiveContent v_contentResponse;
 	   
 						// Test control
@@ -10854,7 +10819,6 @@ module OneM2M_PermutationFunctions {
 						var RequestPrimitive v_request;
 						var integer v_aeIndex, v_ae2Index := -1;
 						var integer v_resourceIndex := -1;
-						var integer v_acpAuxIndex := -1;
 						var template PrimitiveContent v_contentResponse;
 	   
 						// Test control
diff --git a/OneM2M_Testcases_CSE_Release_1.ttcn b/OneM2M_Testcases_CSE_Release_1.ttcn
index e326ff2e37767e1e4e246af937b7f03f2bb89f3b..ac3c4d6d38800f6847565663a5b93a76c7eea511 100644
--- a/OneM2M_Testcases_CSE_Release_1.ttcn
+++ b/OneM2M_Testcases_CSE_Release_1.ttcn
@@ -8250,7 +8250,6 @@ module OneM2M_Testcases_CSE_Release_1 {
 					// Local variables
 					var MsgIn v_response;
 					var integer v_aeIndex := -1;
-					var integer v_acpAuxIndex := -1;
 					var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
 					var RequestPrimitive v_request;
 						
@@ -8266,9 +8265,9 @@ module OneM2M_Testcases_CSE_Release_1 {
 					// Test adapter configuration
 
 					// Preamble
-					v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CUDNDi)
+					f_cse_createAccessControlPolicyAux(-, -, int61);//c_CUDNDi)
 						
-					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//c_CRDNDi);
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//c_CRDNDi);
 				
 					v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription 
 					
@@ -9060,8 +9059,8 @@ module OneM2M_Testcases_CSE_Release_1 {
 						var integer v_aeIndex := -1;
 						var integer v_acpIndex1 := -1;
 						var integer v_acpIndex2 := -1;
-						var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
-						var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+						var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(omit, -, -));
+						var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(omit, -, -));
 						var RequestPrimitive v_updateRequest;
 						var AccessControlRule v_accessControlRule_1;
 						var AccessControlRule v_accessControlRule_2;
@@ -9152,8 +9151,8 @@ module OneM2M_Testcases_CSE_Release_1 {
 						var integer v_aeIndex := -1;
 						var integer v_acpIndex1 := -1;
 						var integer v_acpIndex2 := -1;
-						var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
-						var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
+						var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(omit, -, -));
+						var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(omit, -, -));
 						var RequestPrimitive v_updateRequest;
 						var AccessControlRule v_accessControlRule_1;
 						var AccessControlRule v_accessControlRule_2;
@@ -10009,7 +10008,6 @@ module OneM2M_Testcases_CSE_Release_1 {
 				var integer v_aeIndex := -1;
 				var integer v_resourceIndex := -1;
 				var RequestPrimitive v_request;
-				var integer v_acpAuxIndex := -1;
 				const ResourceType c_containerResourceType := int3; 
 				
 				// Test control
@@ -10024,11 +10022,11 @@ module OneM2M_Testcases_CSE_Release_1 {
 				// Test adapter configuration
 	
 				// Preamble
-				v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int31);//c_CRUN)
+				f_cse_createAccessControlPolicyAux(-, -, int31);//c_CRUN)
 				
 				v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
 				
-				v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
+				v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});
 				
 				v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex);
 				v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
@@ -10290,7 +10288,6 @@ module OneM2M_Testcases_CSE_Release_1 {
 				var MsgIn v_response;
 				var integer v_aeIndex := -1;
 				var integer v_resourceIndex := -1;
-				var integer v_acpAuxIndex := -1;
 				var RequestPrimitive v_request;
 				const ResourceType c_containerResourceType := int3; 
 				var Labels v_labels := {"VALUE_1"};
@@ -10304,14 +10301,14 @@ module OneM2M_Testcases_CSE_Release_1 {
 				// Test adapter configuration
 
 				// Preamble
-				v_acpAuxIndex := f_cse_preamble_createAcpAux(-, -);//c_CRUDNDi)
+				f_cse_createAccessControlPolicyAux(-, -);//c_CRUDNDi)
 				
-				//v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
+				//v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});
 				v_aeIndex := f_cse_preamble_registerAe();
 				
 				f_cse_updateAcpAuxResource(int31); //Not include DISCOVERY permission
 
-				v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
+				v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)};
 				v_createRequest.primitiveContent.container.labels := v_labels;
 				v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex);
 				
@@ -11075,7 +11072,7 @@ module OneM2M_Testcases_CSE_Release_1 {
 					var integer i;
 					var ListOfURIs v_memberIDs;
 					var ListOfURIs v_membersAcpIds;
-					var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, -);
+					var template RequestPrimitive v_createAcp := m_createAcpBase;
 					var template PrimitiveContent v_contentResponse;
 					var XSD.AnyURI v_fanoutPointAddress;
 					var RequestPrimitive v_containerRequestPrimitive := valueof(m_createContainer_noResourceName);
diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn
index 96b108c22d2ac430ce70b91897a0bd284e41144b..e58d4b6ed36452b720c3dbd130601e91c7337f46 100644
--- a/OneM2M_Testcases_CSE_Release_2.ttcn
+++ b/OneM2M_Testcases_CSE_Release_2.ttcn
@@ -3341,7 +3341,6 @@ module OneM2M_Testcases_CSE_Release_2 {
 					// Local variables
 					var integer v_aeIndex := -1;
 					var integer v_resourceIndex := -1;
-					var integer v_acpAuxIndex := -1;
 					var RequestPrimitive v_req1, v_req2, v_req3;
 					var MsgIn v_resp1, v_resp3;
 					var ResponsePrimitive v_resp2;
@@ -3357,9 +3356,9 @@ module OneM2M_Testcases_CSE_Release_2 {
 					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
 					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
 					
-					v_acpAuxIndex := f_cse_preamble_createAcpAux();
+					f_cse_createAccessControlPolicyAux();
 					
-					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//AE1 is registred;
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred;
 					
 					v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
 					
@@ -3449,7 +3448,7 @@ module OneM2M_Testcases_CSE_Release_2 {
 										
 				function f_CSE_PCH_002() runs on AeSimu system CseSystem {
 					// Local variables
-					var integer v_aeIndex, v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
 					var integer v_resourceIndex := -1;
 					var RequestPrimitive v_req1, v_req2, v_req3;
 					var MsgIn v_resp1, v_resp3;
@@ -3466,9 +3465,9 @@ module OneM2M_Testcases_CSE_Release_2 {
 					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
 					vc_cse1.done;
 					
-					v_acpAuxIndex := f_cse_preamble_createAcpAux();
+					f_cse_createAccessControlPolicyAux();
 					
-					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//AE1 is registred;
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred;
 					
 					v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
 					
@@ -3554,7 +3553,7 @@ module OneM2M_Testcases_CSE_Release_2 {
 				
 				function f_CSE_PCH_003() runs on AeSimu system CseSystem {
 					//Local variables
-					var integer v_aeIndex, v_acpAuxIndex := -1;
+					var integer v_aeIndex := -1;
 					var integer v_resourceIndex := -1;
 					var RequestPrimitive v_req1;
 					var RequestPrimitive v_req2;
@@ -3574,9 +3573,9 @@ module OneM2M_Testcases_CSE_Release_2 {
 					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
 					vc_cse1.done;
 		
-					v_acpAuxIndex := f_cse_preamble_createAcpAux();
+					f_cse_createAccessControlPolicyAux();
 					
-				    v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//AE1 is registred;
+				    v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred;
 					
 					v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
 					 
@@ -3785,7 +3784,7 @@ module OneM2M_Testcases_CSE_Release_2 {
 						
 				function f_CSE_PCH_006() runs on AeSimu system CseSystem {
 					 // Local variables
-					 var integer v_aeIndex, v_acpAuxIndex := -1;
+					 var integer v_aeIndex := -1;
 					 var integer v_resourceIndex := -1;
 					 var RequestPrimitive v_req1;
 	
@@ -3800,9 +3799,9 @@ module OneM2M_Testcases_CSE_Release_2 {
 					vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
 					f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
 	
-					v_acpAuxIndex := f_cse_preamble_createAcpAux();
+					f_cse_createAccessControlPolicyAux();
 					 
-					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}, -);//AE1 is registred;
+					v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -);//AE1 is registred;
 					 
 					v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex);
 	
@@ -4014,7 +4013,7 @@ module OneM2M_Testcases_CSE_Release_2 {
 						
 								v_updateRequest.primitiveContent.container.labels := v_labels_1;
 		
-								v_ae1.start(f_CSE_RT_NBS_003(m_updateContainerBase, m_createContainerBase, int3)); //Update Container
+								v_ae1.start(f_CSE_RT_NBS_003(v_updateRequest, m_createContainerBase, int3)); //Update Container
 								v_ae1.done;
 		  
 							}