Renamed KorapQuery to KrillQuery
diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
index 257e245..5376493 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
@@ -591,7 +591,7 @@
      * and <strong>is not recommended</strong>
      * as a common search API.
      *
-     * Please use {@link KorapQuery#run} instead.
+     * Please use {@link KrillQuery#run} instead.
      *
      * @param query a {@link SpanQuery} to apply on the
      *        virtual collection.
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index 3fd3e12..23d61ba 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.java
@@ -36,7 +36,7 @@
  *
  * @see KrillMeta
  * @see KorapCollection
- * @see KorapQuery
+ * @see KrillQuery
  * @see KorapIndex
  */
 /*
@@ -143,7 +143,7 @@
         // Parse "query" attribute
         if (json.has("query")) {
             try {
-                KorapQuery kq = new KorapQuery("tokens");
+                KrillQuery kq = new KrillQuery("tokens");
                 SpanQueryWrapper qw = kq.fromJson(json.get("query"));
                 this.setQuery(kq);
 
diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KrillQuery.java
similarity index 98%
rename from src/main/java/de/ids_mannheim/korap/KorapQuery.java
rename to src/main/java/de/ids_mannheim/korap/KrillQuery.java
index eaa52bc..08edf38 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillQuery.java
@@ -17,13 +17,13 @@
 import de.ids_mannheim.korap.util.QueryException;
 
 /**
- * KorapQuery implements a simple API for wrapping
+ * KrillQuery implements a simple API for wrapping
  * KorAP Lucene Index specific query classes and provides
  * deserialization of JSON-LD queries.
  *
  * Build complex queries.
  * <blockquote><pre>
- *   KorapQuery kq = new KorapQuery("tokens");
+ *   KrillQuery kq = new KrillQuery("tokens");
  *   SpanQueryWrapper sqw = (SpanQueryWrapper)
  *     kq.seq(
  *       kq.empty(),
@@ -36,7 +36,7 @@
  *
  * Deserialize from JSON input.
  * <blockquote><pre>
- *   SpanQueryWrapper = new KorapQuery("tokens").fromJson("{... JsonString ...}");
+ *   SpanQueryWrapper = new KrillQuery("tokens").fromJson("{... JsonString ...}");
  * </pre></blockquote>
  *
  * @author diewald
@@ -56,13 +56,13 @@
   [base=Der]([base=alte]|[base=junge])[base=Mann & p!=ADJA]![base=war | base=lag]
   Search for all documents containing "s:Der" and ("s:alte" or "s:junge") and "s:Mann"
 */
-public class KorapQuery extends Notifications {
+public class KrillQuery extends Notifications {
     private String field;
     private ObjectMapper mapper;
     private JsonNode json;
 
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapQuery.class);
+    private final static Logger log = LoggerFactory.getLogger(KrillQuery.class);
 
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
@@ -83,7 +83,7 @@
     /**
      * Constructs a new object for query generation.
      */
-    public KorapQuery () {
+    public KrillQuery () {
         this.mapper = new ObjectMapper();
     };
 
@@ -93,7 +93,7 @@
      *
      * @param field The specific index field for the query.
      */
-    public KorapQuery (String field) {
+    public KrillQuery (String field) {
         this.field = field;
         this.mapper = new ObjectMapper();
     };
@@ -140,7 +140,7 @@
      *
      * <p>
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanQueryWrapper sqw = kq.fromJson('{"@type":"koral:token","wrap":{' +
      *      '"@type":"koral:term","foundry":"opennlp",' +
      *      '"key":"tree","layer":"orth",' +
@@ -1102,7 +1102,7 @@
      * Create a query object based on a regular expression.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanRegexQueryWrapper re = kq.re(".+?");
      * </pre></blockquote>
      *
@@ -1130,7 +1130,7 @@
      * </ul>
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanRegexQueryWrapper re = kq.re("[Aa]lternatives?", RegExp.NONE);
      * </pre></blockquote>
      *
@@ -1149,7 +1149,7 @@
      * Supports flags (see above) and case insensitivity.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanRegexQueryWrapper re = kq.re("alternatives?", RegExp.NONE, true);
      * </pre></blockquote>
      *
@@ -1169,7 +1169,7 @@
      * Supports case insensitivity.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanRegexQueryWrapper re = kq.re("alternatives?", true);
      * </pre></blockquote>
      *
@@ -1203,7 +1203,7 @@
      * Supports case insensitivity.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanWildcardQueryWrapper wc = kq.wc("wall*", true);
      * </pre></blockquote>
      *
@@ -1220,7 +1220,7 @@
      * Create a segment query object.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanSegmentQueryWrapper seg = kq.seg();
      * </pre></blockquote>
      *
@@ -1237,7 +1237,7 @@
      * and {@link SpanAlterQueryWrapper} objects.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanSegmentQueryWrapper seg = kq.seg(
      *       kq.re("mate/p=.*?"),
      *       kq.re("opennlp/p=.*?")
@@ -1275,7 +1275,7 @@
      * Create an empty query segment.
      *
      * <blockquote><pre>
-     *   KorapQuery kq = new KorapQuery("tokens");
+     *   KrillQuery kq = new KrillQuery("tokens");
      *   SpanRepetitionQueryWrapper seg = kq.empty();
      * </pre></blockquote>
      */
diff --git a/src/main/java/de/ids_mannheim/korap/node/Resource.java b/src/main/java/de/ids_mannheim/korap/node/Resource.java
index 986aad8..ffeb6bf 100644
--- a/src/main/java/de/ids_mannheim/korap/node/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/node/Resource.java
@@ -164,8 +164,8 @@
         // Set HTTP to 200
         kresp.addMessage(681, "Document was added successfully", ID);
 
+        // System.err.println(kresp.toJsonString());
 
-        System.err.println(kresp.toJsonString());
         return kresp.toJsonString();
     };
 
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 5247ac4..1f99fd6 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
@@ -4,7 +4,7 @@
 
 import de.ids_mannheim.korap.util.QueryException;
 
-// TODO: Add warnings and errors - using KorapQuery
+// TODO: Add warnings and errors - using KrillQuery
 
 /**
  * A wrapper base class for Lucene SpanQueries,
diff --git a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
index e4b0359..738e32a 100644
--- a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
+++ b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
@@ -12,7 +12,7 @@
 import de.ids_mannheim.korap.KrillMeta;
 
 
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.response.Notifications;
 
 /**
@@ -39,7 +39,7 @@
     private KorapCollection collection;
 
     private String version, name, node, listener;
-    private KorapQuery query;
+    private KrillQuery query;
 
     private long
         totalResources = -2, // Not set
@@ -325,13 +325,13 @@
     /**
      * Get the KoralQuery query object.
      *
-     * @return The {@link KorapQuery} object,
+     * @return The {@link KrillQuery} object,
      *         representing the KoralQuery query object.
      */
     @JsonIgnore
-    public KorapQuery getQuery () {
+    public KrillQuery getQuery () {
         if (this.query == null)
-            this.query = new KorapQuery();
+            this.query = new KrillQuery();
         return this.query;
     };
 
@@ -339,12 +339,12 @@
     /**
      * Set the KoralQuery query object.
      *
-     * @param query The {@link KorapQuery} object,
+     * @param query The {@link KrillQuery} object,
      *        representing the KoralQuery query object.
      * @return The {@link KorapResponse} object for chaining
      */
     @JsonIgnore
-    public KorapResponse setQuery (KorapQuery query) {
+    public KorapResponse setQuery (KrillQuery query) {
         this.query = query;
 
         // Move messages from the query
diff --git a/src/test/java/de/ids_mannheim/korap/TestSimple.java b/src/test/java/de/ids_mannheim/korap/TestSimple.java
index 786d7a5..1b1fe24 100644
--- a/src/test/java/de/ids_mannheim/korap/TestSimple.java
+++ b/src/test/java/de/ids_mannheim/korap/TestSimple.java
@@ -5,7 +5,7 @@
 
 import static org.junit.Assert.*;
 
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.model.*;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.util.QueryException;
@@ -95,11 +95,11 @@
 	
         try {
             String json = getString(jsonFile);
-            sqwi = new KorapQuery("tokens").fromJson(json);
+            sqwi = new KrillQuery("tokens").fromJson(json);
         }
         catch (QueryException e) {
             fail(e.getMessage());
-            sqwi = new KorapQuery("tokens").seg("???");
+            sqwi = new KrillQuery("tokens").seg("???");
         };
         return sqwi;
     };
diff --git a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
index 2501b31..badae2d 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -8,7 +8,7 @@
 import de.ids_mannheim.korap.KorapCollection;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapResult;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import org.apache.lucene.store.MMapDirectory;
 import de.ids_mannheim.korap.collection.BooleanFilter;
 import org.apache.lucene.search.spans.SpanQuery;
@@ -367,11 +367,11 @@
 	
         try {
             String json = getString(jsonFile);
-            sqwi = new KorapQuery("tokens").fromJson(json);
+            sqwi = new KrillQuery("tokens").fromJson(json);
         }
         catch (QueryException e) {
             fail(e.getMessage());
-            sqwi = new KorapQuery("tokens").seg("???");
+            sqwi = new KrillQuery("tokens").seg("???");
         };
         return sqwi;
     };
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
index 514cb28..7183de6 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
@@ -6,7 +6,7 @@
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.KorapCollection;
 import de.ids_mannheim.korap.KorapResult;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.collection.BooleanFilter;
 
 import org.apache.lucene.index.Term;
@@ -78,7 +78,7 @@
 	assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
 
 	// Create a query
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
 	KorapResult kr = kc.search(query);
@@ -155,7 +155,7 @@
 	assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
 
 	// Create a query
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
 	KorapResult kr = kc.search(query);
@@ -208,7 +208,7 @@
 	assertEquals("Paragraphs", 139, kc.numberOf("paragraphs"));
 
 	// Create a query
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
 	KorapResult kr = kc.search(query);
diff --git a/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java b/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
index 07650dd..c4a6dc5 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
@@ -12,7 +12,7 @@
 
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KorapMatch;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -30,7 +30,7 @@
 		
 		String jsonPath = getClass().getResource("/queries/poly1.json").getFile();
 		String jsonQuery = readFile(jsonPath);
-		SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJson(
+		SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson(
 				jsonQuery
 		);
 		
@@ -63,7 +63,7 @@
 		
 		String jsonPath = getClass().getResource("/queries/poly4.json").getFile();
 		String jsonQuery = readFile(jsonPath);
-		SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJson(
+		SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson(
 				jsonQuery
 		);
 		SpanQuery sq = sqwi.toQuery();
diff --git a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
index 31f7b05..0a154dc 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
@@ -6,7 +6,7 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapMatch;
@@ -50,7 +50,7 @@
         ki.commit();
 
 
-        KorapQuery kq = new KorapQuery("tokens");
+        KrillQuery kq = new KrillQuery("tokens");
         KorapResult kr = ki.search(
             (SpanQuery) kq.seq(kq._(1, kq.seg("s:b"))).toQuery()
         );
@@ -120,7 +120,7 @@
         FieldDocument fd = ki.addDoc(json);
         ki.commit();
 
-        KorapQuery kq = new KorapQuery("tokens");
+        KrillQuery kq = new KrillQuery("tokens");
 
         KorapResult kr = ki.search((SpanQuery) kq.seq(kq.seg("s:a")).append(kq.seg("s:b")).append(kq.seg("s:c")).toQuery());
         KorapMatch km = kr.getMatch(0);
@@ -187,7 +187,7 @@
         // Commit!
         ki.commit();
 
-        KorapQuery kq = new KorapQuery("base");
+        KrillQuery kq = new KrillQuery("base");
         SpanQuery q = (SpanQuery) kq.or(kq._(1, kq.seg("s:a"))).or(kq._(2, kq.seg("s:b"))).toQuery();
         KorapResult kr = ki.search(q);
         assertEquals((long) 14, kr.getTotalResults());
@@ -209,7 +209,7 @@
         assertEquals("a[{2:b}]a", kr.getMatch(12).getSnippetBrackets());
         assertEquals("ab[{1:a}]", kr.getMatch(13).getSnippetBrackets());
 
-        kq = new KorapQuery("base");
+        kq = new KrillQuery("base");
         q = (SpanQuery) kq.or(kq._(1, kq.seg("i:a"))).or(kq._(2, kq.seg("i:c"))).toQuery();
         Krill qs = new Krill(q);
         qs.getMeta().getContext().left.setToken(true).setLength((short) 1);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
index abf2fad..e19c5de 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanClassQuery;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index 3e7ac5d..735674a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -17,7 +17,7 @@
 
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KorapMatch;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -211,11 +211,11 @@
         
         SpanQueryWrapper sqwi;
         try {    	    
-    	    sqwi = new KorapQuery("tokens").fromJson(json);
+    	    sqwi = new KrillQuery("tokens").fromJson(json);
     	}
     	catch (QueryException e) {
     	    fail(e.getMessage());
-    	    sqwi = new KorapQuery("tokens").seg("???");
+    	    sqwi = new KrillQuery("tokens").seg("???");
     	};        
     	
         
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
index 6d203e9..e16d9d8 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.index.FieldDocument;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
index 6cda8de..e376e7f 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -17,7 +17,7 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillMeta;
@@ -135,7 +135,7 @@
 	assertEquals(fd.getPubPlace(),"Bochum");
 	assertEquals(fd.getPubDate().toDisplay(),"2013-06-17");
 
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 	KorapResult kr = ki.search((SpanQuery) kq.seq(kq._(3, kq.seg("s:b"))).toQuery());
 
 	KorapMatch km = kr.getMatch(0);
@@ -174,7 +174,7 @@
 	};
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 
 	Krill ks;
 	KorapResult kr;
@@ -251,11 +251,11 @@
 	
 	try {
 	    String json = getString(jsonFile);
-	    sqwi = new KorapQuery("tokens").fromJson(json);
+	    sqwi = new KrillQuery("tokens").fromJson(json);
 	}
 	catch (QueryException e) {
 	    fail(e.getMessage());
-	    sqwi = new KorapQuery("tokens").seg("???");
+	    sqwi = new KrillQuery("tokens").seg("???");
 	};
 	return sqwi;
     };
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java
index 1c07163..e7fcc0a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestKorapIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.model.MultiTermTokenStream;
 
@@ -80,7 +80,7 @@
         assertEquals(3, ki.numberOf("base", "documents"));
         assertEquals(10, ki.numberOf("base", "sentences"));
 
-        // KorapQuery kq = new KorapQuery("text");
+        // KrillQuery kq = new KrillQuery("text");
         // ki.search();
     };
 
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
index f2a159d..cefb233 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchCollector.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapMatch;
 import de.ids_mannheim.korap.index.MatchCollector;
 import de.ids_mannheim.korap.KorapCollection;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
index a98ed05..ea51476 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
@@ -13,7 +13,7 @@
 import de.ids_mannheim.korap.match.PosIdentifier;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KorapMatch;
@@ -91,7 +91,7 @@
 	ki.addDoc(createSimpleFieldDoc());
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("tokens");
+	KrillQuery kq = new KrillQuery("tokens");
 	Krill ks = new Krill(
 	    kq._(2,kq.seq(kq.seg("s:b")).append(kq._(kq.seg("s:a"))))
         );
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
index 90c88f3..39371c1 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapMatch;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KorapCollection;
@@ -287,7 +287,7 @@
 
         KorapResult kr;
 
-        KorapQuery kq = new KorapQuery("base");
+        KrillQuery kq = new KrillQuery("base");
 
         SpanQuery sq = kq._(1,kq.seq(kq.seg("s:b")).append(kq.seg("s:a")).append(kq._(2,kq.seg("s:c")))).toQuery();
         
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
index b4e22b6..078d651 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
@@ -16,7 +16,7 @@
 
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KorapMatch;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.index.FieldDocument;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java b/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
index 33fbf10..26f13c4 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
@@ -10,7 +10,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
index ba3d299..e2b52fc 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
@@ -20,7 +20,7 @@
     KorapIndex ki;
     KorapResult kr;
     Krill ks;
-    KorapQuery kq;
+    KrillQuery kq;
 	
     public TestRealIndex() throws IOException {
         InputStream is = getClass().getResourceAsStream("/server.properties");
@@ -35,7 +35,7 @@
 
     @Test
     public void testCase1() throws IOException, QueryException {
-        KorapQuery kq = new KorapQuery("tokens");
+        KrillQuery kq = new KrillQuery("tokens");
         ks = new Krill(kq.within(kq.tag("base/s:s"), kq.seq(kq.re("s:.*")).append(kq._(kq.re("s:.*")))).toQuery());
         ks.getMeta().setTimeOut(10000);
         kr = ks.apply(ki);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
index bc7fc80..5fb5afa 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -48,7 +48,7 @@
 
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("base");
+	KrillQuery kq = new KrillQuery("base");
 	SpanQuery sq = kq.re("s:af*e").toQuery();
 	assertEquals("SpanMultiTermQueryWrapper(base:/s:af*e/)", sq.toString());
 			
@@ -61,22 +61,22 @@
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("affe [afffe] baum ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:baum.*").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:baum.*").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... afffe [baum] baumgarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... baum [baumgarten] steingarten ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:.....?garten").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:.....?garten").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... baum [baumgarten] steingarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... baumgarten [steingarten] franz ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:ha.s").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:ha.s").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... franz [hans] haus ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... hans [haus] efeu ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:.*ff.*").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:.*ff.*").toQuery()));
 	assertEquals((long) 3, kr.getTotalResults());
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("affe [afffe] baum ...", kr.getMatch(1).getSnippetBrackets());
@@ -105,7 +105,7 @@
 
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("base");
+	KrillQuery kq = new KrillQuery("base");
 	SpanQuery sq = kq.wc("s:af*e").toQuery();
 	assertEquals("SpanMultiTermQueryWrapper(base:s:af*e)", sq.toString());
 
@@ -118,25 +118,25 @@
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("affe [afffe] baum ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").wc("s:baum.*").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").wc("s:baum.*").toQuery()));
 	assertEquals((long) 0, kr.getTotalResults());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").wc("s:baum*").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").wc("s:baum*").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... afffe [baum] baumgarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... baum [baumgarten] steingarten ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").wc("s:*garten").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").wc("s:*garten").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... baum [baumgarten] steingarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... baumgarten [steingarten] franz ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").wc("s:ha?s").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").wc("s:ha?s").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... franz [hans] haus ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... hans [haus] efeu ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").wc("s:?ff?").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").wc("s:?ff?").toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... efeu [effe]", kr.getMatch(1).getSnippetBrackets());
@@ -164,7 +164,7 @@
 
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("base");
+	KrillQuery kq = new KrillQuery("base");
 	SpanQuery sq = kq.re("s:Af*e", true).toQuery();
 	assertEquals("SpanMultiTermQueryWrapper(base:/i:af*e/)", sq.toString());
 
@@ -177,30 +177,30 @@
 	assertEquals("[AfFe] aFfFE ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("AfFe [aFfFE] Baum ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:Af.*e").toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:Af.*e").toQuery()));
 	assertEquals((long) 1, kr.getTotalResults());
 	assertEquals("[AfFe] aFfFE ...", kr.getMatch(0).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:baum.*", true).toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:baum.*", true).toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... aFfFE [Baum] Baumgarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... Baum [Baumgarten] SteinGarten ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:.*garten", true).toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:.*garten", true).toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... Baum [Baumgarten] SteinGarten ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... Baumgarten [SteinGarten] franZ ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:.*garten", false).toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:.*garten", false).toQuery()));
 	assertEquals((long) 1, kr.getTotalResults());
 	assertEquals("... Baum [Baumgarten] SteinGarten ...", kr.getMatch(0).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:ha.s", true).toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:ha.s", true).toQuery()));
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("... franZ [HaNs] Haus ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... HaNs [Haus] Efeu ...", kr.getMatch(1).getSnippetBrackets());
 
-	kr = ki.search(ks.setSpanQuery(new KorapQuery("base").re("s:.*f*e", true).toQuery()));
+	kr = ki.search(ks.setSpanQuery(new KrillQuery("base").re("s:.*f*e", true).toQuery()));
 	assertEquals((long) 3, kr.getTotalResults());
 	assertEquals("[AfFe] aFfFE ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("AfFe [aFfFE] Baum ...", kr.getMatch(1).getSnippetBrackets());
@@ -229,7 +229,7 @@
 
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("base");
+	KrillQuery kq = new KrillQuery("base");
 	SpanQuery sq = kq.seq(kq.seg("s:affe")).append(kq.re("s:af*e")).toQuery();
 	assertEquals("spanNext(base:s:affe, SpanMultiTermQueryWrapper(base:/s:af*e/))", sq.toString());
 
@@ -265,7 +265,7 @@
 
 	ki.commit();
 
-	KorapQuery kq = new KorapQuery("base");
+	KrillQuery kq = new KrillQuery("base");
 	SpanQuery sq = kq.contains(
 				   kq.seq(
 					  kq.re("s:a.*e")
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 cdf5556..ad99e2c 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -16,7 +16,7 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanExpansionQuery;
@@ -292,7 +292,7 @@
         String jsonPath = getClass().getResource("/queries/poly3.json")
                 .getFile();
         String jsonQuery = readFile(jsonPath);
-        SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJson(jsonQuery);
+        SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson(jsonQuery);
 
         SpanQuery sq = sqwi.toQuery();
         //System.out.println(sq.toString());
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 62821c7..e3a6a20 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -16,7 +16,7 @@
 
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KorapMatch;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
@@ -1090,7 +1090,7 @@
     public void queryJSONpoly2() throws QueryException, IOException {
         String jsonPath = getClass().getResource("/queries/poly2.json").getFile();
         String jsonPQuery = readFile(jsonPath);		
-        SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJson(jsonPQuery);
+        SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson(jsonPQuery);
 		
         SpanWithinQuery sq = (SpanWithinQuery) sqwi.toQuery();
 		
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
similarity index 84%
rename from src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java
rename to src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
index 4db4c0e..a6b7074 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQuery.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQuery.java
@@ -2,7 +2,7 @@
 
 import java.util.*;
 import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -17,39 +17,39 @@
  * @author diewald
  */
 @RunWith(JUnit4.class)
-public class TestKorapQuery {
+public class TestKrillQuery {
 
     @Test
     public void korapQuerySegment () throws QueryException {
-        SpanQuery sq = new KorapQuery("field1").seg("a").with("b").toQuery();
+        SpanQuery sq = new KrillQuery("field1").seg("a").with("b").toQuery();
         assertEquals("spanSegment(field1:a, field1:b)", sq.toString());
         
-        sq = new KorapQuery("field2").seg("a", "b").with("c").toQuery();
+        sq = new KrillQuery("field2").seg("a", "b").with("c").toQuery();
         assertEquals("spanSegment(spanSegment(field2:a, field2:b), field2:c)", sq.toString());
     };
 
     @Test
     public void korapQueryRegexSegment () throws QueryException {
-        KorapQuery kq = new KorapQuery("field1");
+        KrillQuery kq = new KrillQuery("field1");
         SpanQuery sq = kq.seg("a").with(kq.re("b.*c")).toQuery();
         assertEquals("spanSegment(field1:a, SpanMultiTermQueryWrapper(field1:/b.*c/))", sq.toString());
 
-        kq = new KorapQuery("field2");
+        kq = new KrillQuery("field2");
         sq = kq.seg(kq.re("a.*")).with("b").toQuery();
         assertEquals("spanSegment(SpanMultiTermQueryWrapper(field2:/a.*/), field2:b)", sq.toString());
     };
 
     @Test
     public void korapQueryRegexSegment2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seg("a").with(kq.or("b").or("c")).toQuery();
         assertEquals("spanSegment(field:a, spanOr([field:b, field:c]))", sq.toString());
 
-        kq = new KorapQuery("field");
+        kq = new KrillQuery("field");
         sq = kq.seg("a").with(kq.or("b", "c")).toQuery();
         assertEquals("spanSegment(field:a, spanOr([field:b, field:c]))", sq.toString());
 
-        kq = new KorapQuery("field");
+        kq = new KrillQuery("field");
         // [ a & (b | /c.*d/) ]
         sq = kq.seg("a").with(kq.or("b").or(kq.re("c.*d"))).toQuery();
         assertEquals("spanSegment(field:a, spanOr([field:b, SpanMultiTermQueryWrapper(field:/c.*d/)]))", sq.toString());
@@ -57,49 +57,49 @@
 
     @Test
     public void korapQuerySequenceSegment () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("a").with(kq.or("b", "c"))).append("d").append(kq.re("e.?f")).toQuery();
         assertEquals("spanNext(spanNext(spanSegment(field:a, spanOr([field:b, field:c])), field:d), SpanMultiTermQueryWrapper(field:/e.?f/))", sq.toString());
     };
 
     @Test
     public void KorapTagQuery () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.tag("np").toQuery();
         assertEquals("<field:np />", sq.toString());
     };
 
     @Test
     public void KorapTagQuery2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.or(kq.tag("np"), kq.tag("vp")).toQuery();
         assertEquals("spanOr([<field:np />, <field:vp />])", sq.toString());
     };
 
     @Test
     public void KorapTagQuery3 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.tag("np"), kq.tag("vp")).toQuery();
         assertEquals("spanNext(<field:np />, <field:vp />)", sq.toString());
     };
 
     @Test
     public void KorapTagQuery4 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.tag("np"), kq.tag("vp")).append("test").toQuery();
         assertEquals("spanNext(spanNext(<field:np />, <field:vp />), field:test)", sq.toString());
     };
 
     @Test
     public void KorapTagQuery5 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.contains(kq.tag("s"), kq.tag("np")).toQuery();
         assertEquals("spanContain(<field:s />, <field:np />)", sq.toString());
     };
 
     @Test
     public void KorapTagQuery6 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("tree"), kq.contains(kq.tag("s"), kq.tag("np")), kq.re("hey.*")).toQuery();
         assertEquals("spanNext(spanNext(field:tree, spanContain(<field:s />, <field:np />)), SpanMultiTermQueryWrapper(field:/hey.*/))", sq.toString());
     };
@@ -107,133 +107,133 @@
 
     @Test
     public void KorapClassQuery () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("tree"), kq._(1, kq.contains(kq.tag("s"), kq.tag("np"))), kq.re("hey.*")).toQuery();
         assertEquals("spanNext(spanNext(field:tree, {1: spanContain(<field:s />, <field:np />)}), SpanMultiTermQueryWrapper(field:/hey.*/))", sq.toString());
     };
 
     @Test
     public void KorapClassQuery2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq._(kq.seg("base:test")).toQuery();
         assertEquals("{1: field:base:test}", sq.toString());
     };
 
     @Test
     public void KorapClassQuery3 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("tree"), kq.contains(kq.tag("s"), kq._(kq.tag("np"))), kq.re("hey.*")).toQuery();
         assertEquals("spanNext(spanNext(field:tree, spanContain(<field:s />, {1: <field:np />})), SpanMultiTermQueryWrapper(field:/hey.*/))", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.focus(kq.tag("np")).toQuery();
         assertEquals("focus(1: <field:np />)", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery1 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.focus(1, kq.tag("np")).toQuery();
         assertEquals("focus(1: <field:np />)", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.focus(1, kq._(1, kq.tag("np"))).toQuery();
         assertEquals("focus(1: {1: <field:np />})", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery3 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.focus(1, kq._(1, kq.seq(kq.tag("np"), kq._(kq.seg("test").without("no"))))).toQuery();
         assertEquals("focus(1: {1: spanNext(<field:np />, {1: spanNot(field:test, field:no, 0, 0)})})", sq.toString());
     };
 
     @Test
     public void KorapShrinkQuery4 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1"), kq.focus(1, kq._(1, kq.seg("try2"))), kq.seg("try3")).toQuery();
         assertEquals("spanNext(spanNext(field:try1, focus(1: {1: field:try2})), field:try3)", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery1 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).toQuery();
         assertEquals("spanNext(field:try1, field:try2)", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2,3).toQuery();
         assertEquals("spanDistance(field:try1, field:try2, [(w[2:3], ordered, notExcluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery3 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2,3, "s").toQuery();
         assertEquals("spanElementDistance(field:try1, field:try2, [(s[2:3], ordered, notExcluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery4 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2,3,"s").withConstraint(5,6,"w").toQuery();
         assertEquals("spanMultipleDistance(field:try1, field:try2, [(s[2:3], ordered, notExcluded), (w[5:6], ordered, notExcluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery5 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2,3,true).toQuery();
         assertEquals("spanDistance(field:try1, field:try2, [(w[2:3], ordered, excluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery6 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(2,3,"s", true).toQuery();
         assertEquals("spanElementDistance(field:try1, field:try2, [(s[2:3], ordered, excluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery7 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).withConstraint(5,6).withConstraint(2,3,"s",true).toQuery();
         assertEquals("spanMultipleDistance(field:try1, field:try2, [(w[5:6], ordered, notExcluded), (s[2:3], ordered, excluded)])", sq.toString());
     };
 
     @Test
     public void KorapSequenceQuery8 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.seq(kq.seg("try1")).append(kq.seg("try2")).append("try3").withConstraint(5,6).withConstraint(2,3,"s",true).toQuery();
         assertEquals("spanMultipleDistance(spanMultipleDistance(field:try1, field:try2, [(w[5:6], ordered, notExcluded), (s[2:3], ordered, excluded)]), field:try3, [(w[5:6], ordered, notExcluded), (s[2:3], ordered, excluded)])", sq.toString());
     };
 
     @Test
     public void KorapWithinQuery1 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.contains(kq.seg("test"), kq.seg("test2")).toQuery();
         assertEquals("spanContain(field:test, field:test2)", sq.toString());
     };
 
     @Test
     public void KorapWithinQuery2 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.overlaps(kq.seg("test"), kq.seg("test2")).toQuery();
         assertEquals("spanOverlap(field:test, field:test2)", sq.toString());
     };
 
     @Test
     public void KorapWithinQuery3 () throws QueryException {
-        KorapQuery kq = new KorapQuery("field");
+        KrillQuery kq = new KrillQuery("field");
         SpanQuery sq = kq.startswith(kq.seg("test"), kq.seg("test2")).toQuery();
         assertEquals("spanStartsWith(field:test, field:test2)", sq.toString());
     };
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
similarity index 97%
rename from src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
rename to src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
index a244f6a..6277449 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKrillQueryJSON.java
@@ -6,7 +6,7 @@
 import org.apache.lucene.search.spans.SpanQuery;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.util.QueryException;
 
 import static org.junit.Assert.*;
@@ -16,7 +16,7 @@
 import org.junit.runners.JUnit4;
 
 @RunWith(JUnit4.class)
-public class TestKorapQueryJSON {
+public class TestKrillQueryJSON {
 
     @Test
     public void queryJSONBsp1 () throws QueryException {
@@ -184,7 +184,7 @@
 
     @Test
     public void queryJSONDemo () throws QueryException {
-	SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJson("{ \"query\" : { \"@type\" : \"koral:token\", \"wrap\" : { \"@type\" : \"koral:term\", \"foundry\" : \"base\", \"layer\" : \"p\", \"key\" : \"foo\", \"match\" : \"match:eq\" }}}");
+	SpanQueryWrapper sqwi = new KrillQuery("tokens").fromJson("{ \"query\" : { \"@type\" : \"koral:token\", \"wrap\" : { \"@type\" : \"koral:term\", \"foundry\" : \"base\", \"layer\" : \"p\", \"key\" : \"foo\", \"match\" : \"match:eq\" }}}");
 
 	assertEquals(sqwi.toQuery().toString(), "tokens:base/p:foo");
     };
@@ -306,7 +306,7 @@
 	// ((MORPH(APPR) ODER MORPH(APPRART)) /+w1 Urlaub
 	try {
 	    String json = getString(getClass().getResource("/queries/bugs/underspecified_token.jsonld").getFile());
-	    new KorapQuery("tokens").fromJson(json);
+	    new KrillQuery("tokens").fromJson(json);
 	}
 	catch (QueryException e) {
 	    assertEquals(701, e.getErrorCode());
@@ -357,11 +357,11 @@
 	
 	try {
 	    String json = getString(jsonFile);
-	    sqwi = new KorapQuery("tokens").fromJson(json);
+	    sqwi = new KrillQuery("tokens").fromJson(json);
 	}
 	catch (QueryException e) {
 	    fail(e.getMessage());
-	    sqwi = new KorapQuery("tokens").seg("???");
+	    sqwi = new KrillQuery("tokens").seg("???");
 	};
 	return sqwi;
     };
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
index de572cc..26452a9 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
@@ -6,7 +6,7 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapMatch;
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
index cfbedff..7786e3e 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
@@ -6,7 +6,7 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.KorapIndex;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapMatch;
@@ -54,7 +54,7 @@
         // Commit!
         ki.commit();
 
-        KorapQuery kq = new KorapQuery("base");
+        KrillQuery kq = new KrillQuery("base");
         SpanQuery q = (SpanQuery) kq.or(
             kq._(1, kq.seg("s:a"))).or(kq._(2, kq.seg("s:b"))
         ).toQuery();
@@ -221,7 +221,7 @@
         // Commit!
         ki.commit();
 
-        KorapQuery kq = new KorapQuery("base");
+        KrillQuery kq = new KrillQuery("base");
         SpanQuery q = (SpanQuery) kq.seq(kq.seg("s:a")).append(kq.seg("s:b")).toQuery();
         KorapResult kr = ki.search(q);
 
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
index ed04f53..f4472fe 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -8,7 +8,7 @@
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillMeta;
 import de.ids_mannheim.korap.KorapCollection;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.meta.SearchContext;
@@ -34,7 +34,7 @@
     @Test
     public void searchCount () {
         Krill k = new Krill(
-          new KorapQuery("field1").seg("a").with("b")
+          new KrillQuery("field1").seg("a").with("b")
         );
 
         KrillMeta meta = k.getMeta();
@@ -53,7 +53,7 @@
     @Test
     public void searchStartIndex () {
         Krill k = new Krill(
-            new KorapQuery("field1").seg("a").with("b")
+            new KrillQuery("field1").seg("a").with("b")
         );
 
         KrillMeta meta = k.getMeta();
@@ -74,7 +74,7 @@
     @Test
     public void searchQuery () {
         Krill ks = new Krill(
-            new KorapQuery("field1").seg("a").with("b")
+            new KrillQuery("field1").seg("a").with("b")
         );
         // query
         assertEquals(ks.getSpanQuery().toString(), "spanSegment(field1:a, field1:b)");
@@ -101,7 +101,7 @@
         ki.commit();
 
         Krill ks = new Krill(
-	        new KorapQuery("tokens").seg("s:Buchstaben")
+	        new KrillQuery("tokens").seg("s:Buchstaben")
         );
 
         // Todo: This is not an acceptable collection, but sigh
@@ -623,7 +623,7 @@
         assertNull(fd.getDocAuthor());
 
         Krill ks = new Krill(
-            new KorapQuery("tokens").
+            new KrillQuery("tokens").
             seg("mate/m:case:nom").
             with("mate/m:number:pl")
         );
@@ -714,7 +714,7 @@
         assertNull(fd.getDocAuthor());
         
         Krill ks = new Krill(
-            new KorapQuery("tokens").
+            new KrillQuery("tokens").
             seg("mate/m:case:nom").
             with("mate/m:number:sg")
         );
@@ -746,7 +746,7 @@
             getFile()
         );
 
-        KorapQuery kq = new KorapQuery("tokens");
+        KrillQuery kq = new KrillQuery("tokens");
         Krill ks = new Krill(
             kq.focus(
                 1,
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
index 8b5c530..876d645 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
@@ -7,7 +7,7 @@
 
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KorapCollection;
-import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.meta.SearchContext;