diff --git a/src/main/java/de/ids_mannheim/korap/match/DocIdentifier.java b/src/main/java/de/ids_mannheim/korap/match/DocIdentifier.java
deleted file mode 100644
index 1a7ec4f..0000000
--- a/src/main/java/de/ids_mannheim/korap/match/DocIdentifier.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package de.ids_mannheim.korap.match;
-import java.util.*;
-import java.util.regex.*;
-
-
-public class DocIdentifier {
-    protected String corpusID, docID;
-
-    public String getCorpusID () {
-	return this.corpusID;
-    };
-
-    public void setCorpusID (String id) {
-	if (id != null && !id.contains("!"))
-	    this.corpusID = id;
-    };
-
-    public String getDocID () {
-	return this.docID;
-    };
-
-    public void setDocID (String id) {
-	if (id != null && !id.contains("!"))
-	    this.docID = id;
-    };
-};
diff --git a/src/main/java/de/ids_mannheim/korap/match/MatchIdentifier.java b/src/main/java/de/ids_mannheim/korap/match/MatchIdentifier.java
deleted file mode 100644
index b8d3921..0000000
--- a/src/main/java/de/ids_mannheim/korap/match/MatchIdentifier.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package de.ids_mannheim.korap.match;
-import java.util.*;
-import java.util.regex.*;
-
-public class MatchIdentifier extends DocIdentifier {
-    private int startPos, endPos = -1;
-
-    private ArrayList<int[]> pos = new ArrayList<>(8);
-
-    Pattern idRegex = Pattern.compile(
-		        "^match-(?:([^!]+?)!)?" +
-			"([^!]+)-p([0-9]+)-([0-9]+)" +
-			"((?:\\(-?[0-9]+\\)-?[0-9]+--?[0-9]+)*)" +
-			"(?:c.+?)?$");
-    Pattern posRegex = Pattern.compile(
-		        "\\(([0-9]+)\\)([0-9]+)-([0-9]+)");
-
-    public MatchIdentifier () {};
-
-    public MatchIdentifier (String id) {
-	Matcher matcher = idRegex.matcher(id);
-	if (matcher.matches()) {
-	    this.setCorpusID(matcher.group(1));
-	    this.setDocID(matcher.group(2));
-	    this.setStartPos(Integer.parseInt(matcher.group(3)));
-	    this.setEndPos(Integer.parseInt(matcher.group(4)));
-
-	    if (matcher.group(5) != null) {
-		matcher = posRegex.matcher(matcher.group(5));
-		while (matcher.find()) {
-		    this.addPos(
-		        Integer.parseInt(matcher.group(2)),
-		        Integer.parseInt(matcher.group(3)),
-			Integer.parseInt(matcher.group(1))
-		    );
-		};
-	    };
-	};
-    };
-
-    public int getStartPos () {
-	return this.startPos;
-    };
-
-    public void setStartPos (int pos) {
-	if (pos >= 0)
-	    this.startPos = pos;
-    };
-
-    public int getEndPos () {
-	return this.endPos;
-    };
-
-    public void setEndPos (int pos) {
-	if (pos >= 0)
-	    this.endPos = pos;
-    };
-
-    public void addPos(int start, int end, int number) {
-	if (start >= 0 && end >= 0 && number >= 0)
-	    this.pos.add(new int[]{start, end, number});
-    };
-
-    public ArrayList<int[]> getPos () {
-	return this.pos;
-    };
-
-    public String toString () {
-
-	if (this.docID == null) return null;
-
-	StringBuilder sb = new StringBuilder("match-");
-
-	// Get prefix string corpus/doc
-	if (this.corpusID != null) {
-	    sb.append(this.corpusID).append('!');
-	};
-	sb.append(this.docID);
-
-	sb.append('-');
-	sb.append(this.getPositionString());	
-	return sb.toString();
-    };
-
-    /*
-    public String getPositionBytes () {
-	ByteBuffer b = new ByteBuffer(8);
-	b.putInt(this.startPos);
-	b.putInt(this.endPos);
-
-	// Get Position information
-	for (int[] i : this.pos) {
-	    b.putInt(i[2]).putInt(i[0]).putInt(i[1]);
-	};
-    };
-    */
-
-    public String getPositionString () {
-	StringBuilder sb = new StringBuilder();
-	sb.append('p').append(this.startPos).append('-').append(this.endPos);
-
-	// Get Position information
-	for (int[] i : this.pos) {
-	    sb.append('(').append(i[2]).append(')');
-	    sb.append(i[0]).append('-').append(i[1]);
-	};
-
-	return sb.toString();
-
-	/*
-	if (this.processed) {
-	    sb.append('c');
-	    for (int[] s : this.span) {
-		if (s[2] >= 256)
-		    continue;
-		
-		if (s[2] != -1)
-		    sb.append('(').append(s[2]).append(')');
-		sb.append(s[0] + this.startOffsetChar);
-		sb.append('-');
-		sb.append(s[1] + this.startOffsetChar);
-	    };
-	};
-	*/
-    };
-};
diff --git a/src/main/java/de/ids_mannheim/korap/match/PosIdentifier.java b/src/main/java/de/ids_mannheim/korap/match/PosIdentifier.java
deleted file mode 100644
index 1198fac..0000000
--- a/src/main/java/de/ids_mannheim/korap/match/PosIdentifier.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package de.ids_mannheim.korap.match;
-import java.util.*;
-
-public class PosIdentifier extends DocIdentifier {
-    private int pos;
-
-    public PosIdentifier () {};
-
-    public void setPos (int pos) {
-	if (pos >= 0)
-	    this.pos = pos;
-    };
-
-    public int getPos () {
-	return this.pos;
-    };
-
-    public String toString () {
-
-	if (this.docID == null) return null;
-
-	StringBuilder sb = new StringBuilder("word-");
-
-	// Get prefix string corpus/doc
-	if (this.corpusID != null) {
-	    sb.append(this.corpusID).append('!');
-	};
-	sb.append(this.docID);
-
-	sb.append("-p");
-	sb.append(this.pos);
-
-	return sb.toString();
-    };
-};
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 521be0b..9bcbc06 100644
--- a/src/main/java/de/ids_mannheim/korap/response/Match.java
+++ b/src/main/java/de/ids_mannheim/korap/response/Match.java
@@ -16,11 +16,11 @@
 import de.ids_mannheim.korap.meta.SearchContext;
 
 import de.ids_mannheim.korap.model.AbstractDocument;
-import de.ids_mannheim.korap.match.HighlightCombinator;
-import de.ids_mannheim.korap.match.HighlightCombinatorElement;
-import de.ids_mannheim.korap.match.Relation;
-import de.ids_mannheim.korap.match.MatchIdentifier;
-import de.ids_mannheim.korap.match.PosIdentifier;
+import de.ids_mannheim.korap.response.match.HighlightCombinator;
+import de.ids_mannheim.korap.response.match.HighlightCombinatorElement;
+import de.ids_mannheim.korap.response.match.Relation;
+import de.ids_mannheim.korap.response.match.MatchIdentifier;
+import de.ids_mannheim.korap.response.match.PosIdentifier;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 
 import org.slf4j.Logger;
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java b/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java
new file mode 100644
index 0000000..8680742
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/response/match/DocIdentifier.java
@@ -0,0 +1,26 @@
+package de.ids_mannheim.korap.response.match;
+import java.util.*;
+import java.util.regex.*;
+
+
+public class DocIdentifier {
+    protected String corpusID, docID;
+
+    public String getCorpusID () {
+        return this.corpusID;
+    };
+
+    public void setCorpusID (String id) {
+        if (id != null && !id.contains("!"))
+            this.corpusID = id;
+    };
+
+    public String getDocID () {
+        return this.docID;
+    };
+
+    public void setDocID (String id) {
+        if (id != null && !id.contains("!"))
+            this.docID = id;
+    };
+};
diff --git a/src/main/java/de/ids_mannheim/korap/match/HighlightCombinator.java b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinator.java
similarity index 97%
rename from src/main/java/de/ids_mannheim/korap/match/HighlightCombinator.java
rename to src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinator.java
index 43ba8cd..adce408 100644
--- a/src/main/java/de/ids_mannheim/korap/match/HighlightCombinator.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinator.java
@@ -1,7 +1,7 @@
-package de.ids_mannheim.korap.match;
+package de.ids_mannheim.korap.response.match;
 
 import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.match.HighlightCombinatorElement;
+import de.ids_mannheim.korap.response.match.HighlightCombinatorElement;
 import java.util.*;
 import java.io.*;
 
diff --git a/src/main/java/de/ids_mannheim/korap/match/HighlightCombinatorElement.java b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
similarity index 92%
rename from src/main/java/de/ids_mannheim/korap/match/HighlightCombinatorElement.java
rename to src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
index ec0b3b4..ab67ed5 100644
--- a/src/main/java/de/ids_mannheim/korap/match/HighlightCombinatorElement.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/HighlightCombinatorElement.java
@@ -1,8 +1,8 @@
-package de.ids_mannheim.korap.match;
+package de.ids_mannheim.korap.response.match;
 
 import org.apache.lucene.util.FixedBitSet;
 import de.ids_mannheim.korap.response.Match;
-import de.ids_mannheim.korap.match.Relation;
+import de.ids_mannheim.korap.response.match.Relation;
 import static de.ids_mannheim.korap.util.KorapString.*;
 import java.util.*;
 import java.io.*;
@@ -24,23 +24,23 @@
 
     // Constructor for highlighting elements
     public HighlightCombinatorElement (byte type, int number) {
-	this.type = type;
-	this.number = number;
+        this.type = type;
+        this.number = number;
     };
 
     // Constructor for highlighting elements,
     // that may not be terminal, i.e. they were closed and will
     // be reopened for overlapping issues.
     public HighlightCombinatorElement (byte type, int number, boolean terminal) {
-	this.type     = type;
-	this.number   = number;
-	this.terminal = terminal;
+        this.type     = type;
+        this.number   = number;
+        this.terminal = terminal;
     };
 
     // Constructor for textual data
     public HighlightCombinatorElement (String characters) {
-	this.type = (byte) 0;
-	this.characters = characters;
+        this.type = (byte) 0;
+        this.characters = characters;
     };
 
     // Return html fragment for this combinator element
@@ -57,7 +57,7 @@
                     .append(match.getPosID(match.getClassID(this.number)))
                     .append("\">");
             }
-
+            
             else if (this.number >= 256) {
                 sb.append("<span ");
                 if (this.number < 2048) {
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java b/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java
new file mode 100644
index 0000000..5b954d6
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/response/match/MatchIdentifier.java
@@ -0,0 +1,97 @@
+package de.ids_mannheim.korap.response.match;
+import java.util.*;
+import java.util.regex.*;
+
+public class MatchIdentifier extends DocIdentifier {
+    private int startPos, endPos = -1;
+
+    private ArrayList<int[]> pos = new ArrayList<>(8);
+
+    Pattern idRegex = Pattern.compile(
+		        "^match-(?:([^!]+?)!)?" +
+			"([^!]+)-p([0-9]+)-([0-9]+)" +
+			"((?:\\(-?[0-9]+\\)-?[0-9]+--?[0-9]+)*)" +
+			"(?:c.+?)?$");
+    Pattern posRegex = Pattern.compile(
+		        "\\(([0-9]+)\\)([0-9]+)-([0-9]+)");
+
+    public MatchIdentifier () {};
+    
+    public MatchIdentifier (String id) {
+        Matcher matcher = idRegex.matcher(id);
+        if (matcher.matches()) {
+            this.setCorpusID(matcher.group(1));
+            this.setDocID(matcher.group(2));
+            this.setStartPos(Integer.parseInt(matcher.group(3)));
+            this.setEndPos(Integer.parseInt(matcher.group(4)));
+
+            if (matcher.group(5) != null) {
+                matcher = posRegex.matcher(matcher.group(5));
+                while (matcher.find()) {
+                    this.addPos(
+                        Integer.parseInt(matcher.group(2)),
+                        Integer.parseInt(matcher.group(3)),
+                        Integer.parseInt(matcher.group(1))
+                    );
+                };
+            };
+        };
+    };
+
+    public int getStartPos () {
+        return this.startPos;
+    };
+
+    public void setStartPos (int pos) {
+        if (pos >= 0)
+            this.startPos = pos;
+    };
+
+    public int getEndPos () {
+        return this.endPos;
+    };
+
+    public void setEndPos (int pos) {
+        if (pos >= 0)
+            this.endPos = pos;
+    };
+
+    public void addPos(int start, int end, int number) {
+        if (start >= 0 && end >= 0 && number >= 0)
+            this.pos.add(new int[]{start, end, number});
+    };
+
+    public ArrayList<int[]> getPos () {
+        return this.pos;
+    };
+
+    public String toString () {
+        if (this.docID == null) return null;
+
+        StringBuilder sb = new StringBuilder("match-");
+
+        // Get prefix string corpus/doc
+        if (this.corpusID != null)
+            sb.append(this.corpusID).append('!');
+
+        sb.append(this.docID);
+
+        sb.append('-');
+        sb.append(this.getPositionString());	
+        return sb.toString();
+    };
+
+
+    public String getPositionString () {
+        StringBuilder sb = new StringBuilder();
+        sb.append('p').append(this.startPos).append('-').append(this.endPos);
+
+        // Get Position information
+        for (int[] i : this.pos) {
+            sb.append('(').append(i[2]).append(')');
+            sb.append(i[0]).append('-').append(i[1]);
+        };
+        
+        return sb.toString();
+    };
+};
diff --git a/src/main/java/de/ids_mannheim/korap/response/match/PosIdentifier.java b/src/main/java/de/ids_mannheim/korap/response/match/PosIdentifier.java
new file mode 100644
index 0000000..8606aa6
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/response/match/PosIdentifier.java
@@ -0,0 +1,34 @@
+package de.ids_mannheim.korap.response.match;
+import java.util.*;
+
+public class PosIdentifier extends DocIdentifier {
+    private int pos;
+
+    public PosIdentifier () {};
+
+    public void setPos (int pos) {
+        if (pos >= 0)
+            this.pos = pos;
+    };
+
+    public int getPos () {
+        return this.pos;
+    };
+
+    public String toString () {
+        if (this.docID == null) return null;
+
+        StringBuilder sb = new StringBuilder("word-");
+
+        // Get prefix string corpus/doc
+        if (this.corpusID != null) {
+            sb.append(this.corpusID).append('!');
+        };
+        sb.append(this.docID);
+
+        sb.append("-p");
+        sb.append(this.pos);
+
+        return sb.toString();
+    };
+};
diff --git a/src/main/java/de/ids_mannheim/korap/match/Relation.java b/src/main/java/de/ids_mannheim/korap/response/match/Relation.java
similarity index 62%
rename from src/main/java/de/ids_mannheim/korap/match/Relation.java
rename to src/main/java/de/ids_mannheim/korap/response/match/Relation.java
index f8e01c7..1587ed3 100644
--- a/src/main/java/de/ids_mannheim/korap/match/Relation.java
+++ b/src/main/java/de/ids_mannheim/korap/response/match/Relation.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.match;
+package de.ids_mannheim.korap.response.match;
 
 /**
  * Class for relational highlights.
@@ -7,7 +7,7 @@
     public int ref;
     public String annotation;
     public Relation (String annotation, int ref) {
-	this.annotation = annotation;
-	this.ref = ref;
+        this.annotation = annotation;
+        this.ref = ref;
     };
 };
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 ea86ab1..94d639f 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIdentifier.java
@@ -9,8 +9,8 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
-import de.ids_mannheim.korap.match.MatchIdentifier;
-import de.ids_mannheim.korap.match.PosIdentifier;
+import de.ids_mannheim.korap.response.match.MatchIdentifier;
+import de.ids_mannheim.korap.response.match.PosIdentifier;
 
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KrillQuery;
