diff --git a/src/main/java/org/ids_mannheim/TotalNGrams.java b/src/main/java/org/ids_mannheim/TotalNGrams.java
index 2057676..50b7028 100644
--- a/src/main/java/org/ids_mannheim/TotalNGrams.java
+++ b/src/main/java/org/ids_mannheim/TotalNGrams.java
@@ -36,65 +36,68 @@
 
     @CommandLine.Parameters(arity = "1..*", description = "input files")
     private ArrayList<String> inputFiles = new ArrayList<>();
-    @CommandLine.Option(names = {"-L",
-            "--log-file"}, defaultValue = DEFAULT_LOGFILE, description = "log file name (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-L",
+            "--log-file" }, defaultValue = DEFAULT_LOGFILE, description = "log file name (default: ${DEFAULT-VALUE})")
     String logFileName;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-o",
-            "--output-file"}, description = "Output file (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-o",
+            "--output-file" }, description = "Output file (default: ${DEFAULT-VALUE})")
     String output_fillename = "-";
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-d", "--downcase"}, description = "Convert all token characters into lower case (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-d",
+            "--downcase" }, description = "Convert all token characters into lower case (default: ${DEFAULT-VALUE})")
     boolean downcase_tokens = false;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"--force"}, description = "Force overwrite (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "--force" }, description = "Force overwrite (default: ${DEFAULT-VALUE})")
     boolean force_overwrite = false;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-l", "--with-lemma-pos"}, description = "Use also lemma and part-of-speech annotations (default: ${DEFAULT-VALUE}")
+    @CommandLine.Option(names = { "-l",
+            "--with-lemma-pos" }, description = "Use also lemma and part-of-speech annotations (default: ${DEFAULT-VALUE}")
     boolean with_lemma_and_pos = false;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-P",
-            "--max-procs"}, description = "Run up to max-procs processes at a time (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-P",
+            "--max-procs" }, description = "Run up to max-procs processes at a time (default: ${DEFAULT-VALUE})")
     int max_threads = MAX_THREADS;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-p",
-            "--worker-pool"}, description = "Run preprocessing on extern hosts, e.g. '10*local,5*host1,3*smith@host2' (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-p",
+            "--worker-pool" }, description = "Run preprocessing on extern hosts, e.g. '10*local,5*host1,3*smith@host2' (default: ${DEFAULT-VALUE})")
     String worker_pool_specification = "";
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-n",
-            "--ngram-size"}, description = "n-gram size (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-n",
+            "--ngram-size" }, description = "n-gram size (default: ${DEFAULT-VALUE})")
     int ngram_size = 1;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-F",
-            "--folds"}, description = "number of random folds (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-F",
+            "--folds" }, description = "number of random folds (default: ${DEFAULT-VALUE})")
     int FOLDS = 1;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-f",
-            "--fold"}, description = "current fold (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-f",
+            "--fold" }, description = "current fold (default: ${DEFAULT-VALUE})")
     int fold = 1;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-S",
-            "--sort"}, description = "Toggle output sorting (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-S",
+            "--sort" }, description = "Toggle output sorting (default: ${DEFAULT-VALUE})")
     boolean sort = true;
 
     @SuppressWarnings("CanBeFinal")
-    @CommandLine.Option(names = {"-N",
-            "--numeric-secondary-sort"}, description = "Sort entries with same frequency numerically  (default: ${DEFAULT-VALUE})")
+    @CommandLine.Option(names = { "-N",
+            "--numeric-secondary-sort" }, description = "Sort entries with same frequency numerically  (default: ${DEFAULT-VALUE})")
     boolean numericSecondarySort = false;
 
     @SuppressWarnings("CanBeFinal")
     @CommandLine.Option(names = {
-            "--pad"}, description = "Add padding " + PaddedSlidingWindowQueue.TEXT_START_SYMBOL + " and " + PaddedSlidingWindowQueue.TEXT_END_SYMBOL + " symbols at text edges  (default: ${DEFAULT-VALUE})")
+            "--pad" }, description = "Add padding " + PaddedSlidingWindowQueue.TEXT_START_SYMBOL + " and "
+                    + PaddedSlidingWindowQueue.TEXT_END_SYMBOL + " symbols at text edges  (default: ${DEFAULT-VALUE})")
     boolean addPadding = false;
 
     private Progressbar etaPrinter;
@@ -115,7 +118,8 @@
             System.setProperty("java.util.logging.SimpleFormatter.format",
                     "[%1$tF %1$tT] [%4$-7s] %5$s %n");
             fileHandler.setFormatter(new SimpleFormatter());
-            //java.util.logging.SimpleFormatter.format="%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%n";
+            // java.util.logging.SimpleFormatter.format="%1$tb %1$td, %1$tY
+            // %1$tl:%1$tM:%1$tS %1$Tp %2$s%n%4$s: %5$s%n";
             java.util.Locale.setDefault(Locale.Category.FORMAT, Locale.ROOT);
             logger.addHandler(fileHandler);
             ConsoleHandler consoleHandler = new ConsoleHandler();
@@ -136,9 +140,11 @@
         } else {
             File f = Utils.createFile(output_fillename, force_overwrite);
             if (output_fillename.endsWith(".gz")) {
-                output_stream = new PrintStream(new ParallelGZIPOutputStream((new BufferedOutputStream(new FileOutputStream(f)))));
+                output_stream = new PrintStream(
+                        new ParallelGZIPOutputStream((new BufferedOutputStream(new FileOutputStream(f)))));
             } else if (output_fillename.endsWith(".xz")) {
-                output_stream = new PrintStream(new XZCompressorOutputStream((new BufferedOutputStream(new FileOutputStream(f)))));
+                output_stream = new PrintStream(
+                        new XZCompressorOutputStream((new BufferedOutputStream(new FileOutputStream(f)))));
             } else {
                 output_stream = new PrintStream(new BufferedOutputStream(new FileOutputStream(f)));
             }
@@ -150,14 +156,14 @@
         long totalFilesSizes = inputFiles.parallelStream().mapToLong(fname -> {
             long l = new File(fname).length();
             if (l == 0) {
-                logger.severe("File "+fname+" does not exist or is empty.");
+                logger.severe("File " + fname + " does not exist or is empty.");
                 System.exit(-1);
             }
             return l;
         }).sum();
-        inputFiles = (ArrayList<String>) inputFiles.parallelStream().sorted((a, b) ->
-           Long.compareUnsigned(new File(b).length(), new File(a).length())
-        ).collect(Collectors.toList());
+        inputFiles = (ArrayList<String>) inputFiles.parallelStream()
+                .sorted((a, b) -> Long.compareUnsigned(new File(b).length(), new File(a).length()))
+                .collect(Collectors.toList());
 
         etaPrinter = new Progressbar(totalFilesSizes);
         BlockingQueue<Integer> queue = new LinkedBlockingQueue<>(inputFiles.size());
@@ -169,7 +175,8 @@
         int threads = Math.min(max_threads, inputFiles.size());
         logger.info("Processing fold " + fold + "/" + FOLDS);
         logger.info("Using " + threads + " threads");
-        IntStream.range(0, threads).forEach(unused -> es.execute(new Worker(queue, inputFiles, ngram_size, fold, FOLDS, map, with_lemma_and_pos, downcase_tokens, workerNodePool, etaPrinter, logger, addPadding)));
+        IntStream.range(0, threads).forEach(unused -> es.execute(new Worker(queue, inputFiles, ngram_size, fold, FOLDS,
+                map, with_lemma_and_pos, downcase_tokens, workerNodePool, etaPrinter, logger, addPadding)));
         queue.addAll(IntStream.range(0, inputFiles.size()).boxed().collect(Collectors.toList()));
         IntStream.range(0, threads).forEach(unused -> {
             try {
@@ -210,7 +217,8 @@
                                 return a.getKey().compareTo(b.getKey());
                         }
                     })
-                    .forEachOrdered(entry -> output_stream.println(entry.getKey() + "\t" + Integer.toUnsignedString(entry.getValue().get())));
+                    .forEachOrdered(entry -> output_stream
+                            .println(entry.getKey() + "\t" + Integer.toUnsignedString(entry.getValue().get())));
         }
         logger.info("Finished.");
         output_stream.close();
