diff --git a/ms/blueprintsprocessor/functions/restful-executor/pom.xml b/ms/blueprintsprocessor/functions/restful-executor/pom.xml
index ed0fdc9..9c154f1 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/pom.xml
+++ b/ms/blueprintsprocessor/functions/restful-executor/pom.xml
@@ -26,8 +26,8 @@
     <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
     <artifactId>restful-executor</artifactId>
 
-    <name>MS Blueprints Processor Functions - NRM Restful executor</name>
-    <description>Blueprints Processor Function - NRM Restful executor</description>
+    <name>MS Blueprints Processor Functions - Restful executor</name>
+    <description>Blueprints Processor Function - Restful executor</description>
 
     <dependencies>
         <dependency>
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
index 9cd6f57..6b5af80 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
@@ -20,7 +20,7 @@
 import com.fasterxml.jackson.databind.node.ArrayNode
 import com.fasterxml.jackson.databind.node.ObjectNode
 import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.nrmfunction.RestfulNRMServiceClient
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.function.RestfulServiceClient
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
 import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
@@ -49,7 +49,7 @@
 
     fun processNRM(executionRequest: ExecutionServiceInput, input_params: ArrayNode): String {
         // process the managed object instances
-        log.info("Processing NRM Object")
+        log.info("Processing Object")
         operationInputs = executionServiceInput.stepData!!.properties
         val dynamic_properties = operationInputs.get("dynamic-properties")
         // instantiate one restClientService instance
@@ -75,9 +75,9 @@
                 for (managed_object_instance in managed_object_instances) {
                     // invoke createMOI for each managed-object-instance
                     log.info("invoke createMOI for each managed-object-instance")
-                    var NRM_Restful_client = RestfulNRMServiceClient()
-                    val MOI_id = NRM_Restful_client.generateMOIid()
-                    var httpresponse = NRM_Restful_client.createMOI(web_client_service, MOI_id, managed_object_instance)
+                    var Restful_client = RestfulServiceClient()
+                    val MOI_id = Restful_client.generateMOIid()
+                    var httpresponse = Restful_client.createMOI(web_client_service, MOI_id, managed_object_instance)
                     var MOIname = managed_object_instance.get("className").toString().replace("\"", "")
                     response.put("/$MOIname/$MOI_id", httpresponse)
                 }
@@ -86,9 +86,9 @@
                 for (managed_object_instance in managed_object_instances) {
                     // invoke getMOIAttributes for each managed-object-instance
                     log.info("invoke getMOIAttributes for each managed-object-instance")
-                    var NRM_Restful_client = RestfulNRMServiceClient()
+                    var Restful_client = RestfulServiceClient()
                     val MOI_id = managed_object_instance.get("id").toString().replace("\"", "")
-                    var httpresponse = NRM_Restful_client.getMOIAttributes(web_client_service, MOI_id, managed_object_instance)
+                    var httpresponse = Restful_client.getMOIAttributes(web_client_service, MOI_id, managed_object_instance)
                     var MOIname = managed_object_instance.get("className").toString().replace("\"", "")
                     response.put("/$MOIname/$MOI_id", httpresponse)
                 }
@@ -97,9 +97,9 @@
                 for (managed_object_instance in managed_object_instances) {
                     // invoke modifyMOIAttributes for each managed-object-instance
                     log.info("invoke modifyMOIAttributes for each managed-object-instance")
-                    var NRM_Restful_client = RestfulNRMServiceClient()
+                    var Restful_client = RestfulServiceClient()
                     val MOI_id = managed_object_instance.get("id").toString().replace("\"", "")
-                    var httpresponse = NRM_Restful_client.modifyMOIAttributes(web_client_service, MOI_id, managed_object_instance)
+                    var httpresponse = Restful_client.modifyMOIAttributes(web_client_service, MOI_id, managed_object_instance)
                     var MOIname = managed_object_instance.get("className").toString().replace("\"", "")
                     response.put("/$MOIname/$MOI_id", httpresponse)
                 }
@@ -108,9 +108,9 @@
                 for (managed_object_instance in managed_object_instances) {
                     // invoke deleteMOI for each managed-object-instance
                     log.info("invoke deleteMOI for each managed-object-instance")
-                    var NRM_Restful_client = RestfulNRMServiceClient()
+                    var Restful_client = RestfulServiceClient()
                     val MOI_id = managed_object_instance.get("id").toString().replace("\"", "")
-                    var httpresponse = NRM_Restful_client.deleteMOI(web_client_service, MOI_id, managed_object_instance)
+                    var httpresponse = Restful_client.deleteMOI(web_client_service, MOI_id, managed_object_instance)
                     var MOIname = managed_object_instance.get("className").toString().replace("\"", "")
                     response.put("/$MOIname/$MOI_id", httpresponse)
                 }
@@ -120,7 +120,6 @@
                 response.put(this.workflowName, "Not Implemented")
             }
         }
-        val strresponse = "$response"
-        return strresponse
+        return "$response"
     }
 }
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/nrmfunction/RestfulNRMServiceClient.kt b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/function/RestfulServiceClient.kt
similarity index 97%
rename from ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/nrmfunction/RestfulNRMServiceClient.kt
rename to ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/function/RestfulServiceClient.kt
index 259670d..8b3fd2a 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/nrmfunction/RestfulNRMServiceClient.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/function/RestfulServiceClient.kt
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.nrmfunction
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.function
 
 import com.fasterxml.jackson.databind.JsonNode
 import com.fasterxml.jackson.databind.ObjectMapper
@@ -26,9 +26,9 @@
 import org.springframework.web.util.UriComponentsBuilder
 import java.util.UUID
 
-class RestfulNRMServiceClient() {
+class RestfulServiceClient() {
 
-    private val log = logger(RestfulNRMServiceClient::class.java)
+    private val log = logger(RestfulServiceClient::class.java)
 
     fun createMOI(web_client_service: BlueprintWebClientService, idStr: String, managed_object_instance: JsonNode): ObjectNode {
         val classNameStr = managed_object_instance.get("className").toString().replace("\"", "")
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/function/RestfulServiceClientTest.kt
similarity index 89%
rename from ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
rename to ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/function/RestfulServiceClientTest.kt
index 6f76c9b..e450d11 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/function/RestfulServiceClientTest.kt
@@ -14,7 +14,7 @@
  *  limitations under the License.
  */
 
-package org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.nrmfunction
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.function
 
 import com.fasterxml.jackson.databind.node.ObjectNode
 import org.junit.Ignore
@@ -55,22 +55,22 @@
 )
 
 @Ignore
-class RestfulNRMServiceClientTest {
+class RestfulServiceClientTest {
 
     @Autowired
-    lateinit var restfulNRMServiceClient: RestfulNRMServiceClient
+    lateinit var restfulServiceClient: RestfulServiceClient
     lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
 
     @Test
     fun testCreateMOI() {
         val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("nrm")
-        val idStr = restfulNRMServiceClient.generateMOIid()
+        val idStr = restfulServiceClient.generateMOIid()
         var test_moi_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_moi_data.put("className", "TestMangedObjectInstance")
         var test_attributes_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_attributes_data.put("test_attribute_key", "test_attribute_value")
         test_moi_data.put("data", test_attributes_data)
-        val response = restfulNRMServiceClient.createMOI(restClientService, idStr, test_moi_data)
+        val response = restfulServiceClient.createMOI(restClientService, idStr, test_moi_data)
         assertNotNull(response, "failed to get createMOI response")
         assertEquals("Create MOI object successfully", response.get("body").get("data").toString(), "failed to get createMOI response")
     }
@@ -78,13 +78,13 @@
     @Test
     fun testGetMOIAttributes() {
         val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("nrm")
-        val idStr = restfulNRMServiceClient.generateMOIid()
+        val idStr = restfulServiceClient.generateMOIid()
         var test_moi_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_moi_data.put("className", "TestMangedObjectInstance")
         test_moi_data.put("scope", "BASE_ONLY")
         test_moi_data.put("filter", "TestMangedObjectInstance")
         test_moi_data.put("fields", "test_attribute_key")
-        val response = restfulNRMServiceClient.getMOIAttributes(restClientService, idStr, test_moi_data)
+        val response = restfulServiceClient.getMOIAttributes(restClientService, idStr, test_moi_data)
         assertNotNull(response, "failed to get getMOIAttributes response")
         assertEquals("Get MOI object attributes successfully", response.get("body").get("data").toString(), "failed to get getMOIAttributes response")
     }
@@ -92,7 +92,7 @@
     @Test
     fun testModifyMOIAttributes() {
         val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("nrm")
-        val idStr = restfulNRMServiceClient.generateMOIid()
+        val idStr = restfulServiceClient.generateMOIid()
         var test_moi_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_moi_data.put("className", "TestMangedObjectInstance")
         test_moi_data.put("scope", "BASE_ONLY")
@@ -100,7 +100,7 @@
         var test_attributes_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_attributes_data.put("test_attribute_key", "modified_attribute_value")
         test_moi_data.put("data", test_attributes_data)
-        val response = restfulNRMServiceClient.modifyMOIAttributes(restClientService, idStr, test_moi_data)
+        val response = restfulServiceClient.modifyMOIAttributes(restClientService, idStr, test_moi_data)
         assertNotNull(response, "failed to get modifyMOIAttributes response")
         assertEquals(
             "Modify MOI object attributes successfully",
@@ -112,12 +112,12 @@
     @Test
     fun testDeleteMOI() {
         val restClientService = bluePrintRestLibPropertyService.blueprintWebClientService("nrm")
-        val idStr = restfulNRMServiceClient.generateMOIid()
+        val idStr = restfulServiceClient.generateMOIid()
         var test_moi_data = JacksonUtils.jsonNode("{}") as ObjectNode
         test_moi_data.put("className", "TestMangedObjectInstance")
         test_moi_data.put("scope", "BASE_ONLY")
         test_moi_data.put("filter", "TestMangedObjectInstance")
-        val response = restfulNRMServiceClient.deleteMOI(restClientService, idStr, test_moi_data)
+        val response = restfulServiceClient.deleteMOI(restClientService, idStr, test_moi_data)
         assertNotNull(response, "failed to get delete response")
         assertEquals("Delete MOI object attributes successfully", response.get("body").get("data").toString(), "failed to get delete response")
     }
