diff --git a/src/main/java/de/mannheim/ids/korap/sru/Annotation.java b/src/main/java/de/mannheim/ids/korap/sru/Annotation.java
index 43081c3..65f6030 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/Annotation.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/Annotation.java
@@ -1,6 +1,6 @@
 package de.mannheim.ids.korap.sru;
 
-/**
+/** 
  * @author margaretha
  *
  */
@@ -10,14 +10,14 @@
     private long start;
     private long end;
     private String value;
-    private boolean isKeyword;
-
-    public Annotation (int id, String value, long start, long end, boolean isKeyword) {
+    private int hitLevel;
+    
+    public Annotation (int id, String value, long start, long end, int hitLevel) {
         this.id = id;
         this.value = value;
         this.start = start;
         this.end = end;
-        this.isKeyword = isKeyword;
+        this.hitLevel = hitLevel;
     }
 
     public int getId() {
@@ -52,11 +52,11 @@
         this.value = value;
     }
 
-    public boolean isKeyword() {
-        return isKeyword;
+    public int getHitLevel() {
+        return hitLevel;
     }
-
-    public void setKeyword(boolean isKeyword) {
-        this.isKeyword = isKeyword;
+    
+    public void setHitLevel(int hitLevel) {
+        this.hitLevel = hitLevel;
     }
 }
diff --git a/src/main/java/de/mannheim/ids/korap/sru/AnnotationHandler.java b/src/main/java/de/mannheim/ids/korap/sru/AnnotationHandler.java
index 33b6096..4cc66b4 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/AnnotationHandler.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/AnnotationHandler.java
@@ -4,7 +4,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.hamcrest.core.IsSame;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.Attributes;
@@ -17,6 +16,7 @@
             .getLogger(AnnotationHandler.class);
 
     private boolean startSegment = true;
+    private boolean startSentence = false;
 
     private int matchLevel = 0;
 
@@ -41,24 +41,30 @@
     public void startElement(String uri, String localName, String qName,
             Attributes attributes) throws SAXException {
 
-        if (qName.equals("mark")) {
-            text = textBuilder.toString();
-            textBuilder = new StringBuilder();
-            if (!text.isEmpty()) {
-                addAnnotationToMap(text, annotationLayers.get(0),
-                        (matchLevel > 1), textStartOffset, textEndOffset);
-                textStartOffset = textEndOffset;
-            }
-            matchLevel++;
-        }
-        if (matchLevel > 0 && qName.equals("span")
-                && attributes.getQName(0).equals("title")) {
+        if (startSentence && attributes.getValue("title") != null && qName.equals("span")) {
             if (startSegment) {
                 segmentStartOffset = segmentEndOffset;
                 startSegment = false;
             }
             annotationStrings.add(attributes.getValue("title"));
-
+        }
+        else if (attributes.getValue("class") !=null && qName.equals("span")){            
+            if (attributes.getValue("class").equals("match")){
+                startSentence = true;
+            }
+            else {
+                startSentence = false;
+            }
+        }
+        else if (qName.equals("mark")) {
+            text = textBuilder.toString();            
+            textBuilder = new StringBuilder();
+            if (!text.isEmpty()) {
+                addAnnotationToMap(text, annotationLayers.get(0),
+                        matchLevel, textStartOffset, textEndOffset);
+                textStartOffset = textEndOffset;
+            }
+            matchLevel++;
         }
         super.startElement(uri, localName, qName, attributes);
 
@@ -79,22 +85,22 @@
                 segmentBuilder = new StringBuilder();
             }
             else if (annotationLayer.getLayerCode().equals(layerCode)) {
-                addAnnotationToMap(value, annotationLayer, false);
+                addAnnotationToMap(value, annotationLayer, 0);
                 break;
             }
         }
     }
 
     private void addAnnotationToMap(String value,
-            AnnotationLayer annotationLayer, boolean isKeyword) {
-        addAnnotationToMap(value, annotationLayer, isKeyword, segmentStartOffset, segmentEndOffset);
+            AnnotationLayer annotationLayer, int hitLevel) {
+        addAnnotationToMap(value, annotationLayer, hitLevel, segmentStartOffset, segmentEndOffset);
     }
     
     private void addAnnotationToMap(String value,
-            AnnotationLayer annotationLayer, boolean isKeyword, long startOffset, long endOffset) {
+            AnnotationLayer annotationLayer, int hitLevel, long startOffset, long endOffset) {
 
         Annotation annotation = new Annotation(id, value, startOffset,
-                endOffset, isKeyword);
+                endOffset, hitLevel);
 
         Map<Integer, List<Annotation>> map = annotationLayer.getAnnotationMap();
 
@@ -114,18 +120,14 @@
 
         if (qName.equals("mark")) {
 
-            annotationLayers.get(0);
-
             text = textBuilder.toString();
             textBuilder = new StringBuilder();
-
             addAnnotationToMap(text, annotationLayers.get(0),
-                    (matchLevel > 1), textStartOffset, textEndOffset);
+                    matchLevel, textStartOffset, textEndOffset);
             textStartOffset = textEndOffset;
-            
             matchLevel--;
         }
-        else if (!startSegment) {
+        else if (!startSegment && qName.equals("span")) {
             for (String annotationStr : annotationStrings) {
                 parseAnnotation(annotationStr);
             }
@@ -134,6 +136,13 @@
             annotationStrings.clear();
         }
     }
+    
+    @Override
+    public void endDocument() throws SAXException {
+        text = textBuilder.toString();
+        addAnnotationToMap(text, annotationLayers.get(0),
+                matchLevel, textStartOffset, textEndOffset);
+    }
 
     @Override
     public void characters(char[] ch, int start, int length)
diff --git a/src/main/java/de/mannheim/ids/korap/sru/KorapMatch.java b/src/main/java/de/mannheim/ids/korap/sru/KorapMatch.java
index cf1db12..b5c2889 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/KorapMatch.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/KorapMatch.java
@@ -2,6 +2,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
@@ -9,10 +11,10 @@
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class KorapMatch {
 
-    private String ID;
-    private String positionID;
-    private String docID;
-    private String corpusID;
+    private String matchID;
+    private String positionId;
+    private String docId;
+    private String corpusId;
     private String leftContext;
     private String keyword;
     private String rightContext;
@@ -20,41 +22,51 @@
     private String text;
 
     private List<AnnotationLayer> annotationLayers = new ArrayList<AnnotationLayer>();
+    
+    private static Pattern idPattern = Pattern.compile("match-(.*)_(.*)-p([0-9]+-[0-9]+)");
 
     public KorapMatch () {}
-
-    @JsonProperty("ID")
-    public String getID() {
-        return ID;
+    
+    @JsonProperty("matchID")
+    public String getMatchId() {
+        return matchID;
     }
 
-    public void setID(String id) {
-        this.ID = id;
+    public void setMatchId(String id) {
+        this.matchID = id;
+    }
+   
+    public void parseMatchId(){
+        Matcher matcher = idPattern.matcher(matchID);
+        if (matcher.find()){
+            this.corpusId = matcher.group(1);
+            this.docId = matcher.group(2);
+            this.positionId = "p"+matcher.group(3);
+        }
+    } 
+    
+    public void setPositionId(String positionId) {
+        this.positionId = positionId;
     }
 
-    public void setPositionID() {
-        String[] idParts = ID.split("-");
-        this.positionID = idParts[2] + "-" + idParts[3];
+    public String getPositionId() {
+        return positionId;
     }
 
-    public String getPositionID() {
-        return positionID;
+    public String getDocId() {
+        return docId;
     }
 
-    public String getDocID() {
-        return docID;
+    public void setDocId(String docID) {
+        this.docId = docID.replace(corpusId + "_", "");
     }
 
-    public void setDocID(String docID) {
-        this.docID = docID.replace(corpusID + "_", "");
+    public String getCorpusId() {
+        return corpusId;
     }
 
-    public String getCorpusID() {
-        return corpusID;
-    }
-
-    public void setCorpusID(String corpusID) {
-        this.corpusID = corpusID;
+    public void setCorpusId(String corpusId) {
+        this.corpusId = corpusId;
     }
 
     public String getLeftContext() {
diff --git a/src/main/java/de/mannheim/ids/korap/sru/KorapMatchHandler.java b/src/main/java/de/mannheim/ids/korap/sru/KorapMatchHandler.java
index 952fca3..1cd91ee 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/KorapMatchHandler.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/KorapMatchHandler.java
@@ -6,7 +6,7 @@
 
 public class KorapMatchHandler extends DefaultHandler{
 	
-	KorapMatch match;
+	private KorapMatch match;
 	boolean isLeftContext, isRightContext, isKeyword, isMore;
 	private StringBuilder sbLeft, sbRight, sbKey;
 	 
diff --git a/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java b/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java
index 98d2d28..7bccd81 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java
@@ -2,4 +2,8 @@
 
 public enum QueryLanguage {
 	CQL, FCSQL;
+	
+	public String toString() {
+	    return super.toString().toLowerCase();
+	};
 }
