diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyEngine.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyEngine.java
index 4fad508..4e2c092 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyEngine.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyEngine.java
@@ -326,8 +326,8 @@
 	/**
 	 * Retrieves the count of policies on the PAP, PDP, and Policy Engine as a whole
 	 * 
-	 * @param parameters {@link com.att.labs.ecomp.policy.api.MetricsRequestParameters} which represents the Parameters required to get the Policy Metrics 
-	 * @return {@link com.att.labs.ecomp.policy.api.MetricsResponse} which consists of the response related to getMetrics Request. 
+	 * @param parameters {@link  org.openecomp.policy.api.MetricsRequestParameters} which represents the Parameters required to get the Policy Metrics 
+	 * @return {@link org.openecomp.policy.api.MetricsResponse} which consists of the response related to getMetrics Request. 
 	 * @throws PolicyException PolicyException related to the operation	 
 	 * 
 	 * */
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/AutoClientUEB.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/AutoClientUEB.java
index 91d81d0..7821877 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/AutoClientUEB.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/AutoClientUEB.java
@@ -22,7 +22,6 @@
 
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.GeneralSecurityException;
 import java.util.List;
 import java.util.UUID;
 
@@ -127,11 +126,9 @@
 					
 					 CConsumer = builder.build();
 					
-				} catch (MalformedURLException e1) {
-					e1.printStackTrace();
-				} catch (GeneralSecurityException e1) {
-					e1.printStackTrace();
-				}
+				} catch (Exception e1) {
+					logger.error("Exception Occured" + e1);
+				} 
 				while (this.isRunning() )
 				{
 					try {
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndDMAAP.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndDMAAP.java
index 0e30ada..f4a218d 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndDMAAP.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndDMAAP.java
@@ -60,7 +60,9 @@
 		} catch (Exception e) {
 			logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Unable to create DMaaP Publisher: ", e);
 		}
-        pub.close (); 
+		if(pub != null){
+	        pub.close (); 
+		}
 	}
 
 	//NOTE:  should be able to remove this for DMAAP since we will not be creating topics dynamically
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndUEB.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndUEB.java
index f2a6a96..287e5c8 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndUEB.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/ManualClientEndUEB.java
@@ -23,7 +23,6 @@
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.GeneralSecurityException;
 import java.util.List;
 
 import org.json.JSONObject;
@@ -90,10 +89,8 @@
         CambriaPublisher pub = null;
 		try {
 			pub = CambriaClientFactory.createSimplePublisher(null, UEBlist, pubTopic);
-		} catch (MalformedURLException e1) {
-			e1.printStackTrace();
-		} catch (GeneralSecurityException e1) {
-			e1.printStackTrace();
+		} catch (Exception e1) {
+			logger.error("Exception Occured"+e1);
 		}
         final JSONObject msg1 = new JSONObject (); 
 
@@ -135,11 +132,9 @@
 		String id = "0";
 		try {
 			CConsumer = CambriaClientFactory.createConsumer ( null, uebURLList, topic + uniquID, "clientGroup", id, 15*1000, 1000 );
-		} catch (MalformedURLException e1) {
-			e1.printStackTrace();
-		} catch (GeneralSecurityException e1) {
-			e1.printStackTrace();
-		}		
+		} catch (Exception e1) {
+			logger.error("Exception Occured"+e1);
+		} 		
 		int count = 1;
 		while (count < 4) {
 				publishMessage(topic + "UpdateRequest", uniquID, uebURLList);
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/MatchStore.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/MatchStore.java
index ac3c9e9..1459dd9 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/MatchStore.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/MatchStore.java
@@ -34,7 +34,7 @@
 import org.openecomp.policy.common.logging.flexlogger.*; 
 
 public class MatchStore {
-	private static HashSet<Matches> matchStore = new HashSet<Matches>();
+	private static HashSet<Matches> matchStore = new HashSet<>();
 	private static Logger logger = FlexLogger.getLogger(MatchStore.class.getName());
 	
 	public static HashSet<Matches> getMatchStore() {
@@ -115,7 +115,7 @@
 		} 
 		if(oldNotification.getRemovedPolicies()!=null && !oldNotification.getRemovedPolicies().isEmpty()){
 			// send all removed policies to client.
-			Collection<StdRemovedPolicy> removedPolicies = new HashSet<StdRemovedPolicy>();
+			Collection<StdRemovedPolicy> removedPolicies = new HashSet<>();
 			StdRemovedPolicy newRemovedPolicy;
 			for(RemovedPolicy removedPolicy: oldNotification.getRemovedPolicies()){
 				newRemovedPolicy = new StdRemovedPolicy();
@@ -127,7 +127,7 @@
 			removed = true;
 		}
 		if(oldNotification.getLoadedPolicies()!=null && !oldNotification.getLoadedPolicies().isEmpty()){
-			Collection<StdLoadedPolicy> updatedPolicies = new HashSet<StdLoadedPolicy>();
+			Collection<StdLoadedPolicy> updatedPolicies = new HashSet<>();
 			StdLoadedPolicy newUpdatedPolicy;
 			for(LoadedPolicy updatedPolicy: oldNotification.getLoadedPolicies()){
 				// if it is config policies check their matches..
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/NotificationUnMarshal.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/NotificationUnMarshal.java
index a09391b..196f89b 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/NotificationUnMarshal.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/NotificationUnMarshal.java
@@ -39,7 +39,7 @@
 		notification = mapper.readValue(json, StdPDPNotification.class);
 		if(notification!=null){
 			if(notification.getLoadedPolicies()!=null){
-				Collection<StdLoadedPolicy> stdLoadedPolicies = new ArrayList<StdLoadedPolicy>();
+				Collection<StdLoadedPolicy> stdLoadedPolicies = new ArrayList<>();
 				for(LoadedPolicy loadedPolicy: notification.getLoadedPolicies()){
 					StdLoadedPolicy stdLoadedPolicy = (StdLoadedPolicy) loadedPolicy;
 					if(notification.getRemovedPolicies()!=null){
diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java
index abe5ee7..5b10f30 100644
--- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java
+++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java
@@ -97,9 +97,9 @@
 import org.springframework.web.client.RestTemplate;
 import org.xml.sax.InputSource;
 
-import com.att.aft.dme2.internal.gson.Gson;
-import com.att.aft.dme2.internal.gson.GsonBuilder;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
 
 /**
  * PolicyEngine Implementation class
@@ -565,7 +565,7 @@
 	
     public Collection<PolicyConfig> getConfigImpl(ConfigRequestParameters configRequestParameters) throws PolicyConfigException{
 	    String resource= "getConfig";
-		ArrayList<PolicyConfig> response = new ArrayList<PolicyConfig>();
+		ArrayList<PolicyConfig> response = new ArrayList<>();
 		String body = new String();
 		// Create Request. 
 		try {
@@ -598,7 +598,7 @@
 	}
     
     private ArrayList<PolicyConfig> configResult(APIPolicyConfigResponse[] response) throws PolicyConfigException {
-        ArrayList<PolicyConfig> result = new ArrayList<PolicyConfig>();
+        ArrayList<PolicyConfig> result = new ArrayList<>();
         if(response!=null && response.length>0){
             for(APIPolicyConfigResponse policyConfigResponse: response){
                 StdPolicyConfig policyConfig = new StdPolicyConfig();
@@ -647,7 +647,7 @@
 
     private void setMatches(Map<String, String> matchingConditions) {
         Matches match = new Matches();
-        HashMap<String, String> configAttributes = new HashMap<String,String>();
+        HashMap<String, String> configAttributes = new HashMap<>();
         try{
             for(String key: matchingConditions.keySet()){
                 if(key.equalsIgnoreCase("ECOMPName")){
@@ -741,7 +741,7 @@
     }
 
     public Collection<String> listConfigImpl(ConfigRequestParameters listRequestParameters) throws PolicyConfigException{
-		Collection<String> policyList = new ArrayList<String>();
+		Collection<String> policyList = new ArrayList<>();
 		if (junit){
 			policyList.add("Policy Name: listConfigTest");
 			return policyList;
@@ -796,7 +796,7 @@
 	}
 
 	private ArrayList<PolicyResponse> eventResult(StdPolicyResponse[] response) throws PolicyEventException{
-        ArrayList<PolicyResponse> eventResult = new ArrayList<PolicyResponse>();
+        ArrayList<PolicyResponse> eventResult = new ArrayList<>();
         if(response!=null && response.length>0){
             for(StdPolicyResponse policyConfigResponse: response){
                 eventResult.add(policyConfigResponse);
@@ -860,7 +860,7 @@
 					typeDefault = new ArrayList<String>(Arrays.asList(prop.getProperty("NOTIFICATION_TYPE").split(",")));
 					notificationType = typeDefault; 
 				} else {
-						notificationType = new ArrayList<String>();
+						notificationType = new ArrayList<>();
 						notificationType.add(check_type);
 				}
 			}
@@ -873,7 +873,7 @@
 				if(serverList.contains(",")) {
 					notificationURLList = new ArrayList<String>(Arrays.asList(serverList.split(","))); 
 				} else {
-					notificationURLList = new ArrayList<String>();
+					notificationURLList = new ArrayList<>();
 					notificationURLList.add(serverList);
 				}
 			}
@@ -911,8 +911,8 @@
 				environment = Environment.DEVL.toString();
 			}
 			// Initializing the values.
-			pdps = new ArrayList<String>();
-			encoding = new ArrayList<String>();
+			pdps = new ArrayList<>();
+			encoding = new ArrayList<>();
 			// Check the Keys for PDP_URLs
 			Collection<Object> unsorted = prop.keySet();
 			@SuppressWarnings({ "rawtypes", "unchecked" })
diff --git a/PolicyEngineAPI/src/main/resources/logback.xml b/PolicyEngineAPI/src/main/resources/logback.xml
index 9e990cc..098db5a 100644
--- a/PolicyEngineAPI/src/main/resources/logback.xml
+++ b/PolicyEngineAPI/src/main/resources/logback.xml
@@ -205,7 +205,7 @@
       <maxIndex>9</maxIndex>
     </rollingPolicy>
     <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-     <level>INFO</level>
+     <level>DEBUG</level>
      </filter>
     <triggeringPolicy
       class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
