diff --git a/asterix-common/src/test/java/org/apache/asterix/test/server/TestServerProvider.java b/asterix-common/src/test/java/org/apache/asterix/test/server/TestServerProvider.java
index 0be6800..60c1c11 100644
--- a/asterix-common/src/test/java/org/apache/asterix/test/server/TestServerProvider.java
+++ b/asterix-common/src/test/java/org/apache/asterix/test/server/TestServerProvider.java
@@ -30,4 +30,4 @@
                 throw new Exception("Unknown test server");
         }
     }
-}
\ No newline at end of file
+}
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordReader.java b/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordReader.java
index 1462e9b..769db19 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordReader.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/api/IRecordReader.java
@@ -72,4 +72,4 @@
      * progress and errors
      */
     public void setFeedLogManager(FeedLogManager feedLogManager);
-}
\ No newline at end of file
+}
diff --git a/asterix-external-data/src/main/java/org/apache/asterix/external/util/TweetGenerator.java b/asterix-external-data/src/main/java/org/apache/asterix/external/util/TweetGenerator.java
index d4e63ad..3670368 100644
--- a/asterix-external-data/src/main/java/org/apache/asterix/external/util/TweetGenerator.java
+++ b/asterix-external-data/src/main/java/org/apache/asterix/external/util/TweetGenerator.java
@@ -68,7 +68,6 @@
 
     private void writeTweetString(TweetMessage tweetMessage) throws IOException {
         String tweet = tweetMessage.getAdmEquivalent(fields) + "\n";
-        System.out.println(tweet);
         tweetCount++;
         byte[] b = tweet.getBytes();
         if (outputBuffer.position() + b.length > outputBuffer.limit()) {
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/Common.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/Common.java
index b3c027b..da05e46 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/Common.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/Common.java
@@ -63,4 +63,4 @@
             return h;
         }
     };
-}
\ No newline at end of file
+}
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/ExprList.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/ExprList.java
index 13ef3c1..e9376e2 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/ExprList.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/ExprList.java
@@ -277,4 +277,4 @@
     public void reset() {
         exprList.clear();
     }
-}
\ No newline at end of file
+}
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/object/pool/ValuePool.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/object/pool/ValuePool.java
index 5034dbe..698e947 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/object/pool/ValuePool.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/object/pool/ValuePool.java
@@ -30,4 +30,4 @@
     protected void reset(Value obj) {
         obj.clear();
     }
-}
\ No newline at end of file
+}
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdToADMTest.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdToADMTest.java
index 92c6ba1..926c40e 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdToADMTest.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdToADMTest.java
@@ -80,22 +80,14 @@
                 int i = 0;
                 while (recordReader.hasNext()) {
                     i++;
-                    System.out.print("{ ");
                     val.clear();
                     IRawRecord<char[]> record = recordReader.next();
                     lexerSource.setNewSource(record.get());
                     parser.setLexerSource(lexerSource);
                     parser.parseNext(pAd);
-                    //System.out.println(pAd);
                     Map<CaseInsensitiveString, ExprTree> attrs = pAd.getAttrList();
-                    boolean notFirst = false;
                     for (Entry<CaseInsensitiveString, ExprTree> entry : attrs.entrySet()) {
-                        CaseInsensitiveString name = entry.getKey();
                         ExprTree tree = entry.getValue();
-                        if (notFirst) {
-                            System.out.print(", ");
-                        }
-                        notFirst = true;
                         switch (tree.getKind()) {
                             case ATTRREF_NODE:
                             case CLASSAD_NODE:
@@ -103,25 +95,15 @@
                             case EXPR_LIST_NODE:
                             case FN_CALL_NODE:
                             case OP_NODE:
-                                if (pAd.evaluateAttr(name.get(), val)) {
-                                    System.out.print("\"" + name + "Expr\":" + "\"expr=" + tree + "\"");
-                                    System.out.print(", \"" + name + "\":" + val);
-                                } else {
-                                    System.out.print("\"" + name + "\":" + tree);
-                                }
                                 break;
                             case LITERAL_NODE:
-                                // No need to do anything
-                                System.out.print("\"" + name + "\":" + tree);
                                 break;
                             default:
                                 System.out.println("Something is wrong");
                                 break;
                         }
                     }
-                    System.out.println(" }");
                 }
-                System.out.println(i + " number of records found");
                 recordReader.close();
             }
         } catch (Exception e) {
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTest.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTest.java
index c74fd03..f972f45 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTest.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTest.java
@@ -53,7 +53,6 @@
         try {
             ClassAdUnitTester.test(args.length, args);
         } catch (IOException e) {
-            e.printStackTrace();
             assertTrue(false);
         }
         assertTrue(true);
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTester.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTester.java
index 561b541..5b1e0b5 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTester.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/ClassAdUnitTester.java
@@ -232,7 +232,7 @@
         if (parameters.checkAll || parameters.checkOperator) {
         }
         if (parameters.checkAll || parameters.checkCollection) {
-            //test_collection(parameters, results);
+            // test_collection(parameters, results);
         }
         if (parameters.checkAll || parameters.checkUtils) {
             testUtils(parameters, results);
@@ -329,7 +329,7 @@
         AMutableDouble r = new AMutableDouble(0);
         AMutableCharArrayString s = new AMutableCharArrayString();
         ClassAd c = new ClassAd();
-        //ExprList *l;
+        // ExprList *l;
 
         basic = parser.parseClassAd(input_basic);
 
@@ -395,7 +395,6 @@
                         haveSeconds = false;
                         haveOther = false;
                         for (String entry : refs) {
-                            System.out.println(entry);
                             if (entry.compareTo("other.Environment") == 0) {
                                 haveEnvironment = true;
                             } else if (entry.compareTo("other.Time") == 0) {
@@ -439,7 +438,7 @@
                 results);
 
         /* ----- Test chained ClassAds ----- */
-        //classad1 and classad2 from above test are used.
+        // classad1 and classad2 from above test are used.
         ClassAd classad3 = new ClassAd();
 
         classad1.chainToAd(classad2);
@@ -688,41 +687,6 @@
     }
 
     /*********************************************************************
-     * This test suite was deleted since I don't think we need it
-     * Function: test_collection
-     * Purpose: Test the ClassAdCollection class. Note that we test the
-     * local Collections only: we don't test the server/client
-     * versions available in ClassAdCollectionServer and
-     * ClassAdCollectionClient.
-     *********************************************************************/
-
-    /*
-     * This one is deleted too since I don't think we need it
-    public static boolean check_in_view(ClassAdCollection collection, String view_name, String classad_name) {
-        boolean have_view;
-        boolean in_view;
-
-        in_view = false;
-
-        LocalCollectionQuery query;
-
-        query.Bind(collection);
-
-        have_view = query.Query(view_name, null);
-        if (have_view) {
-            String classad_key;
-            for (query.ToFirst(), query.Current(classad_key); !query.IsAfterLast(); query.Next(classad_key)) {
-                if (!classad_key.compare(classad_name)) {
-                    in_view = true;
-                    break;
-                }
-            }
-        }
-        return in_view;
-    }
-    */
-
-    /*********************************************************************
      * Function: test_utils
      * Purpose: Test utils
      *********************************************************************/
diff --git a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/FunctionalTester.java b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/FunctionalTester.java
index 88b7a32..f4cf9db 100644
--- a/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/FunctionalTester.java
+++ b/asterix-external-data/src/test/java/org/apache/asterix/external/classad/test/FunctionalTester.java
@@ -145,7 +145,7 @@
             // Then we parse to see what the user wants.
             for (int argIndex = 1; argIndex < argc; argIndex++) {
                 if (argv[argIndex].equalsIgnoreCase("-d") || argv[argIndex].equalsIgnoreCase("-debug")) {
-                    debug = true;
+                    debug = false;
                 } else if (argv[argIndex].equalsIgnoreCase("-v") || argv[argIndex].equalsIgnoreCase("-verbose")) {
                     verbose = true;
                 } else {
@@ -558,9 +558,6 @@
                 } else {
                     variable = new Variable(variable_name.getStringValue(), value);
                     variables.put(variable_name.getStringValue(), variable);
-                    if (true) {
-                        System.out.println(variable_name.getStringValue() + " = " + value);
-                    }
                 }
             }
         }
@@ -751,84 +748,9 @@
     }
 
     /*********************************************************************
-     * Function: handle_writexml
+     * Function: handle_echo
      * Purpose:
-     *
-     * @throws IOException
      *********************************************************************/
-    /*
-    public static void handle_writexml(AMutableString line, State state, Parameters parameters) throws IOException {
-    AMutableString filename = new AMutableString("");
-    ExprTree expr;
-    BufferedWriter xml_file;
-
-    if (get_file_name(line, filename, state, parameters)) {
-    if ((expr = get_expr(line, state, parameters)) != null) {
-    if (expr_okay_for_xml_file(expr, state, parameters)) {
-    xml_file = Files.newBufferedWriter(Paths.get(filename.getStringValue()));
-    ClassAdXMLUnParser unparser = new ClassAdXMLUnParser();
-    AMutableCharArrayString classad_text = new AMutableCharArrayString();
-    xml_file.write("<classads>\n");
-    if (expr.getKind() == NodeKind.CLASSAD_NODE) {
-    unparser.Unparse(classad_text, expr);
-    xml_file.write(classad_text.toString());
-    } else {
-    ExprList list = (ExprList) expr;
-    for (ExprTree classad : list.getExprList()) {
-    classad_text.setValue("");
-    unparser.Unparse(classad_text, classad);
-    xml_file.write(classad_text.toString());
-    xml_file.newLine();
-    }
-    }
-    xml_file.write("</classads>\n");
-    xml_file.close();
-    }
-    }
-    }
-    return;
-    }
-
-    *//*********************************************************************
-      * Function: handle_readxml
-      * Purpose:
-      *
-      * @throws IOException
-      *********************************************************************/
-
-    /*
-    public static void handle_readxml(AMutableString line, State state, Parameters parameters) throws IOException {
-    AMutableString variable_name = new AMutableString(null);
-    AMutableString file_name = new AMutableString(null);
-
-    if (get_variable_name(line, false, variable_name, state, parameters)) {
-    if (get_file_name(line, file_name, state, parameters)) {
-    InputStream xml_file = Files.newInputStream(Paths.get(file_name.getStringValue()));
-    ExprList list;
-    ClassAd classad;
-    ClassAdXMLParser parser = new ClassAdXMLParser();
-    Variable variable;
-
-    list = new ExprList();
-    do {
-    classad = parser.ParseClassAd(new InputStreamLexerSource(xml_file));
-    if (classad != null) {
-    list.add(classad);
-    }
-    } while (classad != null);
-    variable = new Variable(variable_name.getStringValue(), list);
-    variables.put(variable_name.getStringValue(), variable);
-    if (parameters.interactive) {
-    print_expr(list, state, parameters);
-    }
-    }
-    }
-    }
-
-    *//*********************************************************************
-      * Function: handle_echo
-      * Purpose:
-      *********************************************************************/
     public static void handle_echo(String line, State state, Parameters parameters) {
         AMutableCharArrayString new_line = new AMutableCharArrayString();
         int index;
@@ -1066,13 +988,17 @@
             PrettyPrint unparser = new PrettyPrint();
             unparser.unparse(output, tree);
         } else if (state.format == PrintFormat.print_XML) {/*
-                                                           ClassAdXMLUnParser unparser = new ClassAdXMLUnParser();
-                                                           unparser.SetCompactSpacing(true);
-                                                           unparser.Unparse(output, tree);
-                                                           } else if (state.format == PrintFormat.print_XMLPretty) {
-                                                           ClassAdXMLUnParser unparser = new ClassAdXMLUnParser();
-                                                           unparser.SetCompactSpacing(false);
-                                                           unparser.Unparse(output, tree);*/
+                                                            * ClassAdXMLUnParser unparser = new
+                                                            * ClassAdXMLUnParser();
+                                                            * unparser.SetCompactSpacing(true);
+                                                            * unparser.Unparse(output, tree);
+                                                            * } else if (state.format ==
+                                                            * PrintFormat.print_XMLPretty) {
+                                                            * ClassAdXMLUnParser unparser = new
+                                                            * ClassAdXMLUnParser();
+                                                            * unparser.SetCompactSpacing(false);
+                                                            * unparser.Unparse(output, tree);
+                                                            */
         }
         System.out.println(output);
     }
