diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 6f8682c..44528f0 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1365,11 +1365,12 @@
 
                     if (DEBUG) {
                         if (match.getDocID() != null)
-                            log.trace("With DocID: I've got 1 match of {} in {}",
-                                      count, match.getDocID());
+                            log.trace(
+                                    "With DocID: I've got 1 match of {} in {}",
+                                    count, match.getDocID());
                         else
                             log.trace("With UID: I've got 1 match of {} in {}",
-                                      count, match.getUID());
+                                    count, match.getUID());
                     };
 
                     atomicMatches.add(match);
diff --git a/src/main/java/de/ids_mannheim/korap/index/Indexer.java b/src/main/java/de/ids_mannheim/korap/index/Indexer.java
index 591e511..1735517 100644
--- a/src/main/java/de/ids_mannheim/korap/index/Indexer.java
+++ b/src/main/java/de/ids_mannheim/korap/index/Indexer.java
@@ -16,7 +16,8 @@
  * this tool may be more suitable for your needs
  * (especially as it is way faster).
  * 
- * Usage: java -jar Krill-Indexer.jar [--config propfile] [directories]*
+ * Usage: java -jar Krill-Indexer.jar [--config propfile]
+ * [directories]*
  */
 public class Indexer {
     KrillIndex index;
@@ -118,19 +119,19 @@
 
         if (argv.length == 0) {
             String jar = new File(Indexer.class.getProtectionDomain()
-                                  .getCodeSource().getLocation().getPath()).getName();
-            
-            System.out.println("Add documents from a directory to the Krill index.");
+                    .getCodeSource().getLocation().getPath()).getName();
+
+            System.out
+                    .println("Add documents from a directory to the Krill index.");
             System.out.println("Usage: java -jar " + jar
-                               + " [--config propfile] [directories]*");
+                    + " [--config propfile] [directories]*");
             System.out.println();
             System.err.println("  --config|-c    Configuration file");
-            System.err.println("                 (defaults to " +
-                               de.ids_mannheim.korap.util.KrillProperties.file +
-                               ")");
+            System.err.println("                 (defaults to "
+                    + de.ids_mannheim.korap.util.KrillProperties.file + ")");
             System.err.println("  --indexDir|-d  Index directory");
-            System.err.println("                 (defaults to krill.indexDir"+
-                               " in configuration)");
+            System.err.println("                 (defaults to krill.indexDir"
+                    + " in configuration)");
             System.err.println();
             return;
         };
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java
index 131c4ec..151abf4 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java
@@ -49,7 +49,7 @@
                     operandQuery, true), relation.getTempTargetNum());
             sq.setSorted(false);
             sq.setMatchTemporaryClass(true);
-            
+
             sq2 = new SpanFocusQuery(new SpanSegmentQuery(operand2Query, sq,
                     true), relation.getTempClassNumbers());
         }
@@ -58,11 +58,11 @@
             sq = new SpanFocusQuery(new SpanSegmentQuery(relationQuery,
                     operandQuery, true), relation.getTempSourceNum());
             sq.setMatchTemporaryClass(true);
-            
-            sq2 = new SpanFocusQuery(new SpanSegmentQuery(sq,
-                    operand2Query, true), relation.getTempClassNumbers());
+
+            sq2 = new SpanFocusQuery(new SpanSegmentQuery(sq, operand2Query,
+                    true), relation.getTempClassNumbers());
         }
-        
+
         sq2.setMatchTemporaryClass(true);
         sq2.setRemoveTemporaryClasses(true);
         sq2.setSorted(false);
@@ -91,7 +91,8 @@
         this.operandQuery = operand;
     }
 
-    public void checkVariables(SpanRelationQuery relation, SpanQuery operand,
+
+    public void checkVariables (SpanRelationQuery relation, SpanQuery operand,
             SpanQuery target) {
         checkVariables(relation, operand);
         if (target == null) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java
index 61ec3db..a2f565c 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java
@@ -23,7 +23,8 @@
  * prefix "<" or
  * ">". The direction of the angle bracket represents the direction of
  * the
- * corresponding relation. By default, the relation is set ">". <br/><br/>
+ * corresponding relation. By default, the relation is set ">".
+ * <br/><br/>
  * 
  * This class provides two types of query:
  * <ol>
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
index edd22b4..fae7aa0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanWithAttributeQuery.java
@@ -32,11 +32,13 @@
  * <br/>
  * 
  * <pre>
- * SpanAttributeQuery saq = new SpanAttributeQuery(new SpanTermQuery(new Term(
- *         &quot;tokens&quot;, &quot;@:class=header&quot;)), true);
+ * SpanAttributeQuery saq = new SpanAttributeQuery(new
+ * SpanTermQuery(new Term(
+ * &quot;tokens&quot;, &quot;@:class=header&quot;)), true);
  * <br/>
- * SpanWithAttributeQuery sq = new SpanWithAttributeQuery(new SpanElementQuery(
- *         &quot;tokens&quot;, &quot;div&quot;), saq, true);
+ * SpanWithAttributeQuery sq = new SpanWithAttributeQuery(new
+ * SpanElementQuery(
+ * &quot;tokens&quot;, &quot;div&quot;), saq, true);
  * </pre>
  * 
  * 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
index 244c79d..3fe6dbb 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/FocusSpans.java
@@ -171,12 +171,13 @@
             // throw new
             // IllegalArgumentException("Classnumber is not found.");
             // }
-            if (spanId > 0) hasSpanId = true;
-         }
+            if (spanId > 0)
+                hasSpanId = true;
+        }
         else if (cs.getSpanId() > 0) {
             setSpanId(cs.getSpanId());
             hasSpanId = true;
-         }
+        }
 
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
index 42d391b..59d678e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
@@ -372,27 +372,33 @@
         this.rightEnd = rightEnd;
     }
 
-    public byte getTempSourceNum() {
+
+    public byte getTempSourceNum () {
         return tempSourceNum;
     }
 
-    public void setTempSourceNum(byte tempSourceNum) {
+
+    public void setTempSourceNum (byte tempSourceNum) {
         this.tempSourceNum = tempSourceNum;
     }
 
-    public byte getTempTargetNum() {
+
+    public byte getTempTargetNum () {
         return tempTargetNum;
     }
 
-    public void setTempTargetNum(byte tempTargetNum) {
+
+    public void setTempTargetNum (byte tempTargetNum) {
         this.tempTargetNum = tempTargetNum;
     }
 
-    public int getDirection() {
+
+    public int getDirection () {
         return direction;
     }
 
-    public void setDirection(int direction) {
+
+    public void setDirection (int direction) {
         this.direction = direction;
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RepetitionSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RepetitionSpans.java
index 5b5c33a..843ccd8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RepetitionSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RepetitionSpans.java
@@ -38,6 +38,7 @@
     private List<CandidateSpan> matchList;
     private List<CandidateSpan> candidates;
 
+
     /**
      * Constructs RepetitionSpans from the given
      * {@link SpanRepetitionQuery}.
@@ -139,11 +140,9 @@
 
             if (DEBUG) {
                 log.debug("Check adjacency at {}-{}|{}-{} in {}",
-                          prevSpan.getStart(),
-                          prevSpan.getEnd(),
-                          firstSpans.start(),
-                          firstSpans.end(),
-                          startSpan.getDoc());
+                        prevSpan.getStart(), prevSpan.getEnd(),
+                        firstSpans.start(), firstSpans.end(),
+                        startSpan.getDoc());
             };
 
             if (firstSpans.start() > prevSpan.getEnd()) {
@@ -161,6 +160,7 @@
         return adjacentSpans;
     }
 
+
     /**
      * Generates all possible repetition match spans from the given
      * list of
@@ -175,17 +175,17 @@
             int endIndex;
             while ((endIndex = j + i - 1) < adjacentSpans.size()) {
                 startSpan = adjacentSpans.get(j);
-                
+
                 if (i == 1) {
                     try {
-                         matchSpan = startSpan.clone();
-                         matchSpan.setPayloads(computeMatchPayload(
-                                 adjacentSpans, 0, endIndex - 1));
-                         matchList.add(matchSpan);
+                        matchSpan = startSpan.clone();
+                        matchSpan.setPayloads(computeMatchPayload(
+                                adjacentSpans, 0, endIndex - 1));
+                        matchList.add(matchSpan);
                     }
                     catch (CloneNotSupportedException e) {
-                            e.printStackTrace();
-                        }
+                        e.printStackTrace();
+                    }
                 }
                 else {
                     endSpan = adjacentSpans.get(endIndex);
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
index 0cfb938..215dc85 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
@@ -284,7 +284,7 @@
                     this.more = true;
                     this.inSameDoc = true;
                     this.tryMatch = true;
-                    
+
                     this.nextSpanB();
                     continue;
                 }
@@ -417,7 +417,7 @@
             this.inSameDoc = false;
             return false;
         };
-*/
+        */
 
         this.more = true;
         this.inSameDoc = true;
@@ -442,7 +442,7 @@
             this.inSameDoc = false;
             return false;
         };
-        
+
 
         // Clear all spanStores
         if (this.wrapDoc != this.embeddedDoc) {
@@ -951,12 +951,9 @@
     private byte withinCase () {
 
         if (DEBUG) {
-            log.trace(">>>>>>>>>>>>>> {}-{}|{}-{}",
-                      this.wrapStart,
-                      this.wrapSpans.end(),
-                      this.embeddedStart,
-                      this.embeddedSpans.end()
-                      );
+            log.trace(">>>>>>>>>>>>>> {}-{}|{}-{}", this.wrapStart,
+                    this.wrapSpans.end(), this.embeddedStart,
+                    this.embeddedSpans.end());
         };
 
         // case 1-5
@@ -1170,6 +1167,7 @@
 
         public short elementRef = -1;
 
+
         public void clear () {
             this.start = -1;
             this.end = -1;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
index 5f11c02..0d0fe23 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
@@ -41,7 +41,8 @@
         if (isNull || isEmpty)
             return null;
 
-        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
+        SpanQuery sq = subquery.retrieveNode(this.retrieveNode)
+                .toFragmentQuery();
         if (sq == null) {
             isNull = true;
             return null;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
index 2cb72fc..0855885 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
@@ -66,16 +66,15 @@
 
         // Wrap the query in a <base/s=t>, if it's extended to the right
         if (this.isExtendedToTheRight()) {
-            return new SpanFocusQuery(
-                new SpanWithinQuery(
-                    "base/s:t",
-                    new SpanClassQuery(this.toFragmentQuery(), (byte) 254)), (byte) 254
-            );
+            return new SpanFocusQuery(new SpanWithinQuery("base/s:t",
+                    new SpanClassQuery(this.toFragmentQuery(), (byte) 254)),
+                    (byte) 254);
         };
 
         return this.toFragmentQuery();
     };
 
+
     /**
      * Boolean value indicating that the wrapped query
      * is optional.
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
index 48ba7c2..c874fef 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanReferenceQueryWrapper.java
@@ -40,7 +40,8 @@
             return null;
         }
 
-        SpanQuery sq = subQuery.retrieveNode(this.retrieveNode).toFragmentQuery();
+        SpanQuery sq = subQuery.retrieveNode(this.retrieveNode)
+                .toFragmentQuery();
         if (sq == null)
             return null;
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
index 3eea9c8..d7b0f6d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
@@ -54,7 +54,8 @@
         if (subQuery1.isEmpty) {
             if (!subQuery2.isEmpty) {
                 // match target
-                subq2 = subQuery2.retrieveNode(this.retrieveNode).toFragmentQuery();
+                subq2 = subQuery2.retrieveNode(this.retrieveNode)
+                        .toFragmentQuery();
                 if (subQuery1.hasClass) {
                     rq.setSourceClass(subQuery1.getClassNumber());
                 }
@@ -65,7 +66,8 @@
         else if (subQuery2.isEmpty) {
             if (!subQuery1.isEmpty) {
                 // match source
-                subq1 = subQuery1.retrieveNode(this.retrieveNode).toFragmentQuery();
+                subq1 = subQuery1.retrieveNode(this.retrieveNode)
+                        .toFragmentQuery();
                 if (subQuery2.hasClass) {
                     rq.setTargetClass(subQuery2.getClassNumber());
                 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
index dbbdd67..65c4da6 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
@@ -97,7 +97,8 @@
 
         // The query is not a repetition query at all, but may be optional
         if (this.min == 1 && this.max == 1)
-            return this.subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
+            return this.subquery.retrieveNode(this.retrieveNode)
+                    .toFragmentQuery();
 
         // That's a fine repetition query
         return new SpanRepetitionQuery(this.subquery.retrieveNode(
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
index eadba22..72fadb2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
@@ -134,7 +134,8 @@
         if (DEBUG) {
             if (!sswq.isEmpty()) {
                 try {
-                    log.trace("New span sequence {}", sswq.toFragmentQuery().toString());
+                    log.trace("New span sequence {}", sswq.toFragmentQuery()
+                            .toString());
                 }
                 catch (QueryException qe) {
                     log.trace("Unable to serialize query {}", qe.getMessage());
@@ -546,8 +547,8 @@
         // Todo: This should possibly be evaluated to a query later on!
         try {
             this.constraints.add(new DistanceConstraint((SpanElementQuery) unit
-                    .retrieveNode(this.retrieveNode).toFragmentQuery(), min, max,
-                    isInOrder, exclusion));
+                    .retrieveNode(this.retrieveNode).toFragmentQuery(), min,
+                    max, isInOrder, exclusion));
         }
         catch (QueryException qe) {
             this.constraintException = qe;
@@ -637,6 +638,7 @@
         return super.isNegative();
     };
 
+
     public boolean isExtendedToTheRight () {
         if (!this.isSolved)
             _solveProblematicSequence();
@@ -943,11 +945,13 @@
                         problem.getClassNumber());
 
             query = new SpanExpansionQuery(anchor.retrieveNode(
-                                                               this.retrieveNode).toFragmentQuery(), problem.isOptional() ? 0 : problem.getMin(),
+                    this.retrieveNode).toFragmentQuery(),
+                    problem.isOptional() ? 0 : problem.getMin(),
                     problem.getMax(), direction,
                     problem.hasClass() ? problem.getClassNumber() : (byte) 0,
                     true);
-            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query).isExtended(true);
+            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query)
+                    .isExtended(true);
 
             // Set right extension
             if (direction >= 0)
@@ -972,7 +976,8 @@
                     problem.hasClass() ? problem.getClassNumber() : (byte) 0,
                     true);
 
-            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query).isExtended(true);
+            SpanQueryWrapper sqw = new SpanSimpleQueryWrapper(query)
+                    .isExtended(true);
 
             // Set right extension
             if (direction >= 0)
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
index 8c809c5..d311a27 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSubspanQueryWrapper.java
@@ -110,7 +110,8 @@
             return null;
         }
 
-        SpanQuery sq = subquery.retrieveNode(this.retrieveNode).toFragmentQuery();
+        SpanQuery sq = subquery.retrieveNode(this.retrieveNode)
+                .toFragmentQuery();
         if (sq == null)
             return null;
         if (sq instanceof SpanTermQuery) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
index 89d1fc5..dc1f449 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
@@ -88,6 +88,7 @@
             this.isNull = false;
     };
 
+
     @Override
     public SpanQuery toFragmentQuery () throws QueryException {
         if (this.isNull)
@@ -96,8 +97,8 @@
         // TODO: if (wrap.isNegative())
 
         return new SpanWithinQuery(this.element.retrieveNode(this.retrieveNode)
-                .toFragmentQuery(),
-                this.wrap.retrieveNode(this.retrieveNode).toFragmentQuery(), this.flag);
+                .toFragmentQuery(), this.wrap.retrieveNode(this.retrieveNode)
+                .toFragmentQuery(), this.flag);
     };
 
 
diff --git a/src/main/java/de/ids_mannheim/korap/response/Match.java b/src/main/java/de/ids_mannheim/korap/response/Match.java
index 4bb289a..47806af 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -244,22 +244,25 @@
                     if (DEBUG)
                         log.trace(
                                 "Have a highlight of class {} in {}-{} inside of {}-{}",
-                                unsignedByte(number), start, end, this.getStartPos(),
-                                this.getEndPos());
+                                unsignedByte(number), start, end,
+                                this.getStartPos(), this.getEndPos());
 
                     // Ignore classes out of match range and set by the system
                     // TODO: This may be decidable by PTI!
-                    if (unsignedByte(number) <= 128 && start >= this.getStartPos()
+                    if (unsignedByte(number) <= 128
+                            && start >= this.getStartPos()
                             && end <= this.getEndPos()) {
 
                         if (DEBUG) {
-                            log.trace("Add highlight of class {}!", unsignedByte(number));
+                            log.trace("Add highlight of class {}!",
+                                    unsignedByte(number));
                         };
 
                         this.addHighlight(start, end - 1, number);
                     }
                     else if (DEBUG) {
-                        log.trace("Don't add highlight of class {}!", unsignedByte(number));
+                        log.trace("Don't add highlight of class {}!",
+                                unsignedByte(number));
                     };
                 }
 
diff --git a/src/main/java/de/ids_mannheim/korap/util/KrillByte.java b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
index 0666cc7..378fbb1 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillByte.java
@@ -69,7 +69,7 @@
      * 
      * @param data
      *            The byte.
-     */ 
+     */
     public static int unsignedByte (byte data) {
         return (int) data & 0xFF;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java b/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
index 82ed821..fc066f1 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
@@ -9,7 +9,7 @@
 // Todo: Properties may be loaded twice - althogh Java may cache automatically
 public class KrillProperties {
 
-    public static String file  = "krill.properties";
+    public static String file = "krill.properties";
     private static String info = "krill.info";
     private static Properties prop;
 
@@ -41,12 +41,12 @@
         catch (IOException t) {
             try {
                 iFile = KrillProperties.class.getClassLoader()
-                    .getResourceAsStream(propFile);
+                        .getResourceAsStream(propFile);
 
                 if (iFile == null) {
                     log.warn(
-                              "Cannot find {}. Please create it using \"{}.info\" as template.",
-                              propFile, propFile);
+                            "Cannot find {}. Please create it using \"{}.info\" as template.",
+                            propFile, propFile);
                     return null;
                 };
 
@@ -67,7 +67,7 @@
     public static Properties loadInfo () {
         try {
             InputStream iFile = KrillProperties.class.getClassLoader()
-                .getResourceAsStream(info);
+                    .getResourceAsStream(info);
 
             if (iFile == null) {
                 log.error("Cannot find {}.", info);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index d8f79a7..9aaefc6 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -146,7 +146,7 @@
                         + "<:child-of$<b>34<i>4<i>38<i>7<i>2<s>2<s>1<s>0|"
                         + "<:child-of$<b>35<i>4<i>38<i>10<i>38<i>7<i>2<i>7<s>2<s>4<s>0|"
                         + ">:dep$<b>32<i>0<s>1<s>1<s>0|"
-                        + ">:dep$<b>32<i>3<s>1<s>1<s>0]"                        
+                        + ">:dep$<b>32<i>3<s>1<s>1<s>0]"
 
                         + "[(2-3)s:die|_2$<i>10<i>13|pos:ART$<s>1|tt:DET$<s>2|"
                         + "<>:np$<b>64<i>10<i>20<i>4<b>0<s>3|<>:np$<b>64<i>10<i>38<i>7<b>0<s>4|"
@@ -326,7 +326,7 @@
         // for (Match m : kr.getMatches()) {
         // System.out.println(m.getStartPos() + " " + m.getEndPos());
         // }
-        
+
         SpanAttributeQuery saq = new SpanAttributeQuery(new SpanTermQuery(
                 new Term("base", "@:func=sbj")), true);
         // kr = ki.search(saq, (short) 20);
@@ -587,8 +587,9 @@
         assertEquals(7, kr.getMatch(6).getEndPos());
     }
 
+
     @Test
-    public void testCase9b() throws IOException {
+    public void testCase9b () throws IOException {
         ki.addDoc(createFieldDoc2());
         ki.commit();
 
@@ -622,8 +623,9 @@
         // }
     }
 
+
     @Test
-    public void testCase9c() throws IOException {
+    public void testCase9c () throws IOException {
         ki.addDoc(createFieldDoc2());
         ki.commit();
 
@@ -714,12 +716,13 @@
         // }
     }
 
+
     /**
      * Relation whose nodes have a specific attribute.
      * 
      * */
     @Test
-    public void testCase10a() throws IOException {
+    public void testCase10a () throws IOException {
         ki.addDoc(createFieldDoc2());
         ki.commit();
 
@@ -738,29 +741,28 @@
         // Matching relation source node with an attribute
         SpanFocusQuery sfq1 = new SpanFocusQuery(srq, (byte) 1);
         SpanWithAttributeQuery swaq = new SpanWithAttributeQuery(sfq1, aq, true);
-        
+
         kr = ki.search(swaq, (short) 10);
         assertEquals((long) 2, kr.getTotalResults());
         assertEquals(2, kr.getMatch(0).getStartPos());
         assertEquals(4, kr.getMatch(0).getEndPos());
         assertEquals(5, kr.getMatch(1).getStartPos());
         assertEquals(7, kr.getMatch(1).getEndPos());
-        
-         // Returning relations whose source has a specific attribute
-         SpanFocusQuery fqr = new SpanFocusQuery(swaq,
-         srq.getTempClassNumbers());
-         fqr.setMatchTemporaryClass(true);
-         fqr.setRemoveTemporaryClasses(true);
-         assertEquals("focus(#[1,2]spanRelationWithAttribute(focus(1: "
+
+        // Returning relations whose source has a specific attribute
+        SpanFocusQuery fqr = new SpanFocusQuery(swaq, srq.getTempClassNumbers());
+        fqr.setMatchTemporaryClass(true);
+        fqr.setRemoveTemporaryClasses(true);
+        assertEquals("focus(#[1,2]spanRelationWithAttribute(focus(1: "
                 + "{1: source:{2: target:spanRelation(base:>:child-of)}}), "
                 + "spanAttribute(base:@:case=accusative)))", fqr.toString());
-        
-         kr = ki.search(fqr, (short) 10);
-         assertEquals((long) 2, kr.getTotalResults());
-         assertEquals(2, kr.getMatch(0).getStartPos());
-         assertEquals(7, kr.getMatch(0).getEndPos());
-         assertEquals(4, kr.getMatch(1).getStartPos());
-         assertEquals(7, kr.getMatch(1).getEndPos());
+
+        kr = ki.search(fqr, (short) 10);
+        assertEquals((long) 2, kr.getTotalResults());
+        assertEquals(2, kr.getMatch(0).getStartPos());
+        assertEquals(7, kr.getMatch(0).getEndPos());
+        assertEquals(4, kr.getMatch(1).getStartPos());
+        assertEquals(7, kr.getMatch(1).getEndPos());
 
         // Matching relation target nodes with an attribute
         SpanFocusQuery sfq2 = new SpanFocusQuery(srq, (byte) 2);
@@ -792,12 +794,13 @@
         assertEquals(7, kr.getMatch(1).getEndPos());
     }
 
+
     /**
      * Relation whose nodes have a specific attribute. Alternative
      * query (actually used in serialization)
      * */
     @Test
-    public void testCase10b() throws IOException {
+    public void testCase10b () throws IOException {
         ki.addDoc(createFieldDoc2());
         ki.commit();
 
@@ -861,11 +864,12 @@
         assertEquals(7, kr.getMatch(1).getEndPos());
     }
 
+
     /**
      * Matching both relation nodes whose a specific attribute
      * */
     @Test
-    public void testCase11() throws IOException {
+    public void testCase11 () throws IOException {
         ki.addDoc(createFieldDoc2());
         ki.commit();
 
@@ -885,7 +889,7 @@
         srq.setTargetClass((byte) 2);
         kr = ki.search(srq, (short) 20);
         assertEquals((long) 13, kr.getTotalResults());
-        
+
         SpanWithAttributeQuery swaq1 = new SpanWithAttributeQuery(aq, true);
         SpanWithAttributeQuery swaq2 = new SpanWithAttributeQuery(aq2, true);
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
index 74d611e..b0c1305 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
@@ -175,6 +175,7 @@
         assertEquals("EndPos (0)", 2, kr.getMatch(1).endPos);
     }
 
+
     private FieldDocument createFieldDoc0 () {
         fd = new FieldDocument();
         fd.addString("ID", "doc-0");
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
index f60d1be..5c2bc24 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -31,12 +31,14 @@
     Result kr;
     KrillIndex ki;
 
+
     public TestSpanExpansionIndex () throws IOException {
         ki = new KrillIndex();
         ki.addDoc(getClass().getResourceAsStream("/wiki/00001.json.gz"), true);
         ki.commit();
     }
 
+
     /**
      * Left and right expansions
      * */
@@ -316,7 +318,7 @@
 
     /**
      * Query rewrite bug
-     *
+     * 
      * Warning: This is not armoured by <base/s=t>!
      * 
      * @throws IOException
@@ -332,10 +334,8 @@
         ki.commit();
 
         // See /queries/bugs/repetition_group_rewrite
-        RegexpQuery requery = new RegexpQuery(
-                                              new Term("base", "s:[ac]"),
-                                              RegExp.ALL
-                                              );
+        RegexpQuery requery = new RegexpQuery(new Term("base", "s:[ac]"),
+                RegExp.ALL);
         SpanMultiTermQueryWrapper<RegexpQuery> query = new SpanMultiTermQueryWrapper<RegexpQuery>(
                 requery);
         SpanExpansionQuery seq = new SpanExpansionQuery(query, 1, 1, 1, true);
@@ -361,7 +361,7 @@
         assertEquals(6, kr.getMatch(3).getEndPos());
         assertEquals(9, kr.getMatch(4).getStartPos());
         assertEquals(10, kr.getMatch(4).getEndPos());
-        
+
         kr = ki.search(seq, (short) 20);
         assertEquals(5, kr.getTotalResults());
         assertEquals(0, kr.getMatch(0).getStartPos());
@@ -394,7 +394,6 @@
 
 
 
-
     /**
      * Query rewrite bug
      * 
@@ -408,23 +407,24 @@
         ki.commit();
 
         String json = readFile(getClass().getResource(
-            "/queries/bugs/expansion_bug_3.jsonld").getFile()
-        );
+                "/queries/bugs/expansion_bug_3.jsonld").getFile());
         KrillQuery kq = new KrillQuery("base");
         SpanQuery sq = kq.fromJson(json).toQuery();
-        assertEquals(sq.toString(),"focus(254: spanContain(<base:base/s:t />, {254: spanExpansion(base:s:c, []{0, 4}, right)}))");
+        assertEquals(
+                sq.toString(),
+                "focus(254: spanContain(<base:base/s:t />, {254: spanExpansion(base:s:c, []{0, 4}, right)}))");
 
         kr = ki.search(sq, (short) 10);
-        assertEquals("[c]ab",kr.getMatch(0).getSnippetBrackets());
-        assertEquals("[ca]b",kr.getMatch(1).getSnippetBrackets());
-        assertEquals("[cab]",kr.getMatch(2).getSnippetBrackets());
-        assertEquals("[c]e",kr.getMatch(3).getSnippetBrackets());
+        assertEquals("[c]ab", kr.getMatch(0).getSnippetBrackets());
+        assertEquals("[ca]b", kr.getMatch(1).getSnippetBrackets());
+        assertEquals("[cab]", kr.getMatch(2).getSnippetBrackets());
+        assertEquals("[c]e", kr.getMatch(3).getSnippetBrackets());
 
-        assertEquals("[ce]",kr.getMatch(4).getSnippetBrackets());
+        assertEquals("[ce]", kr.getMatch(4).getSnippetBrackets());
         assertEquals(5, kr.getTotalResults());
 
         sq = kq.builder().tag("base/s:t").toQuery();
-        assertEquals(sq.toString(),"<base:base/s:t />");
+        assertEquals(sq.toString(), "<base:base/s:t />");
         kr = ki.search(sq, (short) 5);
         assertEquals("[cab]", kr.getMatch(0).getSnippetBrackets());
         assertEquals("[ce]", kr.getMatch(1).getSnippetBrackets());
@@ -433,21 +433,16 @@
 
 
 
-
     private FieldDocument createFieldDoc0 () {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-0");
         fd.addTV("base", "ceccecdeec",
-                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>10<i>10<b>0]"
-                 + "[(1-2)s:e|_1$<i>1<i>2]"
-                 + "[(2-3)s:c|_2$<i>2<i>3]"
-                 + "[(3-4)s:c|s:d|_3$<i>3<i>4]"
-                 + "[(4-5)s:e|_4$<i>4<i>5]"
-                 + "[(5-6)s:c|_5$<i>5<i>6]"
-                 + "[(6-7)s:d|_6$<i>6<i>7]"
-                 + "[(7-8)s:e|_7$<i>7<i>8]"
-                 + "[(8-9)s:e|_8$<i>8<i>9]"
-                 + "[(9-10)s:c|_9$<i>9<i>10]");
+                "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>10<i>10<b>0]"
+                        + "[(1-2)s:e|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
+                        + "[(3-4)s:c|s:d|_3$<i>3<i>4]"
+                        + "[(4-5)s:e|_4$<i>4<i>5]" + "[(5-6)s:c|_5$<i>5<i>6]"
+                        + "[(6-7)s:d|_6$<i>6<i>7]" + "[(7-8)s:e|_7$<i>7<i>8]"
+                        + "[(8-9)s:e|_8$<i>8<i>9]" + "[(9-10)s:c|_9$<i>9<i>10]");
         return fd;
     }
 
@@ -456,12 +451,10 @@
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-1");
         fd.addTV("base", "bbccdd",
-                 "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
-                 + "[(1-2)s:b|_1$<i>1<i>2]"
-                 + "[(2-3)s:c|_2$<i>2<i>3]"
-                 + "[(3-4)s:c|_3$<i>3<i>4]"
-                 + "[(4-5)s:d|_4$<i>4<i>5]"
-                 + "[(5-6)s:d|_5$<i>5<i>6]");
+                "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
+                        + "[(1-2)s:b|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
+                        + "[(3-4)s:c|_3$<i>3<i>4]" + "[(4-5)s:d|_4$<i>4<i>5]"
+                        + "[(5-6)s:d|_5$<i>5<i>6]");
         return fd;
     }
 
@@ -470,12 +463,10 @@
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-2");
         fd.addTV("base", "beccea",
-                 "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
-                 + "[(1-2)s:e|_1$<i>1<i>2]"
-                 + "[(2-3)s:c|_2$<i>2<i>3]"
-                 + "[(3-4)s:c|_3$<i>3<i>4]"
-                 + "[(4-5)s:e|_4$<i>4<i>5]"
-                 + "[(5-6)s:a|_5$<i>5<i>6]");
+                "[(0-1)s:b|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>6<i>6<b>0]]"
+                        + "[(1-2)s:e|_1$<i>1<i>2]" + "[(2-3)s:c|_2$<i>2<i>3]"
+                        + "[(3-4)s:c|_3$<i>3<i>4]" + "[(4-5)s:e|_4$<i>4<i>5]"
+                        + "[(5-6)s:a|_5$<i>5<i>6]");
         return fd;
     }
 
@@ -484,9 +475,8 @@
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-3");
         fd.addTV("base", "cab",
-                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>3<i>3<b>0]]"
-                 + "[(1-2)s:a|_1$<i>1<i>2]"
-                 + "[(2-3)s:b|_2$<i>2<i>3]");
+                "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>3<i>3<b>0]]"
+                        + "[(1-2)s:a|_1$<i>1<i>2]" + "[(2-3)s:b|_2$<i>2<i>3]");
         return fd;
     }
 
@@ -495,8 +485,8 @@
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-3");
         fd.addTV("base", "ce",
-                 "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>2<i>2<b>0]]"
-                 + "[(1-2)s:e|_1$<i>1<i>2]");
+                "[(0-1)s:c|_0$<i>0<i>1|<>:base/s:t$<b>64<i>0<i>2<i>2<b>0]]"
+                        + "[(1-2)s:e|_1$<i>1<i>2]");
         return fd;
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
index b47d9fa..b85206e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -392,6 +392,7 @@
 
     };
 
+
     @Test
     public void indexExample2e () throws IOException {
         KrillIndex ki = new KrillIndex();
@@ -432,29 +433,29 @@
 
         assertEquals("StartPos (0)", 0, kr.getMatch(0).startPos);
         assertEquals("EndPos (0)", 4, kr.getMatch(0).endPos);
-        assertEquals("Snippet (0)", "[h  h  i  j  ]h  i  j  h  i  j   ...",
-                     kr.getMatch(0).getSnippetBrackets());
+        assertEquals("Snippet (0)", "[h  h  i  j  ]h  i  j  h  i  j   ...", kr
+                .getMatch(0).getSnippetBrackets());
         assertEquals("StartPos (1)", 0, kr.getMatch(1).startPos);
         assertEquals("EndPos (1)", 4, kr.getMatch(1).endPos);
-        assertEquals("Snippet (1)", "[h  h  i  j  ]h  i  j  h  i  j   ...",
-                     kr.getMatch(1).getSnippetBrackets());
+        assertEquals("Snippet (1)", "[h  h  i  j  ]h  i  j  h  i  j   ...", kr
+                .getMatch(1).getSnippetBrackets());
 
         assertEquals("StartPos (2)", 0, kr.getMatch(2).startPos);
         assertEquals("EndPos (2)", 8, kr.getMatch(2).endPos);
         assertEquals("Snippet (2)", "[h  h  i  j  h  i  j  h  ]i  j        ",
-                     kr.getMatch(2).getSnippetBrackets());
+                kr.getMatch(2).getSnippetBrackets());
         assertEquals("StartPos (3)", 0, kr.getMatch(3).startPos);
         assertEquals("EndPos (3)", 8, kr.getMatch(3).endPos);
         assertEquals("Snippet (3)", "[h  h  i  j  h  i  j  h  ]i  j        ",
-                     kr.getMatch(3).getSnippetBrackets());
+                kr.getMatch(3).getSnippetBrackets());
         assertEquals("StartPos (4)", 0, kr.getMatch(4).startPos);
         assertEquals("EndPos (4)", 8, kr.getMatch(4).endPos);
         assertEquals("Snippet (4)", "[h  h  i  j  h  i  j  h  ]i  j        ",
-                     kr.getMatch(4).getSnippetBrackets());
+                kr.getMatch(4).getSnippetBrackets());
         assertEquals("StartPos (5)", 0, kr.getMatch(5).startPos);
         assertEquals("EndPos (5)", 8, kr.getMatch(5).endPos);
         assertEquals("Snippet (5)", "[h  h  i  j  h  i  j  h  ]i  j        ",
-                     kr.getMatch(5).getSnippetBrackets());
+                kr.getMatch(5).getSnippetBrackets());
 
 
         assertEquals("StartPos (6)", 0, kr.getMatch(6).startPos);
@@ -900,14 +901,12 @@
         // Case 1, 6, 7, 13
         // xy<a><a>x</a>b<a>c</a></a>x
         FieldDocument fd = new FieldDocument();
-        fd.addTV("base", "x  y  x  b  c  x  ",
-                 "[(0-3)s:x|_0$<i>0<i>3]"
-                 + "[(3-6)s:y|_1$<i>3<i>6]"
-                 + "[(6-9)s:x|_2$<i>6<i>9|<>:a$<b>64<i>6<i>9<i>3<b>0|"
-                 + "<>:a$<b>64<i>6<i>15<i>5<b>0]" +
-                 "[(9-12)s:b|_3$<i>9<i>12]"
-                 + "[(12-15)s:c|_4$<i>12<i>15|<>:a$<b>64<i>12<i>15<i>5<b>0]"
-                 + "[(15-18)s:x|_5$<i>15<i>18]");
+        fd.addTV("base", "x  y  x  b  c  x  ", "[(0-3)s:x|_0$<i>0<i>3]"
+                + "[(3-6)s:y|_1$<i>3<i>6]"
+                + "[(6-9)s:x|_2$<i>6<i>9|<>:a$<b>64<i>6<i>9<i>3<b>0|"
+                + "<>:a$<b>64<i>6<i>15<i>5<b>0]" + "[(9-12)s:b|_3$<i>9<i>12]"
+                + "[(12-15)s:c|_4$<i>12<i>15|<>:a$<b>64<i>12<i>15<i>5<b>0]"
+                + "[(15-18)s:x|_5$<i>15<i>18]");
         ki.addDoc(fd);
 
         // Save documents
@@ -923,8 +922,10 @@
 
         assertEquals("totalResults", kr.getTotalResults(), 2);
 
-        assertEquals("x  y  [x  ]b  c  x  ", kr.getMatch(0).getSnippetBrackets());
-        assertEquals("x  y  [x  b  c  ]x  ", kr.getMatch(1).getSnippetBrackets());
+        assertEquals("x  y  [x  ]b  c  x  ", kr.getMatch(0)
+                .getSnippetBrackets());
+        assertEquals("x  y  [x  b  c  ]x  ", kr.getMatch(1)
+                .getSnippetBrackets());
 
         assertEquals("StartPos (0)", 2, kr.getMatch(0).startPos);
         assertEquals("EndPos (0)", 3, kr.getMatch(0).endPos);
@@ -1105,7 +1106,8 @@
 
 
     @Test
-    public void queryJSONcomplexSpanOrTerm () throws QueryException, IOException {
+    public void queryJSONcomplexSpanOrTerm () throws QueryException,
+            IOException {
         /*
           at org.apache.lucene.search.spans.SpanOrQuery$1.doc(SpanOrQuery.java:234)
           at de.ids_mannheim.korap.query.spans.WithinSpans.toSameDoc(WithinSpans.java:423)
@@ -1114,22 +1116,22 @@
           at de.ids_mannheim.korap.Krill.apply(Krill.java:304)
         */
 
-        String jsonPath = getClass().getResource("/queries/bugs/span_or_bug.jsonld")
-            .getFile();
+        String jsonPath = getClass().getResource(
+                "/queries/bugs/span_or_bug.jsonld").getFile();
         String jsonPQuery = readFile(jsonPath);
         SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson(jsonPQuery);
 
         SpanWithinQuery sq = (SpanWithinQuery) sqwi.toQuery();
 
-        assertEquals("spanStartsWith(<tokens:base/s:s />, " +
-                     "spanOr([tokens:s:Er, tokens:s:Sie]))", sq.toString());
+        assertEquals("spanStartsWith(<tokens:base/s:s />, "
+                + "spanOr([tokens:s:Er, tokens:s:Sie]))", sq.toString());
 
         KrillIndex ki = new KrillIndex();
 
         ki.addDoc(getClass().getResourceAsStream("/wiki/DDD-08370.json.gz"),
-                  true);
+                true);
         ki.addDoc(getClass().getResourceAsStream("/wiki/SSS-09803.json.gz"),
-                  true);
+                true);
         ki.commit();
         Result kr = ki.search(sq, (short) 1);
         assertEquals(1, kr.getTotalResults());
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
index 4c1776b..7111b38 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
@@ -308,8 +308,11 @@
     @Test
     public void KorapSequenceWithEmptyRepetitionQuery () throws QueryException {
         QueryBuilder kq = new QueryBuilder("field");
-        SpanQuery sq = kq.seq(kq.seg("try")).append(kq.repeat(kq.empty(),0,100)).toQuery();
-        assertEquals("focus(254: spanContain(<field:base/s:t />, {254: spanExpansion(field:try, []{0, 100}, right)}))",sq.toString());
+        SpanQuery sq = kq.seq(kq.seg("try"))
+                .append(kq.repeat(kq.empty(), 0, 100)).toQuery();
+        assertEquals(
+                "focus(254: spanContain(<field:base/s:t />, {254: spanExpansion(field:try, []{0, 100}, right)}))",
+                sq.toString());
     };
 
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
index 4230d0d..cf8f67d 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
@@ -545,7 +545,8 @@
                     "/queries/bugs/expansion_bug_3.jsonld").getFile());
             KrillQuery kq = new KrillQuery("tokens");
 
-            assertEquals(kq.fromJson(json).toQuery().toString(),
+            assertEquals(
+                    kq.fromJson(json).toQuery().toString(),
                     "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:c, []{0, 4}, right)}))");
         }
         catch (QueryException e) {
@@ -558,12 +559,12 @@
     public void queryJSONcomplexSpanOrTerm () throws QueryException {
         // startsWith(<base/s=s>, { lassen | laufen })
         try {
-            String json = getString(getClass().getResource("/queries/bugs/span_or_bug.jsonld").getFile());
+            String json = getString(getClass().getResource(
+                    "/queries/bugs/span_or_bug.jsonld").getFile());
             KrillQuery kq = new KrillQuery("tokens");
 
-            assertEquals(
-                         kq.fromJson(json).toQuery().toString(),
-                         "spanStartsWith(<tokens:base/s:s />, spanOr([tokens:s:Er, tokens:s:Sie]))");
+            assertEquals(kq.fromJson(json).toQuery().toString(),
+                    "spanStartsWith(<tokens:base/s:s />, spanOr([tokens:s:Er, tokens:s:Sie]))");
         }
         catch (QueryException e) {
             fail(e.getMessage());
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
index 7e1a4ab..caaef7b 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
@@ -12,7 +12,8 @@
 public class TestSpanRelationQueryJSON {
 
     @Test
-    public void testMatchAnyRelationSourceWithAttribute() throws QueryException {
+    public void testMatchAnyRelationSourceWithAttribute ()
+            throws QueryException {
         String filepath = getClass().getResource(
                 "/queries/relation/any-source-with-attribute.json").getFile();
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
@@ -25,8 +26,10 @@
                 sq.toString());
     }
 
+
     @Test
-    public void testMatchAnyRelationTargetWithAttribute() throws QueryException {
+    public void testMatchAnyRelationTargetWithAttribute ()
+            throws QueryException {
         String filepath = getClass().getResource(
                 "/queries/relation/any-target-with-attribute.json").getFile();
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
@@ -36,16 +39,16 @@
         // +
         // "<tokens:c:vp />)), spanWithAttribute(spanAttribute(tokens:type:case:accusative))))",
         //
-                "focus(#[1,2]spanSegment(spanWithAttribute(spanAttribute(tokens:type:case:accusative)), " +
-                "focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), "
-                        + "<tokens:c:vp />))))",
-                sq.toString());
+                "focus(#[1,2]spanSegment(spanWithAttribute(spanAttribute(tokens:type:case:accusative)), "
+                        + "focus(#2: spanSegment(spanRelation(tokens:>:mate/d:HEAD), "
+                        + "<tokens:c:vp />))))", sq.toString());
 
         // System.out.println(sq.toString());
     }
 
+
     @Test
-    public void testMatchSpecificRelationSourceWithAttribute()
+    public void testMatchSpecificRelationSourceWithAttribute ()
             throws QueryException {
         String filepath = getClass().getResource(
                 "/queries/relation/specific-source-with-attribute.json")
@@ -60,8 +63,9 @@
                 sq.toString());
     }
 
+
     @Test
-    public void testMatchBothRelationNodeWithAttribute() throws QueryException {
+    public void testMatchBothRelationNodeWithAttribute () throws QueryException {
         String filepath = getClass().getResource(
                 "/queries/relation/both-operands-with-attribute.json")
                 .getFile();
@@ -76,6 +80,7 @@
                 sq.toString());
     }
 
+
     @Test
     public void testMatchRelationSource () throws QueryException {
         //
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
index 6b3285c..a38aec2 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSequenceQueryJSON.java
@@ -37,7 +37,8 @@
     @Test
     public void queryJSONseqEmptyEnd () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last.jsonld");
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right)}))");
     };
 
@@ -46,7 +47,8 @@
     public void queryJSONseqEmptyEndClass () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last-class.jsonld");
         // der{3:[]}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{1, 1}, right, class:3)}))");
     };
 
@@ -55,7 +57,8 @@
     public void queryJSONseqEmptyEndRepetition () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-last-repetition.jsonld");
         // der[]{3,5}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:der, []{3, 5}, right)}))");
     };
 
@@ -127,7 +130,8 @@
     public void queryJSONseqEmptySurround () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround.jsonld");
         // [][tt/p=NN][]
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{1, 1}, right)}))");
     };
 
@@ -156,7 +160,8 @@
     public void queryJSONseqEmptySurroundRepetition () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-repetition.jsonld");
         // [][tt/p=NN][]{2,7}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{1, 1}, left), []{2, 7}, right)}))");
     };
 
@@ -165,7 +170,8 @@
     public void queryJSONseqEmptySurroundRepetition2 () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("empty-surround-repetition-2.jsonld");
         // []{3,5}[tt/p=NN][]{2,7}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(spanExpansion(tokens:tt/p:NN, []{3, 5}, left), []{2, 7}, right)}))");
     };
 
@@ -204,7 +210,8 @@
     public void queryJSONseqNegativeEnd () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last.jsonld");
         // [tt/p=NN][tt/p!=NN]
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right)}))");
     };
 
@@ -240,7 +247,8 @@
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class.jsonld");
         // [tt/p=NN]{2:[tt/p!=NN]}
         SpanQuery sq = sqwi.toQuery();
-        assertEquals(sq.toString(),
+        assertEquals(
+                sq.toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{1, 1}, right, class:2)}))");
     };
 
@@ -249,7 +257,8 @@
     public void queryJSONseqNegativeEndRepetitionClass () throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition.jsonld");
         // [tt/p=NN]{2:[tt/p!=NN]{4,5}}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))");
     };
 
@@ -259,7 +268,8 @@
             throws QueryException {
         SpanQueryWrapper sqwi = jsonQueryFile("negative-last-class-repetition-2.jsonld");
         // [tt/p=NN]{2:[tt/p!=NN]}{4,5}
-        assertEquals(sqwi.toQuery().toString(),
+        assertEquals(
+                sqwi.toQuery().toString(),
                 "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:tt/p:NN, !tokens:tt/p:NN{4, 5}, right, class:2)}))");
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
index d0db622..2713702 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanSubspanQueryJSON.java
@@ -154,7 +154,8 @@
                 "/queries/submatch/embedded-valid-empty.jsonld").getFile();
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
-        assertEquals("focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:die, []{2, 5}, right)}))",
+        assertEquals(
+                "focus(254: spanContain(<tokens:base/s:t />, {254: spanExpansion(tokens:s:die, []{2, 5}, right)}))",
                 sq.toString());
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
index 574b19a..114ea99 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanWithinQuery.java
@@ -33,17 +33,15 @@
 
     };
 
+
     @Test
     public void spanSegmentStartsWithQuery () throws QueryException {
 
         SpanSequenceQueryWrapper ssquery = new SpanSequenceQueryWrapper(
                 "field", "a", "b", "c");
-        SpanWithinQuery ssequery = new SpanWithinQuery(
-                                                       new SpanElementQuery("field", "s"),
-                                                       ssquery.toQuery(),
-                                                       SpanWithinQuery.STARTSWITH,
-                                                       true
-                                                       );
+        SpanWithinQuery ssequery = new SpanWithinQuery(new SpanElementQuery(
+                "field", "s"), ssquery.toQuery(), SpanWithinQuery.STARTSWITH,
+                true);
 
         assertEquals(
                 "spanStartsWith(<field:s />, spanNext(spanNext(field:a, field:b), field:c))",
