diff --git a/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java b/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java
index 73f708c..9c15524 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -36,21 +38,15 @@
 
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(AbstractModelElement.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
-    private final String type;
-    private final ModelBpmn modelBpmn;
     private final String id;
     protected String topicPublishes;
     protected final JsonElement modelElementJsonNode;
-    private boolean isFound;
-    private final ModelProperties modelProp;
+    private final boolean isFound;
 
     /**
      * Perform base parsing of properties for a ModelElement (such as, VesCollector, Policy and Tca).
      */
-    protected AbstractModelElement(String type, ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
-        this.type = type;
-        this.modelProp = modelProp;
-        this.modelBpmn = modelBpmn;
+    protected AbstractModelElement(String type, ModelBpmn modelBpmn, JsonObject modelJson) {
         this.id = modelBpmn.getId(type);
         this.modelElementJsonNode = modelJson.get(id);
         this.isFound = modelBpmn.isModelElementTypeInList(type);
@@ -58,15 +54,16 @@
 
     /**
      * Get the topic publishes.
+     *
      * @return the topicPublishes
      */
     public String getTopicPublishes() {
         return topicPublishes;
     }
 
-
     /**
      * Get the id.
+     *
      * @return the id
      */
     public String getId() {
@@ -75,6 +72,7 @@
 
     /**
      * Get the isFound flag.
+     *
      * @return the isFound
      */
     public boolean isFound() {
diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java b/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java
index 63c677d..a93b09c 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -18,7 +20,7 @@
  * limitations under the License.
  * ============LICENSE_END============================================
  * ===================================================================
- * 
+ *
  */
 
 package org.onap.clamp.clds.model.properties;
@@ -30,27 +32,22 @@
  * Parse Holmes bpmn parameters json properties.
  * Example json:
  * [{"name":"correlationalLogic","value":"vcwx"},{"name":"configPolicyName","value":"cccc"}]
- *
  */
 public class Holmes extends AbstractModelElement {
 
     private static final String TYPE_HOLMES = "holmes";
 
-    private String              correlationLogic;
-
-    private String              configPolicyName;
+    private String correlationLogic;
+    private String configPolicyName;
 
     /**
      * Default constructor for Holmes Element.
      *
-     * @param modelProp
-     *            The ModelProperties containing the all the info, like bpmn,
-     *            bpmn params, etc ...
      * @param modelBpmn The model bpmn
      * @param modelJson The model json
      */
-    public Holmes(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
-        super(TYPE_HOLMES, modelProp, modelBpmn, modelJson);
+    public Holmes(ModelBpmn modelBpmn, JsonObject modelJson) {
+        super(TYPE_HOLMES, modelBpmn, modelJson);
 
         correlationLogic = JsonUtils.getStringValueByName(modelElementJsonNode, "correlationalLogic");
         configPolicyName = JsonUtils.getStringValueByName(modelElementJsonNode, "configPolicyName");
@@ -67,5 +64,4 @@
     public String getConfigPolicyName() {
         return configPolicyName;
     }
-
 }
diff --git a/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java b/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java
index 5160e10..a880893 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -118,19 +120,19 @@
             // Parse the list of base Model Elements and build up the
             // ModelElements
             modelElementClasses.entrySet().stream().parallel()
-                .filter(entry -> (AbstractModelElement.class.isAssignableFrom(entry.getKey())
-                    && missingTypes.contains(entry.getValue())))
-                .forEach(entry -> {
-                    try {
-                        modelElements.put(entry.getValue(),
-                            (entry.getKey().getConstructor(ModelProperties.class, ModelBpmn.class, JsonObject.class)
-                                .newInstance(this, modelBpmn, modelJson)));
-                    } catch (InstantiationException | NoSuchMethodException | IllegalAccessException
-                        | InvocationTargetException e) {
-                        logger.warn("Unable to instantiate a ModelElement " + entry.getValue()
-                            + ", exception follows: ", e);
-                    }
-                });
+                    .filter(entry -> (AbstractModelElement.class.isAssignableFrom(entry.getKey())
+                            && missingTypes.contains(entry.getValue())))
+                    .forEach(entry -> {
+                        try {
+                            modelElements.put(entry.getValue(),
+                                    (entry.getKey().getConstructor(ModelBpmn.class, JsonObject.class)
+                                            .newInstance(modelBpmn, modelJson)));
+                        } catch (InstantiationException | NoSuchMethodException | IllegalAccessException
+                                | InvocationTargetException e) {
+                            logger.warn("Unable to instantiate a ModelElement " + entry.getValue()
+                                    + ", exception follows: ", e);
+                        }
+                    });
         }
     }
 
diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Policy.java b/src/main/java/org/onap/clamp/clds/model/properties/Policy.java
index 9cb3635..9537cb9 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/Policy.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/Policy.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -25,9 +27,9 @@
 
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
-
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -51,23 +53,22 @@
  * "vf3RtPi"]}]]}]
  */
 public class Policy extends AbstractModelElement {
-    protected static final EELFLogger logger      = EELFManager.getInstance().getLogger(Policy.class);
+    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Policy.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
-    private List<PolicyChain>         policyChains;
+    private List<PolicyChain> policyChains;
 
-    private static final String       TYPE_POLICY = "policy";
+    private static final String TYPE_POLICY = "policy";
 
     /**
      * Parse Policy given json node.
      *
-     * @param modelProp The model properties.
      * @param modelBpmn The model bpmn
      * @param modelJson The model json
      * @throws IOException The IO Exception
      */
-    public Policy(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) throws IOException {
-        super(TYPE_POLICY, modelProp, modelBpmn, modelJson);
+    public Policy(ModelBpmn modelBpmn, JsonObject modelJson) throws IOException {
+        super(TYPE_POLICY, modelBpmn, modelJson);
 
         // process policies
         if (modelElementJsonNode != null) {
@@ -81,6 +82,7 @@
 
     /**
      * Get the policy chains.
+     *
      * @return the policyChains
      */
     public List<PolicyChain> getPolicyChains() {
@@ -90,5 +92,4 @@
     public static final String getType() {
         return TYPE_POLICY;
     }
-
 }
diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Tca.java b/src/main/java/org/onap/clamp/clds/model/properties/Tca.java
index 0d17b95..efa0188 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/Tca.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/Tca.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -18,7 +20,7 @@
  * limitations under the License.
  * ============LICENSE_END============================================
  * ===================================================================
- * 
+ *
  */
 
 package org.onap.clamp.clds.model.properties;
@@ -27,31 +29,30 @@
 import com.att.eelf.configuration.EELFManager;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+
 import java.util.Map.Entry;
 import java.util.Set;
 
 /**
  * Parse ONAP Tca json properties.
- *
  */
 public class Tca extends AbstractModelElement {
 
-    protected static final EELFLogger logger      = EELFManager.getInstance().getLogger(Tca.class);
+    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Tca.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
-    private TcaItem                   tcaItem;
+    private TcaItem tcaItem;
 
-    private static final String       TYPE_TCA    = "tca";
+    private static final String TYPE_TCA = "tca";
 
     /**
      * Parse Tca given json node.
      *
-     * @param modelProp The model properties
      * @param modelBpmn The model bpmn
      * @param modelJson The model json
      */
-    public Tca(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
-        super(TYPE_TCA, modelProp, modelBpmn, modelJson);
+    public Tca(ModelBpmn modelBpmn, JsonObject modelJson) {
+        super(TYPE_TCA, modelBpmn, modelJson);
 
         // process Server_Configurations
         if (modelElementJsonNode != null) {
@@ -68,5 +69,4 @@
     public static final String getType() {
         return TYPE_TCA;
     }
-
 }
diff --git a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
index 871d0a6..31d0be8 100644
--- a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
+++ b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
  *                             reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -26,7 +28,6 @@
 import com.google.gson.JsonObject;
 import org.onap.clamp.clds.model.properties.AbstractModelElement;
 import org.onap.clamp.clds.model.properties.ModelBpmn;
-import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.util.JsonUtils;
 
 /**
@@ -40,8 +41,8 @@
     /**
      * Main Constructor.
      */
-    public CustomModelElement(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
-        super(CUSTOM_TYPE, modelProp, modelBpmn, modelJson);
+    public CustomModelElement(ModelBpmn modelBpmn, JsonObject modelJson) {
+        super(CUSTOM_TYPE, modelBpmn, modelJson);
         topicPublishes = JsonUtils.getStringValueByName(modelElementJsonNode, "topicPublishes");
         test = JsonUtils.getStringValueByName(modelElementJsonNode, "test");
     }
