diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
index 1a1bdf3..9cd7341 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/CQLBatchLoop.java
@@ -3,6 +3,7 @@
  * org.onap.aaf
  * ===========================================================================
  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
  * ===========================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -51,15 +52,14 @@
     /**
      * Assume this is another line in the Batch
      * @return
-     */
+     */	
     public StringBuilder inc() {
-        if(i>=maxBatch || current.length()+sb.length()>MAX_CHARS) {
-            if(i>0) {
-                cqlBatch.execute(dryRun);
+        if((i>=maxBatch || current.length()+sb.length()>MAX_CHARS)&&(i>0)) {
+            
+        	    cqlBatch.execute(dryRun);
                 i = -1;
                 incBatch();
-            }
-        }
+    }
         if(i<0) {
             cqlBatch.begin();
             i=0;
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/UserRole.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/UserRole.java
index d5c0d77..dd24d7d 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/UserRole.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/UserRole.java
@@ -3,6 +3,7 @@
  * org.onap.aaf
  * ===========================================================================
  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
  * ===========================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -128,10 +129,10 @@
 
     public static void load(Trans trans, CSV csv, Creator<UserRole> creator, Visitor<UserRole> visitor) throws IOException, CadiException {
 //        public UserRole(String user, String role, String ns, String rname, Date expires) {
-        csv.visit( row -> {
+        csv.visit( row -> 
             visitor.visit(new UserRole(row.get(1),row.get(2),row.get(3),row.get(4),
-                new Date(Long.parseLong(row.get(6)))));
-        });
+                new Date(Long.parseLong(row.get(6)))))
+        );
     }
     
     private static void load(Trans trans, Session session, Creator<UserRole> creator, String where, Visitor<UserRole> visitor) {
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
index ec8d145..6c95f02 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyBody.java
@@ -3,6 +3,7 @@
  * org.onap.aaf
  * ===========================================================================
  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
  * ===========================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -205,15 +206,13 @@
         for(String cls : classNames) {
             try {
                 Class<?> c = cl.loadClass(cls);
-                if(c!=null) {
-                    if(!Modifier.isAbstract(c.getModifiers())) {
-                        Constructor<?> cst = c.getConstructor(Access.class);
+                if((c!=null)&&(!Modifier.isAbstract(c.getModifiers()))) {
+                       Constructor<?> cst = c.getConstructor(Access.class);
                         NotifyBody nb = (NotifyBody)cst.newInstance(access);
                         if(nb!=null) {
                             bodyMap.put("info|"+nb.name, nb);
                             bodyMap.put(nb.type+'|'+nb.name, nb);
-                        }
-                    }
+                          }
                 }
             } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
                 e.printStackTrace();
