diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index e4a6594..3a9349b 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -1,12 +1,11 @@
 package de.ids_mannheim.korap;
 
 // Krill classes
-import de.ids_mannheim.korap.*;
 import de.ids_mannheim.korap.index.*;
 import de.ids_mannheim.korap.response.*;
 import de.ids_mannheim.korap.query.SpanElementQuery;
+import de.ids_mannheim.korap.util.KrillProperties;
 import de.ids_mannheim.korap.util.QueryException;
-import static de.ids_mannheim.korap.util.KrillProperties.*;
 
 // Lucene classes
 import org.apache.lucene.search.*;
@@ -143,8 +142,8 @@
 
     // Some initializations ...
     {
-        Properties prop = loadProperties();
-        Properties info = loadInfo();
+        Properties prop = KrillProperties.loadDefaultProperties();
+        Properties info = KrillProperties.loadInfo();
         if (info != null) {
             this.version = info.getProperty("krill.version");
             this.name = info.getProperty("krill.name");
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 96054cc..d17215f 100644
--- a/src/main/java/de/ids_mannheim/korap/index/Indexer.java
+++ b/src/main/java/de/ids_mannheim/korap/index/Indexer.java
@@ -16,6 +16,8 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.lucene.store.MMapDirectory;
 import de.ids_mannheim.korap.KrillIndex;
+import de.ids_mannheim.korap.util.KrillProperties;
+
 import static de.ids_mannheim.korap.util.KrillProperties.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -27,26 +29,37 @@
  * is using the standalone server system,
  * this tool may be more suitable for your needs
  * (especially as it is way faster).
+ * <br><br>
+ * Input directories should contain files in the json.gz format. Files
+ * of other formats will be skipped or not indexed. The output
+ * directory can be specified in the config file. See
+ * src/main/resources/krill.properties.info to create a config file.
  * 
- * Usage: java -jar Krill-Indexer.jar [--config propfile]
- * [directories]*
+ * <pre>
+ * Usage:
+ * 
+ * java -jar Krill-Indexer.jar -c [propfile] -i [input directories] -o
+ * [output directory]
+ * 
+ * java -jar Krill-Indexer.jar --config [propfile] --input [input
+ * directories] --output [output directory]
+ * </pre>
+ * 
  * 
  * @author diewald, margaretha
  *
  */
 public class Indexer {
-    KrillIndex index;
-    int count;
-    int commitCount;
+    private KrillIndex index;
+    private int count;
+    private int commitCount;
 
-    // private static String propFile = "krill.properties";
     private static String path = null;
-    private static Pattern jsonFilePattern;
+    private Pattern jsonFilePattern;
 
     // Init logger
     private final static Logger log = LoggerFactory.getLogger(Indexer.class);
 
-
     /**
      * Construct a new indexer object.
      * 
@@ -55,18 +68,18 @@
      * @throws IOException
      */
     public Indexer (Properties prop) throws IOException {
-        if (this.path == null) {
-            this.path = prop.getProperty("krill.indexDir");
+        if (path == null) {
+            path = prop.getProperty("krill.indexDir");
         }
 
-        log.info("Output directory: " + this.path);
+        log.info("Output directory: " + path);
 
         // Default to 1000 documents till the next commit
         String commitCount = prop.getProperty("krill.index.commit.count",
                 "1000");
 
         // Create a new index object based on the directory
-        this.index = new KrillIndex(new MMapDirectory(Paths.get(this.path)));
+        this.index = new KrillIndex(new MMapDirectory(Paths.get(path)));
         this.count = 0;
         this.commitCount = Integer.parseInt(commitCount);
 
@@ -81,16 +94,14 @@
      *            The {@link File} directory containing
      *            documents to index.
      */
-    public void parse (File dir) {
+    private void parse (File dir) {
         Matcher matcher;
         for (String file : dir.list()) {
-            //log.info("Json file: "+file);
             matcher = jsonFilePattern.matcher(file);
             if (matcher.find()) {
                 file = dir.getPath() + '/' + file;
                 log.info("Adding " + file + " to the index. ");
 
-                // Add file to the index
                 try {
                     if (this.index.addDoc(new FileInputStream(file),
                             true) == null) {
@@ -109,7 +120,8 @@
                 }
             }
             else {
-                log.warn(file + " does not have json.gz format.");
+                log.warn("Skip " + file
+                        + " since it does not have json.gz format.");
             }
         }
     }
@@ -118,16 +130,19 @@
     /**
      * Commit changes to the index.
      */
-    public void commit () {
+    private void commit () {
         log.info("Committing index ... ");
         try {
             this.index.commit();
         }
         catch (IOException e) {
-            log.error("Unable to commit to index " + this.path);
+            log.error("Unable to commit to index " + path);
         }
     }
 
+    private void closeIndex() throws IOException{
+        index.close();
+    }
 
     /**
      * Main method.
@@ -139,11 +154,11 @@
      * @throws IOException
      */
     public static void main (String[] argv) throws IOException {
-
+        
         Options options = new Options();
         options.addOption(Option.builder("c").longOpt("config")
                 .desc("configuration file (defaults to "
-                        + de.ids_mannheim.korap.util.KrillProperties.propStr
+                        + KrillProperties.defaultPropertiesLocation
                         + ").")
                 .hasArg().argName("properties file").required().build());
         options.addOption(Option.builder("i").longOpt("inputDir")
@@ -180,7 +195,7 @@
                     "Krill indexer\n java -jar -c <properties file> -i <input directories> "
                             + "[-o <output directory>]",
                     options);
-            System.exit(0);
+            return;
         }
         catch (ParseException e) {
             log.error("Unexpected error: " + e);
@@ -188,23 +203,27 @@
         }
 
         // Load properties
-        Properties prop = loadProperties(propFile);
+        Properties prop = KrillProperties.loadProperties(propFile);
 
         // Get indexer object
-        Indexer ki = new Indexer(prop);
+        Indexer indexer = new Indexer(prop);
 
         // Iterate over list of directories
         for (String arg : inputDirectories) {
-            log.info("Indexing files in"+arg);
+            log.info("Indexing files in " + arg);
             File f = new File(arg);
             if (f.isDirectory())
-                ki.parse(f);
+                indexer.parse(f);
         }
-
+        indexer.closeIndex();
         // Final commit
-        ki.commit();
         log.info("Finished indexing.");
         // Finish indexing
-        System.out.println("Indexed " + ki.count + " files.");
+        String message = "Indexed " + indexer.count + " file";
+        if (indexer.count > 1) {
+            message += "s";
+        }
+        System.out.print(message + ".");
+        
     }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanClassFilterQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanClassFilterQuery.java
index b5a8653..cc32ad6 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanClassFilterQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanClassFilterQuery.java
@@ -12,6 +12,11 @@
 
 import de.ids_mannheim.korap.query.spans.ClassFilteredSpans;
 
+/** Filters query results by means of class operations.
+ * 
+ * @author margaretha
+ *
+ */
 public class SpanClassFilterQuery extends SimpleSpanQuery {
 
     public enum ClassOperation {
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
index 2d6c29f..6458da1 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
@@ -16,18 +16,13 @@
 
 /**
  * SpanExpansionQuery makes a span longer by stretching out the start
- * or the end
- * position of the span. The constraints of the expansion, such as how
- * large the
- * expansion should be (min and max position) and the direction of the
- * expansion
- * with respect to the original span, are specified in
- * ExpansionConstraint. The
- * direction is designated with the sign of a number, namely a
- * negative number
+ * or the end position of the span. The constraints of the expansion,
+ * such as how large the expansion should be (min and max position)
+ * and the direction of the expansion with respect to the original
+ * span, are specified in ExpansionConstraint. The direction is
+ * designated with the sign of a number, namely a negative number
  * signifies the left direction, and a positive number (including 0)
- * signifies
- * the right direction.
+ * signifies the right direction.
  * 
  * <pre>
  * SpanTermQuery stq = new SpanTermQuery(new Term(&quot;tokens&quot;,
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanFocusQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanFocusQuery.java
index db51707..959c7ff 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanFocusQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanFocusQuery.java
@@ -37,7 +37,7 @@
     private boolean isSorted = true;
     private boolean matchTemporaryClass = false;
     private boolean removeTemporaryClasses = false;
-    private int windowSize = 10;
+    private int windowSize = 10; // default
 
 
     /**
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanMultipleDistanceQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanMultipleDistanceQuery.java
index ce65df6..10f106b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanMultipleDistanceQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanMultipleDistanceQuery.java
@@ -16,23 +16,18 @@
 
 /**
  * SpanMultipleDistanceQuery matches two spans with respect to a list
- * of
- * distance constraints. No repetition of constraints of the same unit
- * type
- * (e.g. word, sentence, paragraph) is allowed. For example, there
- * must only
- * exactly one constraint for word/token-based distance. A
- * SpanDistanceQuery is
- * created for each constraint.<br />
+ * of distance constraints. No repetition of constraints of the same
+ * unit type (e.g. word, sentence, paragraph) is allowed. For example,
+ * there must only exactly one constraint for word/token-based
+ * distance. A SpanDistanceQuery is created for each constraint.<br />
  * <br />
  * Examples:
  * <ul>
  * 
  * <li>
  * Search two terms x and y which are separated by minimum two and
- * maximum three
- * other words within the same sentence. The order of x and y does not
- * matter.
+ * maximum three other words within the same sentence. The order of x
+ * and y does not matter.
  * 
  * <pre>
  * List&lt;DistanceConstraint&gt; constraints = new
@@ -51,10 +46,8 @@
  * 
  * <li>
  * Search term x which do <em>not</em> occur with term y in minimum
- * two and
- * maximum three other words and <em>not</em> in the same sentence. X
- * must
- * precede y.
+ * two and maximum three other words and <em>not</em> in the same
+ * sentence. X must precede y.
  * 
  * <pre>
  * List&lt;DistanceConstraint&gt; constraints = new
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
index fb0d382..a728baa 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
@@ -23,15 +23,12 @@
 
 /**
  * SpanNextQuery matches two spans which are directly next to each
- * other. It is
- * identical to a phrase query with exactly two clauses.
+ * other. It is identical to a phrase query with exactly two clauses.
  * 
  * In the example below, the SpanNextQuery retrieves {@link NextSpans}
- * starting
- * from the start position of {@link TermSpans} "turn" and ending at
- * the end
- * position of {@link TermSpans} "off" occurring immediately after the
- * {@link TermSpans} "turn".
+ * starting from the start position of {@link TermSpans} "turn" and
+ * ending at the end position of {@link TermSpans} "off" occurring
+ * immediately after the {@link TermSpans} "turn".
  * 
  * <pre>
  * SpanNextQuery sq = new SpanNextQuery(
@@ -61,7 +58,7 @@
      */
     public SpanNextQuery (SpanQuery firstClause, SpanQuery secondClause) {
         this(firstClause, secondClause, true);
-    };
+    }
 
 
     /**
@@ -84,7 +81,7 @@
     public SpanNextQuery (SpanQuery firstClause, SpanQuery secondClause,
                           boolean collectPayloads) {
         super(firstClause, secondClause, collectPayloads);
-    };
+    }
 
 
     @Override
@@ -92,7 +89,7 @@
     public Spans getSpans (final LeafReaderContext context, Bits acceptDocs,
             Map<Term, TermContext> termContexts) throws IOException {
         return (Spans) new NextSpans(this, context, acceptDocs, termContexts);
-    };
+    }
 
 
     @Override
@@ -102,7 +99,7 @@
                 (SpanQuery) secondClause.clone(), collectPayloads);
         spanNextQuery.setBoost(getBoost());
         return spanNextQuery;
-    };
+    }
 
 
     /*
@@ -133,7 +130,7 @@
             return clone;
 
         return this;
-    };
+    }
 
 
     @Override
@@ -167,10 +164,9 @@
             return false;
 
         return getBoost() == spanNextQuery.getBoost();
-    };
+    }
 
 
-    // I don't know what I am doing here
     @Override
     public int hashCode () {
         int result;
@@ -178,5 +174,5 @@
         result ^= (result << 31) | (result >>> 2); // reversible
         result += Float.floatToRawIntBits(getBoost());
         return result;
-    };
-};
+    }
+}
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanReferenceQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanReferenceQuery.java
index 241b6ce..c50bc78 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanReferenceQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanReferenceQuery.java
@@ -12,11 +12,40 @@
 
 import de.ids_mannheim.korap.query.spans.ReferenceSpans;
 
+/**
+ * SpanReferenceQuery ensures that a span involving in more than one
+ * operations are indeed the same spans. Such a span is referred by a
+ * class and cannot be ensured in one nested SpanQuery.
+ * 
+ * For instance in the following Annis query
+ * 
+ * <pre>
+ * cat="vb" & cat="prp" & cat="nn" & #1 .{0,1} #2 & #1 .{0,2} #3
+ * & #3 -> #2
+ * </pre>
+ * 
+ * cat="prp" is referred by a class with number 2 and involves in two
+ * operations. After resolving the first and second operations, class
+ * number 3 and 2 have to be referred at the same time to solve the
+ * third operation. However, only one class can be focused on from a
+ * span at one time. Let say, class number 3 is focused on from the
+ * resulting spans of the first and second operation, then it is
+ * matched with a new span enumeration of cat="prp" for the third
+ * operation.
+ * 
+ * SpanReferenceQuery ensures that cat="prp" spans in the third
+ * operation are the same as the those in the first operation by
+ * matching their positions using the class number 2 payloads kept in
+ * spans focussing on the class number 3 (it keeps all the payloads
+ * from previous operations).
+ * 
+ * @author margaretha
+ *
+ */
 public class SpanReferenceQuery extends SimpleSpanQuery {
 
     private byte classNum;
 
-
     public SpanReferenceQuery (SpanQuery firstClause, byte classNum,
                                boolean collectPayloads) {
         super(firstClause, collectPayloads);
@@ -26,7 +55,6 @@
 
     @Override
     public SimpleSpanQuery clone () {
-        // TODO Auto-generated method stub
         return null;
     }
 
@@ -34,7 +62,6 @@
     @Override
     public Spans getSpans (LeafReaderContext context, Bits acceptDocs,
             Map<Term, TermContext> termContexts) throws IOException {
-        // TODO Auto-generated method stub
         return new ReferenceSpans(this, context, acceptDocs, termContexts);
     }
 
@@ -51,11 +78,18 @@
     }
 
 
+    /** Get the class number of the referred spans.
+     * @return the class number of the referred spans
+     */
     public byte getClassNum () {
         return classNum;
     }
 
 
+    /** Set the class number of the referred spans. 
+     * 
+     * @param classNum the class number of the referred spans
+     */
     public void setClassNum (byte classNum) {
         this.classNum = classNum;
     }
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 311a5fc..de77ef4 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRelationMatchQuery.java
@@ -12,6 +12,13 @@
 
 import de.ids_mannheim.korap.query.spans.FocusSpans;
 
+/**
+ * Matches the source and/or target of a SpanRelationQuery to specific
+ * SpanQueries.
+ * 
+ * @author margaretha
+ *
+ */
 public class SpanRelationMatchQuery extends SimpleSpanQuery {
 
     private SpanQuery operandQuery;
@@ -19,10 +26,25 @@
     private SpanRelationQuery relationQuery;
 
 
+    /**
+     * Matches the left node of the given relation with the given
+     * SpanQuery.
+     * 
+     * @param relation
+     *            a SpanRelationQuery
+     * @param spanQuery
+     *            a SpanQuery
+     * @param collectPayloads
+     *            a boolean flag representing the value
+     *            <code>true</code> if payloads are to be collected,
+     *            otherwise
+     *            <code>false</code>.
+     */
     public SpanRelationMatchQuery (SpanRelationQuery relation,
-                                   SpanQuery operand, boolean collectPayloads) {
+                                   SpanQuery spanQuery,
+                                   boolean collectPayloads) {
 
-        checkVariables(relation, operand);
+        checkArguments(relation, spanQuery);
         SpanFocusQuery sq = new SpanFocusQuery(
                 new SpanSegmentQuery(relationQuery, operandQuery, true),
                 relation.getTempClassNumbers());
@@ -36,10 +58,26 @@
     }
 
 
+    /**
+     * Matches both the source and target of the given relations with
+     * the given operands.
+     * 
+     * @param relation
+     *            a SpanRelationQuery
+     * @param source
+     *            a SpanQuery
+     * @param target
+     *            a SpanQuery
+     * @param collectPayloads
+     *            a boolean flag representing the value
+     *            <code>true</code> if payloads are to be collected,
+     *            otherwise
+     *            <code>false</code>.
+     */
     public SpanRelationMatchQuery (SpanRelationQuery relation, SpanQuery source,
                                    SpanQuery target, boolean collectPayloads) {
 
-        checkVariables(relation, source, target);
+        checkArguments(relation, source, target);
         SpanFocusQuery sq = null;
         SpanFocusQuery sq2 = null;
         // match source and then target
@@ -76,30 +114,53 @@
     }
 
 
-    public void checkVariables (SpanRelationQuery relation, SpanQuery operand) {
+    /**
+     * Checks if the SpanRelationQuery and the SpanQuery are not null
+     * and if the SpanQuery has the same field as the
+     * SpanRelationQuery.
+     * 
+     * @param relation
+     *            SpanRelationQery
+     * @param spanQuery
+     *            SpanQuery
+     */
+    public void checkArguments (SpanRelationQuery relation,
+            SpanQuery spanQuery) {
         if (relation == null) {
             throw new IllegalArgumentException(
                     "The relation query cannot be null.");
         }
-        if (operand == null) {
+        if (spanQuery == null) {
             throw new IllegalArgumentException(
                     "The operand query cannot be null.");
         }
         this.field = relation.getField();
-        if (!operand.getField().equals(field)) {
+        if (!spanQuery.getField().equals(field)) {
             throw new IllegalArgumentException(
                     "Clauses must have the same field.");
         }
         this.relationQuery = relation;
-        this.operandQuery = operand;
+        this.operandQuery = spanQuery;
     }
 
 
-    public void checkVariables (SpanRelationQuery relation, SpanQuery operand,
+    /**
+     * Checks if the SpanRelationQuery and the source and target
+     * SpanQuery are not null and if the SpanQueries have the same
+     * field as the SpanRelationQuery.
+     * 
+     * @param relation
+     *            SpanRelationQery
+     * @param source
+     *            SpanQuery
+     * @param target
+     *            SpanQuery
+     */
+    public void checkArguments (SpanRelationQuery relation, SpanQuery source,
             SpanQuery target) {
-        checkVariables(relation, operand);
+        checkArguments(relation, source);
         if (target == null) {
-            if (operand == null) {
+            if (source == null) {
                 throw new IllegalArgumentException(
                         "The target query cannot be 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 094e457..ea71d63 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRelationQuery.java
@@ -18,12 +18,10 @@
 
 /**
  * SpanRelationQuery retrieves spans representing a relation between
- * tokens,
- * elements, or a-token-and-an-element. Relation are marked with
- * prefix "<" or
- * ">". The direction of the angle bracket represents the direction of
- * the
- * corresponding relation. By default, the relation is set ">".
+ * tokens, elements, or a-token-and-an-element. Relation are marked
+ * with prefix "<" or ">". The direction of the angle bracket
+ * represents the direction of the corresponding relation. By default,
+ * the relation is set ">".
  * <br/><br/>
  * 
  * This class provides two types of query:
@@ -38,11 +36,10 @@
  * </pre>
  * </li>
  * <li>querying relations matching a certain type of sources/targets,
- * that are the
- * left or the right sides of the relations. This query is used within
- * {@link SpanRelationPartQuery}, for instance, to retrieve all
- * dependency relations
- * "<:xip/syntax-dep_rel" whose sources (right side) are noun phrases.
+ * that are the left or the right sides of the relations. This query
+ * is used within {@link SpanRelationPartQuery}, for instance, to
+ * retrieve all dependency relations "<:xip/syntax-dep_rel" whose
+ * sources (right side) are noun phrases.
  * <pre>
  * SpanRelationPartQuery rv =
  * new SpanRelationPartQuery(sq, new SpanElementQuery("tokens","np"),
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
index c169e4b..fa7f5aa 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
@@ -15,18 +15,15 @@
 
 /**
  * SpanRepetitionQuery means that the given SpanQuery must appears
- * multiple
- * times in a sequence. The number of repetition depends on the
- * minimum and the
- * maximum number parameters. <br />
+ * multiple times in a sequence. The number of repetition depends on
+ * the minimum and the maximum number parameters. <br />
  * <br />
  * 
  * In the example below, SpanRepetitionQuery retrieves
  * {@link RepetitionSpans} consisting of the TermSpans "tt:p/ADJ" that
- * must appear at least once or
- * consecutively two times. What appears after the RepetitionSpans is
- * not
- * considered, so it is possible that it is another "tt:p/ADJ". <br />
+ * must appear at least once or consecutively two times. What appears
+ * after the RepetitionSpans is not considered, so it is possible that
+ * it is another "tt:p/ADJ". <br />
  * <br />
  * 
  * <pre>
@@ -52,7 +49,6 @@
 
     private int min, max;
 
-
     /**
      * Constructs a SpanRepetitionQuery for the given
      * {@link SpanQuery}.
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanSegmentQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanSegmentQuery.java
index 9e36c40..dc7c81d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanSegmentQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanSegmentQuery.java
@@ -117,7 +117,7 @@
             return false;
 
         return getBoost() == spanSegmentQuery.getBoost();
-    };
+    }
 
 
     @Override
@@ -137,6 +137,5 @@
 
     public void setRelation (boolean isRelation) {
         this.isRelation = isRelation;
-    };
-
+    }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
index 5d31352..82792f2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanSubspanQuery.java
@@ -14,12 +14,9 @@
 
 /**
  * This query extracts a subspan from another span. The subspan starts
- * from a
- * startOffset until startOffset + length. A positive startOffset is
- * counted
- * from the start of the span, while a negative startOffset is
- * calculated from
- * the end of the span. <br />
+ * from a startOffset until startOffset + length. A positive
+ * startOffset is counted from the start of the span, while a negative
+ * startOffset is calculated from the end of the span. <br />
  * <br />
  * SpanSubspanQuery takes a SpanQuery as its input and creates
  * subspans from the
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanTermWithIdQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanTermWithIdQuery.java
index 51ae8d1..33cfdfb 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanTermWithIdQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanTermWithIdQuery.java
@@ -14,11 +14,9 @@
 
 /**
  * SpanTermWithIdQuery wraps a SpanTermQuery retrieving TermSpans and
- * add a
- * spanid to the TermSpans. It is used in other spanqueries requiring
- * spans with
- * id as their child spans, for example in span relation with variable
- * query ( {@link SpanRelationPartQuery}).
+ * add a spanid to the TermSpans. It is used in other spanqueries
+ * requiring spans with id as their child spans, for example in span
+ * relation with variable query ( {@link SpanRelationPartQuery}).
  * 
  * <pre>
  * SpanTermWithIdQuery sq = new SpanTermWithIdQuery(new
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanWithinQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanWithinQuery.java
index e658046..fb16ff9 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanWithinQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanWithinQuery.java
@@ -2,27 +2,20 @@
 
 // Based on SpanNearQuery
 import java.io.IOException;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermContext;
-import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.Spans;
-import org.apache.lucene.search.spans.SpanTermQuery;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.ToStringUtils;
 
 import de.ids_mannheim.korap.query.spans.WithinSpans;
-import de.ids_mannheim.korap.query.SpanElementQuery;
 
 
 /**
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/AttributeSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/AttributeSpans.java
index ab0576f..5ee5e75 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/AttributeSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/AttributeSpans.java
@@ -19,28 +19,22 @@
 import de.ids_mannheim.korap.query.SpanAttributeQuery;
 
 /**
- * UPDATE THIS!
  * Span enumeration of attributes which are term spans with special
- * payload
- * assignments referring to another span (e.g. element/relation span)
- * to which
- * an attribute span belongs. The class is basically a wrapper of
- * Lucene {@link TermSpans} with additional functionality regarding
- * element/relation
+ * payload assignments referring to another span (e.g.
+ * element/relation span) to which an attribute span belongs. The
+ * class is basically a wrapper of Lucene {@link TermSpans} with
+ * additional functionality regarding element/relation
  * reference. Element/relation id is annotated ascendingly starting
- * from the
- * left side. <br/>
- * <br/>
+ * from the left side.
+ * <br/><br/>
  * The enumeration is ordered firstly by the start position of the
- * attribute and
- * secondly by the element/relation id descendingly. This order helps
- * to match
- * element and attributes faster.
+ * attribute and secondly by the element/relation id descendingly.
+ * This order helps to match element and attributes faster.
  * 
- * AttributeSpans contain information about the elements they belongs
- * to, thus
- * querying them alone is sufficient to get
- * "any element having a specific attribute".
+ * AttributeSpans have the same start and end positions of the
+ * element/relations they belongs to, thus querying them alone
+ * is sufficient to get "any element having a specific
+ * attribute".
  * 
  * @author margaretha
  */
@@ -59,6 +53,11 @@
         private PayloadTypeIdentifier (int value) {
             this.value = value;
         }
+
+
+        public int getValue () {
+            return value;
+        }
     }
 
     protected Logger logger = LoggerFactory.getLogger(AttributeSpans.class);
@@ -101,8 +100,7 @@
 
     /**
      * Moves to the next match by checking the candidate match list or
-     * setting
-     * the list first when it is empty.
+     * setting the list first when it is empty.
      * 
      * @return true if a match is found
      * @throws IOException
@@ -132,10 +130,9 @@
 
     /**
      * Collects all the attributes in the same start position and sort
-     * them by
-     * element/relation Id in a reverse order (the ones with the
-     * bigger
-     * element/relation Id first).
+     * them by element/relation Id in a reverse order (the ones with
+     * the
+     * bigger element/relation Id first).
      * 
      * @throws IOException
      */
@@ -155,8 +152,7 @@
 
     /**
      * Creates a CandidateAttributeSpan based on the child span and
-     * set the
-     * spanId and elementEnd from its payloads.
+     * set the spanId and elementEnd from its payloads.
      * 
      * @param firstSpans
      *            an AttributeSpans
@@ -169,21 +165,10 @@
 
         byte payloadTypeIdentifier = payloadBuffer.get(0);
         short spanId = payloadBuffer.getShort(5);
-        // if (payload.get(0).length == 6) {
         int end = payloadBuffer.getInt(1);
 
         return new CandidateAttributeSpan(firstSpans, payloadTypeIdentifier,
                 spanId, end);
-
-        // }
-        // else if (payload.get(0).length == 10) {
-        // start = wrapper.getInt(0);
-        // end = wrapper.getInt(4);
-        // spanId = wrapper.getShort(8);
-        // return new CandidateAttributeSpan(firstSpans, spanId, start, end);
-        // }
-
-        // throw new NullPointerException("Missing element end in payloads.");
     }
 
 
@@ -234,14 +219,11 @@
 
     /**
      * CandidateAttributeSpan contains information about an Attribute
-     * span. All
-     * attribute spans occurring in an identical position are
-     * collected as
-     * CandidateAttributeSpans. The list of these
-     * CandidateAttributeSpans are
-     * sorted based on the span ids to which the attributes belong to.
-     * The
-     * attributes with smaller spanIds come first on the list.
+     * span. All attribute spans occurring in an identical position
+     * are collected as CandidateAttributeSpans. The list of these
+     * CandidateAttributeSpans are sorted based on the span ids to
+     * which the attributes belong to. The attributes with smaller
+     * spanIds come first on the list.
      * 
      */
     class CandidateAttributeSpan extends CandidateSpan
@@ -277,14 +259,6 @@
         }
 
 
-        // public CandidateAttributeSpan (Spans span, short spanId, int start,
-        // int end) throws IOException {
-        // super(span);
-        // setSpanId(spanId);
-        // this.start = start;
-        // this.end = end;
-        // }
-
         @Override
         public int compareTo (CandidateSpan o) {
             CandidateAttributeSpan cs = (CandidateAttributeSpan) o;
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/CandidateSpanComparator.java b/src/main/java/de/ids_mannheim/korap/query/spans/CandidateSpanComparator.java
index c351891..bc50e6d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/CandidateSpanComparator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/CandidateSpanComparator.java
@@ -2,6 +2,14 @@
 
 import java.util.Comparator;
 
+/**
+ * Compares the positions of two CandidateSpans. The CandidateSpan
+ * with lower document number, start position and end position is
+ * ordered before the other CandidateSpan.
+ * 
+ * @author margaretha
+ *
+ */
 public class CandidateSpanComparator implements Comparator<CandidateSpan> {
 
     @Override
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/DistanceSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/DistanceSpans.java
index 286f91c..d0ac492 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/DistanceSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/DistanceSpans.java
@@ -7,20 +7,16 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermContext;
 import org.apache.lucene.util.Bits;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanMultipleDistanceQuery;
 
 /**
  * DistanceSpan is a base class for enumeration of span matches, whose
- * two child
- * spans have a specific range of distance (within a min and a max
- * distance) and
- * other constraints (i.e. order and co-occurrence) depending on the
- * {@link SpanDistanceQuery}. All distance related spans extends this
- * class.
+ * two child spans have a specific range of distance (within a min and
+ * a max distance) and other constraints (i.e. order and
+ * co-occurrence) depending on the {@link SpanDistanceQuery}. All
+ * distance related spans extends this class.
  * 
  * @see DistanceExclusionSpans
  * @see ElementDistanceExclusionSpans
@@ -33,7 +29,6 @@
 public abstract class DistanceSpans extends SimpleSpans {
 
     protected CandidateSpan matchFirstSpan, matchSecondSpan;
-    protected Logger log = LoggerFactory.getLogger(DistanceSpans.class);
     protected boolean exclusion; // for MultipleDistanceQuery
 
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index dcd59d3..4dd9247 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -2,7 +2,6 @@
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -21,8 +20,7 @@
 
 /**
  * Enumeration of spans representing elements such as phrases,
- * sentences and
- * paragraphs. Span length is stored as a payload.
+ * sentences and paragraphs. Span length is stored as a payload.
  * 
  * Depth and certainty value payloads have not been loaded and handled
  * yet.
@@ -38,8 +36,6 @@
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
 
-    private byte[] b = new byte[10];
-
     public static enum PayloadTypeIdentifier {
         ELEMENT(64),
         // ELEMENT_WITH_TUI(65),
@@ -49,7 +45,6 @@
 
         private byte value;
 
-
         private PayloadTypeIdentifier (int value) {
             this.value = (byte) value;
         }
@@ -142,9 +137,9 @@
 
             this.payloadTypeIdentifier = bb.get(0);
 
-			if (payloadTypeIdentifier != PayloadTypeIdentifier.MILESTONE.value) {
-				this.matchEndPosition = bb.getInt(9);
-			};
+            if (payloadTypeIdentifier != PayloadTypeIdentifier.MILESTONE.value) {
+                this.matchEndPosition = bb.getInt(9);
+            };
 
             if (payloadTypeIdentifier == PayloadTypeIdentifier.ELEMENT.value
                     && length > 15) {
@@ -164,7 +159,7 @@
             return;
         }
 
-		this.matchEndPosition = this.matchStartPosition;
+        this.matchEndPosition = this.matchStartPosition;
         this.setSpanId((short) -1);
         this.hasSpanId = false;
         this.matchPayload = null;
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 84e5da9..51bf64f 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
@@ -3,7 +3,6 @@
 import static de.ids_mannheim.korap.util.KrillByte.byte2int;
 
 import java.io.IOException;
-import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.PriorityQueue;
@@ -14,8 +13,6 @@
 import org.apache.lucene.index.TermState;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.util.Bits;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.query.SpanFocusQuery;
 
@@ -47,7 +44,6 @@
 public class FocusSpans extends SimpleSpans {
     private List<Byte> classNumbers;
     private SpanQuery query;
-    private final Logger log = LoggerFactory.getLogger(FocusSpans.class);
 
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
index 75dd930..96eeceb 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/NextSpans.java
@@ -10,8 +10,6 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermContext;
 import org.apache.lucene.util.Bits;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.query.SpanNextQuery;
 
@@ -33,9 +31,6 @@
     private int candidateListDocNum;
     private boolean hasMoreFirstSpan;
 
-    private Logger log = LoggerFactory.getLogger(NextSpans.class);
-
-
     /**
      * Constructs NextSpans for the given {@link SpanNextQuery}.
      * 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/NonPartialOverlappingSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/NonPartialOverlappingSpans.java
index 4464d90..8e87f29 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/NonPartialOverlappingSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/NonPartialOverlappingSpans.java
@@ -8,24 +8,17 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermContext;
 import org.apache.lucene.util.Bits;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.query.SimpleSpanQuery;
 
 /**
  * An abstract class for Span enumeration whose two child spans are
- * matched by
- * their positions and do not have a partial overlap.
+ * matched by their positions and do not have a partial overlap.
  * 
  * @author margaretha
  */
 public abstract class NonPartialOverlappingSpans extends SimpleSpans {
 
-    private Logger log = LoggerFactory
-            .getLogger(NonPartialOverlappingSpans.class);
-
-
     /**
      * Constructs NonPartialOverlappingSpans from the given
      * {@link SimpleSpanQuery}.
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ReferenceSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ReferenceSpans.java
index 9ab35e1..a78094d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ReferenceSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ReferenceSpans.java
@@ -12,6 +12,14 @@
 
 import de.ids_mannheim.korap.query.SpanReferenceQuery;
 
+/**
+ * Resolves a reference to some class by searching for the class
+ * payload
+ * in the payloads of the subspans (firstspans).
+ * 
+ * @author margaretha
+ *
+ */
 public class ReferenceSpans extends SimpleSpans {
 
     private byte classNum;
@@ -42,6 +50,16 @@
     }
 
 
+    /**
+     * Iterates over the payloads of the firstspans and looks for a
+     * payload having the same class number as referenced spans. If
+     * there are more than one payloads with the same class number,
+     * but different start and end positions, the method will return
+     * false.
+     * 
+     * @return true, if such a payload is found, false, otherwise.
+     * @throws IOException
+     */
     private boolean hasSameClassPosition () throws IOException {
         int start = 0, end = 0;
         boolean isFound = false;
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java
index b00dc43..6067d9d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationBaseSpans.java
@@ -14,12 +14,10 @@
 
 /**
  * RelationBaseSpans is a base class for relation spans containing
- * properties
- * about the start and end positions of right side of the relation. It
- * can also
- * store information about the id of the left/right side, for
- * instance, when it
- * is an element or another relation.
+ * properties about the start and end positions of right side of the
+ * relation. It can also store information about the id of the
+ * left/right side, for instance, when it is an element or another
+ * relation.
  * 
  * @author margaretha
  * 
@@ -33,7 +31,7 @@
 
     public RelationBaseSpans () {
         this.hasSpanId = true;
-    };
+    }
 
 
     /**
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 cedd25a..22314e4 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
@@ -20,8 +20,7 @@
 
 /**
  * Enumeration of spans occurring multiple times in a sequence. The
- * number of
- * repetition depends on the min and max parameters.
+ * number of repetition depends on the min and max parameters.
  * 
  * @author margaretha
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SegmentSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/SegmentSpans.java
index 96b699f..8375b28 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SegmentSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SegmentSpans.java
@@ -13,8 +13,7 @@
 
 /**
  * SegmentSpans is an enumeration of Span matches in which that two
- * child spans
- * have exactly the same start and end positions.
+ * child spans have exactly the same start and end positions.
  * 
  * @author margaretha
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SimpleSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/SimpleSpans.java
index 7917eb5..2bf24de 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SimpleSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SimpleSpans.java
@@ -11,23 +11,25 @@
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.Spans;
 import org.apache.lucene.util.Bits;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.query.SimpleSpanQuery;
 
 /**
  * An abstract class for Span enumeration including span match
- * properties
- * and basic methods.
+ * properties and basic methods.
  * 
  * @author margaretha
  */
 public abstract class SimpleSpans extends Spans {
+    protected final Logger log = LoggerFactory.getLogger(SimpleSpans.class);
     private SimpleSpanQuery query;
     protected boolean isStartEnumeration;
     protected boolean collectPayloads;
 
     protected boolean hasMoreSpans;
-    // Warning: enumeration of Spans
+    // Enumeration of Spans
     protected Spans firstSpans, secondSpans;
 
     protected int matchDocNumber, matchStartPosition, matchEndPosition;
@@ -46,7 +48,7 @@
         matchEndPosition = -1;
         matchPayload = new ArrayList<byte[]>();
         isStartEnumeration = true;
-    };
+    }
 
 
     public SimpleSpans (SimpleSpanQuery simpleSpanQuery,
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedElementDistanceSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedElementDistanceSpans.java
index 6850ab4..24e277b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedElementDistanceSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/UnorderedElementDistanceSpans.java
@@ -16,14 +16,10 @@
 
 /**
  * Enumeration of span matches, whose two child spans have a specific
- * range of
- * distance (within a min and a max distance) and can be in any order.
- * The unit
- * distance is an element, which can be a sentence or a paragraph for
- * instance.
- * The distance is the difference between the positions of elements
- * containing
- * the spans.
+ * range of distance (within a min and a max distance) and can be in
+ * any order. The unit distance is an element, which can be a sentence
+ * or a paragraph for instance. The distance is the difference between
+ * the positions of elements containing the spans.
  * 
  * @author margaretha
  */
diff --git a/src/main/java/de/ids_mannheim/korap/server/Node.java b/src/main/java/de/ids_mannheim/korap/server/Node.java
index 058cf33..9291d8b 100644
--- a/src/main/java/de/ids_mannheim/korap/server/Node.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Node.java
@@ -20,6 +20,8 @@
 import java.beans.PropertyVetoException;
 
 import de.ids_mannheim.korap.KrillIndex;
+import de.ids_mannheim.korap.util.KrillProperties;
+
 import org.apache.lucene.store.MMapDirectory;
 
 import static de.ids_mannheim.korap.util.KrillProperties.*;
@@ -96,7 +98,7 @@
             };
         };
 
-        Properties prop = loadProperties(propFile);
+        Properties prop = KrillProperties.loadProperties(propFile);
 
         // Node properties
         if (path != null && path.equals(":memory:")) {
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 8d2f466..1ba261c 100644
--- a/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
+++ b/src/main/java/de/ids_mannheim/korap/util/KrillProperties.java
@@ -2,27 +2,33 @@
 
 import java.util.*;
 import java.io.*;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import de.ids_mannheim.korap.Krill;
 
-// Todo: Properties may be loaded twice - althogh Java may cache automatically
+/**
+ * 
+ * Todo: Properties may be loaded twice - although Java may cache automatically
+ * 
+ * @author diewald, margaretha
+ *
+ */
 public class KrillProperties {
 
-    public static String propStr = "krill.properties";
-    private static String infoStr = "krill.info";
+    public static final String defaultPropertiesLocation = "krill.properties";
+    public static final String defaultInfoLocation = "krill.info";
     private static Properties prop, info;
 
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(Krill.class);
-
+    private final static Logger log = LoggerFactory
+            .getLogger(KrillProperties.class);
 
     // Load properties from file
-    public static Properties loadProperties () {
+    public static Properties loadDefaultProperties () {
         if (prop != null)
             return prop;
 
-        prop = loadProperties(propStr);
+        prop = loadProperties(defaultPropertiesLocation);
         return prop;
     };
 
@@ -30,22 +36,23 @@
     // Load properties from file
     public static Properties loadProperties (String propFile) {
         if (propFile == null)
-            return loadProperties();
+            return loadDefaultProperties();
 
         InputStream iFile;
         try {
             iFile = new FileInputStream(propFile);
             prop = new Properties();
             prop.load(iFile);
+
         }
         catch (IOException t) {
             try {
                 iFile = KrillProperties.class.getClassLoader()
                         .getResourceAsStream(propFile);
-
                 if (iFile == null) {
                     log.warn(
-                            "Cannot find {}. Please create it using \"{}.info\" as template.",
+                            "Cannot find {}. Please create it using "
+                            + "\"src/main/resources/krill.properties.info\" as template.",
                             propFile, propFile);
                     return null;
                 };
@@ -68,10 +75,10 @@
         try {
             info = new Properties();
             InputStream iFile = KrillProperties.class.getClassLoader()
-                    .getResourceAsStream(infoStr);
+                    .getResourceAsStream(defaultInfoLocation);
 
             if (iFile == null) {
-                log.error("Cannot find {}.", infoStr);
+                log.error("Cannot find {}.", defaultInfoLocation);
                 return null;
             };
 
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 1554002..2805e78 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,4 +1,4 @@
-log4j.rootLogger = DEBUG, stdout
+log4j.rootLogger = ERROR, stdout
 
 # Queries:
 # log4j.logger.de.ids_mannheim.korap.query.SpanNextQuery = TRACE, stdout
diff --git a/src/test/java/de/ids_mannheim/korap/TestIndexer.java b/src/test/java/de/ids_mannheim/korap/TestIndexer.java
new file mode 100644
index 0000000..ea2aea9
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/TestIndexer.java
@@ -0,0 +1,112 @@
+package de.ids_mannheim.korap;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import de.ids_mannheim.korap.index.Indexer;
+
+/**
+ * @author margaretha
+ *
+ */
+public class TestIndexer {
+    private Logger logger = LoggerFactory.getLogger(TestIndexer.class);
+    private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+    private String info = "usage: Krill indexer";
+    private File outputDirectory = new File("test-index");
+
+    @Test
+    public void testArguments () throws IOException {
+        Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
+                "-i", "src/test/resources/bzk" });
+        assertEquals("Indexed 1 file.", outputStream.toString());
+    }
+
+    @Test
+    public void testOutputArgument () throws IOException {
+        Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
+                "-i", "src/test/resources/bzk", "-o", "test-output"});
+        assertEquals("Indexed 1 file.", outputStream.toString());
+    }
+
+    @Test
+    public void testMultipleInputFiles () throws IOException {
+        Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
+                "-i", "src/test/resources/wiki" });
+        assertEquals("Indexed 14 files.", outputStream.toString());
+    }
+
+    @Test
+    public void testMultipleInputDirectories () throws IOException {
+        Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
+                "-i",
+                "src/test/resources/bzk;src/test/resources/goe;src/test/resources/sgbr",
+                "-o", "test-index" });
+        assertEquals("Indexed 3 files.", outputStream.toString());
+    }
+
+    @Test
+    public void testEmptyArgument () throws IOException {
+        Indexer.main(new String[] {});
+        logger.info(outputStream.toString());
+        assertEquals(true, outputStream.toString().startsWith(info));
+    }
+
+
+    @Test
+    public void testMissingConfig () throws IOException {
+        Indexer.main(new String[] { "-i", "src/test/resources/bzk",
+                "-o test-index" });
+        logger.info(outputStream.toString());
+        assertEquals(true, outputStream.toString().startsWith(info));
+    }
+
+    @Test
+    public void testMissingInput () throws IOException {
+        Indexer.main(new String[] { "-c", "src/test/resources/krill.properties",
+                "-o", "test-index" });
+        logger.info(outputStream.toString());
+        assertEquals(true, outputStream.toString().startsWith(info));
+    }
+
+    @Before
+    public void setOutputStream () {
+        System.setOut(new PrintStream(outputStream));
+    }
+
+    @After
+    public void cleanOutputStream () {
+        System.setOut(null);
+    }
+
+    @Before
+    public void cleanOutputDirectory () {
+
+        if (outputDirectory.exists()) {
+            logger.debug("Output directory exists");
+            deleteFile(outputDirectory);
+        }
+    }
+
+    private void deleteFile (File path) {
+        if (path.isDirectory()) {
+            File file;
+            for (String filename : path.list()) {
+                file = new File(path + "/" + filename);
+                deleteFile(file);
+                logger.debug(file.getAbsolutePath());
+            }
+        }
+        path.delete();
+    }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
index fc4d57c..177dbc7 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestReferenceIndex.java
@@ -35,40 +35,32 @@
         ki.addDoc(TestRelationIndex.createFieldDoc2());
         ki.commit();
 
-        SpanTermQuery seq1 = new SpanTermQuery(new Term("base", "pos:V"));
-        SpanElementQuery seq2 = new SpanElementQuery("base", "np");
-        SpanClassQuery scq1 = new SpanClassQuery(seq1, (byte) 1);
-        SpanClassQuery scq2 = new SpanClassQuery(seq2, (byte) 2);
+        SpanTermQuery stq = new SpanTermQuery(new Term("base", "pos:V"));
+        SpanElementQuery seq = new SpanElementQuery("base", "np");
+        SpanClassQuery scq1 = new SpanClassQuery(stq, (byte) 1);
+        SpanClassQuery scq2 = new SpanClassQuery(seq, (byte) 2);
         SpanNextQuery snq1 = new SpanNextQuery(scq1, scq2);
 
         SpanFocusQuery sfq1 = new SpanFocusQuery(snq1, (byte) 2);
 
         SpanRelationQuery srq = new SpanRelationQuery(
                 new SpanTermQuery(new Term("base", "<:child-of")), true);
-        // SpanSegmentQuery ssq = new SpanSegmentQuery(srq, sfq1,
-        // true);
-        // SpanFocusQuery sfq2 = new SpanFocusQuery(ssq, (byte) 1);
-        // sfq2.setSorted(false);
-        // sfq2.setMatchTemporaryClass(false);
 
-        SpanElementQuery seq3 = new SpanElementQuery("base", "pp");
-        SpanClassQuery scq3 = new SpanClassQuery(seq3, (byte) 3);
-        // SpanSegmentQuery ssq2 = new SpanSegmentQuery(sfq2, scq3,
-        // true);
+        SpanElementQuery seq2 = new SpanElementQuery("base", "pp");
+        SpanClassQuery scq3 = new SpanClassQuery(seq2, (byte) 3);
 
         SpanRelationMatchQuery rq = new SpanRelationMatchQuery(srq, sfq1, scq3,
                 true);
-
-        // System.out.println(rq.toString());
-        SpanFocusQuery sfq3 = new SpanFocusQuery(rq, (byte) 1);
+        
+        // focus on np
+        SpanFocusQuery sfq2 = new SpanFocusQuery(rq, (byte) 1);
 
         DistanceConstraint constraint = new DistanceConstraint(3, 3, true,
                 false);
-        SpanDistanceQuery sdq = new SpanDistanceQuery(sfq3, scq3, constraint,
+        SpanDistanceQuery sdq = new SpanDistanceQuery(sfq2, scq3, constraint,
                 true);
 
         SpanReferenceQuery ref = new SpanReferenceQuery(sdq, (byte) 3, true);
-        // System.out.println(ref.toString());
 
         kr = ki.search(ref, (short) 10);
         /*
@@ -78,7 +70,8 @@
          * + " " + km.getSnippetBrackets()); }
          * System.out.println(kr.getTotalResults());
          */
-
+        
+        // cat=V & cat=np & cat=pp & #1 . #2 & #3 ->child-of #2 & #1 .{3,3} #3
         assertEquals(
                 "spanReference(spanDistance(focus(1: focus(#[1,2]spanSegment("
                         + "focus(#1: spanSegment(spanRelation(base:<:child-of), focus(2: spanNext("
@@ -100,7 +93,7 @@
         SpanQueryWrapper sqwi = getJSONQuery(filepath);
         SpanQuery sq = sqwi.toQuery();
 
-        // cat="vb" & cat="prp" & cat="nn" & #1 .notordered #2 & #1
+        // cat="vb" & cat="prp" & cat="nn" & #1 .{0,1} #2 & #1
         // .{0,2} #3 & #3 -> #2
 
         assertEquals(
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 63491a2..657fa33 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -14,13 +14,11 @@
 import de.ids_mannheim.korap.query.SpanClassQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanFocusQuery;
-import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanRelationMatchQuery;
 import de.ids_mannheim.korap.query.SpanRelationQuery;
 import de.ids_mannheim.korap.query.SpanSegmentQuery;
 import de.ids_mannheim.korap.query.SpanTermWithIdQuery;
 import de.ids_mannheim.korap.query.SpanWithAttributeQuery;
-import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.response.Result;
 
 /*
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 8be9a79..3122b4d 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
@@ -70,7 +70,7 @@
 
 
     @Test
-    public void testMatchBothRelationNodeWithAttribute ()
+    public void testMatchBothRelationNodesWithAttribute ()
             throws QueryException {
         String filepath = getClass()
                 .getResource(
diff --git a/src/test/resources/krill.properties b/src/test/resources/krill.properties
index f9cbc50..e14926b 100644
--- a/src/test/resources/krill.properties
+++ b/src/test/resources/krill.properties
@@ -1,2 +1,3 @@
 krill.version = ${project.version}
 krill.name = ${project.name}
+krill.indexDir = test-output
\ No newline at end of file
