diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelBatch.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelBatch.java
index 9cc3d2b..a90733c 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelBatch.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelBatch.java
@@ -60,7 +60,7 @@
 	* Encode the event as a JSON event object according to AT&T's schema.
 	* retval : String of JSON event header only message
 	*****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		  JsonObjectBuilder batchobj = Json.createObjectBuilder();
 		  
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java
index 35685d8..57192a8 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelFault.java
@@ -463,7 +463,6 @@
 	  String fault_severity;
 	  String fault_source_type;
 	  String fault_vf_status;
-	 // double version = major_version+(double)minor_version/10;
 	  String version = "4.0";
 	  EVEL_ENTER();
 	  
@@ -547,7 +546,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_FAULT);
 		//encode common event header and body     
@@ -563,7 +562,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_FAULT);
 		//encode common event header and body     
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeartbeatField.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeartbeatField.java
index 9d8de72..133c172 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeartbeatField.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelHeartbeatField.java
@@ -39,9 +39,6 @@
 
 public class EvelHeartbeatField extends EvelHeader {
 	
-	//version of Heartbeat field format revisions
-	int major_version = 1;
-	int minor_version = 0;
 	
 	/**************************************************************************//**
 	 * Alert types.
@@ -57,7 +54,6 @@
 	/***************************************************************************/
 	/* Optional fields                                                         */
 	/***************************************************************************/
-	 // ArrayList<String[]> additional_info;
 	  
 	  HashMap<String, String > additional_inf;
 	
@@ -212,7 +208,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -230,7 +226,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelMobileFlow.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelMobileFlow.java
index f4287e0..6291844 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelMobileFlow.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelMobileFlow.java
@@ -39,9 +39,6 @@
 
 public class EvelMobileFlow extends EvelHeader {
 	
-	int major_version = 2;
-	int minor_version = 0;
-	
 	
 	static int EVEL_TOS_SUPPORTED    =  256;
 	/**************************************************************************//**
@@ -421,7 +418,6 @@
 	  /***************************************************************************/
 	  /* Optional fields                                                         */
 	  /***************************************************************************/
-	  //ArrayList<String[]> ipTosList;
 	  Map<String,String> additional_inf;
 	  
 	  Map<String,String> hashMap;
@@ -1969,7 +1965,6 @@
 	    	    
 	    	    		
 	    	    
-
 	    	    metrics.dur_connection_failed_status.encJsonValue(obj, "durConnectionFailedStatus");
 	    	    metrics.dur_tunnel_failed_status.encJsonValue(obj, "durTunnelFailedStatus");
 	    	    metrics.flow_activated_by.encJsonValue(obj, "flowActivatedBy");
@@ -2097,7 +2092,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -2115,7 +2110,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelNotification.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelNotification.java
index 2f27a96..5087e2e 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelNotification.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelNotification.java
@@ -461,7 +461,7 @@
 	}
 	 
 	 
-	 JsonObject evel_json_encode_event()
+	 public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -479,7 +479,7 @@
 
 	  }
 	 
-	 JsonObject evel_json_encode_event_batch()
+	 public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java
index d01387a..dbfaff3 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelOther.java
@@ -341,7 +341,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -359,7 +359,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelPnfRegistration.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelPnfRegistration.java
index c964849..1b286b4 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelPnfRegistration.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelPnfRegistration.java
@@ -372,7 +372,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_PNFREGISTRATION);
 		//encode common event header and body     
@@ -388,7 +388,7 @@
 
 	  }	
 	  
-	  JsonObject evel_json_encode_event_batch()
+	 public JsonObject evel_json_encode_event_batch()
 	  {
 		assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_PNFREGISTRATION);
 		//encode common event header and body     
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java
index 2f1d759..875f157 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelScalingMeasurement.java
@@ -6192,7 +6192,7 @@
 	   *
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -6210,7 +6210,8 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSipSignaling.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSipSignaling.java
index d2d9fc1..98bb056 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSipSignaling.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSipSignaling.java
@@ -538,7 +538,7 @@
 	   *
 	   * retval : String of JSON event message
 	   *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -556,7 +556,7 @@
 
 	  }
 
-	  JsonObject evel_json_encode_event_batch()
+	 public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java
index 25ffef5..6fbc5b5 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelStateChange.java
@@ -259,7 +259,7 @@
 	   * Encode the event as a JSON event object according to AT&T's schema.
 	   * retval : String of JSON state change event message
 	   *****************************************************************************/
-	 JsonObject evel_json_encode_event()
+	 public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -277,7 +277,7 @@
 
 	  }
 	 
-	 JsonObject evel_json_encode_event_batch()
+	 public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSyslog.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSyslog.java
index 847e7a0..f8bed62 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSyslog.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelSyslog.java
@@ -627,7 +627,7 @@
      * Encode the event as a JSON event object according to AT&T's schema.
      * retval : String of JSON syslog event message
      *****************************************************************************/
-      JsonObject evel_json_encode_event()
+      public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -645,7 +645,7 @@
 
 	  }
       
-      JsonObject evel_json_encode_event_batch()
+      public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java
index 128d8be..2cf5da3 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelThresholdCross.java
@@ -43,10 +43,6 @@
 
 public class EvelThresholdCross extends EvelHeader {
 	
-	
-	int major_version = 1;
-	int minor_version = 0;
-	
 	/**************************************************************************//**
 	 * Alert types.
 	 * JSON equivalent fields: newState, oldState
@@ -104,7 +100,6 @@
 	/***************************************************************************/
 	/* Optional fields                                                         */
 	/***************************************************************************/
-    //ArrayList<String[]> additional_info;
     Map<String,String> additional_inf;
     
     
@@ -151,18 +146,14 @@
 		super(evname,evid);
 		event_domain = EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING;
 		assert( tcriticality!= null );
-	//	assert( tname!= null );
 		assert( tthresholdCrossed!= null );
-	//	assert( tvalue!= null );
 		assert( talertAction!= null );
 		
 		additionalParameters = new PERF_COUNTER();
 		assert( additionalParameters != null);
 		
 		additionalParameters.criticality = tcriticality;
-	//	additionalParameters.name = tname;
 		additionalParameters.thresholdCrossed = tthresholdCrossed;
-	//	additionalParameters.value = tvalue;
 		
 		
 		additionalParameters.hashMap = null;
@@ -252,7 +243,6 @@
 	 *****************************************************************************/
 	public void evel_thresholdcross_addl_info_add(String name, String value)
 	{
-	  //String[] addl_info = null;
 	  EVEL_ENTER();
 
 	  /***************************************************************************/
@@ -264,17 +254,11 @@
 	  
 	  if( additional_inf == null )
 	  {
-		 // additional_info = new ArrayList<String[]>();
 		  additional_inf = new HashMap<String,String>();
 	  }
 
 	  LOGGER.debug(MessageFormat.format("Adding name={0} value={1}", name, value));
-	//  addl_info = new String[2];
-	//  assert(addl_info != null);
-	//  addl_info[0] = name;
-	//  addl_info[1] = value;
 	  additional_inf.put(name,  value);
-	//  additional_info.add(addl_info);
 
 	  EVEL_EXIT();
 	}
@@ -296,7 +280,7 @@
 	 *****************************************************************************/
 	public void evel_thresholdcross_hashMap_add(String name, String value)
 	{
-	  //String[] addl_info = null;
+
 	  EVEL_ENTER();
 
 	  /***************************************************************************/
@@ -308,17 +292,11 @@
 	  
 	  if( additionalParameters.hashMap == null )
 	  {
-		 // additional_info = new ArrayList<String[]>();
 		  additionalParameters.hashMap = new HashMap<String,String>();
 	  }
 
 	  LOGGER.debug(MessageFormat.format("Adding name={0} value={1}", name, value));
-	//  addl_info = new String[2];
-	//  assert(addl_info != null);
-	//  addl_info[0] = name;
-	//  addl_info[1] = value;
 	  additionalParameters.hashMap.put(name,  value);
-	//  additional_info.add(addl_info);
 
 	  EVEL_EXIT();
 	}
@@ -708,7 +686,7 @@
 	     * Encode the event as a JSON event object according to AT&T's schema.
 	     * retval : String of JSON TCA event message
 	     *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -726,7 +704,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelVoiceQuality.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelVoiceQuality.java
index d33abce..d964c74 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelVoiceQuality.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/EvelVoiceQuality.java
@@ -741,7 +741,7 @@
 	     * Encode the event as a JSON event object according to AT&T's schema.
 	     * retval : String of JSON Voice Quality event message
 	     *****************************************************************************/
-	  JsonObject evel_json_encode_event()
+	  public JsonObject evel_json_encode_event()
 	  {
 		EVEL_ENTER();
 		
@@ -759,7 +759,7 @@
 
 	  }
 	  
-	  JsonObject evel_json_encode_event_batch()
+	  public JsonObject evel_json_encode_event_batch()
 	  {
 		EVEL_ENTER();
 		
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/FaultData.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/FaultData.java
index 135838e..046051c 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/FaultData.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/FaultData.java
@@ -39,6 +39,7 @@
 
 
 import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -116,7 +117,7 @@
 	
 	static int falut_raised =0;
 
-	
+	private static final Logger logger = Logger.getLogger(AgentMain.class);
 	public final Runnable faultInstance01;
 	public final Runnable faultInstance02;
 	
@@ -126,17 +127,17 @@
 			
 			@Override
 			public void run() {
-				 int  gm_event_id = 1;
-				  String event_id2=null;
+				 int  gmEventId = 1;
+				  String eventId2=null;
 				
-				Long start_epoch_microsec = 0L;
-				Long last_epoch_microsec = 0L;
+				Long startEpochMicrosec = 0L;
+				Long lastEpochMicrosec = 0L;
 				String hostName = hostName();
 				try {
 					readFalutConfig();		
 					readVppMetrics(resDevice);						
 				} catch (IOException | ParseException e1) {
-
+					logger.error(e1);
 				}		
 				
 				
@@ -149,41 +150,41 @@
 					return;
 				}				
 				
-				HashMap<String, DeviceData> falut_last_metrics = readVppMetrics(resDevice);		
+				HashMap<String, DeviceData> falutLastMetrics = readVppMetrics(resDevice);		
 				
 				while(true) {
 					try {				
-					EvelBatch ebt = new EvelBatch();
+					
 				
 					for( String falut : intFaceMapFault ) {				
 					    
-						HashMap<String, DeviceData> falut_current_metrics = readVppMetrics(resDevice);
+						HashMap<String, DeviceData> falutCurrentMetrics = readVppMetrics(resDevice);
 
 						
-						for( String tmp_device :falut_current_metrics.keySet() ) {
+						for( String tmp_device :falutCurrentMetrics.keySet() ) {
 						
 						
 							
-							int receivedOctetsDelta = Integer.parseInt((falut_current_metrics.get(tmp_device).getT1Bytesin()) )
-									- Integer.parseInt((falut_last_metrics.get(tmp_device).getT0bytesIn()));
+							int receivedOctetsDelta = Integer.parseInt((falutCurrentMetrics.get(tmp_device).getT1Bytesin()) )
+									- Integer.parseInt((falutLastMetrics.get(tmp_device).getT0bytesIn()));
 							
-							int receivedTotalPacketsDelta = Integer.parseInt((falut_current_metrics.get(tmp_device).getT1Packetsin()) )
-									- Integer.parseInt((falut_last_metrics.get(tmp_device).getT0packetIn()));
+							int receivedTotalPacketsDelta = Integer.parseInt((falutCurrentMetrics.get(tmp_device).getT1Packetsin()) )
+									- Integer.parseInt((falutLastMetrics.get(tmp_device).getT0packetIn()));
 							
-							int transmittedOctetsDelta = Integer.parseInt((falut_current_metrics.get(tmp_device).getT1Bytesout()) )
-							- Integer.parseInt((falut_last_metrics.get(tmp_device).getT0bytesOut()));
+							int transmittedOctetsDelta = Integer.parseInt((falutCurrentMetrics.get(tmp_device).getT1Bytesout()) )
+							- Integer.parseInt((falutLastMetrics.get(tmp_device).getT0bytesOut()));
 							
 							
 							
-							int transmittedTotalPacketsDelta = Integer.parseInt((falut_current_metrics.get(tmp_device).getT1Packetsout()) )
-							- Integer.parseInt((falut_last_metrics.get(tmp_device).getT0packetOut()));
+							int transmittedTotalPacketsDelta = Integer.parseInt((falutCurrentMetrics.get(tmp_device).getT1Packetsout()) )
+							- Integer.parseInt((falutLastMetrics.get(tmp_device).getT0packetOut()));
 							
 						
-						String alarmInterface = tmp_device; //resDevice[0];
+						String alarmInterface = tmp_device;
 						if((receivedOctetsDelta < Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) || transmittedOctetsDelta < Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) || 
 								receivedTotalPacketsDelta < Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) || transmittedTotalPacketsDelta < Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark"))) && falut_raised == 0){
-							event_id2 = event_id1+ event_id+(gm_event_id++);
-							EvelFault eveFalt  = new EvelFault(faultInstanceres01.get("eventName"),event_id2, alarmCondition, specificProblem,
+							eventId2 = event_id1+ event_id+(gmEventId++);
+							EvelFault eveFalt  = new EvelFault(faultInstanceres01.get("eventName"),eventId2, alarmCondition, specificProblem,
 				                    EvelHeader.PRIORITIES.EVEL_PRIORITY_LOW,
 				                    EVEL_SEVERITIES.EVEL_SEVERITY_MAJOR,
 				                    EVEL_SOURCE_TYPES.EVEL_SOURCE_ROUTER,
@@ -195,32 +196,32 @@
 		                    	if( faultConfig.get("eventType")!=null) {
 		                    		eveFalt.evel_fault_type_set(faultConfig.get("eventType"));
 		                    		
-		                    		start_epoch_microsec = last_epoch_microsec;
-		                    	    last_epoch_microsec = System.nanoTime()/1000;
+		                    		startEpochMicrosec = lastEpochMicrosec;
+		                    		lastEpochMicrosec = System.nanoTime()/1000;
 		                    		
-		                    		eveFalt.evel_last_epoch_set(start_epoch_microsec);
-		                    		eveFalt.evel_start_epoch_set(last_epoch_microsec);
+		                    		eveFalt.evel_last_epoch_set(startEpochMicrosec);
+		                    		eveFalt.evel_start_epoch_set(lastEpochMicrosec);
 		                    		
 		                    		eveFalt.evel_fault_category_set(eventCategory);
 		                    		eveFalt.evel_fault_interface_set(alarmInterface.replaceAll("^[\"']+|[\"']+$", ""));
-		                    		eveFalt.evel_nfcnamingcode_set(faultConfig.get("nfcNamingCode").toString());
-		                    		eveFalt.evel_nfnamingcode_set(faultConfig.get("nfNamingCode").toString());
+		                    		eveFalt.evel_nfcnamingcode_set(faultConfig.get("nfcNamingCode"));
+		                    		eveFalt.evel_nfnamingcode_set(faultConfig.get("nfNamingCode"));
 		                    		if(faultConfig.get("reportingEntityName") == null) {
 		                    			eveFalt.evel_reporting_entity_name_set(hostName);
 		                    			}else {
-		                    			eveFalt.evel_reporting_entity_name_set(faultConfig.get("reportingEntityName").toString());
+		                    			eveFalt.evel_reporting_entity_name_set(faultConfig.get("reportingEntityName"));
 		                    			}		                   		
-		        					eveFalt.evel_reporting_entity_id_set(faultConfig.get("reportingEntityId").toString());
-		        					eveFalt.evel_nfVendorName_set(faultConfig.get("nfVendorName").toString());
-		        					eveFalt.evel_header_set_sourceid(true,faultConfig.get("sourceId").toString()); 
+		        					eveFalt.evel_reporting_entity_id_set(faultConfig.get("reportingEntityId"));
+		        					eveFalt.evel_nfVendorName_set(faultConfig.get("nfVendorName"));
+		        					eveFalt.evel_header_set_sourceid(true,faultConfig.get("sourceId")); 
 		        					
 		        		     		if(faultConfig.get("sourceName") == null) {
 		        		     			eveFalt.evel_header_set_source_name(hostName);
 		                    			}else {
-		                    				eveFalt.evel_header_set_source_name(faultConfig.get("sourceName").toString());
+		                    				eveFalt.evel_header_set_source_name(faultConfig.get("sourceName"));
 		                    			}			        					
 		        							
-		        					eveFalt.evel_timeZoneOffset_set(faultConfig.get("timeZoneOffset").toString());
+		        					eveFalt.evel_timeZoneOffset_set(faultConfig.get("timeZoneOffset"));
 		        					AgentMain.evel_post_event(eveFalt);		
 		                    	}
 		                    	
@@ -229,8 +230,8 @@
 						}else if((receivedOctetsDelta > Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) && transmittedOctetsDelta > Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) && 
 								receivedTotalPacketsDelta > Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark")) && transmittedTotalPacketsDelta > Integer.parseInt((String)faultInstanceres01.get("tmp_lowWaterMark"))) && falut_raised == 1) {							
 							
-							event_id2 = event_id1+event_id+ (gm_event_id++);
-							EvelFault eveFalt  = new EvelFault(faultInstanceres01.get("eventName"),event_id2, alarmConditionClear, specificProblemClear,
+							eventId2 = event_id1+event_id+ (gmEventId++);
+							EvelFault eveFalt  = new EvelFault(faultInstanceres01.get("eventName"),eventId2, alarmConditionClear, specificProblemClear,
 				                    EvelHeader.PRIORITIES.EVEL_PRIORITY_LOW,
 				                    EVEL_SEVERITIES.EVEL_SEVERITY_NORMAL,
 				                    EVEL_SOURCE_TYPES.EVEL_SOURCE_ROUTER,
@@ -246,28 +247,28 @@
 		                    		eveFalt.evel_fault_category_set(eventCategory);
 		                    		eveFalt.evel_fault_interface_set(alarmInterface.replaceAll("^[\"']+|[\"']+$", ""));
 		                    		                    		
-		                    		eveFalt.evel_nfcnamingcode_set(faultConfig.get("nfcNamingCode").toString());
-		                    		eveFalt.evel_nfnamingcode_set(faultConfig.get("nfNamingCode").toString());
+		                    		eveFalt.evel_nfcnamingcode_set(faultConfig.get("nfcNamingCode"));
+		                    		eveFalt.evel_nfnamingcode_set(faultConfig.get("nfNamingCode"));
 		                    		
 		                    		if(faultConfig.get("reportingEntityName") == null) {
 		                    			eveFalt.evel_reporting_entity_name_set(hostName);
 		                    			}else {
-		                    			eveFalt.evel_reporting_entity_name_set(faultConfig.get("reportingEntityName").toString());
+		                    			eveFalt.evel_reporting_entity_name_set(faultConfig.get("reportingEntityName"));
 		                    			}	
 		                    		
 		                    		
-		        					eveFalt.evel_reporting_entity_id_set(faultConfig.get("reportingEntityId").toString());
-		        					eveFalt.evel_nfVendorName_set(faultConfig.get("nfVendorName").toString());
-		        					eveFalt.evel_header_set_sourceid(true,faultConfig.get("sourceId").toString());
+		        					eveFalt.evel_reporting_entity_id_set(faultConfig.get("reportingEntityId"));
+		        					eveFalt.evel_nfVendorName_set(faultConfig.get("nfVendorName"));
+		        					eveFalt.evel_header_set_sourceid(true,faultConfig.get("sourceId"));
 		        					
 		        		     		if(faultConfig.get("sourceName") == null) {
 		        		     			eveFalt.evel_header_set_source_name(hostName);
 		                    			}else {
-		                    				eveFalt.evel_header_set_source_name(faultConfig.get("sourceName").toString());
+		                    				eveFalt.evel_header_set_source_name(faultConfig.get("sourceName"));
 		                    			}		
 		        					
 		        							
-		        					eveFalt.evel_timeZoneOffset_set(faultConfig.get("timeZoneOffset").toString());
+		        					eveFalt.evel_timeZoneOffset_set(faultConfig.get("timeZoneOffset"));
 		        					AgentMain.evel_post_event(eveFalt);		
 		                    		
 		                    	}
@@ -296,7 +297,7 @@
 					
 					
 					}catch (Exception e) {
-						
+						logger.error(e);
 					}
 					
 					
@@ -308,10 +309,10 @@
 			
 			@Override
 			public void run() {
-				 int  gm_event_id = 1;
-				  String event_id2=null;
-				Long start_epoch_microsec = 0L;
-				Long last_epoch_microsec = 0L;
+				 int  gmEventid = 1;
+				  String eventid2=null;
+				Long startEpochmicrosec = 0L;
+				Long lastEpochmicrosec = 0L;
 				String hostName = hostName();
 				try {
 					readFalutConfig();		
@@ -343,8 +344,8 @@
 					
 						if(ins02Cmd < Integer.parseInt((String)falutMetric.get("Instanceres02Cmd").getInstanceres02Command())){					
 							
-							event_id2 = event_id1+ event_id+(gm_event_id++);
-							EvelFault eveFalt  = new EvelFault(Instance02eventName,event_id2, setAlarmCondition, setSpecificProblem,
+							eventid2 = event_id1+ event_id+(gmEventid++);
+							EvelFault eveFalt  = new EvelFault(Instance02eventName,eventid2, setAlarmCondition, setSpecificProblem,
 				                    EvelHeader.PRIORITIES.EVEL_PRIORITY_LOW,
 				                    EVEL_SEVERITIES.EVEL_SEVERITY_MAJOR,
 				                    EVEL_SOURCE_TYPES.EVEL_SOURCE_VIRTUAL_MACHINE,
@@ -360,11 +361,11 @@
 		                    	if( faultConfig.get("eventType")!=null) {
 		                    		eveFalt.evel_fault_type_set(faultConfig.get("eventType"));
 		                    		
-		                    		start_epoch_microsec = last_epoch_microsec;
-		                    	    last_epoch_microsec = System.nanoTime()/1000;
+		                    		startEpochmicrosec = lastEpochmicrosec;
+		                    		lastEpochmicrosec = System.nanoTime()/1000;
 		                    		
-		                    		eveFalt.evel_last_epoch_set(start_epoch_microsec);
-		                    		eveFalt.evel_start_epoch_set(last_epoch_microsec);
+		                    		eveFalt.evel_last_epoch_set(startEpochmicrosec);
+		                    		eveFalt.evel_start_epoch_set(lastEpochmicrosec);
 		                    		
 		                    		eveFalt.evel_fault_category_set(Instance02eventCategory);
 		                    		eveFalt.evel_fault_interface_set(Instance02alarmInterfaceA.replaceAll("^[\"']+|[\"']+$", ""));
@@ -398,8 +399,8 @@
 						}else if(ins02Cmd > Integer.parseInt((String)falutMetric.get("Instanceres02Cmd").getInstanceres02Command())) {
 							
 							
-							event_id2 = event_id1+ event_id+(gm_event_id++);
-							EvelFault eveFalt  = new EvelFault(Instance02eventName,event_id2, ins02alarmConditionClear, ins02specificProblemClear,
+							eventid2 = event_id1+ event_id+(gmEventid++);
+							EvelFault eveFalt  = new EvelFault(Instance02eventName,eventid2, ins02alarmConditionClear, ins02specificProblemClear,
 				                    EvelHeader.PRIORITIES.EVEL_PRIORITY_LOW,
 				                    EVEL_SEVERITIES.EVEL_SEVERITY_NORMAL,
 				                    EVEL_SOURCE_TYPES.EVEL_SOURCE_VIRTUAL_MACHINE,
@@ -458,14 +459,14 @@
 						}
 					Thread.sleep(Integer.parseInt(Ins02Interval));					
 					}catch(Exception e) {
-						
+						logger.error(e);
 					}
 					
 					}catch (Exception e) {
-						
+						logger.error(e);
 					}
 					
-					
+					break;
 				}
 			}
 		};
@@ -517,8 +518,7 @@
 	        }
 	      }
 	    } catch (SocketException e) {
-			// TODO Auto-generated catch block
-			
+			logger.error(e);
 		}
 
 		return hostname;
@@ -526,7 +526,7 @@
 	
 	
 	
-	public static HashMap<String, String> readFalutConfig() throws IOException, ParseException {
+	private static HashMap<String, String> readFalutConfig() throws IOException, ParseException {
 		
 		
 		
@@ -717,7 +717,7 @@
 	        	        
 	        
 			} catch (ClassCastException ex) {
-			ex.printStackTrace();
+			logger.error(ex);
 		}
 		return faultConfig;
 	}
@@ -725,207 +725,15 @@
 
 
 	
-	public static HashMap<String, String> readFalutConfig1() throws IOException, ParseException {
-		List<String> list = new ArrayList<String>();
-		JSONParser jsonParser = new JSONParser();
-		try {
-			
-			FileReader reader = new FileReader("./src/main/java/evel_javalibrary/att/com/loadbalance/flt_config.json");
-			JSONObject obj = (JSONObject) jsonParser.parse(reader);
-			Map.Entry directPair = null;
-			String directObject ="";
-			String[] directres;
-			Map directParameters = ((Map)obj.get("tmp_directParameters"));
-			Iterator<Map.Entry> itr1 = directParameters.entrySet().iterator(); 
-	        while (itr1.hasNext()) { 
-	        	directPair = itr1.next(); 
-	        	directObject=String.valueOf(directPair);  
-	        	directres = directObject.split("=");
-	            faultConfig.put(directres[0], directres[1]);	        
-	        } 		
-	        JSONArray arrJson = (JSONArray) directParameters.get("tmp_device");
-	        resDevice = new String[arrJson.size()];
-	        for(int i = 0; i < arrJson.size(); i++)
-	        	resDevice[i] = (String) arrJson.get(i);
-	        
-	        
-	        //tmp_indirectParameters
-	        Map.Entry indirectPair = null;
-	        String indirectObject ="";
-	        String[] indirectres;
-			Map indirectParameters = ((Map)obj.get("tmp_indirectParameters"));
-			Iterator<Map.Entry> itr2 = indirectParameters.entrySet().iterator(); 
-	        while (itr2.hasNext()) { 
-	        	indirectPair = itr2.next(); 
-	        	indirectObject=String.valueOf(indirectPair);  
-	        	indirectres = indirectObject.split("=");
-	            faultConfig.put(indirectres[0], indirectres[1]);	        
-	        } 	
-	        
-	        
-	        //tmp_faultInstance01
-	        Map.Entry faultInstancePair = null;
-	        String faultInstanceObject ="";
-	        String[] faultInstanceres;
-			Map faultInstanceParameters = ((Map)indirectParameters.get("tmp_faultInstance01"));
-			Iterator<Map.Entry> itr3 = faultInstanceParameters.entrySet().iterator(); 
-	        while (itr3.hasNext()) { 
-	        	faultInstancePair = itr3.next(); 
-	        	faultInstanceObject=String.valueOf(faultInstancePair);  
-	        	faultInstanceres = faultInstanceObject.split("=");
-	        	faultInstanceres01.put(faultInstanceres[0], faultInstanceres[1]);	        
-	        } 
-	        
-	         
-	        eventCategory = faultInstanceres01.get("eventCategory").toString();
-	        eventSourceType = faultInstanceres01.get("eventSourceType").toString();
-	        //tmp_init
-	        Map.Entry tempInitPair = null;
-	        String tempInitObject ="";
-			Map tempInitParameters = ((Map)faultInstanceParameters.get("tmp_init"));
-			Iterator<Map.Entry> itr4 = tempInitParameters.entrySet().iterator(); 
-	        while (itr4.hasNext()) { 
-	        	tempInitPair = itr4.next(); 
-	        	tempInitObject=String.valueOf(tempInitPair);  
-	        	tempInitres = tempInitObject.split("=");
-	        	faultConfigTempInit.put(tempInitres[0], tempInitres[1]);	        
-	        } 	
-	        
-	        String tmp_t0BytesOut = faultConfigTempInit.get("tmp_init");
-	        
-	        
-	        
-	        //tmp_command
-	        Map.Entry tempcommandPair = null;
-	        String tempcommandObject ="";	        
-			Map tempcommandParameters = ((Map)faultInstanceParameters.get("tmp_command"));
-			Iterator<Map.Entry> itr5 = tempcommandParameters.entrySet().iterator(); 
-	        while (itr5.hasNext()) { 
-	        	tempcommandPair = itr5.next(); 
-	        	tempcommandObject=String.valueOf(tempcommandPair);  
-	        	tempcommandres = tempcommandObject.split("=");
-	            faultConfig.put(tempcommandres[0], tempcommandres[1]);	        
-	        } 	
-	        
-	        //tmp_alarmSetParameters
-	        Map.Entry alarmSetPair = null;
-	        String alarmSetObject ="";
-	        String[] alarmSetres;
-			Map alarmSetParameters = ((Map)faultInstanceParameters.get("tmp_alarmSetParameters"));
-			Iterator<Map.Entry> itr6 = alarmSetParameters.entrySet().iterator(); 
-	        while (itr6.hasNext()) { 
-	        	alarmSetPair = itr6.next(); 
-	        	alarmSetObject=String.valueOf(alarmSetPair);  
-	        	alarmSetres = alarmSetObject.split("=");
-	            faultConfig.put(alarmSetres[0], alarmSetres[1]);	        
-	        } 	
-	        
-	        
-	        alarmCondition = faultConfig.get("alarmCondition").toString();
-	        specificProblem = faultConfig.get("specificProblem").toString();
-	        eventSeverity =   faultConfig.get("eventSeverity").toString();
-	        
-	        //tmp_alarmClearParameters
-	        Map.Entry alarmClearPair = null;
-	        String alarmClearObject ="";
-	        String[] alarmClearres;
-			Map alarmClearParameters = ((Map)faultInstanceParameters.get("tmp_alarmClearParameters"));
-			Iterator<Map.Entry> itr7 = alarmClearParameters.entrySet().iterator(); 
-	        while (itr7.hasNext()) { 
-	        	alarmClearPair = itr7.next(); 
-	        	alarmClearObject=String.valueOf(alarmClearPair);  
-	        	alarmClearres = alarmClearObject.split("=");
-	            tempAlaramClearParameter.put(alarmClearres[0], alarmClearres[1]);	        
-	        } 	
-	        
-	        alarmConditionClear = tempAlaramClearParameter.get("alarmCondition").toString();
-	        specificProblemClear = tempAlaramClearParameter.get("specificProblem").toString();
-	        eventSeverityClear =   tempAlaramClearParameter.get("eventSeverity").toString();
-	        
-	        
-	        //tmp_faultInstance02
-	        Map.Entry faultInstance02Pair = null;
-	        String faultInstance02Object ="";
-	        String[] faultInstance02res;
-			Map faultInstance02Parameters = ((Map)indirectParameters.get("tmp_faultInstance02"));
-			Iterator<Map.Entry> itr8 = faultInstance02Parameters.entrySet().iterator(); 
-	        while (itr8.hasNext()) { 
-	        	faultInstance02Pair = itr8.next(); 
-	        	faultInstance02Object=String.valueOf(faultInstance02Pair);  
-	        	faultInstance02res = faultInstance02Object.split("=");
-	        	faultInstanceres02.put(faultInstance02res[0], faultInstance02res[1]);	        
-	        } 	
-	        Instance02alarmInterfaceA  = faultInstanceres02.get("alarmInterfaceA");
-	        Instance02eventCategory  = faultInstanceres02.get("eventCategory");
-	        Instance02eventSourceType  = faultInstanceres02.get("eventSourceType");
-	        Instance02eventName  = faultInstanceres02.get("eventName");
-	        
-	        //tmp_command
-	        Map.Entry tempcommand02Pair = null;
-	        String tempcommand02Object ="";	        
-			Map tempcommand02Parameters = ((Map)faultInstance02Parameters.get("tmp_command"));
-			Iterator<Map.Entry> itr9 = tempcommand02Parameters.entrySet().iterator(); 
-	        while (itr9.hasNext()) { 
-	        	tempcommand02Pair = itr9.next(); 
-	        	tempcommand02Object=String.valueOf(tempcommand02Pair);  
-	        	tempcommand02res = tempcommand02Object.split("=");
-	        	faultInstanceres02.put(tempcommand02res[0], tempcommand02res[1]);	        
-	        } 	
-	        
-	        
-	        
-	        //tmp_alarmSetParameters
-	        Map.Entry Instance02alarmSetPair = null;
-	        String Instance02alarmSetObject ="";
-	        String[] Instance02alarmSetres;
-			Map Instance02alarmSetParameters = ((Map)faultInstance02Parameters.get("tmp_alarmSetParameters"));
-			Iterator<Map.Entry> itr10 = Instance02alarmSetParameters.entrySet().iterator(); 
-	        while (itr10.hasNext()) { 
-	        	Instance02alarmSetPair = itr10.next(); 
-	        	Instance02alarmSetObject=String.valueOf(Instance02alarmSetPair);  
-	        	Instance02alarmSetres = Instance02alarmSetObject.split("=");
-	        	faultInstanceres02.put(Instance02alarmSetres[0], Instance02alarmSetres[1]);	        
-	        } 	
-	        
-	        
-	        setAlarmCondition = faultInstanceres02.get("alarmCondition").toString();
-	        setSpecificProblem = faultInstanceres02.get("specificProblem").toString();
-	        setEventSeverity =   faultInstanceres02.get("eventSeverity").toString();
-	        
-	        //tmp_alarmClearParameters
-	        Map.Entry Instanceres02alarmClearPair = null;
-	        String Instanceres02alarmClearObject ="";
-	        String[] Instanceres02alarmClearres;
-			Map Instanceres02alarmClearParameters = ((Map)faultInstance02Parameters.get("tmp_alarmClearParameters"));
-			Iterator<Map.Entry> itr11 = Instanceres02alarmClearParameters.entrySet().iterator(); 
-	        while (itr11.hasNext()) { 
-	        	Instanceres02alarmClearPair = itr11.next(); 
-	        	Instanceres02alarmClearObject=String.valueOf(Instanceres02alarmClearPair);  
-	        	Instanceres02alarmClearres = Instanceres02alarmClearObject.split("=");
-	        	Instanceres02ClearParameter.put(Instanceres02alarmClearres[0], Instanceres02alarmClearres[1]);	        
-	        } 	
-	        
-	        ins02alarmConditionClear = Instanceres02ClearParameter.get("alarmCondition").toString();
-	        ins02specificProblemClear = Instanceres02ClearParameter.get("specificProblem").toString();
-	        ins02eventSeverityClear =   Instanceres02ClearParameter.get("eventSeverity").toString();
-	        
-
-	        	        
-	        
-			} catch (ClassCastException ex) {
-			ex.printStackTrace();
-		}
-		return faultConfig;
-	}
 	
 	
-	public static HashMap<String, DeviceData> readVppMetrics(String[] linkStart) {
+	private static HashMap<String, DeviceData> readVppMetrics(String[] linkStart) {
 		
 		//t0
-		String Bytesin = faultConfigTempInit.get("tmp_t0BytesIn");
-		String BytesOut = faultConfigTempInit.get("tmp_t0BytesOut").toString();
-		String PacketsIn = faultConfigTempInit.get("tmp_t0PacketsIn");
-		String PacketsOut = faultConfigTempInit.get("tmp_t0PacketsOut");
+		String bytesIn = faultConfigTempInit.get("tmp_t0BytesIn");
+		String bytesOut = faultConfigTempInit.get("tmp_t0BytesOut").toString();
+		String packetsIn = faultConfigTempInit.get("tmp_t0PacketsIn");
+		String packetsOut = faultConfigTempInit.get("tmp_t0PacketsOut");
 		
 		
 		//t1
@@ -946,31 +754,31 @@
 		
 		//t0
 		String replaceBytesin ="";
-		if(Bytesin.contains("$tmp_device")) {
-		 String repString = Bytesin.replace("$tmp_device", device.trim());
+		if(bytesIn.contains("$tmp_device")) {
+		 String repString = bytesIn.replace("$tmp_device", device.trim());
 		 replaceBytesin = repString.replace("sudo", "/bin/sh,-c,");
 		}			
 		String[] bytesinArray= replaceBytesin.split(",");
 		
 		
 		String replaceBytesOut ="";
-		if(BytesOut.contains("$tmp_device")) {
-		 String  repString = BytesOut.replace("$tmp_device", device.trim());
+		if(bytesOut.contains("$tmp_device")) {
+		 String  repString = bytesOut.replace("$tmp_device", device.trim());
 		 replaceBytesOut = repString.replace("sudo", "/bin/sh,-c,");
 		}		
 		String[] bytesoutArray = replaceBytesOut.split(",");
 		
 		
 		String replacePacketsIn ="";
-		if(PacketsIn.contains("$tmp_device")) {
-		 String repString = PacketsIn.replace("$tmp_device", device.trim());
+		if(packetsIn.contains("$tmp_device")) {
+		 String repString = packetsIn.replace("$tmp_device", device.trim());
 		 replacePacketsIn = repString.replace("sudo", "/bin/sh,-c,");
 		}		
 		String[] packetsInArray= replacePacketsIn.split(",");
 				
 		String replacePacketsOut ="";
-		if(PacketsOut.contains("$tmp_device")) {
-		 String repString = PacketsOut.replace("$tmp_device", device.trim());
+		if(packetsOut.contains("$tmp_device")) {
+		 String repString = packetsOut.replace("$tmp_device", device.trim());
 		 replacePacketsOut = repString.replace("sudo", "/bin/sh,-c,");
 		}		
 		String[] packetsOutArray= replacePacketsOut.split(",");
@@ -1096,7 +904,7 @@
 			}
 		    
 		        }catch (Exception e) {
-					
+					logger.error(e);
 				}   						
 		}		
 		return vppMetrics;
@@ -1104,108 +912,8 @@
 
 
 
-	public static HashMap<String, DeviceData> readVppMetrics1(String[] linkStart) {
-		String Bytesin = faultConfigTempInit.get("tmp_t0BytesIn");
-		String BytesOut = faultConfigTempInit.get("tmp_t0BytesOut").toString();
-		String PacketsIn = faultConfigTempInit.get("tmp_t0PacketsIn");
-		String PacketsOut = faultConfigTempInit.get("tmp_t0PacketsOut");
-		
-		String echoFalut = faultInstanceres02.get("tmp_cmd1");
-		HashMap<String, DeviceData> vppMetrics =  new HashMap<>();
-		
-		for(int i=0;i<linkStart.length;i++) {
-		String device = linkStart[i];
-		String replaceBytesin ="";
-		if(Bytesin.contains("$tmp_device")) {
-		 String repString = Bytesin.replace("$tmp_device", device.trim());
-		 replaceBytesin = repString.replace("sudo", "/bin/sh,-c,");
-
-		}	
-		
-		String[] bytesinArray= replaceBytesin.split(",");
-		
-		
-		String replaceBytesOut ="";
-		if(BytesOut.contains("$tmp_device")) {
-		 String  repString = BytesOut.replace("$tmp_device", device.trim());
-		 replaceBytesOut = repString.replace("sudo", "/bin/sh,-c,");
-		}
-		
-		String[] bytesoutArray = replaceBytesOut.split(",");
-		
-		
-		
-		
-		String replacePacketsIn ="";
-		if(PacketsIn.contains("$tmp_device")) {
-		 String repString = PacketsIn.replace("$tmp_device", device.trim());
-		 replacePacketsIn = repString.replace("sudo", "/bin/sh,-c,");
-
-		}		
-		String[] packetsInArray= replacePacketsIn.split(",");
-		
-		
-		String replacePacketsOut ="";
-		if(PacketsOut.contains("$tmp_device")) {
-		 String repString = PacketsOut.replace("$tmp_device", device.trim());
-		 replacePacketsOut = repString.replace("sudo", "/bin/sh,-c,");
-
-		}		
-		String[] packetsOutArray= replacePacketsOut.split(",");
-		try {
-			
-			Runtime rt1 = Runtime.getRuntime();
-		    Process bytesinchild = rt1.exec(bytesinArray);
-		    BufferedReader readerBytesin = new BufferedReader(new InputStreamReader(        
-		    		bytesinchild.getInputStream())); 
-		    String readMetrics= readerBytesin.readLine();
-		    Runtime rt2 = Runtime.getRuntime();
-     	    Process bytesoutchild = rt2.exec(bytesoutArray);
-		    BufferedReader readerBytesout = new BufferedReader(new InputStreamReader(        
-		    		bytesoutchild.getInputStream())); 
-		    String readMetrics1= readerBytesout.readLine();
-		    Runtime rt3 = Runtime.getRuntime();
-     	    Process packetsInchild = rt3.exec(packetsInArray);
-		    BufferedReader readerPacketsIn = new BufferedReader(new InputStreamReader(        
-		    		packetsInchild.getInputStream())); 
-		    String readMetrics2= readerPacketsIn.readLine();
-		    Runtime rt4 = Runtime.getRuntime();
-     	    Process packetsOutchild = rt4.exec(packetsOutArray);
-		    BufferedReader readerpacketsOut = new BufferedReader(new InputStreamReader(        
-		    		packetsOutchild.getInputStream())); 
-		    String readMetrics3= readerpacketsOut.readLine();
-		    Runtime rt5 = Runtime.getRuntime();
-     	    Process echoFaultchild = rt5.exec(echoFalut);
-		    BufferedReader readerechoFault = new BufferedReader(new InputStreamReader(        
-		    		echoFaultchild.getInputStream())); 
-		    String echoFaultMetric= readerechoFault.readLine();
-		    DeviceData mddata = new DeviceData();
-		    
-//		    mddata.setBytesIn(readMetrics);
-//		    mddata.setBytesOut(readMetrics1);
-//		    mddata.setPacketIn(readMetrics2);
-//		    mddata.setPacketOut(readMetrics3);
-		    
-		    mddata.setInstanceres02Command(echoFaultMetric);
-		    
-		    vppMetrics.put("Instanceres02Cmd", mddata);
-		    
-		    if(device.equals("enp0s3")) {
-		    	vppMetrics.put("enp0s3", mddata);
-		    }else if(device.equals("lo")) {
-		    	vppMetrics.put("lo", mddata);
-			}else if(device.equals("docker0")) {
-				vppMetrics.put("docker0", mddata);
-			}
-		        }catch (Exception e) {
-					
-				}   						
-		}		
-		return vppMetrics;
-	}	
 	
 public static void main(String[] args) {
-		// TODO Auto-generated method stub
         
 		try {
             AgentMain.evel_initialize("http://127.0.0.1",30000,
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/HeartBeatData.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/HeartBeatData.java
index 52ddaea..77c1823 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/HeartBeatData.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/HeartBeatData.java
@@ -38,6 +38,7 @@
 import evel_javalibrary.att.com.EvelHeartbeatField;
 
 import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
@@ -45,26 +46,28 @@
 
 public class HeartBeatData extends Thread{
 	static HashMap<String, String> hbConfig = new HashMap();	
-	static int  gm_event_id = 1;
-	static String event_id1 = "heartbeatvfs";
-	static String event_id = "00000000";
-	static String event_id2=null;
+	static int    gmEventid = 1;
+	static String eventId1 = "heartbeatvfs";
+	static String eventId = "00000000";
+	static String eventId2=null;
 	
+	private static final Logger logger = Logger.getLogger(AgentMain.class);
 	
-	public void run() {
-		
-		Long start_epoch_microsec = 0L;
-		Long last_epoch_microsec = 0L;
+	@Override
+	public void run() {		
+		Long startEpochMicrosec = 0L;
+		Long lastEpochMicrosec = 0L;
         String hostName = hostName();
 		try {
 		readHeartbeatConfig();
-		}catch(Exception e) {			
+		}catch(Exception e) {	
+			logger.error(e);
 		}
 		while(true) {
 		String heatBeatInterval="";
 		long milliseconds = 60000;
 		
-		event_id2 = event_id1+ event_id+(gm_event_id++);	
+		eventId2 = eventId1+ eventId+(gmEventid++);	
 		if(hbConfig.get("heartbeatInterval") == null) {
 			heatBeatInterval = Long.toString(milliseconds);
 		}else {
@@ -72,46 +75,46 @@
 		}
 		EvelHeartbeatField evelHb = new EvelHeartbeatField(Integer.parseInt(heatBeatInterval) ,
 				hbConfig.get("eventName"),
-                event_id2);
+				eventId2);
 		
 		if( hbConfig.get("eventType")!=null) {			
-			start_epoch_microsec = last_epoch_microsec;
-    	    last_epoch_microsec = System.nanoTime()/1000;
+			startEpochMicrosec = lastEpochMicrosec;
+			lastEpochMicrosec = System.nanoTime()/1000;
     		
-    	    evelHb.evel_last_epoch_set(start_epoch_microsec);
-    	    evelHb.evel_start_epoch_set(last_epoch_microsec);
+    	    evelHb.evel_last_epoch_set(startEpochMicrosec);
+    	    evelHb.evel_start_epoch_set(lastEpochMicrosec);
 		
-		evelHb.evel_header_type_set(hbConfig.get("eventType").toString());
-		evelHb.evel_nfcnamingcode_set(hbConfig.get("nfcNamingCode").toString());
-		evelHb.evel_nfnamingcode_set(hbConfig.get("nfNamingCode").toString());
+		evelHb.evel_header_type_set(hbConfig.get("eventType"));
+		evelHb.evel_nfcnamingcode_set(hbConfig.get("nfcNamingCode"));
+		evelHb.evel_nfnamingcode_set(hbConfig.get("nfNamingCode"));
 		if(hbConfig.get("reportingEntityName") == null) {
 		evelHb.evel_reporting_entity_name_set(hostName);
 		}else {
-		evelHb.evel_reporting_entity_name_set(hbConfig.get("reportingEntityName").toString());
+		evelHb.evel_reporting_entity_name_set(hbConfig.get("reportingEntityName"));
 		}
-		evelHb.evel_reporting_entity_id_set(hbConfig.get("reportingEntityId").toString());
-		evelHb.evel_nfVendorName_set(hbConfig.get("nfVendorName").toString());
-		evelHb.evel_header_set_sourceid(true,hbConfig.get("sourceId").toString());
+		evelHb.evel_reporting_entity_id_set(hbConfig.get("reportingEntityId"));
+		evelHb.evel_nfVendorName_set(hbConfig.get("nfVendorName"));
+		evelHb.evel_header_set_sourceid(true,hbConfig.get("sourceId"));
 		if(hbConfig.get("sourceName") == null) {
 			evelHb.evel_header_set_source_name(hostName);
 		}else {
-			evelHb.evel_header_set_source_name(hbConfig.get("sourceName").toString());
+			evelHb.evel_header_set_source_name(hbConfig.get("sourceName"));
 		}				
-		evelHb.evel_timeZoneOffset_set(hbConfig.get("timeZoneOffset").toString());
+		evelHb.evel_timeZoneOffset_set(hbConfig.get("timeZoneOffset"));
 		
 		}
 		
 		try {
 			Thread.sleep(Integer.parseInt(heatBeatInterval));
 			}catch(Exception e) {
-				
+				logger.error(e);
 			}
 		AgentMain.evel_post_event(evelHb);
 		}
 	}
 	
 	
-	public static HashMap<String, String> readHeartbeatConfig() throws IOException, ParseException {
+	private static HashMap<String, String> readHeartbeatConfig() throws IOException, ParseException {
 		JSONParser jsonParser = new JSONParser();
 		try {
 			
@@ -130,7 +133,7 @@
 	        } 			
 	        
 			} catch (ClassCastException ex) {
-			ex.printStackTrace();
+			   logger.error(ex);
 		}
 		return hbConfig;
 	}
@@ -148,7 +151,7 @@
 
 public static String hostName() {
     String hostname = "Unknown";
-    String uuid = "Unknown";
+    
     try
     {
         InetAddress addr;
@@ -157,6 +160,7 @@
     }
     catch (UnknownHostException ex)
     {
+    	logger.error(ex);
     }	    
     try{	    	
       Enumeration<NetworkInterface> networks =
@@ -177,19 +181,18 @@
          }
         }
         if (mac != null) {
-            uuid = bytesToHex(mac);
+            bytesToHex(mac);
         }
       }
     } catch (SocketException e) {
-		// TODO Auto-generated catch block
-		
+		logger.error(e);
 	}
 
 	return hostname;
 }
 	
 public static void main(String[] args) {
-		// TODO Auto-generated method stub
+
         
 		try {
             AgentMain.evel_initialize("http://127.0.0.1",30000,
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/MeasureData.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/MeasureData.java
index d3c0d5f..744d3aa 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/MeasureData.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/MeasureData.java
@@ -40,6 +40,7 @@
 import java.util.Map;
 
 import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -85,9 +86,11 @@
 	static String linkStart = "";
 	static int linkCount; 
 	
+	private static final Logger logger = Logger.getLogger(AgentMain.class);
+	Long startEpochMicrosec = 0L;
+	Long lastEpochMicrosec = 0L;
 	
-	Long start_epoch_microsec = 0L;
-	Long last_epoch_microsec = 0L;
+	@Override
 	public void run() {
         
 		try {
@@ -95,7 +98,7 @@
 			readMeasurementConfig();
 			readVppMetrics(resDevice);
 		} catch (IOException | ParseException e1) {
-			e1.printStackTrace();
+			logger.error(e1);
 		}
 	
 		String[] intFaceMap = resDevice;
@@ -113,12 +116,13 @@
 
 		try {
 		Thread.sleep(1000);  
-		}catch(Exception e) {}
+		}catch(Exception e) {
+			logger.error(e);
+		}
 
 		
 		while(true) {
 			HashMap<String, DeviceData> lastMetrics = readVppMetrics(resDevice);
-			//HashMap<String, DeviceData> currentMetrics = readVppMetrics(resDevice);;
 			HashMap<String, DeviceData> currentMetrics = lastMetrics;
 			requestRate =2;
 			eventId2 = eventId1+ eventId+(gmEventId++);
@@ -143,7 +147,7 @@
 				
 				    if (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesin()))
 							- Integer.parseInt((lastMetrics.get(vNic).getT0bytesIn()) ) > 0) {
-						receivedOctetsDeltaLo = (int) (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesin()) )
+						receivedOctetsDeltaLo = (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesin()) )
 								- Integer.parseInt((lastMetrics.get(vNic).getT0bytesIn()) ));
 					} else {
 						receivedOctetsDeltaLo = 0;
@@ -152,7 +156,7 @@
 					
 					if (Integer.parseInt((currentMetrics.get(vNic).getT1Packetsin()))
 							- Integer.parseInt((lastMetrics.get(vNic).getT0packetIn()) ) > 0) {
-						receivedTotalPacketsDeltaLo = (int) (Integer.parseInt((currentMetrics.get(vNic).getT1Packetsin()) )
+						receivedTotalPacketsDeltaLo =(Integer.parseInt((currentMetrics.get(vNic).getT1Packetsin()) )
 								- Integer.parseInt((lastMetrics.get(vNic).getT0packetIn())  ));
 					} else {
 						receivedTotalPacketsDeltaLo = 0;
@@ -161,7 +165,7 @@
 					
 					if (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesout()))
 							- Integer.parseInt((lastMetrics.get(vNic).getT0bytesOut()) ) > 0) {
-						transmittedOctetsDeltaLo = (int) (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesout()) )
+						transmittedOctetsDeltaLo = (Integer.parseInt((currentMetrics.get(vNic).getT1Bytesout()) )
 								- Integer.parseInt((lastMetrics.get(vNic).getT0bytesOut())));
 					} else {
 						transmittedOctetsDeltaLo = 0;
@@ -170,22 +174,20 @@
 					
 					if (Integer.parseInt((currentMetrics.get(vNic).getT1Packetsout()))
 							- Integer.parseInt((lastMetrics.get(vNic).getT0packetOut()) ) > 0) {
-						transmittedTotalPacketsDeltaLo = (int) (Integer.parseInt((currentMetrics.get(vNic).getT1Packetsout()) )
+						transmittedTotalPacketsDeltaLo = (Integer.parseInt((currentMetrics.get(vNic).getT1Packetsout()) )
 								- Integer.parseInt((lastMetrics.get(vNic).getT0packetOut())));
 					} else {
 						transmittedTotalPacketsDeltaLo = 0;
 					}
 
 				EvelScalingMeasurement.MEASUREMENT_NIC_PERFORMANCE vNicPerf = eveMeas.evel_measurement_new_vnic_performance(vNic.replaceAll("^[\"']+|[\"']+$", ""), "true");
-				//eveMeas.evel_meas_vnic_performance_add(vNicPerf);
-				
 				if( measConfig.get("eventType")!=null) {
 					String hostName = hostName();
-					start_epoch_microsec = last_epoch_microsec;
-            	    last_epoch_microsec = System.nanoTime()/1000;            		
-            	    eveMeas.evel_last_epoch_set(start_epoch_microsec);
-            	    eveMeas.evel_start_epoch_set(last_epoch_microsec);										
-					eveMeas.evel_measurement_type_set( measConfig.get("eventType").toString());
+					startEpochMicrosec = lastEpochMicrosec;
+					lastEpochMicrosec = System.nanoTime()/1000;            		
+            	    eveMeas.evel_last_epoch_set(startEpochMicrosec);
+            	    eveMeas.evel_start_epoch_set(lastEpochMicrosec);										
+					eveMeas.evel_measurement_type_set( measConfig.get("eventType"));
 					
 					
 					eveMeas.evel_vnic_performance_rx_octets_delta_set( vNicPerf, receivedOctetsDeltaLo);
@@ -193,22 +195,22 @@
 					eveMeas.evel_vnic_performance_tx_octets_delta_set( vNicPerf, transmittedOctetsDeltaLo);
 					eveMeas.evel_vnic_performance_tx_total_pkt_delta_set(vNicPerf, transmittedTotalPacketsDeltaLo);
 			
-					eveMeas.evel_nfcnamingcode_set(measConfig.get("nfcNamingCode").toString());
-					eveMeas.evel_nfnamingcode_set(measConfig.get("nfNamingCode").toString());					
+					eveMeas.evel_nfcnamingcode_set(measConfig.get("nfcNamingCode"));
+					eveMeas.evel_nfnamingcode_set(measConfig.get("nfNamingCode"));					
             		if(measConfig.get("reportingEntityName") == null) {
             			eveMeas.evel_reporting_entity_name_set(hostName);
             			}else {
-            				eveMeas.evel_reporting_entity_name_set(measConfig.get("reportingEntityName").toString());
+            				eveMeas.evel_reporting_entity_name_set(measConfig.get("reportingEntityName"));
             			}											
-					eveMeas.evel_reporting_entity_id_set(measConfig.get("reportingEntityId").toString());
-					eveMeas.evel_nfVendorName_set(measConfig.get("nfVendorName").toString());
-					eveMeas.evel_header_set_sourceid(true,measConfig.get("sourceId").toString());					
+					eveMeas.evel_reporting_entity_id_set(measConfig.get("reportingEntityId"));
+					eveMeas.evel_nfVendorName_set(measConfig.get("nfVendorName"));
+					eveMeas.evel_header_set_sourceid(true,measConfig.get("sourceId"));					
 		     		if(measConfig.get("sourceName") == null) {
 		     			eveMeas.evel_header_set_source_name(hostName);
             			}else {
-            				eveMeas.evel_header_set_source_name(measConfig.get("sourceName").toString());	
+            				eveMeas.evel_header_set_source_name(measConfig.get("sourceName"));	
             			}												
-					eveMeas.evel_timeZoneOffset_set(measConfig.get("timeZoneOffset").toString());
+					eveMeas.evel_timeZoneOffset_set(measConfig.get("timeZoneOffset"));
 					
 				}
 				
@@ -220,7 +222,7 @@
 				try {
 					Thread.sleep(100);
 					}catch (Exception e) {
-						// TODO: handle exception
+                     logger.error(e);
 					}
 				if(System.currentTimeMillis() >= (curr+Integer.parseInt(measurmentInterval))) {
 					continues = false;				
@@ -244,7 +246,6 @@
 	}
 	public static String hostName() {
 	    String hostname = "Unknown";
-	    String uuid = "Unknown";
 	    try
 	    {
 	        InetAddress addr;
@@ -253,6 +254,7 @@
 	    }
 	    catch (UnknownHostException ex)
 	    {
+	    	logger.error(ex);
 	    }	    
 	    try{	    	
 	      Enumeration<NetworkInterface> networks =
@@ -273,12 +275,11 @@
 	         }
 	        }
 	        if (mac != null) {
-	            uuid = bytesToHex(mac);
+	            bytesToHex(mac);
 	        }
 	      }
 	    } catch (SocketException e) {
-			// TODO Auto-generated catch block
-			
+		   logger.error(e);			
 		}
 
 		return hostname;
@@ -286,7 +287,7 @@
 
 	
 	
-	public static HashMap<String, String> readMeasurementConfig() throws IOException, ParseException {
+	private static HashMap<String, String> readMeasurementConfig() throws IOException, ParseException {
 		JSONParser jsonParser = new JSONParser();
 		
 		try {
@@ -305,7 +306,7 @@
 	        	measConfig.put(directres[0], directres[1]);	        
 	        } 		
 	        
-	        String eventName  = measConfig.get("eventName").toString();   
+	        String eventName  = measConfig.get("eventName");   
 	        JSONArray arrJson = (JSONArray) directParameters.get("tmp_device");
 	        resDevice = new String[arrJson.size()];
 	        for(int i = 0; i < arrJson.size(); i++)
@@ -325,11 +326,6 @@
 	        	measConfig.put(indirectres[0], indirectres[1]);	        
 	        } 	
 	        
-
-	            
-	        //tmp_init
-	 //       Map tempInitParameters = ((Map)indirectParameters.get("tmp_init"));
-	        
 	        //tmp_init
 	        Map.Entry tempcommandPair = null;
 	        String tempcommandObject ="";	        
@@ -370,14 +366,14 @@
 	        String receivedOctetsDelta = vNicPerformanceArray.get("receivedOctetsDelta");
 	        
 			} catch (ClassCastException ex) {
-			
+			logger.error(ex);
 		}
 		return measConfig;
 	}
 	
 
 	
-	public static HashMap<String, DeviceData> readVppMetrics(String[] linkStart) {
+	private static HashMap<String, DeviceData> readVppMetrics(String[] linkStart) {
 		DeviceData mddata = null;  new DeviceData();
 	
 		
@@ -500,7 +496,6 @@
 		    Thread.sleep(Integer.parseInt(measConfig.get("measurementInterval"))); 		    
 			Runtime rt1 = Runtime.getRuntime();
 		    Process bytesinchild = rt1.exec(t1BytesinArray);
-		  //  bytesinchild.waitFor();
 		    BufferedReader readerBytesin = new BufferedReader(new InputStreamReader(        
 		    		bytesinchild.getInputStream())); 
 		    String readMetrics= readerBytesin.readLine();
@@ -549,7 +544,7 @@
 			}
 		    
 		        }catch (Exception e) {
-					
+					logger.error(e);
 				}   						
 		}		
 		return vppMetrics;
@@ -560,8 +555,7 @@
 	
 	
 	public static void main(String[] args) {
-		// TODO Auto-generated method stub
-        
+
 		try {
             AgentMain.evel_initialize("http://127.0.0.1",30000,
                     null,null,
@@ -571,8 +565,7 @@
                     "http://127.0.0.1",30001, "will",
                     "pill",
                     Level.TRACE); 
-		 }catch(Exception e) {
-			 
+		 }catch(Exception e) {			 
 			 return;
 		 }
 		MeasureData mdataThread = new MeasureData();
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/syslogData.java b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/syslogData.java
index a323675..a9ccca9 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/syslogData.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/main/java/evel_javalibrary/att/com/loadbalance/syslogData.java
@@ -12,6 +12,7 @@
 import java.util.Iterator;
 import java.util.Map;
 import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
 import org.json.simple.parser.ParseException;
@@ -56,29 +57,34 @@
 	static String eventId1 = "syslog";
 	static String eventId = "00000000";
 	static String eventId2=null;
-	
+	private static final Logger logger = Logger.getLogger(AgentMain.class);
 	private static int linesReadFromFile =0;
-	
+	@Override
 	public void run() {
 		try {
 			readSyslogConfig();
-			
-		} catch (IOException | ParseException e) {}
+		} catch (IOException | ParseException e) {
+			logger.error(e);
+		}
 		
 		while(true) {
-			String tagToCompare = syslogConfig.get("syslogTag").toString();
-			
+			String tagToCompare = syslogConfig.get("syslogTag");
+			try {
 			syslogFileRead(tagToCompare );
-		
-			try { Thread.sleep(500);}catch(Exception e) {}
+			}catch (Exception e) {
+				logger.error(e);
+			}
+			try { Thread.sleep(500);}catch(Exception e) {
+				logger.error(e);
+			}
 
 		}
 	}
 	
 	
 	public void sendSysLogEvent(String sysTag,String syslogMsg) {
-		Long start_epoch_microsec = 0L;
-		Long last_epoch_microsec = 0L;
+		Long startEpochMicrosec = 0L;
+		Long lastEpochMicrosec = 0L;
 		String hostName = hostName();
 		
 		eventId2 = eventId1+ eventId+(gmEventId++);
@@ -87,33 +93,33 @@
 				syslogMsg, sysTag);
 					
 		if( syslogConfig.get("eventType")!=null) {			
-			start_epoch_microsec = last_epoch_microsec;
-    	    last_epoch_microsec = System.nanoTime()/1000;
+			startEpochMicrosec = lastEpochMicrosec;
+			lastEpochMicrosec = System.nanoTime()/1000;
     		
-    	    eveSyslog.evel_last_epoch_set(start_epoch_microsec);
-    	    eveSyslog.evel_start_epoch_set(last_epoch_microsec);
+    	    eveSyslog.evel_last_epoch_set(startEpochMicrosec);
+    	    eveSyslog.evel_start_epoch_set(lastEpochMicrosec);
 		
-    	    eveSyslog.evel_header_type_set(syslogConfig.get("eventType").toString());
-    	    eveSyslog.evel_nfcnamingcode_set(syslogConfig.get("nfcNamingCode").toString());
-    	    eveSyslog.evel_nfnamingcode_set(syslogConfig.get("nfNamingCode").toString());
+    	    eveSyslog.evel_header_type_set(syslogConfig.get("eventType"));
+    	    eveSyslog.evel_nfcnamingcode_set(syslogConfig.get("nfcNamingCode"));
+    	    eveSyslog.evel_nfnamingcode_set(syslogConfig.get("nfNamingCode"));
 		if(syslogConfig.get("reportingEntityName") == null) {
 			eveSyslog.evel_reporting_entity_name_set(hostName);
 		}else {
-			eveSyslog.evel_reporting_entity_name_set(syslogConfig.get("reportingEntityName").toString());
+			eveSyslog.evel_reporting_entity_name_set(syslogConfig.get("reportingEntityName"));
 		}
-		eveSyslog.evel_reporting_entity_id_set(syslogConfig.get("reportingEntityId").toString());
-		eveSyslog.evel_nfVendorName_set(syslogConfig.get("nfVendorName").toString());
-		eveSyslog.evel_header_set_sourceid(true,syslogConfig.get("sourceId").toString());
+		eveSyslog.evel_reporting_entity_id_set(syslogConfig.get("reportingEntityId"));
+		eveSyslog.evel_nfVendorName_set(syslogConfig.get("nfVendorName"));
+		eveSyslog.evel_header_set_sourceid(true,syslogConfig.get("sourceId"));
 		if(syslogConfig.get("sourceName") == null) {
 			eveSyslog.evel_header_set_source_name(hostName);
 		}else {
-			eveSyslog.evel_header_set_source_name(syslogConfig.get("sourceName").toString());
+			eveSyslog.evel_header_set_source_name(syslogConfig.get("sourceName"));
 		}				
-		eveSyslog.evel_timeZoneOffset_set(syslogConfig.get("timeZoneOffset").toString());
+		eveSyslog.evel_timeZoneOffset_set(syslogConfig.get("timeZoneOffset"));
 		}
 		
 		eveSyslog.evel_syslog_facility_set(EVEL_SYSLOG_FACILITIES.EVEL_SYSLOG_FACILITY_LOCAL0);
-		eveSyslog.evel_syslog_proc_set(syslogConfig.get("syslogProc").toString());			
+		eveSyslog.evel_syslog_proc_set(syslogConfig.get("syslogProc"));			
 
 		
 		
@@ -121,14 +127,11 @@
 
 	}
 	
-	public  String syslogFileRead(String tagToCompare){		
-		String syslines ="";
+	public  String syslogFileRead(String tagToCompare) throws IOException{		
+		
 		int currentIndex = 0;
 		boolean compare = false;
-		
-	        try {
-	        	
-	        	BufferedReader reader = new BufferedReader(new FileReader("/var/log/syslog"));
+	        try (BufferedReader reader = new BufferedReader(new FileReader("/var/log/syslog"))){
 				String line = reader.readLine();
 				while (line != null) {
 					if( currentIndex == linesReadFromFile ) {
@@ -141,15 +144,14 @@
 					currentIndex ++;					
 					
 					line = reader.readLine();
-				}
-				
-				if( compare )
+				}				
+				if( compare ) {
 				linesReadFromFile=currentIndex;
-	        	
+				}
 	        	
 	        } catch (Exception ex) {
-	           ex.printStackTrace();
-	        } 
+	           logger.error(ex);
+	        }
 	        
 	  return null;
 	}
@@ -167,7 +169,7 @@
 
 	public static String hostName() {
 	    String hostname = "Unknown";
-	    String uuid = "Unknown";
+	    
 	    try
 	    {
 	        InetAddress addr;
@@ -176,7 +178,7 @@
 	    }
 	    catch (UnknownHostException ex)
 	    {
-	        
+	        logger.error(ex);
 	    }	    
 	    try{	    	
 	      Enumeration<NetworkInterface> networks =
@@ -197,11 +199,11 @@
 	         }
 	        }
 	        if (mac != null) {
-	            uuid = bytesToHex(mac);
+	             bytesToHex(mac);
 	        }
 	      }
 	    } catch (SocketException e) {
-			// TODO Auto-generated catch block
+			logger.error(e);
 			
 		}
 
@@ -209,7 +211,7 @@
 	}
 
 	
-	public static HashMap<String, String> readSyslogConfig() throws IOException, ParseException {
+	private static HashMap<String, String> readSyslogConfig() throws IOException, ParseException {
 
 		JSONParser jsonParser = new JSONParser();
 		try {
@@ -240,16 +242,15 @@
 	        	indirectres = indirectObject.split("=");
 	        	syslogConfig.put(indirectres[0], indirectres[1]);	        
 	        } 	
-	        syslogFile =      syslogConfig.get("tmp_syslogFile").toString();
+	        syslogFile =      syslogConfig.get("tmp_syslogFile");
 			} catch (ClassCastException ex) {
-			ex.printStackTrace();
+			logger.error(ex);
 		}
 		return syslogConfig;
 	}
 	
 	
 	public static void main(String[] args) {
-		// TODO Auto-generated method stub
         
 		try {
             AgentMain.evel_initialize("http://127.0.0.1",30000,
diff --git a/veslibrary/ves_javalibrary/evel_javalib2/src/test/java/TestJunit.java b/veslibrary/ves_javalibrary/evel_javalib2/src/test/java/TestJunit.java
index fe993ec..adab087 100644
--- a/veslibrary/ves_javalibrary/evel_javalib2/src/test/java/TestJunit.java
+++ b/veslibrary/ves_javalibrary/evel_javalib2/src/test/java/TestJunit.java
@@ -107,7 +107,7 @@
          }
     }
 
-
+    
     @Test
     public void testMain() {
     	Main mains = new Main();
@@ -119,7 +119,8 @@
     @Test
     public void testLBHeartBeat() {
     	HeartBeatData hb = new HeartBeatData();
-    	hb.start();    	
+    	hb.start();  
+    	hb.hostName();
     }
    
     @Test
@@ -127,7 +128,7 @@
     	FaultData flDataThread = new FaultData();   	
     	new Thread(flDataThread.faultInstance01).start();	
         new Thread(flDataThread.faultInstance02).start();
-        
+        flDataThread.hostName();
     	String[] strArray = {"name1","name12","name13"}; 
     	flDataThread.main(strArray);
     }
@@ -136,7 +137,7 @@
     public void testLBMeasurement() {
     	MeasureData mdataThread = new MeasureData();
     	mdataThread.start();
-    	
+    	mdataThread.hostName();
     	String[] strArra = {"meas1","meas1","meas1"}; 
     	mdataThread.main(strArra);
     	
@@ -144,9 +145,14 @@
     }
     
     @Test
-    public void testLBSyslog() {
+    public void testLBSyslog() throws IOException {
     	syslogData syslogDataThread = new syslogData();
     	syslogDataThread.start();
+    	syslogDataThread.syslogFileRead("INSECURE MODE");
+    	syslogDataThread.hostName();
+    	syslogDataThread.sendSysLogEvent("INSECURE MODE", "Jan 23 18:09:01 ves-VirtualBox cron[1119]: (*system*) INSECURE MODE (group/other writable) (/etc/crontab)");
+    	String[] strArra = {"meas1"}; 
+    	syslogDataThread.main(strArra);
  
     }
     
@@ -162,6 +168,15 @@
     	dd.setT1Bytesout("671940");
     	dd.setT1Packetsin("73017");
     	dd.setT1Packetsout("86180");
+    	dd.getInstanceres02Command();
+    	dd.getT0bytesIn();
+    	dd.getT0bytesOut();
+    	dd.getT0packetIn();
+    	dd.getT0packetOut();
+    	dd.getT1Bytesin();
+    	dd.getT1Bytesout();
+    	dd.getT1Packetsin();
+    	dd.getT1Packetsout();
 
     }
 
@@ -198,10 +213,10 @@
                 EVEL_ENTITY_STATE.EVEL_ENTITY_STATE_OUT_OF_SERVICE,"bgp");
     stc.evel_statechange_addl_info_add("bgpa", "fail");
     stc.evel_statechange_addl_info_add("bgpb", "fail");
-        when(mymainmock.evel_post_event(stc)).thenReturn(true);
-    boolean ret = mymainmock.evel_post_event(stc);
-    LOG.info("Returned "+ret);
-    assertTrue( ret );
+    
+   
+    stc.evel_json_encode_event();
+    stc.evel_json_encode_event_batch();
 
     }
 
@@ -212,7 +227,7 @@
               header  = EvelHeader.evel_new_heartbeat("Hearbeat_vAFX","vmname_ip");
               header.evel_nfnamingcode_set("vVNF");
               header.evel_nfcnamingcode_set("vVNF");
-              header.evel_timeZoneOffset_set("UTC+5:30");
+              header.evel_timeZoneOffset_set("UTC+5:30");              
               when(mymainmock.evel_post_event(header)).thenReturn(true);
               boolean ret = mymainmock.evel_post_event(header);
               LOG.info("Returned "+ret);
@@ -225,10 +240,9 @@
 	   EvelHeartbeatField hfld = new EvelHeartbeatField(123,"HeartbeatField_vVNF", "1");
        hfld.evel_hrtbt_interval_set(100);
        hfld.evel_timeZoneOffset_set("UTC+5:30");
-       when(mymainmock.evel_post_event(hfld)).thenReturn(true);
-       boolean ret = mymainmock.evel_post_event(hfld);
-       LOG.info("Returned "+ret);
-       assertTrue( ret );
+       
+       hfld.evel_json_encode_event();
+       hfld.evel_json_encode_event_batch();
               
    }
 
@@ -247,305 +261,18 @@
               flt.evel_fault_type_set("vmintf");
               flt.evel_fault_interface_set("My Interface Card");
               flt.evel_fault_category_set("link");
-              when(mymainmock.evel_post_event(flt)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(flt);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+              
+              flt.evel_json_encode_event();
+              flt.evel_json_encode_event_batch();
 
    }
 
    @Test
    public void testBatch() {
               EvelBatch be = new EvelBatch();
-              EvelFault flt2  = new EvelFault("Fault_vVNF", "vmname_ip",
-            		  "NIC error", "Hardware failed",
-                  EvelHeader.PRIORITIES.EVEL_PRIORITY_HIGH,
-                  EVEL_SEVERITIES.EVEL_SEVERITY_MAJOR,
-                  EVEL_SOURCE_TYPES.EVEL_SOURCE_CARD,
-                  EVEL_VF_STATUSES.EVEL_VF_STATUS_ACTIVE);
-              flt2.evel_fault_addl_info_add("nichw", "fail");
-              flt2.evel_fault_addl_info_add("nicsw", "fail");
-              be.addEvent(flt2);
               
-              EvelFault flt3  = new EvelFault("Fault_vVNF", "vmname_ip2",
-            		  "NIC error", "Hardware failed",
-                  EvelHeader.PRIORITIES.EVEL_PRIORITY_NORMAL,
-                  EVEL_SEVERITIES.EVEL_SEVERITY_MAJOR,
-                  EVEL_SOURCE_TYPES.EVEL_SOURCE_CARD,
-                  EVEL_VF_STATUSES.EVEL_VF_STATUS_ACTIVE);
-              flt3.evel_fault_type_set("Interface fault");
-              flt3.evel_fault_category_set("Failed category");
-              flt3.evel_fault_interface_set("An Interface Card");
-              flt3.evel_fault_addl_info_add("nichw", "fail");
-              flt3.evel_fault_addl_info_add("nicsw", "fail");
-              be.addEvent(flt3);
- 
-
-              EvelStateChange stc  = new EvelStateChange("StateChange_vVNF", "vmname_ip",
-            		      EVEL_ENTITY_STATE.EVEL_ENTITY_STATE_IN_SERVICE,
-                          EVEL_ENTITY_STATE.EVEL_ENTITY_STATE_OUT_OF_SERVICE,"bgp");
-              stc.evel_statechange_addl_info_add("bgpa", "fail");
-              stc.evel_statechange_addl_info_add("bgpb", "fail");
-              //AgentMain.evel_post_event(stc);                          
-              be.addEvent(stc);
+              be.evel_json_encode_event();
               
-              
-              EvelSyslog sysl = new EvelSyslog("Syslog_vVNF", "vmname_ip",
-              		   EvelFault.EVEL_SOURCE_TYPES.EVEL_SOURCE_ROUTER,
-                         "Router failed","JUNIPER");             
-                 sysl.evel_syslog_event_source_host_set("SL Host");
-                 sysl.evel_syslog_priority_set(21);
-                 sysl.evel_syslog_proc_id_set(456);
-                 sysl.evel_syslog_proc_set("routed");
-                 sysl.evel_syslog_s_data_set("sys data");
-                 sysl.evel_syslog_sdid_set("200");
-                 sysl.evel_syslog_severity_set("Alert");              
-                 sysl.evel_syslog_facility_set(EVEL_SYSLOG_FACILITIES.EVEL_SYSLOG_FACILITY_INTERNAL);
-                 sysl.evel_syslog_severity_set("Data");
-                 sysl.evel_syslog_version_set(20);
-                 sysl.evel_syslog_msghost_set("Hostmsg");
-                 sysl.evel_syslogTs_set("SyslogTs");                            
-                 sysl.evel__syslog_addl_info_add("name1", "value1");
-                 sysl.evel__syslog_addl_info_add("name2", "value2");
-                 be.addEvent(sysl);
-                 
-                 
-                 EvelNotification notification = new EvelNotification("Notification_vVNF", "vmname_ip","change_identifier", "configuration changed");
-                 notification.evel_notification_add_newState_set("maintainance");
-                 notification.evel_notification_add_oldState_set("out of Service");
-                 notification.evel_notification_add_changeContact_set("ChangeContact");
-                 notification.evel_notification_addl_info_add("name1", "value1");
-                 notification.evel_notification_addl_info_add("name4", "value5");              
-                 notification.evel_notification_add_namedarray("hmNam1", "hmName1", "hmNmae2");            
-                 notification.evel_notification_add_stateInterface_set("StateChange");
-                 be.addEvent(notification);
-                 
-
-                 
-                 EvelPnfRegistration pnfRegistration = new EvelPnfRegistration("PnfRegistration_vVNF", "vmname_ip");
-                 pnfRegistration.evel_pnrregistration_add_lastServiceDate_set("10FEB2019");
-                 pnfRegistration.evel_pnrregistration_add_modelNumber_set("123456789");
-                 pnfRegistration.evel_pnfRegistration_serialNumber_set("6061ZW3");
-                 pnfRegistration.evel_pnrregistration_add_macaddress_set("localhost");
-                 pnfRegistration.evel_pnrregistration_add_manufactureDate_set("FEB2011");
-                 pnfRegistration.evel_pnrregistration_add_oamV4IpAddress_set("localhost");
-                 
-                 pnfRegistration.evel_pnfRegistration_softwareVersion_set("SW1234");
-                 
-                 
-                 pnfRegistration.evel_pnfRegistration_unitFamily_set("unitFamily222");
-                 pnfRegistration.evel_pnfRegistration_unitType_set("unitType1");
-                 
-                 pnfRegistration.evel_pnrregistration_add_oamV4IpAddress_set("localhost");
-                 pnfRegistration.evel_pnrregistration_add_oamV6IpAddress_set("localhost");
-                 
-                 
-                 pnfRegistration.evel_pnfRegistration_vendorName_set("Vend_nam_123");
-                 pnfRegistration.evel_pnrregistration_addl_info_add("Name1", "value1");
-                 pnfRegistration.evel_pnrregistration_addl_info_add("Name2", "value2");
-                 be.addEvent(pnfRegistration);
-                 
-                 EvelSipSignaling sip = new EvelSipSignaling("SipSignaling_vVNF", "vmname_ip","aricent","corlator","localhost","5647","localhost","5678");
-                 sip.evel_signaling_vnfmodule_name_set("nfName");
-                 sip.evel_signaling_vnfname_set("nf_name");
-                 sip.evel_signaling_addl_info_add("name1", "value1");
-                 sip.evel_signaling_addl_info_add("name2", "value2");
-                sip.evel_signaling_compressed_sip_set("CompressedIP");    
-                sip.evel_signaling_summary_sip_set("SummarySip");
-                be.addEvent(sip);
-               
-                EvelVoiceQuality vq = new EvelVoiceQuality("VoiceQuality_vVNF", "vmname_ip",
-                        "calleeSideCodc",
-                        "callerSideCodc", "corlator",
-                        "midCllRtcp", "juniper");
-                vq.evel_voice_quality_end_metrics_set("adjname", "Caller", 20, 30, 40, 50, 60, 70, 80, 100, 110, 120, 130, 140, 1.1, 160.12, 17, 190, 200,210,220,230,240,250,260,270,280,290,300);                          
-                vq.evel_voice_quality_phone_number_set("PhoneNumber");
-                vq.evel_voice_quality_vnfmodule_name_set("vnfNaming");
-                vq.evel_voice_quality_vnfname_set("vnfName");
-                vq.evel_voice_quality_addl_info_add("Name1", "value1");
-                vq.evel_voice_quality_addl_info_add("Name2", "value2");
-                be.addEvent(vq);
-                
-                EvelOther ev = new EvelOther("MyCustomEvent_vVNF", "vmname_ip");
-                ev.evel_other_field_add("name1", "value1");
-                ev.evel_other_field_add("name2", "value2");
-                ev.evel_other_field_add("name3", "value3");
-                ev.evel_other_field_add("name4", "value4");
-                
-                ev.evel_other_field_add_namedarray("value3", "name3", "value6");
-                ev.evel_other_field_add_namedarray("value1", "name4", "value7");
-                ev.evel_other_field_add_namedarray("value1", "name4", "value7");
-                ev.evel_other_field_add_namedarray("value4", "name5", "value8");
-               
-
-                       JsonObjectBuilder jsonObjBld =
-                               Json.createObjectBuilder()
-                                       .add("trackIdentifier", 12345)
-                                       .add("remoteSource", "vm1235")
-                                       .add("ended", "12:45:67")
-                                       .add("detached", 633453)
-                                       .add("frameWidth", 765765)
-                                       .add("frameHeight", 767867)
-                                       .add("framesPerSecond", 334343)
-                                       .add("framesSent", 8976786)
-                                       .add("framesReceived", 233423)
-                                       .add("frameHeight", 8897896)
-                                       .add("framesDecoded", 3434533)
-                                       .add("framesDropped", 87867676)
-                                       .add("framesCorrupted", 3345342)
-                                       .add("audioLevel", "-45dBm");
-                       JsonObject custom = jsonObjBld.build();
-
-                       ev.evel_other_field_add_jsonobj(custom);
-                       be.addEvent(ev);
-                       
-                 		String dateStart = "01/14/2012 09:29:58";
-                 		String dateStop = "01/15/2012 10:31:48";
-
-                 		//HH converts hour in 24 hours format (0-23), day calculation
-                 		SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
-
-                 		Date d1 = null;
-                 		Date d2 = null;
-
-                 		try {
-                 			d1 = format.parse(dateStart);
-                 			d2 = format.parse(dateStop);
-                 		}catch (Exception e) {
-               			
-               		}
-                         
-                       EvelThresholdCross tca = new EvelThresholdCross("ThresholdCross_vVNF", "vmname_ip", "CRIT", 
-                       		"mcastRxPackets", EvelThresholdCross.EVEL_EVENT_ACTION.EVEL_EVENT_ACTION_CLEAR, 
-                       		"Mcast Rx breached", 
-                       		EvelThresholdCross.EVEL_ALERT_TYPE.EVEL_CARD_ANOMALY, 
-                       		
-                       		d1, EvelThresholdCross.EVEL_SEVERITIES.EVEL_SEVERITY_CRITICAL, 
-                       		d2);
-                       
-                       tca.evel_threshold_cross_alertvalue_set("alertvalue");
-                       tca.evel_threshold_cross_data_collector_set("data_collector");
-                       tca.evel_threshold_cross_data_elementtype_set("data_elementtype");
-                       tca.evel_threshold_cross_interfacename_set("interfacename");
-                       tca.evel_threshold_cross_networkservice_set("networkservice");
-                       tca.evel_threshold_cross_possible_rootcause_set("possible_rootcause");
-                       
-                       tca.evel_thresholdcross_addl_info_add("addname1", "addvalue1");
-                       tca.evel_thresholdcross_addl_info_add("addname2", "addvalue2");
-                       tca.evel_thresholdcross_alertid_add("alert1");
-                       tca.evel_thresholdcross_alertid_add("alert2");
-                       tca.evel_thresholdcross_alertid_add("alert3");
-                       tca.evel_thresholdcross_hashMap_add("hashName", "hashValue");
-                       be.addEvent(tca);
-                 
-                 		
-                 		
-                 		
-                 		try {
-                 			d1 = format.parse(dateStart);
-                 		}catch (Exception e) {
-               			
-               		}
-                       EvelMobileFlow mf = new EvelMobileFlow("MobileFlow_vVNF", "vmname_ip",
-                               "In",
-                               null,
-                               "GTP",
-                               "v2.3",
-                               "localhost",
-                               345556,
-                               "localhost",
-                               334344);
-           			MOBILE_GTP_PER_FLOW_METRICS mygtp = mf.new MOBILE_GTP_PER_FLOW_METRICS(
-                               1.01,
-                               2.02,
-                               3,
-                               4,
-                               5,
-                               6,
-                               7,
-                               8,
-                               9,
-                               d1,
-                               "ACTIVE",
-                               10,
-                               11,
-                               12,
-                               13,
-                               14,
-                               15,
-                               16,
-                               17,
-                               18,
-                               19,
-                               20,
-                               21,
-                               22,
-                               23,
-                               24,
-                               25,
-                               26,
-                               27,
-                               28);
-                       mf.gtp_per_flow_metrics = mygtp;
-                       
-                       
-                       mf.evel_mobile_gtp_metrics_dur_con_fail_set(mygtp, 1);
-                       mf.evel_mobile_gtp_metrics_dur_tun_fail_set(mygtp, 1);
-                       mf.evel_mobile_gtp_metrics_act_by_set(mygtp, "Active");
-                       mf.evel_mobile_gtp_metrics_act_time_set(mygtp, "Time");
-                       mf.evel_mobile_gtp_metrics_deact_by_set(mygtp, "FlowDeactivation");
-                       mf.evel_mobile_gtp_metrics_con_status_set(mygtp, "Status");
-                       mf.evel_mobile_gtp_metrics_tun_status_set(mygtp, "Tunnel Status");
-                       mf.evel_mobile_gtp_metrics_large_pkt_rtt_set(mygtp, 12);
-                       mf.evel_mobile_gtp_metrics_large_pkt_thresh_set(mygtp, 123);
-                       mf.evel_mobile_gtp_metrics_max_rcv_bit_rate_set(mygtp, 12);
-                       mf.evel_mobile_gtp_metrics_max_trx_bit_rate_set(mygtp, 12);
-                       mf.evel_mobile_gtp_metrics_num_echo_fail_set(mygtp, 1);
-                       mf.evel_mobile_gtp_metrics_num_tun_fail_set(mygtp, 2);
-                       mf.evel_mobile_gtp_metrics_num_http_errors_set(mygtp, 2);
-                       
-                       mf.evel_mobile_gtp_metrics_iptos_set(mygtp,2, 3);            
-                       mf.evel_mobile_gtp_metrics_iptos_set(mygtp,5, 6);
-                       
-                       mf.evel_mobile_gtp_metrics_tcp_flag_count_add(mygtp, 3, 4);
-                       mf.evel_mobile_gtp_metrics_tcp_flag_count_add(mygtp, 5, 8);
-                       
-                       mf.evel_mobile_gtp_metrics_qci_cos_count_add(mygtp, 2, 3);
-                       mf.evel_mobile_gtp_metrics_qci_cos_count_add(mygtp, 5, 6);
-                       mf.evel_mobile_flow_addl_field_add("mobileFlowName1", "mobileValue1");          
-                       mf.evel_mobile_flow_app_type_set("application type");
-                       mf.evel_mobile_flow_app_prot_type_set("appProtocolType");
-                       mf.evel_mobile_flow_app_prot_ver_set("appProtocolVersion");
-                       mf.evel_mobile_flow_cid_set("CID");
-                       mf.evel_mobile_flow_con_type_set("ConnectionType");
-                       mf.evel_mobile_flow_ecgi_set("ECGI");
-                       mf.evel_mobile_flow_gtp_prot_type_set("gtpProtocalType");
-                       mf.evel_mobile_flow_gtp_prot_ver_set("GtpVersion");
-                       mf.evel_mobile_flow_http_header_set("HttpHeader");
-                       mf.evel_mobile_flow_imei_set("IMEI");
-                       mf.evel_mobile_flow_imsi_set("IMSI");
-                       mf.evel_mobile_flow_lac_set("LAC");
-                       mf.evel_mobile_flow_mcc_set("MCC");
-                       mf.evel_mobile_flow_mnc_set("MNC");
-                       mf.evel_mobile_flow_msisdn_set("Msisdn");
-                       mf.evel_mobile_flow_other_func_role_set("OtherFunctionRole");
-                       
-                       mf.evel_mobile_flow_rac_set("RAC");
-                       mf.evel_mobile_flow_radio_acc_tech_set("RadoiAcessTech");
-                       mf.evel_mobile_flow_sac_set("SAC");
-                       
-                       mf.evel_mobile_flow_samp_alg_set(123);
-                       mf.evel_mobile_flow_tac_set("TAC");
-                       mf.evel_mobile_flow_tunnel_id_set("Tunnel");
-                       mf.evel_mobile_flow_vlan_id_set("Vlan");
-                       be.addEvent(mf);
-
-              
-              
-              when(mymainmock.evel_post_event(be)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(be);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
    }
 
    
@@ -838,10 +565,9 @@
           
               sm.evel_measurement_vnic_performance_add("vnic","vals",0., 1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.,24.,25.,26.,27.,28.,"administrativeState","operationalState",31.,32.,33.,34.,35.,36.);
 
-              when(mymainmock.evel_post_event(sm)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(sm);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+              sm.evel_json_encode_event();
+              sm.evel_json_encode_event_batch();
+                            
    }
               
    @Test  
@@ -867,11 +593,10 @@
        
        sysl.evel__syslog_addl_info_add("name1", "value1");
        sysl.evel__syslog_addl_info_add("name2", "value2");
+       
+       sysl.evel_json_encode_event();
+       sysl.evel_json_encode_event_batch();
               
-              when(mymainmock.evel_post_event(sysl)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(sysl);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
    }
    
               
@@ -891,11 +616,10 @@
               mf.evel_mobile_flow_type_set("named");
               mf.evel_mobile_flow_app_type_set("named");
               mf.evel_mobile_flow_addl_field_add("Name", "Value");
-
-              when(mymainmock.evel_post_event(mf)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(mf);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+              
+              
+              mf.evel_json_encode_event();
+              mf.evel_json_encode_event_batch();
    }
    
    
@@ -914,10 +638,9 @@
        
        notification.evel_notification_add_stateInterface_set("StateChange");
 
-              when(mymainmock.evel_post_event(notification)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(notification);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+       notification.evel_json_encode_event();
+       notification.evel_json_encode_event_batch();
+
    }
 
    @Test
@@ -930,7 +653,7 @@
        pnfRegistration.evel_pnfRegistration_serialNumber_set("6061ZW3");
        pnfRegistration.evel_pnrregistration_add_macaddress_set("localhost");
        pnfRegistration.evel_pnrregistration_add_manufactureDate_set("FEB2011");
-     //  pnfRegistration.evel_pnrregistration_add_modelNumber_set("FE934567");
+     
        pnfRegistration.evel_pnrregistration_add_oamV4IpAddress_set("localhost");
        
        pnfRegistration.evel_pnfRegistration_softwareVersion_set("SW1234");
@@ -947,12 +670,8 @@
        pnfRegistration.evel_pnrregistration_addl_info_add("Name1", "value1");
        pnfRegistration.evel_pnrregistration_addl_info_add("Name2", "value2");
        
-
-
-              when(mymainmock.evel_post_event(pnfRegistration)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(pnfRegistration);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+       pnfRegistration.evel_json_encode_event();
+       pnfRegistration.evel_json_encode_event_batch();
    }
 
 
@@ -969,11 +688,9 @@
        sip.evel_signaling_addl_info_add("name2", "value2");
       sip.evel_signaling_compressed_sip_set("CompressedIP");    
       sip.evel_signaling_summary_sip_set("SummarySip");
-
-              when(mymainmock.evel_post_event(sip)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(sip);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+      
+      sip.evel_json_encode_event();
+      sip.evel_json_encode_event_batch();
    }
               
    
@@ -991,16 +708,9 @@
        vq.evel_voice_quality_vnfname_set("vnfName");
        vq.evel_voice_quality_addl_info_add("Name1", "value1");
        vq.evel_voice_quality_addl_info_add("Name2", "value2");
- /*
-  * Arguments updated 15/07/2018
-  */
-              
-          //    vq.evel_voice_quality_end_metrics_set("name","descr",2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12,13.,14.,15.,16.,17.,19.,20.,21.,22.,23.,24.,25.,26.,27.,28.,29.,30.);
-              
-              when(mymainmock.evel_post_event(vq)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(vq);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+       
+       vq.evel_json_encode_event();
+       vq.evel_json_encode_event_batch();
    }
               
    @Test
@@ -1037,10 +747,9 @@
 
               ev.evel_other_field_add_jsonobj(custom);
               
-              when(mymainmock.evel_post_event(ev)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(ev);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+              ev.evel_json_encode_event();
+              ev.evel_json_encode_event_batch();
+
    }
               
    @Test
@@ -1082,11 +791,9 @@
             tca.evel_thresholdcross_alertid_add("alert2");
             tca.evel_thresholdcross_alertid_add("alert3");
             tca.evel_thresholdcross_hashMap_add("hashName", "hashValue");
-              
-              when(mymainmock.evel_post_event(tca)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(tca);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+            
+            tca.evel_json_encode_event();
+            tca.evel_json_encode_event_batch();
    }
               
 
@@ -1140,9 +847,7 @@
                     26,
                     27,
                     28);
-            mf.gtp_per_flow_metrics = mygtp;
-            
-            
+            mf.gtp_per_flow_metrics = mygtp;                        
             mf.evel_mobile_gtp_metrics_dur_con_fail_set(mygtp, 1);
             mf.evel_mobile_gtp_metrics_dur_tun_fail_set(mygtp, 1);
             mf.evel_mobile_gtp_metrics_act_by_set(mygtp, "Active");
@@ -1192,11 +897,10 @@
             mf.evel_mobile_flow_tac_set("TAC");
             mf.evel_mobile_flow_tunnel_id_set("Tunnel");
             mf.evel_mobile_flow_vlan_id_set("Vlan");
-              
-              when(mymainmock.evel_post_event(mf)).thenReturn(true);
-              boolean ret = mymainmock.evel_post_event(mf);
-              LOG.info("Returned "+ret);
-              assertTrue( ret );
+            
+            mf.evel_json_encode_event();
+            mf.evel_json_encode_event_batch();
+
    }
 
 
