diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
index ea57409..0c2ce2f 100644
--- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
+++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java
@@ -189,11 +189,7 @@
 
         }
 
-        if (data.isPresent()) {
-            return true;
-        } else {
-            return false;
-        }
+        return data.isPresent();
     }
 
     protected void addArtifactVersion(String aName, String aVersion) {
@@ -289,14 +285,14 @@
 
 @Override
 public Future<RpcResult<VfLicenseModelUpdateOutput>> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) {
-    final String SVC_OPERATION = "vf-license-model-update";
+    final String svcOperation = "vf-license-model-update";
 
     Properties parms = new Properties();
 
-    LOG.info( SVC_OPERATION +" called." );
+    LOG.info( svcOperation +" called." );
 
     if(input == null ) {
-        LOG.debug("exiting " +SVC_OPERATION+ " because of invalid input");
+        LOG.debug("exiting " +svcOperation+ " because of invalid input");
         return null;
     }
 
@@ -313,7 +309,7 @@
         errorMessage = "Artifact version already exists";
     } else {
         // Translate input object into SLI-consumable properties
-        LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + inputVfLic);
+        LOG.info("Adding INPUT data for "+svcOperation+" input: " + inputVfLic);
         AsdcApiUtil.toProperties(parms, inputVfLic);
 
 
@@ -321,19 +317,19 @@
         Properties respProps = null;
         try
         {
-            if (asdcApiSliClient.hasGraph("ASDC-API", SVC_OPERATION , null, "sync"))
+            if (asdcApiSliClient.hasGraph("ASDC-API", svcOperation , null, "sync"))
             {
 
                 try
                 {
-                    respProps = asdcApiSliClient.execute("ASDC-API", SVC_OPERATION, null, "sync", parms);
+                    respProps = asdcApiSliClient.execute("ASDC-API", svcOperation, null, "sync", parms);
                 }
                 catch (Exception e)
                 {
-                    LOG.error("Caught exception executing service logic for "+ SVC_OPERATION, e);
+                    LOG.error("Caught exception executing service logic for "+ svcOperation, e);
                 }
             } else {
-                errorMessage = "No service logic active for ASDC-API: '" + SVC_OPERATION + "'";
+                errorMessage = "No service logic active for ASDC-API: '" + svcOperation + "'";
                 errorCode = "503";
             }
         }
diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
index 91482d8..40ebde6 100644
--- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
+++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java
@@ -100,15 +100,15 @@
 	@Override
 	public Future<RpcResult<DataChangeNotificationOutput>> dataChangeNotification(
 			DataChangeNotificationInput input) {
-		final String SVC_OPERATION = "data-change-notification";
+		final String svcOperation = "data-change-notification";
 
 		Properties parms = new Properties();
 		DataChangeNotificationOutputBuilder serviceDataBuilder = new DataChangeNotificationOutputBuilder();
 
-		LOG.info( SVC_OPERATION +" called." );
+		LOG.info( svcOperation +" called." );
 
 		if(input == null || input.getAaiEventId() == null) {
-			LOG.debug("exiting " +SVC_OPERATION+ " because of invalid input");
+			LOG.debug("exiting " +svcOperation+ " because of invalid input");
 			serviceDataBuilder.setDataChangeResponseCode("403");
 			RpcResult<DataChangeNotificationOutput> rpcResult =
 				RpcResultBuilder.<DataChangeNotificationOutput> status(true).withResult(serviceDataBuilder.build()).build();
@@ -116,26 +116,26 @@
 		}
 
 		// add input to parms
-		LOG.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input);
+		LOG.info("Adding INPUT data for "+svcOperation+" input: " + input);
 		DataChangeNotificationInputBuilder inputBuilder = new DataChangeNotificationInputBuilder(input);
 		MdsalHelper.toProperties(parms, inputBuilder.build());
 
 		// Call SLI sync method
 		try
 		{
-			if (dataChangeClient.hasGraph("DataChange", SVC_OPERATION , null, "sync"))
+			if (dataChangeClient.hasGraph("DataChange", svcOperation , null, "sync"))
 			{
 				try
 				{
-					dataChangeClient.execute("DataChange", SVC_OPERATION, null, "sync", serviceDataBuilder, parms);
+					dataChangeClient.execute("DataChange", svcOperation, null, "sync", serviceDataBuilder, parms);
 				}
 				catch (Exception e)
 				{
-					LOG.error("Caught exception executing service logic for "+ SVC_OPERATION, e);
+					LOG.error("Caught exception executing service logic for "+ svcOperation, e);
 					serviceDataBuilder.setDataChangeResponseCode("500");
 				}
 			} else {
-				LOG.error("No service logic active for DataChange: '" + SVC_OPERATION + "'");
+				LOG.error("No service logic active for DataChange: '" + svcOperation + "'");
 				serviceDataBuilder.setDataChangeResponseCode("503");
 			}
 		}
@@ -148,9 +148,9 @@
 		String errorCode = serviceDataBuilder.getDataChangeResponseCode();
 
 		if (!("0".equals(errorCode) || "200".equals(errorCode))) {
-			LOG.error("Returned FAILED for "+SVC_OPERATION+" error code: '" + errorCode + "'");
+			LOG.error("Returned FAILED for "+svcOperation+" error code: '" + errorCode + "'");
 		} else {
-			LOG.info("Returned SUCCESS for "+SVC_OPERATION+" ");
+			LOG.info("Returned SUCCESS for "+svcOperation+" ");
 		}
 
 		RpcResult<DataChangeNotificationOutput> rpcResult =
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
index b26c50f..6521559 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncARModel.java
@@ -43,8 +43,6 @@
 		addParameter("type", extractValue (nodeTemplate, "nf_type"));
 		addParameter("ecomp_generated_naming", extractBooleanValue (nodeTemplate, "nf_naming#ecomp_generated_naming"));
 		addParameter("naming_policy", extractValue (nodeTemplate, "nf_naming#naming_policy"));
-		//addParameter("depending_service", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_DEPENDINGSERVICE));
-		//addParameter("service_dependency", extractValue (sdcCsarHelper, nodeTemplate, SdcPropertyNames.PROPERTY_NAME_SERVICEDEPENDENCY));
 	}
 
 }
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
index 35e62f8..5041b4d 100644
--- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
+++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java
@@ -573,11 +573,10 @@
 			insertToscaData(serviceModel.getSql(model_yaml));
 		} catch (IOException e) {
 			LOG.error("Could not insert Tosca YAML data into the SERVICE_MODEL table ", e);
-			// return;
+    
 		}
 
 		// Ingest Network (VL) Data - 1707
-		//List<NodeTemplate> vlNodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VL");
 		List<NodeTemplate> vlNodeTemplatesList = sdcCsarHelper.getServiceVlList();
 
 		for (NodeTemplate nodeTemplate :  vlNodeTemplatesList) {
@@ -614,7 +613,6 @@
 		}
 
 		// Ingest Network (VF) Data - 1707
-		//List<NodeTemplate> nodeTemplatesList = sdcCsarHelper.getServiceNodeTemplatesByType("VF");
 		List<NodeTemplate> vfNodeTemplatesList = sdcCsarHelper.getServiceVfList();
 
 		for (NodeTemplate nodeTemplate :  vfNodeTemplatesList) {
@@ -642,7 +640,6 @@
 				}
 
 				// For each VF Module, get the VFC list, insert VF_MODULE_TO_VFC_MAPPING data
-				// List<NodeTemplate> groupMembers = sdcCsarHelper.getMembersOfGroup(group); - old version
 				// For each vfcNode (group member) in the groupMembers list, extract vm_type and vm_count.
 				// Insert vf_module.customizationUUID, vfcNode.customizationUUID and vm_type and vm_count into VF_MODULE_TO_VFC_MAPPING
 				List<NodeTemplate> groupMembers = sdcCsarHelper.getMembersOfVfModule(nodeTemplate, group); // not yet available
@@ -707,12 +704,11 @@
 
 					// extract values from the left "CP" Node
 					SdncBaseModel.addParameter("ipv4_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams);
-					//SdncBaseModel.addParameter("ipv4_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV4SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams);
+
 					SdncBaseModel.addParameter("ipv4_ip_version", "dummy_ipv4_vers", mappingParams);
 					SdncBaseModel.addParameter("ipv6_use_dhcp", SdncBaseModel.extractBooleanValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_DHCPENABLED), mappingParams);
-					//SdncBaseModel.addParameter("ipv6_ip_version", SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_NETWORKASSIGNMENTS_IPV6SUBNETDEFAULTASSIGNMENTS_IPVERSION), mappingParams);
+
 					SdncBaseModel.addParameter("ipv6_ip_version", "dummy_ipv6_vers", mappingParams);
-					//String extcp_subnetpool_id = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getLeft(), SdcPropertyNames.PROPERTY_NAME_SUBNETPOOLID) + "\""; // need path to subnetpoolid
 
 					// extract values from the right "VFC" Node
 					String vfcCustomizationUuid = "\"" + SdncBaseModel.extractValue(sdcCsarHelper, match.getRight().getMetaData(), "customization_uuid") + "\"";
@@ -817,7 +813,7 @@
 
         if (artifactType != ArtifactTypeEnum.YANG_XML) {
             LOG.error("Unexpected artifact type - expecting YANG_XML, got "+artifactType);
-			return (null);
+			return null;
         }
 
         // Examine outer tag
@@ -1024,7 +1020,7 @@
         conn.setDoOutput(true);
         conn.setUseCaches(false);
 
-		return(conn);
+		return conn;
 
     }
 
@@ -1045,7 +1041,7 @@
 			LOG.error("Caught exception posting to ODL tier", e);
         }
 
-		return(response);
+		return response;
 
     }
 
@@ -1089,7 +1085,7 @@
         // After transformations, parse transformed XML
 
 
-		return(outFile);
+		return outFile;
     }
 
     private String escapeFilename(String str) {
@@ -1106,7 +1102,7 @@
             }
         }
 
-		return(retval.toString());
+		return retval.toString();
 
     }
 
