Moved KorapResult to response/Result
diff --git a/Changes b/Changes
index 6c63f35..8e8b7a1 100644
--- a/Changes
+++ b/Changes
@@ -13,7 +13,8 @@
 	  renamed KorapArray to KrillArray,
 	  renamed KorapByte to KrillByte,
 	  renamed KorapString to KrillString,
-	  moved KorapNode to server/Node (diewald)
+	  moved KorapNode to server/Node,
+	  moved KorapResult to response/Result (diewald)
         - [documentation] Improved documentation for API classes (diewald)
 
 0.50 2015-02-23
diff --git a/src/main/java/de/ids_mannheim/korap/Krill.java b/src/main/java/de/ids_mannheim/korap/Krill.java
index d3d6588..0daddf6 100644
--- a/src/main/java/de/ids_mannheim/korap/Krill.java
+++ b/src/main/java/de/ids_mannheim/korap/Krill.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.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.util.QueryException;
 import de.ids_mannheim.korap.response.Notifications;
 import de.ids_mannheim.korap.response.KorapResponse;
@@ -238,9 +238,9 @@
      *
      * @param index The {@link KrillIndex}
      *        the search should be applyied to.
-     * @return The result as a {@link KorapResult} object.
+     * @return The result as a {@link Result} object.
      */
-    public KorapResult apply (KrillIndex index) {
+    public Result apply (KrillIndex index) {
         return this.setIndex(index).apply();
     };
 
@@ -248,12 +248,12 @@
     /**
      * Apply the KoralQuery to an index.
      *
-     * @return The result as a {@link KorapResult} object.
+     * @return The result as a {@link Result} object.
      */
-    public KorapResult apply () {
+    public Result apply () {
 
-        // Create new KorapResult object to return
-        KorapResult kr = new KorapResult();
+        // Create new Result object to return
+        Result kr = new Result();
 
         // There were errors
         if (this.hasErrors()) {
diff --git a/src/main/java/de/ids_mannheim/korap/KrillCollection.java b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
index d44693e..2b7e771 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
@@ -10,6 +10,7 @@
 import de.ids_mannheim.korap.collection.FilterOperation;
 import de.ids_mannheim.korap.collection.CollectionBuilder;
 import de.ids_mannheim.korap.response.Notifications;
+import de.ids_mannheim.korap.response.Result;
 
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.*;
@@ -596,10 +597,10 @@
      *
      * @param query a {@link SpanQuery} to apply on the
      *        virtual collection.
-     * @return A {@link KorapResult} object representing the search's
+     * @return A {@link Result} object representing the search's
      *         result.
      */
-    public KorapResult search (SpanQuery query) {
+    public Result search (SpanQuery query) {
         return this.index.search(
             this,
             query,
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index 124e560..a7327e2 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -30,8 +30,7 @@
 import de.ids_mannheim.korap.*;
 import de.ids_mannheim.korap.index.*;
 import de.ids_mannheim.korap.meta.*;
-import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.response.MatchCollector;
+import de.ids_mannheim.korap.response.*;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -1076,12 +1075,12 @@
     /**
      * Search in the index.
      */
-    public KorapResult search (SpanQuery query) {
+    public Result search (SpanQuery query) {
         return this.search(new Krill(query));
     };
 
 
-    public KorapResult search (SpanQuery query, short count) {
+    public Result search (SpanQuery query, short count) {
         Krill krill = new Krill(query);
         krill.getMeta().setCount(count);
         return this.search(krill);
@@ -1089,7 +1088,7 @@
 
 
     @Deprecated
-    public KorapResult search (SpanQuery query,
+    public Result search (SpanQuery query,
                                int startIndex,
                                short count,
                                boolean leftTokenContext,
@@ -1113,7 +1112,7 @@
 
 
     @Deprecated
-    public KorapResult search (KrillCollection collection,
+    public Result search (KrillCollection collection,
                                SpanQuery query,
                                int startIndex,
                                short count,
@@ -1138,7 +1137,7 @@
     /**
      * Search the endpoint.
      */
-    public KorapResult search (Krill ks) {
+    public Result search (Krill ks) {
         if (DEBUG)
             log.trace("Start search");
 
@@ -1155,8 +1154,8 @@
 
         KrillMeta meta = ks.getMeta();
 
-        // Todo: Make kr subclassing ks - so ks has a method for a new KorapResult!
-        KorapResult kr = new KorapResult(
+        // Todo: Make kr subclassing ks - so ks has a method for a new Result!
+        Result kr = new Result(
             query.toString(),
             meta.getStartIndex(),
             meta.getCount(),
@@ -1293,7 +1292,7 @@
                     );
                     match.setContext(kr.getContext());
 
-                    // Add match to KorapResult
+                    // Add match to Result
                     kr.add(match);
 
                     if (spans.isPayloadAvailable())
diff --git a/src/main/java/de/ids_mannheim/korap/response/Match.java b/src/main/java/de/ids_mannheim/korap/response/Match.java
index 9bcbc06..941dd8e 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -42,10 +42,10 @@
 */
 
 /**
- * Representation of Matches in a KorapResult.
+ * Representation of Matches in a Result.
  *
  * @author Nils Diewald
- * @see KorapResult
+ * @see Result
  */
 @JsonInclude(Include.NON_NULL)
 public class Match extends AbstractDocument {
@@ -138,7 +138,7 @@
     /**
      * Constructs a new Match object.
      *
-     * @param idString Match identifier string as provided by KorapResult.
+     * @param idString Match identifier string as provided by Result.
      * @param includeHighlights Boolean value indicating if possible provided
      *        highlight information should be ignored or not.
      */
@@ -620,7 +620,7 @@
     /**
      * Get possible error message.
      */
-    // Identical to KorapResult
+    // Identical to Result
     public String getError () {
 	return this.error;
     };
@@ -1332,7 +1332,7 @@
     };
     
 
-    // Identical to KorapResult!
+    // Identical to Result!
     public String toJsonString () {
 	ObjectNode json = (ObjectNode) mapper.valueToTree(this);
 
diff --git a/src/main/java/de/ids_mannheim/korap/response/MatchCollector.java b/src/main/java/de/ids_mannheim/korap/response/MatchCollector.java
index a7870bb..2b24c8a 100644
--- a/src/main/java/de/ids_mannheim/korap/response/MatchCollector.java
+++ b/src/main/java/de/ids_mannheim/korap/response/MatchCollector.java
@@ -34,7 +34,7 @@
     public void close () {};
 
     /*
-     * The following methods are shared and should be used from KorapResult
+     * The following methods are shared and should be used from Result
      * And:
      * getQueryHash
      * getNode
diff --git a/src/main/java/de/ids_mannheim/korap/KorapResult.java b/src/main/java/de/ids_mannheim/korap/response/Result.java
similarity index 90%
rename from src/main/java/de/ids_mannheim/korap/KorapResult.java
rename to src/main/java/de/ids_mannheim/korap/response/Result.java
index 20d2149..cb35b08 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapResult.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Result.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap;
+package de.ids_mannheim.korap.response;
 
 import com.fasterxml.jackson.annotation.*;
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -15,6 +15,7 @@
 
 import de.ids_mannheim.korap.response.KorapResponse;
 import de.ids_mannheim.korap.response.Match;
+import de.ids_mannheim.korap.Krill;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,7 +36,7 @@
  */
 @JsonInclude(Include.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class KorapResult extends Krill {
+public class Result extends Krill {
     ObjectMapper mapper = new ObjectMapper();
 
     @JsonIgnore
@@ -56,27 +57,27 @@
     private JsonNode request;
 
     // Logger
-    // This is Match instead of KorapResult!
+    // This is Match instead of Result!
     private final static Logger log = LoggerFactory.getLogger(Match.class);
 
 
     /**
-     * Construct a new KorapResult object.
+     * Construct a new Result object.
      */
-    public KorapResult() {
+    public Result() {
         mapper.enable(SerializationFeature.INDENT_OUTPUT);
     };
 
 
     /**
-     * Construct a new KorapResult object.
+     * Construct a new Result object.
      *
      * @param serialQuery Query representation as a string.
      * @param startIndex Offset position in match array.
      * @param itemsPerPage Number of matches per page.
      * @param context Requested {@link SearchContext}
      */
-    public KorapResult(String query,
+    public Result(String query,
                        int startIndex,
                        short itemsPerPage,
                        SearchContext context) {
@@ -119,9 +120,9 @@
      * Set the number of items (documents) shown per page.
      *
      * @param count Number of items shown per page.
-     * @return {@link KorapResult} object for chaining.
+     * @return {@link Result} object for chaining.
      */
-    public KorapResult setItemsPerPage (short count) {
+    public Result setItemsPerPage (short count) {
         this.itemsPerPage = count;
         return this;
     };
@@ -141,9 +142,9 @@
      * Set serialized query as a {@link JsonNode}.
      *
      * @param request {@link JsonNode} representation of the query object.
-     * @return {@link KorapResult} object for chaining.
+     * @return {@link Result} object for chaining.
      */    
-    public KorapResult setRequest (JsonNode request) {
+    public Result setRequest (JsonNode request) {
         this.request = request;
         return this;
     };
@@ -165,9 +166,9 @@
      * Defaults to <tt>0</tt>, which is infinite.
      *
      * @param value The number of items shown per resource.
-     * @return {@link KorapResult} object for chaining.
+     * @return {@link Result} object for chaining.
      */
-    public KorapResult setItemsPerResource (short value) {
+    public Result setItemsPerResource (short value) {
         this.itemsPerResource = value;
         return this;
     };
@@ -178,9 +179,9 @@
      * Defaults to <tt>0</tt>, which is infinite.
      *
      * @param value The number of items shown per resource.
-     * @return {@link KorapResult} object for chaining.
+     * @return {@link Result} object for chaining.
      */
-    public KorapResult setItemsPerResource (int value) {
+    public Result setItemsPerResource (int value) {
         this.itemsPerResource = (short) value;
         return this;
     };
@@ -247,9 +248,9 @@
      *
      * @param context The {@link SearchContext} object providing
      *        search context parameters.
-     * @return {@link KorapResult} object for chaining.
+     * @return {@link Result} object for chaining.
      */
-    public KorapResult setContext (SearchContext context) {
+    public Result setContext (SearchContext context) {
         this.context = context;
         return this;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/server/Resource.java b/src/main/java/de/ids_mannheim/korap/server/Resource.java
index 4af504e..ed47ff7 100644
--- a/src/main/java/de/ids_mannheim/korap/server/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Resource.java
@@ -24,7 +24,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillCollection;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.response.KorapResponse;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -245,7 +245,7 @@
 
                 return ks.apply(index).toJsonString();
             };
-            KorapResult kr = new KorapResult();
+            Result kr = new Result();
             kr.setNode(Node.getName());
             kr.addError(610, "Missing request parameters", "No unique IDs were given");
             return kr.toJsonString();
@@ -338,7 +338,7 @@
 
 	// Search index
         if (index != null) {
-            KorapResult kr = new Krill(json).apply(index);
+            Result kr = new Krill(json).apply(index);
 	    kr.setNode(Node.getName());
 	    return kr.toJsonString();
 	};
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 0b9730e..e80be5f 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -7,7 +7,7 @@
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.Krill;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.query.QueryBuilder;
 import org.apache.lucene.store.MMapDirectory;
@@ -43,7 +43,7 @@
 
         int rounds = 100;
 
-        KorapResult kr = new KorapResult();
+        Result kr = new Result();
 
         t1 = System.nanoTime();
         for (int i = 1; i <= rounds; i++) {
@@ -94,7 +94,7 @@
         
         int rounds = 10000;
         
-        KorapResult kr = new KorapResult();
+        Result kr = new Result();
         String result = new String("");
         
         t1 = System.nanoTime();
@@ -137,7 +137,7 @@
 
         int rounds = 10;
 
-        KorapResult kr = new KorapResult();
+        Result kr = new Result();
 
         t1 = System.nanoTime();
         double length = 0;
@@ -179,7 +179,7 @@
 
         int rounds = 2000;
         
-        KorapResult kr = new KorapResult();
+        Result kr = new Result();
 
         t1 = System.nanoTime();
         for (int i = 1; i <= rounds; i++) {
@@ -326,7 +326,7 @@
 
         int rounds = 500;
     
-        KorapResult kr = new KorapResult();
+        Result kr = new Result();
 
         t1 = System.nanoTime();
         for (int i = 1; i <= rounds; i++) {
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
index d6b673c..5ff9891 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
@@ -5,7 +5,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.KrillCollection;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.query.QueryBuilder;
 import de.ids_mannheim.korap.collection.BooleanFilter;
@@ -82,7 +82,7 @@
 	QueryBuilder kq = new QueryBuilder("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
-	KorapResult kr = kc.search(query);
+	Result kr = kc.search(query);
 	assertEquals(kr.getTotalResults(), 70);
 
 	kc.extend( kf.and("textClass", "uninteresting") );
@@ -159,7 +159,7 @@
 	QueryBuilder kq = new QueryBuilder("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
-	KorapResult kr = kc.search(query);
+	Result kr = kc.search(query);
 	assertEquals(kr.getTotalResults(), 70);
 
 	kc.extend( kf.and("textClass", "uninteresting") );
@@ -212,7 +212,7 @@
 	QueryBuilder kq = new QueryBuilder("tokens");
 	SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
 
-	KorapResult kr = kc.search(query);
+	Result kr = kc.search(query);
 
 	assertEquals(kr.getTotalResults(), 369);
 
@@ -253,7 +253,7 @@
 	assertEquals("Tokens",    2661, ki.numberOf("tokens"));
 
 	SpanQuery sq = new SpanTermQuery(new Term("tokens", "s:der"));
-	KorapResult kr = ki.search(sq, (short) 10);
+	Result kr = ki.search(sq, (short) 10);
         assertEquals(86,kr.getTotalResults());
 
 	// Create Virtual collections:
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 a805ea6..34481c4 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestClass.java
@@ -13,7 +13,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
@@ -22,7 +22,7 @@
 
 public class TestClass {
 	KrillIndex ki;
-	KorapResult kr;
+	Result kr;
 	Krill ks;
 	
 	@Test
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 b3ecb72..6c4b633 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
@@ -8,7 +8,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.query.QueryBuilder;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -52,7 +52,7 @@
 
 
         QueryBuilder kq = new QueryBuilder("tokens");
-        KorapResult kr = ki.search(
+        Result kr = ki.search(
             (SpanQuery) kq.seq(kq._(1, kq.seg("s:b"))).toQuery()
         );
         Match km = kr.getMatch(0);
@@ -123,7 +123,7 @@
 
         QueryBuilder kq = new QueryBuilder("tokens");
 
-        KorapResult kr = ki.search((SpanQuery) kq.seq(kq.seg("s:a")).append(kq.seg("s:b")).append(kq.seg("s:c")).toQuery());
+        Result kr = ki.search((SpanQuery) kq.seq(kq.seg("s:a")).append(kq.seg("s:b")).append(kq.seg("s:c")).toQuery());
         Match km = kr.getMatch(0);
         km.addHighlight(0, 1, (short) 7);
         assertEquals("<span class=\"context-left\"></span><mark><mark class=\"class-7 level-0\">ab</mark>c</mark><span class=\"context-right\"></span>", km.getSnippetHTML());
@@ -190,7 +190,7 @@
 
         QueryBuilder kq = new QueryBuilder("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);
+        Result kr = ki.search(q);
         assertEquals((long) 14, kr.getTotalResults());
         assertEquals("[{1:a}]bab", kr.getMatch(0).getSnippetBrackets());
         assertEquals("a[{2:b}]ab", kr.getMatch(1).getSnippetBrackets());
@@ -283,7 +283,7 @@
         String json = getString(getClass().getResource("/queries/bugs/greater_highlights_15.jsonld").getFile());
 	
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getSerialQuery(),"{15: tokens:s:Alphabet}");
         assertEquals(kr.getTotalResults(),7);
         assertEquals(kr.getStartIndex(),0);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
index 2ba205d..a971a4d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
@@ -12,7 +12,7 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanAttributeQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -21,7 +21,7 @@
 public class TestAttributeIndex {
 
     private KrillIndex ki = new KrillIndex();
-    private KorapResult kr;
+    private Result kr;
     private FieldDocument fd;
 
     public TestAttributeIndex() throws IOException {
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 2bb6175..f1899c4 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
@@ -15,7 +15,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanClassQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -55,7 +55,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	sq = new SpanNextQuery(
             new SpanTermQuery(new Term("base", "s:b")),
@@ -246,7 +246,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	/*
 	sq = new SpanNextQuery(
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
index e5c4e82..d97e44a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestDistanceExclusionIndex.java
@@ -10,7 +10,7 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -19,7 +19,7 @@
 public class TestDistanceExclusionIndex {
 
     private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 
 	/** Ordered, unordered
 	 * */
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
index 69f24fc..df9b00e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestDistanceIndex.java
@@ -12,7 +12,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -20,7 +20,7 @@
 
 @RunWith(JUnit4.class)
 public class TestDistanceIndex {
-    KorapResult kr;
+    Result kr;
     KrillIndex ki;   
  
     private FieldDocument createFieldDoc0() {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
index 616bbf4..0ac7bad 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceExclusionIndex.java
@@ -10,7 +10,7 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -18,7 +18,7 @@
 
 public class TestElementDistanceExclusionIndex {
 	
-    KorapResult kr;
+    Result kr;
     KrillIndex ki; 
     
     private SpanQuery createQuery(String e, String x, String y, int min, int max, boolean isOrdered,
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 b5eed89..4c31b16 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -18,7 +18,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.QueryBuilder;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
@@ -30,7 +30,7 @@
 @RunWith(JUnit4.class)
 public class TestElementDistanceIndex {
 	
-	KorapResult kr;
+	Result kr;
     KrillIndex ki;   
     
 	private FieldDocument createFieldDoc0() {
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 00179be..3999807 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementIndex.java
@@ -15,7 +15,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.model.MultiTermTokenStream;
@@ -76,7 +76,7 @@
 
 	SpanQuery sq = new SpanElementQuery("base", "a");
 
-	KorapResult kr = ki.search(sq, (short) 10);
+	Result kr = ki.search(sq, (short) 10);
 
 	assertEquals("totalResults", kr.getTotalResults(), 6);
 
@@ -124,7 +124,7 @@
 
 	SpanQuery sq = new SpanElementQuery("base", "a");
 
-	KorapResult kr = ki.search(sq, (short) 10);
+	Result kr = ki.search(sq, (short) 10);
 
 	assertEquals("totalResults", kr.getTotalResults(), 3);
 	assertEquals("StartPos (0)", 0, kr.getMatch(0).startPos);
@@ -224,7 +224,7 @@
 
 	SpanQuery sq = new SpanElementQuery("base", "a");
 
-	KorapResult kr = ki.search(sq, (short) 15);
+	Result kr = ki.search(sq, (short) 15);
 
 	// System.err.println(kr.toJSON());
 
@@ -286,7 +286,7 @@
 
 	SpanQuery sq = new SpanElementQuery("base", "a");
 
-	KorapResult kr = ki.search(sq, 0, (short) 15, false, (short) 3, false, (short) 3);
+	Result kr = ki.search(sq, 0, (short) 15, false, (short) 3, false, (short) 3);
 	
 	assertEquals("... ccc[222222]fff ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... fff[333333]iii ...", kr.getMatch(1).getSnippetBrackets());
@@ -319,7 +319,7 @@
 
 	SpanQuery sq = new SpanElementQuery("base", "a");
 
-	KorapResult kr = ki.search(sq, 0, (short) 15, false, (short) 3, false, (short) 3);
+	Result kr = ki.search(sq, 0, (short) 15, false, (short) 3, false, (short) 3);
 
 	assertEquals("[111111]ccc ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("... ccc[222222]fff ...", kr.getMatch(1).getSnippetBrackets());
@@ -400,7 +400,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	sq = new SpanElementQuery("base", "a");
 	kr = ki.search(sq, (short) 15);
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 161c0a1..03aff09 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -18,7 +18,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillMeta;
 import de.ids_mannheim.korap.response.Match;
@@ -136,7 +136,7 @@
 	assertEquals(fd.getPubDate().toDisplay(),"2013-06-17");
 
 	QueryBuilder kq = new QueryBuilder("tokens");
-	KorapResult kr = ki.search((SpanQuery) kq.seq(kq._(3, kq.seg("s:b"))).toQuery());
+	Result kr = ki.search((SpanQuery) kq.seq(kq._(3, kq.seg("s:b"))).toQuery());
 
 	Match km = kr.getMatch(0);
 
@@ -177,7 +177,7 @@
 	QueryBuilder kq = new QueryBuilder("tokens");
 
 	Krill ks;
-	KorapResult kr;
+	Result kr;
 
 	// Start creating query
 	// within(<s>, {1: {2: [mate/p=ADJA & mate/m=number:sg]}[opennlp/p=NN & tt/p=NN]})
@@ -225,7 +225,7 @@
 
 	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp18.jsonld").getFile());
 
-	KorapResult kr = ki.search(sqwi.toQuery(), 0, (short) 5, true, (short) 2, false, (short) 5);
+	Result kr = ki.search(sqwi.toQuery(), 0, (short) 5, true, (short) 2, false, (short) 5);
 
 	// Bug:
 	// System.err.println(kr.toJSON());
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 589e964..d3184ae 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
@@ -16,7 +16,7 @@
 import de.ids_mannheim.korap.KrillQuery;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.query.QueryBuilder;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -96,7 +96,7 @@
 	Krill ks = new Krill(
 	    kq._(2,kq.seq(kq.seg("s:b")).append(kq._(kq.seg("s:a"))))
         );
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 
 	assertEquals("totalResults", kr.getTotalResults(),    1);
 	assertEquals("StartPos (0)", kr.getMatch(0).startPos, 7);
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 a44a493..9ee4111 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -15,7 +15,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.query.*;
@@ -57,7 +57,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	sq = new SpanNextQuery(
             new SpanTermQuery(new Term("base", "s:b")),
@@ -231,7 +231,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         // No contexts:
         sq = new SpanOrQuery(
@@ -285,7 +285,7 @@
         ki.addDoc(fd);
         ki.commit();
 
-        KorapResult kr;
+        Result kr;
 
         QueryBuilder kq = new QueryBuilder("base");
 
@@ -320,7 +320,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanFocusQuery(
             new SpanNextQuery(
@@ -380,7 +380,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
         
         sq = new SpanWithinQuery(
             new SpanClassQuery(new SpanElementQuery("base", "s"), (byte) 2),
@@ -469,7 +469,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
         KrillCollection kc = new KrillCollection(ki);
 
         assertEquals("Documents", 4, kc.numberOf("documents"));
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
index ada1e21..666216b 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -14,7 +14,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -25,7 +25,7 @@
 public class TestMultipleDistanceIndex {
 	
 	private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 
 	public SpanQuery createQuery(String x, String y, List<DistanceConstraint> 
 			constraints, boolean isOrdered){
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 e254f3a..19f83df 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestNextIndex.java
@@ -17,7 +17,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.model.MultiTermTokenStream;
@@ -61,7 +61,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanNextQuery(
             new SpanTermQuery(new Term("base", "s:a")),
@@ -139,7 +139,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	sq = new SpanNextQuery(
 	       new SpanTermQuery(new Term("base", "s:c")),
@@ -174,7 +174,7 @@
 	ki.commit();
 
 	SpanQuery sq;
-	KorapResult kr;
+	Result kr;
 
 	sq = new SpanNextQuery(
 	       new SpanElementQuery("base", "x"),
@@ -226,7 +226,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanNextQuery(
             new SpanElementQuery("base", "x"),
@@ -274,7 +274,7 @@
 					new SpanTermQuery(new Term("base","s:d")),
 					new SpanTermQuery(new Term("base","s:b"))
 				);
-		KorapResult kr = ki.search(sq, (short) 10);			
+		Result kr = ki.search(sq, (short) 10);			
 				
 		assertEquals("totalResults", kr.getTotalResults(), 2);
 		// Match #0
@@ -315,7 +315,7 @@
 				)
 			);
 		
-		KorapResult kr = ki.search(sq, (short) 10);			
+		Result kr = ki.search(sq, (short) 10);			
 		assertEquals("totalResults", kr.getTotalResults(), 1);
 		assertEquals("doc-number", 2, kr.getMatch(0).getLocalDocID());
 		assertEquals("StartPos", 0, kr.getMatch(0).startPos);
@@ -335,7 +335,7 @@
 		SpanSequenceQueryWrapper sq = new SpanSequenceQueryWrapper("base");
 		sq.append("i:b").append("i:d").withConstraint(1,3);
 		
-		KorapResult kr = ki.search(sq.toQuery(), (short) 10);			
+		Result kr = ki.search(sq.toQuery(), (short) 10);			
 
 		assertEquals("totalResults", kr.getTotalResults(), 3);
 		assertEquals("doc-number", "match-doc-0-p2-5", kr.getMatch(0).getID());
@@ -355,7 +355,7 @@
 		SpanSequenceQueryWrapper sq = new SpanSequenceQueryWrapper("base");
 		sq.append("i:a").append("i:b").withConstraint(0, 3, "e");
 		
-		KorapResult kr = ki.search(sq.toQuery(), (short) 10);			
+		Result kr = ki.search(sq.toQuery(), (short) 10);			
 
 		assertEquals("totalResults", kr.getTotalResults(), 3);
 		assertEquals("doc-number", "match-doc-0-p3-6", kr.getMatch(0).getID());
@@ -376,7 +376,7 @@
 				new SpanTermQuery(new Term("base","s:c"))
 			);
 		
-		KorapResult kr = ki.search(sq, (short) 10);
+		Result kr = ki.search(sq, (short) 10);
 		
 		assertEquals(0, kr.getMatch(0).getStartPos());
 		assertEquals(2, kr.getMatch(0).getEndPos());
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 d87d5b6..3d381ae 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestPosToOffset.java
@@ -11,7 +11,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
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 0c022bf..aa1478e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRealIndex.java
@@ -14,12 +14,13 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.*;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.QueryBuilder;
 import de.ids_mannheim.korap.util.QueryException;
 
 public class TestRealIndex {
     KrillIndex ki;
-    KorapResult kr;
+    Result kr;
     Krill ks;
 	
     public TestRealIndex() throws IOException {
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 9b9370a..648ed63 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRegexWildcardIndex.java
@@ -15,7 +15,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.query.QueryBuilder;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -57,7 +57,7 @@
 	ks.getMeta().getContext().left.setToken(true).setLength(1);
 	ks.getMeta().getContext().right.setToken(true).setLength(1);
 
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("affe [afffe] baum ...", kr.getMatch(1).getSnippetBrackets());
@@ -114,7 +114,7 @@
 	ks.getMeta().getContext().left.setToken(true).setLength(1);
 	ks.getMeta().getContext().right.setToken(true).setLength(1);
 
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("[affe] afffe ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("affe [afffe] baum ...", kr.getMatch(1).getSnippetBrackets());
@@ -173,7 +173,7 @@
 	ks.getMeta().getContext().left.setToken(true).setLength(1);
 	ks.getMeta().getContext().right.setToken(true).setLength(1);
 
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 	assertEquals((long) 2, kr.getTotalResults());
 	assertEquals("[AfFe] aFfFE ...", kr.getMatch(0).getSnippetBrackets());
 	assertEquals("AfFe [aFfFE] Baum ...", kr.getMatch(1).getSnippetBrackets());
@@ -238,7 +238,7 @@
 	ks.getMeta().getContext().left.setToken(true).setLength(1);
 	ks.getMeta().getContext().right.setToken(true).setLength(1);
 
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 	assertEquals((long) 1, kr.getTotalResults());
 	assertEquals("[affe afffe] baum ...", kr.getMatch(0).getSnippetBrackets());
     };
@@ -279,7 +279,7 @@
 	ks.getMeta().getContext().left.setToken(true).setLength(1);
 	ks.getMeta().getContext().right.setToken(true).setLength(1);
 
-	KorapResult kr = ki.search(ks);
+	Result kr = ki.search(ks);
 	assertEquals((long) 1, kr.getTotalResults());
 	assertEquals("[affe afffe] baum ...", kr.getMatch(0).getSnippetBrackets());
     };
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 38a1495..17db8e4 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -10,7 +10,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanAttributeQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanRelationQuery;
@@ -60,7 +60,7 @@
 
 public class TestRelationIndex {
 	private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 
 	public TestRelationIndex() throws IOException {
 		ki = new KrillIndex();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
index 220ca59..fe0621d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
@@ -12,14 +12,14 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanRepetitionQuery;
 
 public class TestRepetitionIndex {
 	
     private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 
 	private FieldDocument createFieldDoc0(){
     	FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
index d70f8b9..01e9aa3 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSegmentIndex.java
@@ -14,7 +14,7 @@
 import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanSegmentQuery;
@@ -26,7 +26,7 @@
 public class TestSegmentIndex {
 	private SpanQuery sq;
 	private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 	private FieldDocument fd;
 	private Logger log;	
 	
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
index 70308a8..9f1571a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSegmentNegationIndex.java
@@ -14,7 +14,7 @@
 import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanSegmentQuery;
@@ -25,7 +25,7 @@
 public class TestSegmentNegationIndex {
     private SpanQuery sq;
     private KrillIndex ki;
-    private KorapResult kr;
+    private Result kr;
     private FieldDocument fd;
     private Logger log;	
 	
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 123d8e3..f612409 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -17,7 +17,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanExpansionQuery;
 import de.ids_mannheim.korap.query.SpanRepetitionQuery;
@@ -26,7 +26,7 @@
 
 public class TestSpanExpansionIndex {
 
-    KorapResult kr;
+    Result kr;
     KrillIndex ki;
 
     public TestSpanExpansionIndex() throws IOException {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
index 22541d0..41607cd 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
@@ -9,14 +9,14 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanSubspanQuery;
 
 public class TestSubSpanIndex {
 
-    KorapResult kr;
+    Result kr;
     KrillIndex ki;
 
     public TestSubSpanIndex () throws IOException {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
index c32a7aa..e19b719 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
@@ -12,7 +12,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -22,7 +22,7 @@
 public class TestUnorderedDistanceIndex{
 	
     private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 
 	private FieldDocument createFieldDoc0(){
     	FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
index a9ad58e..305e574 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedElementDistanceIndex.java
@@ -12,7 +12,7 @@
 import org.junit.runners.JUnit4;
 
 import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
@@ -22,7 +22,7 @@
 public class TestUnorderedElementDistanceIndex {
 	
 	private KrillIndex ki;
-	private KorapResult kr;
+	private Result kr;
 	
 	private FieldDocument createFieldDoc0() {
     	FieldDocument fd = new FieldDocument();
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
index cf7dda2..dc3b4da 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
@@ -16,7 +16,7 @@
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.collection.BooleanFilter;
 import de.ids_mannheim.korap.query.DistanceConstraint;
@@ -28,7 +28,7 @@
 public class TestWPDIndex {
 	long start, end;
 	KrillIndex ki;
-	KorapResult kr;
+	Result kr;
 	Krill ks;
 	
 	private SpanDistanceQuery createElementDistanceQuery(String e, String x, String y, 
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 df59a05..ecfda73 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -17,7 +17,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanWithinQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
@@ -69,7 +69,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanWithinQuery(
             new SpanElementQuery("base", "a"),
@@ -142,7 +142,7 @@
         ki.commit();
         
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanWithinQuery(
             new SpanElementQuery("base", "a"),
@@ -247,7 +247,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanWithinQuery(
             new SpanElementQuery("base", "a"),
@@ -335,7 +335,7 @@
         ki.commit();
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanElementQuery("base", "a");
         kr = ki.search(sq, (short) 15);
@@ -398,7 +398,7 @@
         assertEquals(1, ki.numberOf("documents"));
 
         SpanQuery sq;
-        KorapResult kr;
+        Result kr;
 
         sq = new SpanElementQuery("base", "a");
         kr = ki.search(sq, (short) 10);
@@ -472,7 +472,7 @@
         assertEquals(1, ki.numberOf("documents"));
 
         SpanQuery sq = new SpanElementQuery("base", "a");
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
 
         assertEquals("totalResults", kr.getTotalResults(), 3);
         assertEquals("StartPos (0)", 0, kr.getMatch(0).startPos);
@@ -541,7 +541,7 @@
 
         SpanQuery sq = new SpanElementQuery("base", "a");
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
     
         assertEquals("totalResults", kr.getTotalResults(), 4);
         assertEquals("StartPos (0)", 0, kr.getMatch(0).startPos);
@@ -616,7 +616,7 @@
 
         SpanQuery sq = new SpanElementQuery("base", "a");
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
     
         assertEquals("totalResults", kr.getTotalResults(), 5);
 
@@ -760,7 +760,7 @@
 
         SpanQuery sq = new SpanElementQuery("base", "a");
 
-        KorapResult kr = ki.search(sq, (short) 15);
+        Result kr = ki.search(sq, (short) 15);
 
         assertEquals("totalResults", kr.getTotalResults(), 12);
         assertEquals("StartPos (0)", 0, kr.getMatch(0).startPos);
@@ -813,7 +813,7 @@
         ki.commit();
         
         SpanQuery sq = new SpanClassQuery(new SpanElementQuery("base", "sentence"), (byte)3);
-        KorapResult kr;
+        Result kr;
         kr = ki.search(sq, 0, (short) 15, true, (short) 1, true, (short) 1);
         assertEquals("totalResults", kr.getTotalResults(), 1);
         
@@ -928,7 +928,7 @@
             new SpanTermQuery(new Term("base", "s:x"))
         );
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
 
         assertEquals("totalResults", kr.getTotalResults(), 2);
         assertEquals("StartPos (0)", 2, kr.getMatch(0).startPos);
@@ -971,7 +971,7 @@
             )
         );
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
 
         assertEquals("totalResults", kr.getTotalResults(), 4);
 
@@ -1020,7 +1020,7 @@
             )
         );
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
         assertEquals("totalResults", kr.getTotalResults(), 0);
     };
 
@@ -1059,7 +1059,7 @@
             )
         );
 
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
         
         assertEquals("totalResults", kr.getTotalResults(), 0);
     };
@@ -1106,7 +1106,7 @@
         );
 
         ki.commit();
-        KorapResult kr = ki.search(sq, (short) 10);
+        Result kr = ki.search(sq, (short) 10);
         assertEquals(2, kr.getTotalResults());
         assertEquals(0, kr.getMatch(0).getLocalDocID());
         assertEquals(76, kr.getMatch(0).getStartPos());
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 df6533f..153ff5f 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestTemporaryQueryLimitations.java
@@ -7,7 +7,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.index.FieldDocument;
@@ -53,7 +53,7 @@
 	json = getString(getClass().getResource("/queries/bugs/cosmas_classrefcheck.jsonld").getFile());
 	
 	Krill ks = new Krill(json);
-	KorapResult kr = ks.apply(ki);
+	Result kr = ks.apply(ki);
 	assertEquals(kr.getSerialQuery(),"focus(130: {131: spanContain({129: <tokens:s />}, {130: tokens:s:wegen})})");
 	assertEquals(kr.getTotalResults(),0);
 	assertEquals(kr.getStartIndex(),0);
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 7707ebf..822b3bf 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestKrill.java
@@ -14,7 +14,7 @@
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.meta.SearchContext;
 import de.ids_mannheim.korap.collection.CollectionBuilder;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import java.nio.file.Files;
 import java.nio.file.FileSystem;
 import java.nio.file.Path;
@@ -116,7 +116,7 @@
         meta.getContext().left.setLength(1);
         meta.getContext().right.setLength(1);
         
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 6);
         assertEquals(
             kr.getMatch(0).getSnippetBrackets(),
@@ -157,7 +157,7 @@
         );
 
         Krill ks = new Krill(json);
-		KorapResult kr = ks.apply(ki);
+		Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 66);
         assertEquals(5, kr.getItemsPerPage());
         assertEquals(5, kr.getStartIndex());
@@ -199,7 +199,7 @@
         );
 
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
 
         assertEquals(kr.getTotalResults(), 1);
 
@@ -246,7 +246,7 @@
             );
         };
         ki.commit();
-        KorapResult kr = new Krill("{ query").apply(ki);
+        Result kr = new Krill("{ query").apply(ki);
         assertEquals(kr.getTotalResults(), 0);
         assertEquals(kr.getError(0).getMessage(), "Unable to parse JSON");
     };
@@ -275,7 +275,7 @@
             getClass().getResource("/queries/bsp-fail1.jsonld").getFile()
         );
 
-        KorapResult kr = new Krill(json).apply(ki);
+        Result kr = new Krill(json).apply(ki);
         assertEquals(0, kr.getStartIndex());
         assertEquals(kr.getTotalResults(), 0);
         assertEquals(25, kr.getItemsPerPage());
@@ -305,7 +305,7 @@
             getClass().getResource("/queries/bsp-fail2.jsonld").getFile()
         );
 
-        KorapResult kr = new Krill(json).apply(ki);
+        Result kr = new Krill(json).apply(ki);
         assertEquals(50, kr.getItemsPerPage());
         assertEquals(49950, kr.getStartIndex());
         assertEquals(kr.getTotalResults(), 0);
@@ -336,7 +336,7 @@
         );
 
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 10);
         assertEquals("A bzw. a ist der erste Buchstabe des" +
                      " lateinischen [Alphabets] und ein Vokal." +
@@ -396,7 +396,7 @@
         );
 
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 10);
         assertEquals(5, kr.getStartIndex());
         assertEquals(5, kr.getItemsPerPage());
@@ -444,7 +444,7 @@
         );
 
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 10);
         assertEquals(0, kr.getStartIndex());
         assertEquals(20, kr.getItemsPerPage());
@@ -541,7 +541,7 @@
         kc.setIndex(ki);
         ks.setCollection(kc);
 
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
 
         assertEquals(kr.getTotalResults(), 2);
         assertEquals(0, kr.getStartIndex());
@@ -628,7 +628,7 @@
             seg("mate/m:case:nom").
             with("mate/m:number:pl")
         );
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
 
         assertEquals(kr.getTotalResults(), 148);
         assertEquals(0, kr.getStartIndex());
@@ -719,7 +719,7 @@
             seg("mate/m:case:nom").
             with("mate/m:number:sg")
         );
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
 
         assertEquals(kr.getTotalResults(), 6);
         assertEquals(0, kr.getStartIndex());
@@ -755,7 +755,7 @@
             )
         );
 
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(
             kr.getSerialQuery(),
             "focus(1: spanContain(<tokens:base/s:s />, {1: tokens:s:Leben}))"
@@ -831,7 +831,7 @@
         );
 	
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(
             kr.getSerialQuery(),
             "{4: spanNext({1: spanNext({2: tokens:s:ins}, "+
@@ -876,7 +876,7 @@
         );
 	
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
 
         ObjectMapper mapper = new ObjectMapper();
         JsonNode res = mapper.readTree(kr.toTokenListJsonString());
@@ -942,7 +942,7 @@
         ks.setCollection(kc);
         assertEquals(1, kc.numberOf("documents"));
 
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         
         assertEquals(
             kr.getSerialQuery(),
@@ -1010,7 +1010,7 @@
         );
 	
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(kr.getTotalResults(), 276);
         assertEquals(0, kr.getStartIndex());
         assertEquals(10, kr.getItemsPerPage());
@@ -1109,7 +1109,7 @@
         sc.left.setLength((short) 10);
         sc.right.setLength((short) 10);
         
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals(
             kr.getMatch(1).getSnippetBrackets(),
             "... dezimalen [Wert] 65 sowohl ..."
@@ -1174,7 +1174,7 @@
             getFile()
         );
 
-        KorapResult kr = new Krill(json).apply(ki);
+        Result kr = new Krill(json).apply(ki);
 
         assertEquals(
             kr.getError(0).getMessage(),
@@ -1207,7 +1207,7 @@
             getFile()
         );
 	
-		KorapResult kr = new Krill(json).apply(ki);				
+		Result kr = new Krill(json).apply(ki);				
 		assertEquals("... Buchstabe des Alphabetes. In Dänemark ist " +
                      "[der alte Digraph Aa durch Å] ersetzt worden, " +
                      "in Eigennamen und Ortsnamen ...",
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 f1ec5c4..d79ce79 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestMetaFields.java
@@ -11,7 +11,7 @@
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.meta.SearchContext;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import java.nio.file.Files;
 import java.nio.file.FileSystem;
 import java.nio.file.Path;
@@ -50,7 +50,7 @@
 	
         Krill ks = new Krill(jsonString);
 
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals((long) 17, kr.getTotalResults());
         assertEquals(0, kr.getStartIndex());
         assertEquals(9, kr.getItemsPerPage());
diff --git a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java b/src/test/java/de/ids_mannheim/korap/search/TestResult.java
similarity index 97%
rename from src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
rename to src/test/java/de/ids_mannheim/korap/search/TestResult.java
index 141fd42..cce192d 100644
--- a/src/test/java/de/ids_mannheim/korap/search/TestKorapResult.java
+++ b/src/test/java/de/ids_mannheim/korap/search/TestResult.java
@@ -8,7 +8,7 @@
 
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.query.QueryBuilder;
@@ -28,7 +28,7 @@
 import org.junit.runners.JUnit4;
 
 @RunWith(JUnit4.class)
-public class TestKorapResult {
+public class TestResult {
 
     @Test
     public void checkJSONResult () throws Exception  {
@@ -60,7 +60,7 @@
         SpanQuery q = (SpanQuery) kq.or(
             kq._(1, kq.seg("s:a"))).or(kq._(2, kq.seg("s:b"))
         ).toQuery();
-        KorapResult kr = ki.search(q);
+        Result kr = ki.search(q);
         assertEquals((long) 7, kr.getTotalResults());
 
         ObjectMapper mapper = new ObjectMapper();
@@ -116,7 +116,7 @@
         String json = getString(getClass().getResource("/queries/bugs/optionality_warning.jsonld").getFile());
         Krill ks = new Krill(json);
 
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals((long) 2, kr.getTotalResults());
 
         ObjectMapper mapper = new ObjectMapper();
@@ -159,7 +159,7 @@
             getClass().getResource("/queries/bsp-result-check.jsonld").getFile()
         );
         Krill ks = new Krill(json);
-        KorapResult kr = ks.apply(ki);
+        Result kr = ks.apply(ki);
         assertEquals((long) 7, kr.getTotalResults());
 
         ObjectMapper mapper = new ObjectMapper();
@@ -225,7 +225,7 @@
 
         QueryBuilder kq = new QueryBuilder("base");
         SpanQuery q = (SpanQuery) kq.seq(kq.seg("s:a")).append(kq.seg("s:b")).toQuery();
-        KorapResult kr = ki.search(q);
+        Result kr = ki.search(q);
 
         assertEquals((long) 3, kr.getTotalResults());
         ObjectMapper mapper = new ObjectMapper();
diff --git a/src/test/java/de/ids_mannheim/korap/server/TestResource.java b/src/test/java/de/ids_mannheim/korap/server/TestResource.java
index a4aeaae..bbe0e8c 100644
--- a/src/test/java/de/ids_mannheim/korap/server/TestResource.java
+++ b/src/test/java/de/ids_mannheim/korap/server/TestResource.java
@@ -20,7 +20,7 @@
 import java.io.FileInputStream;
 
 import de.ids_mannheim.korap.server.Node;
-import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.response.Result;
 import de.ids_mannheim.korap.response.KorapResponse;
 import static de.ids_mannheim.korap.util.KrillString.*;