diff --git a/src/main/java/org/onap/clamp/authorization/AuthorizationController.java b/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
index 511b950..4a35f45 100644
--- a/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
+++ b/src/main/java/org/onap/clamp/authorization/AuthorizationController.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2019 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
@@ -39,8 +41,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.GrantedAuthority;
-import org.springframework.security.core.context.SecurityContext;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 
 /**
@@ -57,12 +57,8 @@
     @Autowired
     private ClampProperties refProp;
 
-    private SecurityContext securityContext = SecurityContextHolder.getContext();
-    private static final String permPrefix = "security.permission.type.";
-    private static final String permInstance = "security.permission.instance";
-
-    public AuthorizationController() {
-    }
+    private static final String PERM_PREFIX = "security.permission.type.";
+    private static final String PERM_INSTANCE = "security.permission.instance";
 
     /**
      * Insert authorize the api based on the permission
@@ -77,8 +73,8 @@
      *        The action of the permissions. e.g. read
      */
     public void authorize(Exchange camelExchange, String typeVar, String instanceVar, String action) {
-        String type = refProp.getStringValue(permPrefix + typeVar);
-        String instance = refProp.getStringValue(permInstance);
+        String type = refProp.getStringValue(PERM_PREFIX + typeVar);
+        String instance = refProp.getStringValue(PERM_INSTANCE);
 
         if (null == type || type.isEmpty()) {
             //authorization is turned off, since the permission is not defined
@@ -93,9 +89,8 @@
         LoggingUtils.setTargetContext("Clamp", "authorize");
         LoggingUtils.setTimeContext(startTime, new Date());
         securityLogger.debug("checking if {} has permission: {}", principalName, perm);
-        try {
-            isUserPermitted(perm);
-        } catch (NotAuthorizedException nae) {
+
+        if (!isUserPermitted(perm)){
             String msg = principalName + " does not have permission: " + perm;
             LoggingUtils.setErrorContext("100", "Authorization Error");
             securityLogger.warn(msg);
@@ -103,45 +98,26 @@
         }
     }
 
-    private boolean isUserPermitted(SecureServicePermission inPermission) {
-        boolean authorized = false;
+    public boolean isUserPermitted(SecureServicePermission inPermission) {
+
         String principalName = PrincipalUtils.getPrincipalName();
         // check if the user has the permission key or the permission key with a
         // combination of  all instance and/or all action.
-        if (hasRole(inPermission.getKey())) {
-            auditLogger.info("{} authorized because user has permission with * for instance: {}", 
-                  principalName, inPermission.getKey());
-            authorized = true;
+        if (hasRole(inPermission.getKey()) || hasRole(inPermission.getKeyAllInstance())) {
+            auditLogger.info("{} authorized because user has permission with * for instance: {}",
+                    principalName, inPermission.getKey());
+            return true;
             // the rest of these don't seem to be required - isUserInRole method
             // appears to take * as a wildcard
-        } else if (hasRole(inPermission.getKeyAllInstance())) {
-            auditLogger.info("{} authorized because user has permission with * for instance: {}", 
-                  principalName, inPermission.getKey());
-            authorized = true;
         } else if (hasRole(inPermission.getKeyAllInstanceAction())) {
-            auditLogger.info("{} authorized because user has permission with * for instance and * for action: {}", 
-                  principalName, inPermission.getKey());
-            authorized = true;
+            auditLogger.info("{} authorized because user has permission with * for instance and * for action: {}",
+                    principalName, inPermission.getKey());
+            return true;
         } else if (hasRole(inPermission.getKeyAllAction())) {
             auditLogger.info("{} authorized because user has permission with * for action: {}",
-                  principalName, inPermission.getKey());
-            authorized = true;
+                    principalName, inPermission.getKey());
+            return true;
         } else {
-            throw new NotAuthorizedException("");
-        }
-        return authorized;
-    }
-
-    /**
-     * Verify whether the user has the permission.
-     *
-     * @param inPermission
-     *        The permissions to verify
-     */
-    public boolean isUserPermittedNoException(SecureServicePermission inPermission) {
-        try {
-            return isUserPermitted(inPermission);
-        } catch (NotAuthorizedException e) {
             return false;
         }
     }
diff --git a/src/main/java/org/onap/clamp/clds/Application.java b/src/main/java/org/onap/clamp/clds/Application.java
index 025dbab..f6dfdc0 100644
--- a/src/main/java/org/onap/clamp/clds/Application.java
+++ b/src/main/java/org/onap/clamp/clds/Application.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
@@ -54,9 +56,8 @@
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 
-@SpringBootApplication
 @ComponentScan(basePackages = { "org.onap.clamp" })
-@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, SecurityAutoConfiguration.class,
+@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, SecurityAutoConfiguration.class,
     UserDetailsServiceAutoConfiguration.class })
 @EnableJpaRepositories(basePackages = { "org.onap.clamp" })
 @EntityScan(basePackages = { "org.onap.clamp" })
@@ -135,7 +136,8 @@
     private Connector createRedirectConnector(int redirectSecuredPort) {
         if (redirectSecuredPort <= 0) {
             eelfLogger.warn(
-                "HTTP port redirection to HTTPS is disabled because the HTTPS port is 0 (random port) or -1 (Connector disabled)");
+                "HTTP port redirection to HTTPS is disabled because the HTTPS port is 0 (random port) or -1"
+                  + " (Connector disabled)");
             return null;
         }
         Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
index f74af49..f7aff0e 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.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
@@ -54,7 +56,6 @@
     private static final String STATUS_URL_LOG = "Status URL extracted: ";
     private static final String DCAE_URL_PREFIX = "/dcae-deployments/";
     private static final String DCAE_URL_PROPERTY_NAME = "dcae.dispatcher.url";
-    public static final String DCAE_REQUESTID_PROPERTY_NAME = "dcae.header.requestId";
     private static final String DCAE_LINK_FIELD = "links";
     private static final String DCAE_STATUS_FIELD = "status";
 
@@ -99,7 +100,9 @@
         Date startTime = new Date();
         LoggingUtils.setTargetContext("DCAE", "getOperationStatus");
         try {
-            String responseStr = dcaeHttpConnectionManager.doHttpRequest(statusUrl, "GET", null, null, "DCAE", null, null);
+            String responseStr = dcaeHttpConnectionManager.doHttpRequest(statusUrl, "GET", null,
+                                                                         null, "DCAE", null,
+                                                                         null);
             JSONObject jsonObj = parseResponse(responseStr);
             String operationType = (String) jsonObj.get("operationType");
             String status = (String) jsonObj.get(DCAE_STATUS_FIELD);
@@ -156,6 +159,7 @@
 
     /***
      * Returns status URL for deleteExistingDeployment operation.
+     *
      * @param deploymentId
      *        The deployment ID
      * @param serviceTypeId
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
index dcf0542..7f20919 100644
--- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java
@@ -70,7 +70,7 @@
      */
     @Autowired
     public DcaeInventoryServices(ClampProperties refProp, CldsDao cldsDao,
-    		HttpConnectionManager httpConnectionManager) {
+                                 HttpConnectionManager httpConnectionManager) {
         this.refProp = refProp;
         this.cldsDao = cldsDao;
         this.httpConnectionManager = httpConnectionManager;
@@ -97,8 +97,8 @@
         }
         try {
             // Below are the properties required for calling the dcae inventory
-            ModelProperties prop = new ModelProperties(cldsModel.getName(), cldsModel.getControlName(), null, false,
-                "{}", cldsModel.getPropText());
+            ModelProperties prop = new ModelProperties(cldsModel.getName(), cldsModel.getControlName(), null,
+                                                       false, "{}", cldsModel.getPropText());
             Global global = prop.getGlobal();
             String invariantServiceUuid = global.getService();
             List<String> resourceUuidList = global.getResourceVf();
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
index bc82cb3..e996ae8 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.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
@@ -30,6 +32,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.EnumMap;
 
 import org.onap.clamp.clds.model.properties.ModelProperties;
 import org.onap.clamp.clds.model.properties.PolicyChain;
@@ -99,7 +102,7 @@
     }
 
     private static Map<AttributeType, Map<String, String>> createAttributesMap(Map<String, String> matchingAttributes) {
-        Map<AttributeType, Map<String, String>> attributes = new HashMap<>();
+        Map<AttributeType, Map<String, String>> attributes = new EnumMap<>(AttributeType.class);
         attributes.put(AttributeType.MATCHING, matchingAttributes);
         return attributes;
     }
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
index c884891..43209b2 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/PolicyClient.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
@@ -84,7 +86,6 @@
     public static final String POLICY_OP_NAME_PREFIX_PROPERTY_NAME = "policy.op.policyNamePrefix";
     public static final String POLICY_MS_NAME_PREFIX_PROPERTY_NAME = "policy.ms.policyNamePrefix";
     public static final String POLICY_OP_TYPE_PROPERTY_NAME = "policy.op.type";
-    public static final String POLICY_GUARD_SUFFIX = "_Guard";
     public static final String TOSCA_FILE_TEMP_PATH = "tosca.filePath";
 
     @Autowired
@@ -382,10 +383,12 @@
      * Use list Policy API to retrieve the policy. Return true if policy exists
      * otherwise return false.
      *
-     * @param policyNamePrefix
-     *        The Policy Name Prefix
      * @param prop
      *        The ModelProperties
+     * @param policyPrefix
+     *        The Policy Name Prefix
+     * @param policyNameWithPrefix
+     *        The Policy Full Name
      * @return The response message from policy
      * @throws PolicyConfigException
      *         In case of issues with policy engine
diff --git a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
index 6b8f043..ae0de07 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.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
@@ -173,7 +175,7 @@
     /**
      * This method updates the blueprint that is received in the UI with the TCA
      * Json.
-     * 
+     *
      * @param refProp
      *            * The refProp generally created by Spring, it's an access on
      *            the clds-references.properties file
@@ -188,11 +190,11 @@
         String jsonPolicy = JsonUtils.GSON.toJson(createPolicyContent(refProp, modelProperties, null, null, null));
         logger.info("Yaml that will be updated:" + yamlValue);
         Yaml yaml = new Yaml();
-        Map<String, Object> loadedYaml = (Map<String, Object>) yaml.load(yamlValue);
-        Map<String, Object> nodeTemplates = (Map<String, Object>) loadedYaml.get("node_templates");
-        Map<String, Object> tcaObject = (Map<String, Object>) nodeTemplates.get("tca_tca");
-        Map<String, Object> propsObject = (Map<String, Object>) tcaObject.get("properties");
-        Map<String, Object> appPreferences = (Map<String, Object>) propsObject.get("app_preferences");
+        Map<String, Map> loadedYaml = yaml.load(yamlValue);
+        Map<String, Map> nodeTemplates = loadedYaml.get("node_templates");
+        Map<String, Map> tcaObject = nodeTemplates.get("tca_tca");
+        Map<String, Map> propsObject = tcaObject.get("properties");
+        Map<String, String> appPreferences = propsObject.get("app_preferences");
         appPreferences.put("tca_policy", jsonPolicy);
         String blueprint = yaml.dump(loadedYaml);
         logger.info("Yaml updated:" + blueprint);
diff --git a/src/main/java/org/onap/clamp/clds/config/CldsUserJsonDecoder.java b/src/main/java/org/onap/clamp/clds/config/CldsUserJsonDecoder.java
index 602ee62..876acc8 100644
--- a/src/main/java/org/onap/clamp/clds/config/CldsUserJsonDecoder.java
+++ b/src/main/java/org/onap/clamp/clds/config/CldsUserJsonDecoder.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,6 +38,9 @@
 
 public class CldsUserJsonDecoder {
 
+    private CldsUserJsonDecoder() {
+    }
+
     /**
      * This method decodes the JSON file provided to a CldsUser Array. The stream is
      * closed after this call, this is not possible to reuse it.
@@ -68,7 +73,4 @@
             throw new CldsUsersException("Exception occurred during the decoding of the clds-users.json", e);
         }
     }
-
-    private CldsUserJsonDecoder() {
-    }
 }
diff --git a/src/main/java/org/onap/clamp/clds/config/sdc/BlueprintParserMappingConfiguration.java b/src/main/java/org/onap/clamp/clds/config/sdc/BlueprintParserMappingConfiguration.java
index 529753f..20d5d69 100644
--- a/src/main/java/org/onap/clamp/clds/config/sdc/BlueprintParserMappingConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/sdc/BlueprintParserMappingConfiguration.java
@@ -23,9 +23,6 @@
 
 package org.onap.clamp.clds.config.sdc;
 
-
-import com.google.gson.JsonElement;
-import com.google.gson.JsonParser;
 import com.google.gson.reflect.TypeToken;
 import java.io.InputStream;
 import java.io.InputStreamReader;
diff --git a/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java b/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java
index b7a7f0e..ad2751b 100644
--- a/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/sdc/SdcControllersConfiguration.java
@@ -5,6 +5,8 @@
  * Copyright (C) 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
@@ -23,9 +25,6 @@
 
 package org.onap.clamp.clds.config.sdc;
 
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
 import com.google.gson.JsonObject;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -49,8 +48,7 @@
  */
 public class SdcControllersConfiguration {
 
-    private static final EELFLogger logger = EELFManager.getInstance().getLogger(SdcControllersConfiguration.class);
-    public static final String CONTROLLER_SUBTREE_KEY = "sdc-connections";
+    private static final String CONTROLLER_SUBTREE_KEY = "sdc-connections";
     @Autowired
     protected ApplicationContext appContext;
     /**
diff --git a/src/main/java/org/onap/clamp/clds/dao/CldsDao.java b/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
index 8378af8..44228b2 100644
--- a/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
+++ b/src/main/java/org/onap/clamp/clds/dao/CldsDao.java
@@ -199,17 +199,13 @@
             .addValue("v_model_blueprint_text", model.getBlueprintText())
             .addValue("v_service_type_id", model.getTypeId()).addValue("v_deployment_id", model.getDeploymentId())
             .addValue("v_deployment_status_url", model.getDeploymentStatusUrl())
-            .addValue("v_control_name_prefix", model.getControlNamePrefix())
+            .addValue(V_CONTROL_NAME_PREFIX, model.getControlNamePrefix())
             .addValue(V_CONTROL_NAME_UUID, model.getControlNameUuid());
         Map<String, Object> out = logSqlExecution(procSetModel, in);
         model.setControlNamePrefix((String) out.get(V_CONTROL_NAME_PREFIX));
         model.setControlNameUuid((String) out.get(V_CONTROL_NAME_UUID));
         model.setId((String) (out.get("v_model_id")));
-        model.getEvent().setId((String) (out.get("v_event_id")));
-        model.getEvent().setActionCd((String) out.get("v_action_cd"));
-        model.getEvent().setActionStateCd((String) out.get("v_action_state_cd"));
-        model.getEvent().setProcessInstanceId((String) out.get("v_event_process_instance_id"));
-        model.getEvent().setUserid((String) out.get("v_event_user_id"));
+        setEventProp(model.getEvent(), out);
         return model;
     }
 
@@ -318,14 +314,9 @@
             .addValue("v_user_id", userid).addValue("v_template_bpmn_text", template.getBpmnText())
             .addValue("v_template_image_text", template.getImageText())
             .addValue("v_template_doc_text", template.getPropText());
-        Map<String, Object> out = logSqlExecution(procSetTemplate, in);
-        template.setId((String) (out.get("v_template_id")));
-        template.setBpmnUserid((String) (out.get("v_template_bpmn_user_id")));
-        template.setBpmnId((String) (out.get("v_template_bpmn_id")));
-        template.setImageId((String) (out.get("v_template_image_id")));
-        template.setImageUserid((String) out.get("v_template_image_user_id"));
-        template.setPropId((String) (out.get("v_template_doc_id")));
-        template.setPropUserid((String) out.get("v_template_doc_user_id"));
+
+        // properties to setup the template is return from the logSqlExecution method
+        setTemplateBaseProp(template, logSqlExecution(procSetTemplate, in));
     }
 
     /**
@@ -349,20 +340,35 @@
         CldsTemplate template = new CldsTemplate();
         template.setName(templateName);
         SqlParameterSource in = new MapSqlParameterSource().addValue("v_template_name", templateName);
+
         Map<String, Object> out = logSqlExecution(procGetTemplate, in);
-        template.setId((String) (out.get("v_template_id")));
-        template.setBpmnUserid((String) (out.get("v_template_bpmn_user_id")));
-        template.setBpmnId((String) (out.get("v_template_bpmn_id")));
-        template.setBpmnText((String) (out.get("v_template_bpmn_text")));
-        template.setImageId((String) (out.get("v_template_image_id")));
-        template.setImageUserid((String) out.get("v_template_image_user_id"));
-        template.setImageText((String) out.get("v_template_image_text"));
-        template.setPropId((String) (out.get("v_template_doc_id")));
-        template.setPropUserid((String) out.get("v_template_doc_user_id"));
+        setTemplateBaseProp(template, out);
+
+        // additional template setting's
         template.setPropText((String) out.get("v_template_doc_text"));
+        template.setBpmnText((String) out.get("v_template_bpmn_text"));
+        template.setImageText((String) out.get("v_template_image_text"));
         return template;
     }
 
+    /**
+     * Helper method to setup the base template properties
+     *
+     * @param template
+     *  the template
+     * @param prop
+     *  collection with the properties
+     */
+    private void setTemplateBaseProp(CldsTemplate template, Map prop) {
+        template.setId((String) prop.get("v_template_id"));
+        template.setBpmnUserid((String) prop.get("v_template_bpmn_user_id"));
+        template.setBpmnId((String) prop.get("v_template_bpmn_id"));
+        template.setImageId((String) prop.get("v_template_image_id"));
+        template.setImageUserid((String) prop.get("v_template_image_user_id"));
+        template.setPropId((String) prop.get("v_template_doc_id"));
+        template.setPropUserid((String) prop.get("v_template_doc_user_id"));
+    }
+
     private static Map<String, Object> logSqlExecution(SimpleJdbcCall call, SqlParameterSource source) {
         try {
             return call.execute(source);
@@ -452,22 +458,35 @@
     private void populateModelProperties(CldsModel model, Map out) {
         model.setControlNamePrefix((String) out.get(V_CONTROL_NAME_PREFIX));
         model.setControlNameUuid((String) out.get(V_CONTROL_NAME_UUID));
-        model.setId((String) (out.get("v_model_id")));
-        model.setTemplateId((String) (out.get("v_template_id")));
+        model.setId((String) out.get("v_model_id"));
+        model.setTemplateId((String) out.get("v_template_id"));
         model.setTemplateName((String) (out.get("v_template_name")));
         model.setBpmnText((String) out.get("v_template_bpmn_text"));
         model.setPropText((String) out.get("v_model_prop_text"));
         model.setImageText((String) out.get("v_template_image_text"));
         model.setDocText((String) out.get("v_template_doc_text"));
         model.setBlueprintText((String) out.get("v_model_blueprint_text"));
-        model.getEvent().setId((String) (out.get("v_event_id")));
-        model.getEvent().setActionCd((String) out.get("v_action_cd"));
-        model.getEvent().setActionStateCd((String) out.get("v_action_state_cd"));
-        model.getEvent().setProcessInstanceId((String) out.get("v_event_process_instance_id"));
-        model.getEvent().setUserid((String) out.get("v_event_user_id"));
         model.setTypeId((String) out.get("v_service_type_id"));
         model.setDeploymentId((String) out.get("v_deployment_id"));
         model.setDeploymentStatusUrl((String) out.get("v_deployment_status_url"));
+
+        setEventProp(model.getEvent(), out);
+    }
+
+    /**
+     * Helper method to setup the event prop to the CldsEvent class
+     *
+     * @param event
+     *  the clds event
+     * @param prop
+     *  collection with the configuration
+     */
+    private void setEventProp(CldsEvent event, Map prop) {
+        event.setId((String) prop.get("v_event_id"));
+        event.setActionCd((String) prop.get("v_action_cd"));
+        event.setActionStateCd((String) prop.get("v_action_state_cd"));
+        event.setProcessInstanceId((String) prop.get("v_event_process_instance_id"));
+        event.setUserid((String) prop.get("v_event_user_id"));
     }
 
     /**
@@ -507,14 +526,14 @@
         SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
         List<CldsToscaModel> cldsToscaModels = new ArrayList<>();
 
-        String toscaModelSql = new StringBuilder("SELECT tm.tosca_model_name, tm.tosca_model_id, tm.policy_type, " +
-                "tmr.tosca_model_revision_id, tmr.tosca_model_json, tmr.version, tmr.user_id, tmr.createdTimestamp, " +
-                "tmr.lastUpdatedTimestamp")
-                .append(toscaModelName != null ? (", tmr.tosca_model_yaml") : "")
+        String toscaModelSql = new StringBuilder("SELECT tm.tosca_model_name, tm.tosca_model_id, tm.policy_type, "
+                + "tmr.tosca_model_revision_id, tmr.tosca_model_json, tmr.version, tmr.user_id, tmr.createdTimestamp,"
+                + "tmr.lastUpdatedTimestamp").append(toscaModelName != null ? (", tmr.tosca_model_yaml") : "")
                 .append(" FROM tosca_model tm, tosca_model_revision tmr WHERE tm.tosca_model_id = tmr.tosca_model_id")
                 .append(toscaModelName != null ? (" AND tm.tosca_model_name = '" + toscaModelName + "'") : "")
                 .append(policyType != null ? (" AND tm.policy_type = '" + policyType + "'") : "")
-                .append(" AND tmr.version = (select max(version) from tosca_model_revision st where tmr.tosca_model_id=st.tosca_model_id)")
+                .append(" AND tmr.version = (select max(version) from tosca_model_revision st where tmr.tosca_model_id"
+                + "=st.tosca_model_id)")
                 .toString();
 
         List<Map<String, Object>> rows = jdbcTemplateObject.queryForList(toscaModelSql);
@@ -555,7 +574,7 @@
             .addValue("v_tosca_model_yaml", cldsToscaModel.getToscaModelYaml())
             .addValue("v_tosca_model_json", cldsToscaModel.getToscaModelJson()).addValue("v_user_id", userId);
         Map<String, Object> out = logSqlExecution(procInsertNewToscaModelVersion, in);
-        cldsToscaModel.setRevisionId((String) (out.get("v_revision_id")));
+        cldsToscaModel.setRevisionId((String) out.get("v_revision_id"));
         return cldsToscaModel;
     }
 
@@ -593,7 +612,7 @@
             .addValue("v_dictionary_name", cldsDictionary.getDictionaryName())
             .addValue("v_user_id", cldsDictionary.getCreatedBy());
         Map<String, Object> out = logSqlExecution(procInsertDictionary, in);
-        cldsDictionary.setDictionaryId((String) (out.get("v_dictionary_id")));
+        cldsDictionary.setDictionaryId((String) out.get("v_dictionary_id"));
     }
 
     /**
@@ -633,7 +652,7 @@
         String whereFilter = " WHERE ";
         if (dictionaryName != null) {
             whereFilter += "dictionary_name = '" + dictionaryName + "'";
-            if (dictionaryId != null){
+            if (dictionaryId != null) {
                 whereFilter += " AND dictionary_id = '" + dictionaryId + "'";
             }
         } else if (dictionaryId != null) {
@@ -641,8 +660,8 @@
         } else {
             whereFilter = "";
         }
-        String dictionarySql = new StringBuilder("SELECT dictionary_id, dictionary_name, created_by, " +
-                "modified_by, timestamp FROM dictionary")
+        String dictionarySql = new StringBuilder("SELECT dictionary_id, dictionary_name, created_by, "
+                + "modified_by, timestamp FROM dictionary")
                 .append(whereFilter).toString();
 
         List<Map<String, Object>> rows = jdbcTemplateObject.queryForList(dictionarySql);
@@ -677,7 +696,7 @@
             .addValue("v_dict_element_description", cldsDictionaryItem.getDictElementDesc())
             .addValue("v_dict_element_type", cldsDictionaryItem.getDictElementType()).addValue("v_user_id", userId);
         Map<String, Object> out = logSqlExecution(procInsertDictionaryElement, in);
-        cldsDictionaryItem.setDictElementId((String) (out.get("v_dict_element_id")));
+        cldsDictionaryItem.setDictElementId((String) out.get("v_dict_element_id"));
     }
 
     /**
diff --git a/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java b/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
index f058a9e..586899a 100644
--- a/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
+++ b/src/main/java/org/onap/clamp/clds/filter/ClampCadiFilter.java
@@ -20,6 +20,7 @@
  * ===================================================================
  *
  */
+
 package org.onap.clamp.clds.filter;
 
 import com.att.eelf.configuration.EELFLogger;
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java b/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java
index 8f66204..8f34083 100644
--- a/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java
@@ -73,7 +73,7 @@
      * @param name The template name to retrieve
      * @param okIfNotFound 
      *     The flag indicating whether exception will be returned in case nothing is found
-     * @return
+     * @return Clds template from DB
      */
     public static CldsTemplate retrieve(CldsDao cldsDao, String name, boolean okIfNotFound) {
         // get from db
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java
index a4ee734..4ee1deb 100644
--- a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java
@@ -27,8 +27,7 @@
 import java.util.List;
 
 /**
- * Represents a CLDS Tosca model
- *
+ * Represents a CLDS Tosca model.
  */
 public class CldsToscaModelDetails {
 
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java
index 68cd496..b9a7e0d 100644
--- a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java
@@ -22,8 +22,7 @@
  */
 
 /**
- * Represents a CLDS Tosca model revision
- *
+ * Represents a CLDS Tosca model revision.
  */
 
 package org.onap.clamp.clds.model;
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 a880893..9b7f85d 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
@@ -279,8 +279,8 @@
     /**
      * Replace all '-' with '_' within policy scope and name.
      *
-     * @param inName
-     * @return
+     * @param inName policy scope and name
+     * @return policy scope and name with "-" replaced with "_"
      */
     private String normalizePolicyScopeName(String inName) {
         return inName.replaceAll("-", "_");
@@ -359,6 +359,12 @@
         return global;
     }
 
+    /**
+     * Registers model element.
+     *
+     * @param modelElementClass model element class
+     * @param type model element type
+     */
     public static final synchronized void registerModelElement(Class<? extends AbstractModelElement> modelElementClass,
         String type) {
         if (!modelElementClasses.containsKey(modelElementClass.getClass())) {
diff --git a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java
index 6d766be..1855468 100644
--- a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java
+++ b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java
@@ -83,10 +83,10 @@
     private String guardActiveEnd;
 
     /**
-     * Parse Policy given json node.
+     * Parse Policy given JSON node.
      *
-     * @param item
-     * @throws IOException
+     * @param item policy in JSON format
+     * @throws IOException IO exception
      */
     public PolicyItem(JsonElement item) throws IOException {
         id = JsonUtils.getStringValueByName(item, "_id");
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java
index 2474da0..515e77d 100644
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java
+++ b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResource.java
@@ -126,31 +126,38 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         SdcResource other = (SdcResource) obj;
         if (resourceInstanceName == null) {
-            if (other.resourceInstanceName != null)
+            if (other.resourceInstanceName != null) {
                 return false;
-        } else if (!resourceInstanceName.equals(other.resourceInstanceName))
+            }
+        } else if (!resourceInstanceName.equals(other.resourceInstanceName)) {
             return false;
+        }
         if (resourceVersion == null) {
-            if (other.resourceVersion != null)
+            if (other.resourceVersion != null) {
                 return false;
-        } else if (!resourceVersion.equals(other.resourceVersion))
+            }
+        } else if (!resourceVersion.equals(other.resourceVersion)) {
             return false;
+        }
         return true;
     }
 
     /**
-     * Convert version String into a BigDecimal
+     * Convert version String into a BigDecimal.
      *
-     * @param versionText
-     * @return
+     * @param versionText version
+     * @return version in BigDecimal
      */
     private BigDecimal convertVersion(String versionText) {
         BigDecimal rtn = BigDecimal.valueOf(0.0);
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java
index e853621..47192a5 100644
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java
+++ b/src/main/java/org/onap/clamp/clds/model/sdc/SdcResourceBasicInfo.java
@@ -71,31 +71,38 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         SdcResourceBasicInfo other = (SdcResourceBasicInfo) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         if (version == null) {
-            if (other.version != null)
+            if (other.version != null) {
                 return false;
-        } else if (!version.equals(other.version))
+            }
+        } else if (!version.equals(other.version)) {
             return false;
+        }
         return true;
     }
 
     /**
-     * Convert version String into a BigDecimal
+     * Convert version String into a BigDecimal.
      *
-     * @param version
-     * @return
+     * @param version version
+     * @return version in BigDecimal
      */
     private BigDecimal convertVersion(String version) {
         BigDecimal rtn = BigDecimal.valueOf(0.0);
diff --git a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java b/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java
index a9c1e64..bb9f3f8 100644
--- a/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java
+++ b/src/main/java/org/onap/clamp/clds/model/sdc/SdcServiceInfo.java
@@ -146,31 +146,38 @@
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
+        if (this == obj) {
             return true;
-        if (obj == null)
+        }
+        if (obj == null) {
             return false;
-        if (getClass() != obj.getClass())
+        }
+        if (getClass() != obj.getClass()) {
             return false;
+        }
         SdcServiceInfo other = (SdcServiceInfo) obj;
         if (name == null) {
-            if (other.name != null)
+            if (other.name != null) {
                 return false;
-        } else if (!name.equals(other.name))
+            }
+        } else if (!name.equals(other.name)) {
             return false;
+        }
         if (version == null) {
-            if (other.version != null)
+            if (other.version != null) {
                 return false;
-        } else if (!version.equals(other.version))
+            }
+        } else if (!version.equals(other.version)) {
             return false;
+        }
         return true;
     }
 
     /**
-     * Convert version String into a BigDecimal
+     * Convert version String into a BigDecimal.
      *
-     * @param versionText
-     * @return
+     * @param versionText version
+     * @return version in BigDecimal
      */
     private BigDecimal convertVersion(String versionText) {
         try {
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintArtifact.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintArtifact.java
index 6c7bfbb..35bc909 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintArtifact.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintArtifact.java
@@ -20,15 +20,15 @@
  * ===================================================================
  * 
  */
-/**
- * This class is useful to store the information concerning
- * blueprint artifact extracted from SDC CSAR
- */
 
 package org.onap.clamp.clds.sdc.controller.installer;
 
 import org.onap.sdc.api.notification.IResourceInstance;
 
+/**
+ * This class is useful to store the information concerning
+ * blueprint artifact extracted from SDC CSAR.
+ */
 public class BlueprintArtifact {
 
     private String dcaeBlueprint;
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java
index 5a8ccca..5dcffd6 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/BlueprintParser.java
@@ -21,6 +21,7 @@
  * ===================================================================
  *
  */
+
 package org.onap.clamp.clds.sdc.controller.installer;
 
 import com.google.gson.Gson;
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
index 65d5592..5a21a1f 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java
@@ -75,10 +75,10 @@
     public static final String DATA_DEFINITION_NAME_SUFFIX = "Definitions/data.yml";
     public static final String DATA_DEFINITION_KEY = "data_types:";
 
-    public CsarHandler(INotificationData iNotif, String controller, String clampCsarPath) throws CsarHandlerException {
-        this.sdcNotification = iNotif;
+    public CsarHandler(INotificationData data, String controller, String clampCsarPath) throws CsarHandlerException {
+        this.sdcNotification = data;
         this.controllerName = controller;
-        this.artifactElement = searchForUniqueCsar(iNotif);
+        this.artifactElement = searchForUniqueCsar(data);
         this.csarFilePath = buildFilePathForCsar(artifactElement, clampCsarPath);
     }
 
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/MicroService.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/MicroService.java
index a785f41..ac4daef 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/MicroService.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/MicroService.java
@@ -21,6 +21,7 @@
  * ===================================================================
  *
  */
+
 package org.onap.clamp.clds.sdc.controller.installer;
 
 import java.util.Objects;
@@ -58,8 +59,9 @@
 
     @Override
     public String toString() {
-        return "MicroService{" + "name='" + name + '\'' + ", modelType='" + modelType + '\'' + ", inputFrom='" + inputFrom + '\'' + ", mappedNameJpa='"
-            + mappedNameJpa + '\'' + ", blueprintName='" + blueprintName + '\'' + '}';
+        return "MicroService{" + "name='" + name + '\'' + ", modelType='" + modelType + '\'' + ", inputFrom='"
+                + inputFrom + '\'' + ", mappedNameJpa='" + mappedNameJpa + '\'' + ", blueprintName='"
+                + blueprintName + '\'' + '}';
     }
 
     public String getMappedNameJpa() {
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 2a89b19..bf7c502 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -32,18 +32,15 @@
 import com.google.gson.reflect.TypeToken;
 import java.io.IOException;
 import java.lang.reflect.Type;
-import java.security.GeneralSecurityException;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.BadRequestException;
-import javax.ws.rs.NotAuthorizedException;
 import javax.xml.transform.TransformerException;
 
 import org.apache.camel.Produce;
-import org.apache.commons.codec.DecoderException;
 import org.json.simple.parser.ParseException;
 import org.onap.clamp.clds.camel.CamelProxy;
 import org.onap.clamp.clds.client.DcaeDispatcherServices;
diff --git a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
index 16a817e..ea4e097 100644
--- a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
+++ b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
@@ -40,7 +40,7 @@
 
 /**
  * Tosca Model Yaml parser and convertor to JSON Schema consumable for JSON
- * Editor
+ * Editor.
  *
  */
 public class ToscaYamlToJsonConvertor {
@@ -68,6 +68,8 @@
     }
 
     /**
+     * Returns the CldsDao.
+     *
      * @return the cldsDao
      */
     public CldsDao getCldsDao() {
@@ -75,13 +77,20 @@
     }
 
     /**
-     * @param cldsDao
-     *        the cldsDao to set
+     * Sets the CldsDao.
+     *
+     * @param cldsDao the cldsDao to set
      */
     public void setCldsDao(CldsDao cldsDao) {
         this.cldsDao = cldsDao;
     }
 
+    /**
+     * Parses Tosca YAML string.
+     *
+     * @param yamlString YAML string
+     * @return JSON string
+     */
     public String parseToscaYaml(String yamlString) {
 
         Yaml yaml = new Yaml();
@@ -91,7 +100,6 @@
         }
         LinkedHashMap<String, Object> nodeTypes = new LinkedHashMap<>();
         LinkedHashMap<String, Object> dataNodes = new LinkedHashMap<>();
-        JSONObject jsonEditorObject = new JSONObject();
         JSONObject jsonParentObject = new JSONObject();
         JSONObject jsonTempObject = new JSONObject();
         parseNodeAndDataType(loadedYaml, nodeTypes, dataNodes);
@@ -99,6 +107,7 @@
         if (jsonTempObject.length() > 0) {
             jsonParentObject = jsonTempObject;
         }
+        JSONObject jsonEditorObject = new JSONObject();
         jsonEditorObject.put(JsonEditorSchemaConstants.SCHEMA, jsonParentObject);
         return jsonEditorObject.toString();
     }
@@ -138,8 +147,8 @@
                                     boolean isListNode = false;
                                     parseDescription((LinkedHashMap<String, Object>) ntPropertiesElement.getValue(),
                                         jsonParentObject);
-                                    LinkedHashMap<String, Object> parentPropertiesMap = (LinkedHashMap<String, Object>) ntPropertiesElement
-                                        .getValue();
+                                    LinkedHashMap<String, Object> parentPropertiesMap =
+                                            (LinkedHashMap<String, Object>) ntPropertiesElement.getValue();
                                     if (parentPropertiesMap.containsKey(ToscaSchemaConstants.TYPE)
                                         && ((String) parentPropertiesMap.get(ToscaSchemaConstants.TYPE))
                                             .contains(ToscaSchemaConstants.TYPE_MAP)
diff --git a/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java b/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
index a8f233e..85b3f5c 100644
--- a/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
+++ b/src/main/java/org/onap/clamp/clds/transform/XslTransformer.java
@@ -45,6 +45,12 @@
 
     private Templates templates;
 
+    /**
+     * Sets Xsl Resource name.
+     *
+     * @param xslResourceName xsl resource name
+     * @throws TransformerConfigurationException exception if there is configuration error
+     */
     public void setXslResourceName(String xslResourceName) throws TransformerConfigurationException {
         TransformerFactory tfactory = new TransformerFactoryImpl();
         tfactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
@@ -55,8 +61,8 @@
     /**
      * Given xml input, return the transformed result.
      *
-     * @param xml
-     * @throws TransformerException
+     * @param xml xml string
+     * @throws TransformerException exception during transformation
      */
     public String doXslTransformToString(String xml) throws TransformerException {
         StringWriter output = new StringWriter(4096);
diff --git a/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java b/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java
index 0633009..fd7a9a0 100644
--- a/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java
+++ b/src/main/java/org/onap/clamp/clds/util/ClampVersioning.java
@@ -43,6 +43,11 @@
     private ClampVersioning() {
     }
 
+    /**
+     * Returns Clds version from properties.
+     *
+     * @return Clds version from properties
+     */
     public static String getCldsVersionFromProps() {
         String cldsVersion = "";
         Properties props = new Properties();
@@ -50,7 +55,7 @@
             props.load(resourceStream);
             cldsVersion = props.getProperty(CLDS_VERSION_PROPERTY);
         } catch (Exception ex) {
-            LOGGER.error("Exception caught during the "+CLDS_VERSION_PROPERTY+" property reading", ex);
+            LOGGER.error("Exception caught during the " + CLDS_VERSION_PROPERTY + " property reading", ex);
         }
         return cldsVersion;
     }
diff --git a/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java b/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java
index 07c4147..f08bf7b 100644
--- a/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java
+++ b/src/main/java/org/onap/clamp/clds/util/CryptoUtils.java
@@ -153,7 +153,7 @@
     }
 
     /**
-     * Reads SecretKeySpec from file specified by propertiesFileName
+     * Reads SecretKeySpec from file specified by propertiesFileName.
      *
      * @param propertiesFileName
      *            File name with properties
@@ -162,15 +162,15 @@
     private static SecretKeySpec readSecretKeySpec(String propertiesFileName) {
         Properties props = new Properties();
         try {
-        	//Workaround fix to make encryption key configurable.
-        	//System environment variable takes precedence for over clds/key.properties
-        	String encryptionKey = System.getenv(AES_ENCRYPTION_KEY);
-        	if(encryptionKey != null && encryptionKey.trim().length() > 0) {
-        		return getSecretKeySpec(encryptionKey);
-        	} else {
-        		props.load(ResourceFileUtil.getResourceAsStream(propertiesFileName));
+            //Workaround fix to make encryption key configurable
+            // System environment variable takes precedence for over clds/key.properties
+            String encryptionKey = System.getenv(AES_ENCRYPTION_KEY);
+            if(encryptionKey != null && encryptionKey.trim().length() > 0) {
+                return getSecretKeySpec(encryptionKey);
+            } else {
+                props.load(ResourceFileUtil.getResourceAsStream(propertiesFileName));
                 return getSecretKeySpec(props.getProperty(KEY_PARAM));
-        	}
+            }
         } catch (IOException | DecoderException e) {
             logger.error("Exception occurred during the key reading", e);
             return null;
diff --git a/src/main/java/org/onap/clamp/clds/util/LogMessages.java b/src/main/java/org/onap/clamp/clds/util/LogMessages.java
index eaa1b2a..7f4c878 100644
--- a/src/main/java/org/onap/clamp/clds/util/LogMessages.java
+++ b/src/main/java/org/onap/clamp/clds/util/LogMessages.java
@@ -27,7 +27,8 @@
 import com.att.eelf.i18n.EELFResourceManager;
 
 public enum LogMessages implements EELFResolvableErrorEnum {
-    LOGSERVICE_HELLO_MESSAGE, LOGSERVICE_EMAIL_ERROR, LOGSERVICE_EMAIL_CLASS, LOGSERVICE_EMAIL_CLASS_NULL, PROCESS_INSTANCE_ID;
+    LOGSERVICE_HELLO_MESSAGE, LOGSERVICE_EMAIL_ERROR, LOGSERVICE_EMAIL_CLASS, LOGSERVICE_EMAIL_CLASS_NULL,
+    PROCESS_INSTANCE_ID;
 
     static {
         EELFResourceManager.loadMessageBundle("logmessages");
diff --git a/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java b/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java
index 47b4f9a..08bb976 100644
--- a/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java
+++ b/src/main/java/org/onap/clamp/clds/util/LoggingUtils.java
@@ -60,14 +60,15 @@
     private static final String EMPTY_MESSAGE = "";
 
     /** Logger delegate. */
-    private EELFLogger mLogger;
+    private EELFLogger mlogger;
     /** Automatic UUID, overrideable per adapter or per invocation. */
     private static UUID sInstanceUUID = UUID.randomUUID();
+
     /**
-     * Constructor
+     * Constructor.
      */
     public LoggingUtils(final EELFLogger loggerP) {
-        this.mLogger = checkNotNull(loggerP);
+        this.mlogger = checkNotNull(loggerP);
     }
 
     /**
@@ -173,20 +174,21 @@
     /**
      * Report <tt>ENTERING</tt> marker.
      *
-     * @param request non-null incoming request (wrapper).
-     * @return this.
+     * @param request non-null incoming request (wrapper)
+     * @param serviceName service name
      */
     public void entering(HttpServletRequest request, String serviceName) {
         MDC.clear();
         checkNotNull(request);
         // Extract MDC values from standard HTTP headers.
-        final String requestID = defaultToUUID(request.getHeader(ONAPLogConstants.Headers.REQUEST_ID));
-        final String invocationID = defaultToUUID(request.getHeader(ONAPLogConstants.Headers.INVOCATION_ID));
+        final String requestId = defaultToUUID(request.getHeader(ONAPLogConstants.Headers.REQUEST_ID));
+        final String invocationId = defaultToUUID(request.getHeader(ONAPLogConstants.Headers.INVOCATION_ID));
         final String partnerName = defaultToEmpty(request.getHeader(ONAPLogConstants.Headers.PARTNER_NAME));
 
         // Default the partner name to the user name used to login to clamp
         if (partnerName.equalsIgnoreCase(EMPTY_MESSAGE)) {
-            MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME, new DefaultUserNameHandler().retrieveUserName(SecurityContextHolder.getContext()));
+            MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME, new DefaultUserNameHandler()
+                    .retrieveUserName(SecurityContextHolder.getContext()));
         }
 
         // Set standard MDCs. Override this entire method if you want to set
@@ -196,28 +198,31 @@
         MDC.put(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP,
             ZonedDateTime.now(ZoneOffset.UTC)
             .format(DateTimeFormatter.ISO_INSTANT));
-        MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, requestID);
-        MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationID);
+        MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, requestId);
+        MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, invocationId);
         MDC.put(ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS, defaultToEmpty(request.getRemoteAddr()));
         MDC.put(ONAPLogConstants.MDCs.SERVER_FQDN, defaultToEmpty(request.getServerName()));
         MDC.put(ONAPLogConstants.MDCs.INSTANCE_UUID, defaultToEmpty(sInstanceUUID));
 
         // Default the service name to the requestURI, in the event that
         // no value has been provided.
-        if (serviceName == null ||
-            serviceName.equalsIgnoreCase(EMPTY_MESSAGE)) {
+        if (serviceName == null
+                || serviceName.equalsIgnoreCase(EMPTY_MESSAGE)) {
             MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI());
         } else {
             MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, serviceName);
         }
 
-        this.mLogger.info(ONAPLogConstants.Markers.ENTRY);
+        this.mlogger.info(ONAPLogConstants.Markers.ENTRY);
     }
 
     /**
      * Report <tt>EXITING</tt> marker.
      *
-     * @return this.
+     * @param code response code
+     * @param descrption response description
+     * @param severity response severity
+     * @param status response status code
      */
     public void exiting(String code, String descrption, Level severity, ONAPLogConstants.ResponseStatus status) {
         try {
@@ -225,7 +230,7 @@
             MDC.put(ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION, defaultToEmpty(descrption));
             MDC.put(ONAPLogConstants.MDCs.RESPONSE_SEVERITY, defaultToEmpty(severity));
             MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, defaultToEmpty(status));
-            this.mLogger.info(ONAPLogConstants.Markers.EXIT);
+            this.mlogger.info(ONAPLogConstants.Markers.EXIT);
         }
         finally {
             MDC.clear();
@@ -236,28 +241,29 @@
      * Report pending invocation with <tt>INVOKE</tt> marker,
      * setting standard ONAP logging headers automatically.
      *
-     * @param builder request builder, for setting headers.
-     * @param sync whether synchronous, nullable.
-     * @return invocation ID to be passed with invocation.
+     * @param con http URL connection
+     * @param targetEntity target entity
+     * @param targetServiceName target service name
+     * @return invocation ID to be passed with invocation
      */
     public HttpURLConnection invoke(final HttpURLConnection con, String targetEntity, String targetServiceName) {
-        final String invocationID = UUID.randomUUID().toString();
+        final String invocationId = UUID.randomUUID().toString();
 
         // Set standard HTTP headers on (southbound request) builder.
         con.setRequestProperty(ONAPLogConstants.Headers.REQUEST_ID,
             defaultToEmpty(MDC.get(ONAPLogConstants.MDCs.REQUEST_ID)));
         con.setRequestProperty(ONAPLogConstants.Headers.INVOCATION_ID,
-            invocationID);
+            invocationId);
         con.setRequestProperty(ONAPLogConstants.Headers.PARTNER_NAME,
             defaultToEmpty(MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME)));
 
-        invokeContext(targetEntity, targetServiceName, invocationID);
+        invokeContext(targetEntity, targetServiceName, invocationId);
 
         // Log INVOKE*, with the invocationID as the message body.
         // (We didn't really want this kind of behavior in the standard,
         // but is it worse than new, single-message MDC?)
-        this.mLogger.info(ONAPLogConstants.Markers.INVOKE);
-        this.mLogger.info(ONAPLogConstants.Markers.INVOKE_SYNC + "{"+ invocationID +"}");
+        this.mlogger.info(ONAPLogConstants.Markers.INVOKE);
+        this.mlogger.info(ONAPLogConstants.Markers.INVOKE_SYNC + "{" + invocationId + "}");
         return con;
     }
 
@@ -265,43 +271,47 @@
      * Report pending invocation with <tt>INVOKE</tt> marker,
      * setting standard ONAP logging headers automatically.
      *
-     * @param builder request builder, for setting headers.
-     * @param sync whether synchronous, nullable.
-     * @return invocation ID to be passed with invocation.
+     * @param con http URL connection
+     * @param targetEntity target entity
+     * @param targetServiceName target service name
+     * @return invocation ID to be passed with invocation
      */
     public HttpsURLConnection invokeHttps(final HttpsURLConnection con, String targetEntity, String targetServiceName) {
-        final String invocationID = UUID.randomUUID().toString();
+        final String invocationId = UUID.randomUUID().toString();
 
         // Set standard HTTP headers on (southbound request) builder.
         con.setRequestProperty(ONAPLogConstants.Headers.REQUEST_ID,
             defaultToEmpty(MDC.get(ONAPLogConstants.MDCs.REQUEST_ID)));
         con.setRequestProperty(ONAPLogConstants.Headers.INVOCATION_ID,
-            invocationID);
+            invocationId);
         con.setRequestProperty(ONAPLogConstants.Headers.PARTNER_NAME,
             defaultToEmpty(MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME)));
 
-        invokeContext(targetEntity, targetServiceName, invocationID);
+        invokeContext(targetEntity, targetServiceName, invocationId);
 
         // Log INVOKE*, with the invocationID as the message body.
         // (We didn't really want this kind of behavior in the standard,
         // but is it worse than new, single-message MDC?)
-        this.mLogger.info(ONAPLogConstants.Markers.INVOKE);
-        this.mLogger.info(ONAPLogConstants.Markers.INVOKE_SYNC + "{"+ invocationID +"}");
+        this.mlogger.info(ONAPLogConstants.Markers.INVOKE);
+        this.mlogger.info(ONAPLogConstants.Markers.INVOKE_SYNC + "{" + invocationId + "}");
         return con;
     }
 
+    /**
+     * Invokes return context.
+     */
     public void invokeReturn() {
         // Add the Invoke-return marker and clear the needed MDC
-        this.mLogger.info(ONAPLogConstants.Markers.INVOKE_RETURN);
+        this.mlogger.info(ONAPLogConstants.Markers.INVOKE_RETURN);
         invokeReturnContext();
     }
 
     /**
      * Dependency-free nullcheck.
      *
-     * @param in to be checked.
-     * @param <T> argument (and return) type.
-     * @return input arg.
+     * @param in to be checked
+     * @param <T> argument (and return) type
+     * @return input arg
      */
     private static <T> T checkNotNull(final T in) {
         if (in == null) {
@@ -313,8 +323,8 @@
     /**
      * Dependency-free string default.
      *
-     * @param in to be filtered.
-     * @return input string or null.
+     * @param in to be filtered
+     * @return input string or null
      */
     private static String defaultToEmpty(final Object in) {
         if (in == null) {
@@ -326,8 +336,8 @@
     /**
      * Dependency-free string default.
      *
-     * @param in to be filtered.
-     * @return input string or null.
+     * @param in to be filtered
+     * @return input string or null
      */
     private static String defaultToUUID(final String in) {
         if (in == null) {
@@ -337,13 +347,13 @@
     }
 
     /**
-     * Set target related logging variables in thread local data via MDC
+     * Set target related logging variables in thread local data via MDC.
      *
      * @param targetEntity Target entity (an external/sub component, for ex. "sdc")
      * @param targetServiceName Target service name (name of API invoked on target)
-     * @param invocationId The invocation ID
+     * @param invocationID The invocation ID
      */
-    private void invokeContext (String targetEntity, String targetServiceName, String invocationID) {
+    private void invokeContext(String targetEntity, String targetServiceName, String invocationID) {
         MDC.put(ONAPLogConstants.MDCs.TARGET_ENTITY, defaultToEmpty(targetEntity));
         MDC.put(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME, defaultToEmpty(targetServiceName));
         MDC.put(ONAPLogConstants.MDCs.INVOCATIONID_OUT, invocationID);
@@ -353,10 +363,9 @@
     }
 
     /**
-     * Clear target related logging variables in thread local data via MDC
-     *
+     * Clear target related logging variables in thread local data via MDC.
      */
-    private void invokeReturnContext () {
+    private void invokeReturnContext() {
         MDC.remove(ONAPLogConstants.MDCs.TARGET_ENTITY);
         MDC.remove(ONAPLogConstants.MDCs.TARGET_SERVICE_NAME);
         MDC.remove(ONAPLogConstants.MDCs.INVOCATIONID_OUT);
diff --git a/src/main/java/org/onap/clamp/clds/util/XmlTools.java b/src/main/java/org/onap/clamp/clds/util/XmlTools.java
index 391f008..a812fa1 100644
--- a/src/main/java/org/onap/clamp/clds/util/XmlTools.java
+++ b/src/main/java/org/onap/clamp/clds/util/XmlTools.java
@@ -37,6 +37,13 @@
 import org.w3c.dom.Document;
 
 public class XmlTools {
+
+    /**
+     * Transforms document to XML string.
+     *
+     * @param doc XML document
+     * @return XML string
+     */
     public static String exportXmlDocumentAsString(Document doc) {
         try {
             TransformerFactory tf = TransformerFactory.newInstance();
@@ -49,9 +56,15 @@
             throw new RuntimeException(e);
         }
     }
+
+    /**
+     * Creates empty svg document.
+     *
+     * @return Document
+     */
     public static Document createEmptySvgDocument() {
         DOMImplementation domImplementation = GenericDOMImplementation.getDOMImplementation();
-        String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
-        return domImplementation.createDocument(svgNS, SVGConstants.SVG_SVG_TAG, null);
+        String svgNs = SVGDOMImplementation.SVG_NAMESPACE_URI;
+        return domImplementation.createDocument(svgNs, SVGConstants.SVG_SVG_TAG, null);
     }
 }
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/AwtUtils.java b/src/main/java/org/onap/clamp/clds/util/drawing/AwtUtils.java
index e9e589e..1ece484 100755
--- a/src/main/java/org/onap/clamp/clds/util/drawing/AwtUtils.java
+++ b/src/main/java/org/onap/clamp/clds/util/drawing/AwtUtils.java
@@ -5,6 +5,8 @@
  * Copyright (C) 2019 Nokia. 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
@@ -39,6 +41,9 @@
     private static final String FONT_FACE = "SansSerif";
     private static final Color TRANSPARENT = new Color(0.0f, 0.0f, 0.0f, 0.0f);
 
+    private AwtUtils() {
+    }
+
     static void rectWithText(Graphics2D g2d, String text, Point point, int width, int height) {
         Rectangle rect = new Rectangle(point.x, point.y, width, height);
         g2d.draw(rect);
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraph.java b/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraph.java
index f49e735..46aa67b 100755
--- a/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraph.java
+++ b/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraph.java
@@ -34,8 +34,13 @@
         this.documentBuilder = documentBuilder;
     }
 
+    /**
+     * Returns svg string.
+     *
+     * @return svg string
+     */
     public String getAsSVG() {
-        if(Objects.isNull(svg) || svg.isEmpty()) {
+        if (Objects.isNull(svg) || svg.isEmpty()) {
             svg = XmlTools.exportXmlDocumentAsString(this.documentBuilder.getGroupingDocument());
         }
         return svg;
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraphBuilder.java b/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraphBuilder.java
index ef4c4e4..c4ced5e 100755
--- a/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraphBuilder.java
+++ b/src/main/java/org/onap/clamp/clds/util/drawing/ClampGraphBuilder.java
@@ -40,13 +40,13 @@
         this.painter = painter;
     }
 
-    public ClampGraphBuilder collector(String c) {
-        collector = c;
+    public ClampGraphBuilder collector(String collector) {
+        this.collector = collector;
         return this;
     }
 
-    public ClampGraphBuilder policy(String p) {
-        policy = p;
+    public ClampGraphBuilder policy(String policy) {
+        this.policy = policy;
         return this;
     }
 
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java b/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java
index 4d76581..ce21c4c 100644
--- a/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java
+++ b/src/main/java/org/onap/clamp/clds/util/drawing/ImageBuilder.java
@@ -57,9 +57,9 @@
 
     ImageBuilder rectangle(String dataElementId, RectTypes rectType, String text) {
         Point next = new Point(currentPoint.x + baseLength, currentPoint.y);
-        Point p = coordinatesForRectangle(currentPoint, next);
+        Point point = coordinatesForRectangle(currentPoint, next);
 
-        handleBasedOnRectType(rectType, text, p, baseLength, rectHeight);
+        handleBasedOnRectType(rectType, text, point, baseLength, rectHeight);
 
         documentBuilder.pushChangestoDocument(g2d, dataElementId);
         currentPoint = next;
@@ -94,36 +94,37 @@
         return documentBuilder;
     }
 
-    private void handleBasedOnRectType(RectTypes rectType, String text, Point p, int w, int h) {
-        AwtUtils.rectWithText(g2d, text, p, w, h);
+    private void handleBasedOnRectType(RectTypes rectType, String text, Point point, int width, int height) {
+        AwtUtils.rectWithText(g2d, text, point, width, height);
         switch (rectType) {
             case COLECTOR:
-                drawVerticalLineForCollector(p, w, h);
+                drawVerticalLineForCollector(point, width, height);
                 break;
             case MICROSERVICE:
-                drawHorizontalLineForMicroService(p, w, h);
+                drawHorizontalLineForMicroService(point, width, height);
                 break;
             case POLICY:
-                drawDiagonalLineForPolicy(p, w, h);
+                drawDiagonalLineForPolicy(point, width, height);
                 break;
         }
     }
 
-    private void drawVerticalLineForCollector(Point p, int w, int h) {
-        g2d.drawLine(p.x + w / COLLECTOR_LINE_RATIO, p.y, p.x + w / COLLECTOR_LINE_RATIO, p.y + h);
+    private void drawVerticalLineForCollector(Point point, int width, int height) {
+        g2d.drawLine(point.x + width / COLLECTOR_LINE_RATIO, point.y, point.x + width / COLLECTOR_LINE_RATIO,
+                     point.y + height);
     }
 
-    private void drawHorizontalLineForMicroService(Point p, int w, int h) {
-        int y = calculateMsHorizontalLineYCoordinate(p,h);
-        g2d.drawLine(p.x, y, p.x + w, y);
+    private void drawHorizontalLineForMicroService(Point point, int width, int height) {
+        int y = calculateMsHorizontalLineYCoordinate(point,height);
+        g2d.drawLine(point.x, y, point.x + width, y);
     }
 
-    private void drawDiagonalLineForPolicy(Point p, int w, int h) {
-        g2d.drawLine(p.x, p.y + h / POLICY_LINE_RATIO, p.x + w / POLICY_LINE_RATIO, p.y);
+    private void drawDiagonalLineForPolicy(Point point, int width, int height) {
+        g2d.drawLine(point.x, point.y + height / POLICY_LINE_RATIO, point.x + width / POLICY_LINE_RATIO, point.y);
     }
 
-    private int calculateMsHorizontalLineYCoordinate(Point p, int h) {
-        return (int)(p.y * h * MS_LINE_TO_HEIGHT_RATIO);
+    private int calculateMsHorizontalLineYCoordinate(Point point, int height) {
+        return (int)(point.y * height * MS_LINE_TO_HEIGHT_RATIO);
     }
 
     private Point coordinatesForRectangle(Point from, Point next) {
diff --git a/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java b/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java
index 6263f30..fe2d5cb 100755
--- a/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java
+++ b/src/main/java/org/onap/clamp/clds/util/drawing/Painter.java
@@ -44,6 +44,12 @@
     private static final double RECT_RATIO = 3.0 / 2.0;
     private static final int CIRCLE_RADIUS = 17;
 
+    /**
+     * Constructor to create instance of Painter.
+     *
+     * @param svgGraphics2D svg graphics
+     * @param documentBuilder document builder
+     */
     public Painter(SVGGraphics2D svgGraphics2D, DocumentBuilder documentBuilder) {
         this.g2d = svgGraphics2D;
         this.documentBuilder = documentBuilder;
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html
index a53ad73..b7864ec 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/operational_policy_window.html
@@ -292,7 +292,8 @@
 						<div class="col-sm-8">
 							<select class="form-control" name="type" id="type"
 								ng-click="initTargetResourceId()" ng-model="type">
-								<option value="VFC">VFC</option>
+                						<option value="">-- choose an option --</option>                                                    
+								<option value="VFModule">VFModule</option>
 								<option value="VM">VM</option>
 								<option value="VNF">VNF</option>
 							</select>
@@ -305,7 +306,7 @@
 							<select class="form-control" name="resourceId" id="resourceId"
 								enableFilter="true" ng-click="changeTargetResourceId()"
 								ng-model="resourceId">
-								<option value=""></option>
+								<option value="">-- choose an option --</option>
 								<option value="Other:">Other:</option>
 							</select>
 						</div>
diff --git a/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js b/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js
index 4e8855e..2c3f83e 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/OperationalPolicyCtrl.js
@@ -228,7 +228,7 @@
 			$("#resourceId")
 					.append(
 							$('<option></option>').val("")
-									.html(""));
+									.html("-- choose an option --"));
 			$("#resourceId").append(
 					$('<option></option>').val("Other:")
 							.html("Other:"));
@@ -247,14 +247,14 @@
 				}
 
 			}
-			var resourceVfc = getResourceDetailsVfcProperty();
-			if (type == "VFC"
-					&& (null !== resourceVfc || undefined !== resourceVfc)) {
+			var resourceVFModule = getResourceDetailsVfModuleProperty();
+			if (type == "VFModule"
+					&& (null !== resourceVFModule || undefined !== resourceVFModule)) {
 				if (recipe == 'VF Module Create'
 						|| recipe == 'VF Module Delete') {
-					for ( var prop in resourceVfc) {
-						if (resourceVfc[prop]["isBase"] == false) {
-							var name = resourceVfc[prop]["name"];
+					for ( var prop in resourceVFModule) {
+						if (resourceVFModule[prop]["isBase"] == false) {
+							var name = resourceVFModule[prop]["name"];
 							$("#resourceId").append(
 									$('<option></option>')
 											.val(name)
@@ -264,8 +264,8 @@
 				} 
 		        else
 		        {
-		          for ( var prop in resourceVfc) {
-				     var name = resourceVfc[prop]["name"];
+		          for ( var prop in resourceVFModule) {
+				     var name = resourceVFModule[prop]["name"];
 		    	      $("#resourceId").append(
 		    		     $('<option></option>')
 		    			    .val(name).html(name));
@@ -280,29 +280,29 @@
 			$("#modelVersionId").val("");
 			$("#modelVersion").val("");
 			$("#modelCustomizationId").val("");
-			var resourceVfc = getResourceDetailsVfcProperty();
+			var resourceVFModule = getResourceDetailsVfModuleProperty();
 			var type = $("#type").val();
 			var recipe = $("#recipe").val();
 			vfBaseName = $(event.target).val();
-			if (type == "VFC"
-					&& (null !== resourceVfc || undefined !== resourceVfc)
+			if (type == "VFModule"
+					&& (null !== resourceVFModule || undefined !== resourceVFModule)
 					&& (recipe == 'VF Module Create' || recipe == 'VF Module Delete')) {
-				for ( var prop in resourceVfc) {
-					var name = resourceVfc[prop]["name"];
+				for ( var prop in resourceVFModule) {
+					var name = resourceVFModule[prop]["name"];
 					if (name == vfBaseName) {
-						var vfModuleModelName = resourceVfc[prop]["name"];
+						var vfModuleModelName = resourceVFModule[prop]["name"];
 						$("#modelName").val(
 								vfModuleModelName);
-						var vfModuleModelInvariantUUID = resourceVfc[prop]["invariantUUID"];
+						var vfModuleModelInvariantUUID = resourceVFModule[prop]["invariantUUID"];
 						$("#modelInvariantId").val(
 								vfModuleModelInvariantUUID);
-						var vfModuleModelUUID = resourceVfc[prop]["UUID"];
+						var vfModuleModelUUID = resourceVFModule[prop]["UUID"];
 						$("#modelVersionId").val(
 								vfModuleModelUUID);
-						var vfModuleModelVersion = resourceVfc[prop]["version"];
+						var vfModuleModelVersion = resourceVFModule[prop]["version"];
 						$("#modelVersion").val(
 								vfModuleModelVersion);
-						var vfModuleModelCustomizationUUID = resourceVfc[prop]["customizationUUID"];
+						var vfModuleModelCustomizationUUID = resourceVFModule[prop]["customizationUUID"];
 						$("#modelCustomizationId")
 								.val(
 										vfModuleModelCustomizationUUID);
diff --git a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js
index 916de67..3902cf4 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js
@@ -118,12 +118,12 @@
 	return cl_props["modelPropertiesJson"]["resourceDetails"]["VF"];
 }
 
-function getResourceDetailsVfcProperty() {
-	return cl_props["modelPropertiesJson"]["resourceDetails"]["VFC"];
+function getResourceDetailsVfModuleProperty() {
+	return cl_props["modelPropertiesJson"]["resourceDetails"]["VFModule"];
 }
 
 function getLoopLogsArray() {
 	return cl_props.loopLogs;
 }
 
-module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfcProperty };
\ No newline at end of file
+module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getLastUpdatedStatus,getDeploymentID,getDeploymentStatusURL,getResourceDetailsProperty,getResourceDetailsVfModuleProperty };
\ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java b/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java
index a15c556..58d9468 100644
--- a/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/AuthorizationControllerItCase.java
@@ -87,9 +87,9 @@
         PrincipalUtils.setSecurityContext(securityContext);
 
         AuthorizationController auth = new AuthorizationController();
-        assertTrue(auth.isUserPermittedNoException(new SecureServicePermission("permission-type-cl","dev","read")));
-        assertTrue(auth.isUserPermittedNoException(new SecureServicePermission("permission-type-cl-manage","dev","DEPLOY")));
-        assertTrue(auth.isUserPermittedNoException(new SecureServicePermission("permission-type-filter-vf","dev","12345-55555-55555-5555")));
-        assertFalse(auth.isUserPermittedNoException(new SecureServicePermission("permission-type-cl","test","read")));
+        assertTrue(auth.isUserPermitted(new SecureServicePermission("permission-type-cl","dev","read")));
+        assertTrue(auth.isUserPermitted(new SecureServicePermission("permission-type-cl-manage","dev","DEPLOY")));
+        assertTrue(auth.isUserPermitted(new SecureServicePermission("permission-type-filter-vf","dev","12345-55555-55555-5555")));
+        assertFalse(auth.isUserPermitted(new SecureServicePermission("permission-type-cl","test","read")));
     }
 }
