diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
index def2e5b..edbeb5c 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
@@ -573,7 +573,7 @@
 
 		    // Do not load all of this, in case the doc is the same!
 		    Document doc = lreader.document(localDocID, fieldsToLoadLocal);
-		    KorapMatch match = kr.addMatch(); // new KorapMatch();
+		    KorapMatch match = kr.addMatch(pto); // new KorapMatch();
 
 		    match.startPos = spans.start();
 		    match.endPos = spans.end();
@@ -715,10 +715,6 @@
 			break;
 		    i++;
 		};
-
-		for (KorapMatch km : atomicMatches) {
-		    km.processHighlight(pto);
-		};
 		atomicMatches.clear();
 	    };
 
diff --git a/src/main/java/de/ids_mannheim/korap/KorapMatch.java b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
index f1b57cb..2e892bc 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapMatch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapMatch.java
@@ -44,9 +44,17 @@
     private Collection<byte[]> payload;
     private ArrayList<int[]> highlight;
 
+    public PositionsToOffset positionsToOffset;
+
+    private boolean processed = false;
+
     // Logger
     private final static Logger log = LoggerFactory.getLogger(KorapMatch.class);
 
+    public KorapMatch (PositionsToOffset pto) {
+	this.positionsToOffset = pto;
+    };
+
     /**
      * Insert a highlight for the snippet view by means of positional
      * offsets and an optional class number.
@@ -64,7 +72,7 @@
     };
 
     public void addHighlight (int start, int end) {
-	this.addHighlight(start, end, (int) 1);
+	this.addHighlight(start, end, (int) 0);
     };
 
     public void addHighlight (int start, int end, int number) {
@@ -115,16 +123,15 @@
      * @see #snippetBrackets()
      * @see PositionsToOffset
      */
-    public void processHighlight (PositionsToOffset pto) {
+    public void processHighlight () {
+
+	if (processed)
+	    return;
 
 	log.trace("Start highlight processing ...");
 	
 	// Get the list of spans for matches and highlighting
-	LinkedList<int[]> spans = this._processHighlightSpans(
-            pto,
-	    leftTokenContext,
-	    rightTokenContext
-        );
+	LinkedList<int[]> spans = this._processHighlightSpans(leftTokenContext,rightTokenContext);
 
 	for (int[] s : spans) {
 	    log.trace(" >> [Spans] Start: {}, End: {}, Class: {}, Dummy: {}", s[0], s[1], s[2], s[3]);
@@ -136,12 +143,15 @@
 	    log.trace(" >> [Stack] Start: {}, End: {}, Class: {}, Dummy: {}", s[0], s[1], s[2], s[3]);
 	};
 
-
-	if (this.tempSnippet == null)
+	if (this.tempSnippet == null) {
+	    processed = true;
 	    return;
+	};
 
 	this._processHighlightSnippet(this.tempSnippet, stack);
 
+	processed = true;
+
 	/*
 
 	Collection.sort(openList);
@@ -194,23 +204,31 @@
 	    this.characters = characters;
 	};
 
-	public String toHTML () {	    
+	public String toHTML (byte[] level) {	    
 	    if (this.type == 1) {
 		StringBuilder sb = new StringBuilder();
-		sb.append("<span class=\"");
 		if (this.number == -1) {
-		    sb.append("korap-match\"");
+		    sb.append("<span class=\"match\">");
 		}
 		else {
-		    sb.append("korap-highlight korap-class-")
-			.append(this.number)
-			.append('"');
+		    byte actLevel = level[255];
+		    if (level[this.number] == '\0') {
+			level[this.number] = actLevel;
+			level[255]++;
+		    };
+		    sb.append("<em class=\"class-")
+                      .append(this.number)
+		      .append(" level-")
+                      .append(actLevel)
+                      .append("\">");
 		};
-		sb.append('>');
 		return sb.toString();
 	    }
 	    else if (this.type == 2) {
-		return "</span>";
+		if (this.number == -1)
+		    return "</span>";
+		// level[]
+		return "</em>";
 	    };
 	    return encodeHTML(this.characters);
 	};
@@ -229,9 +247,8 @@
 		return sb.toString();
 	    }
 	    else if (this.type == 2) {
-		if (this.number == -1) {
+		if (this.number == -1)
 		    return "]";
-		}
 		return "}";
 	    };
 	    return this.characters;
@@ -353,51 +370,51 @@
 
     @JsonProperty("snippet")
     public String getSnippetHTML () {
+
+	this.processHighlight();
+
 	if (this.snippetHTML != null)
 	    return this.snippetHTML;
 
 	StringBuilder sb = new StringBuilder();
 
 	short start = (short) 0;
-	short end   = this.snippetStack.size();
+	short end = this.snippetStack.size();
+	byte[] level = new byte[256];
+	level[255] = 0;
 
 	HighlightCombinatorElement elem = this.snippetStack.getFirst();
 
-	// Create context, if there is any
-	if ((elem.type == 0) || startMore) {
-	    sb.append("<span class=\"korap-context-left\">");
-	    if (startMore)
-		sb.append("<span class=\"korap-more\"></span>");
-	    if (elem.type == 0) {
-		sb.append(elem.toHTML());
-		start++;
-	    };
-	    sb.append("</span>");
+	// Create context
+	sb.append("<span class=\"context-left\">");
+	if (startMore)
+	    sb.append("<span class=\"more\"></span>");
+
+	if (elem.type == 0) {
+	    sb.append(elem.toHTML(level));
+	    start++;
 	};
+	sb.append("</span>");
 
 	elem = this.snippetStack.getLast();
 
 	StringBuilder rightContext = new StringBuilder();
 
 	// Create context, if trhere is any
-	if (endMore || (elem != null && elem.type == 0)) {
-	    rightContext.append("<span class=\"korap-context-right\">");
-	    if (elem != null && elem.type == 0) {
-		rightContext.append(elem.toHTML());
-		end--;
-	    };
-	    if (endMore)
-		rightContext.append("<span class=\"korap-more\"></span>");
-	    rightContext.append("</span>");
+	rightContext.append("<span class=\"context-right\">");
+	if (elem != null && elem.type == 0) {
+	    rightContext.append(elem.toHTML(level));
+	    end--;
 	};
+	if (endMore)
+	    rightContext.append("<span class=\"more\"></span>");
+	rightContext.append("</span>");
 
 	for (short i = start; i < end; i++) {
-	    sb.append(this.snippetStack.get(i).toHTML());
+	    sb.append(this.snippetStack.get(i).toHTML(level));
 	};
 
-	if (rightContext != null) {
-	    sb.append(rightContext);
-	};
+	sb.append(rightContext);
 
 	return (this.snippetHTML = sb.toString());
     };
@@ -409,6 +426,9 @@
     
     @JsonIgnore
     public String getSnippetBrackets () {
+
+	this.processHighlight();
+
 	if (this.snippetBrackets != null)
 	    return this.snippetBrackets;
 
@@ -428,7 +448,9 @@
     };
 
 
-    // Todo: Not very fast - just a direct translation of the perl script
+    // This sorts all highlight and match spans to make them nesting correctly,
+    // even in case they overlap
+    // TODO: Not very fast - improve!
     private ArrayList<int[]> _processHighlightStack (LinkedList<int[]> spans) {
 
 	log.trace("Create Stack");
@@ -445,6 +467,7 @@
 
 	ArrayList<int[]> stack = new ArrayList<>(openList.size() * 2);
 
+	// Create stack unless both lists are empty
 	while (!openList.isEmpty() || !closeList.isEmpty()) {
 
 	    if (openList.isEmpty()) {
@@ -465,8 +488,7 @@
     };
 
 
-    private LinkedList<int[]> _processHighlightSpans (PositionsToOffset pto,
-						      boolean leftTokenContext,
+    private LinkedList<int[]> _processHighlightSpans (boolean leftTokenContext,
 						      boolean rightTokenContext) {
 	int startOffsetChar,
 	    endOffsetChar,
@@ -478,14 +500,14 @@
 	int ldid = this.localDocID;
 
 	// Match position
-	startPosChar = pto.start(ldid, this.startPos);
+	startPosChar = this.positionsToOffset.start(ldid, this.startPos);
 
 	// Check potential differing start characters
 	// e.g. from element spans
 	if (potentialStartPosChar != -1 && startPosChar > potentialStartPosChar)
 	    startPosChar = potentialStartPosChar;
 
-	endPosChar = pto.end(ldid, this.endPos - 1);
+	endPosChar = this.positionsToOffset.end(ldid, this.endPos - 1);
 
 	if (endPosChar < potentialEndPosChar)
 	    endPosChar = potentialEndPosChar;
@@ -494,7 +516,7 @@
 
 	// left context
 	if (leftTokenContext) {
-	    startOffsetChar = pto.start(ldid, startPos - this.leftContext);
+	    startOffsetChar = this.positionsToOffset.start(ldid, startPos - this.leftContext);
 	}
 	else {
 	    startOffsetChar = startPosChar - this.leftContext;
@@ -502,7 +524,7 @@
 
 	// right context
 	if (rightTokenContext) {
-	    endOffsetChar = pto.end(ldid, this.endPos + this.rightContext - 1);
+	    endOffsetChar = this.positionsToOffset.end(ldid, this.endPos + this.rightContext - 1);
 	    log.trace("For endOffset {} ({}+{}-1) pto returns {}", (this.endPos + this.rightContext - 1), this.endPos, this.rightContext, endOffsetChar);
 	}
 	else {
@@ -552,7 +574,7 @@
 	spans.add(intArray);
 
 	// highlights
-	// I'm not sure about this.
+	// -- I'm not sure about this.
 	if (this.highlight != null) {
 	    for (int[] highlight : this.highlight) {
 
@@ -575,8 +597,8 @@
 		end -= startOffsetChar;
 		*/
 
-		int start = pto.start(ldid, highlight[0]) - startOffsetChar;
-		int end = pto.end(ldid, highlight[1]) - startOffsetChar;
+		int start = this.positionsToOffset.start(ldid, highlight[0]) - startOffsetChar;
+		int end = this.positionsToOffset.end(ldid, highlight[1]) - startOffsetChar;
 
 		if (start < 0 || end < 0)
 		    continue;
@@ -589,8 +611,8 @@
 		};
 
 		log.trace("IntArray: {}", intArray);
-		log.trace("PTO-start: {}", pto.start(ldid, highlight[0]));
-		log.trace("PTO-end: {}", pto.end(ldid, highlight[1]));
+		log.trace("PTO-start: {}", start + startOffsetChar);
+		log.trace("PTO-end: {}", end + startOffsetChar);
 
 		spans.add(intArray);
 	    };
diff --git a/src/main/java/de/ids_mannheim/korap/KorapResult.java b/src/main/java/de/ids_mannheim/korap/KorapResult.java
index 3abb51d..c24ce3b 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapResult.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapResult.java
@@ -2,6 +2,7 @@
 
 import java.util.*;
 import de.ids_mannheim.korap.KorapMatch;
+import de.ids_mannheim.korap.index.PositionsToOffset;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -65,13 +66,14 @@
 	this.matches.add(km);
     };
 
-    public KorapMatch addMatch () {
-	KorapMatch km = new KorapMatch();
+    public KorapMatch addMatch (PositionsToOffset pto) {
+	KorapMatch km = new KorapMatch(pto);
 	// Temporary:
 	km.leftContext = this.leftContextOffset;
 	km.leftTokenContext = this.leftTokenContext;
 	km.rightContext = this.rightContextOffset;
 	km.rightTokenContext = this.rightTokenContext;
+	km.positionsToOffset = pto;
 	this.add(km);
 	return km;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java b/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
index 5e57185..c893d53 100644
--- a/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
+++ b/src/main/java/de/ids_mannheim/korap/index/PositionsToOffset.java
@@ -204,7 +204,7 @@
 	    };
 	}
 	catch (IOException e) {
-	    // log.warn(e.getLocalizedMessage());
+	    log.warn(e.getLocalizedMessage());
 	};
 
 	processed = true;
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
index 5ce4e70..a045e5f 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanClassQuery.java
@@ -29,7 +29,11 @@
     public SpanClassQuery (SpanQuery highlight, byte number) {
 	this.field = highlight.getField();
 	this.highlight = highlight;
-	this.number = number;
+	if (number <= 15) {
+	    this.number = number;
+	} else{
+	    this.number = (byte) 0;
+	};
     };
 
     public SpanClassQuery (SpanQuery highlight) {
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 bfc6c33..65eba5b 100644
--- a/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
+++ b/src/test/java/de/ids_mannheim/korap/highlight/TestHighlight.java
@@ -1,32 +1,13 @@
 import java.util.*;
 import java.io.IOException;
 
-// import org.apache.lucene.search.postingshighlight.PostingsHighlighter;
+import org.apache.lucene.search.spans.SpanQuery;
 
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.RAMDirectory;
-
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.IndexReaderContext;
-import org.apache.lucene.index.AtomicReaderContext;
-import org.apache.lucene.index.DirectoryReader;
-
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.index.IndexWriterConfig.OpenMode;
-
-import de.ids_mannheim.korap.analysis.MultiTermTokenStream;
-
-import org.apache.lucene.search.IndexSearcher;
-
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-
-import org.apache.lucene.util.Version;
-
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.document.FieldType;
-import org.apache.lucene.document.TextField;
+import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KorapQuery;
+import de.ids_mannheim.korap.KorapResult;
+import de.ids_mannheim.korap.KorapMatch;
+import de.ids_mannheim.korap.index.FieldDocument;
 
 import static de.ids_mannheim.korap.Test.*;
 
@@ -39,65 +20,39 @@
 @RunWith(JUnit4.class)
 public class TestHighlight { // extends LuceneTestCase {
 
-    // Create index in RAM
-    private Directory index = new RAMDirectory();
-
-    StandardAnalyzer analyzer = new StandardAnalyzer(Version.LUCENE_43);
-
-    IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_43, analyzer);
-
-
     @Test
     public void checkHighlights () throws IOException  {
-	// Check directory
 
-	IndexWriter w = new IndexWriter(index, config);
+	KorapIndex ki = new KorapIndex();
+	String json = new String(
+"{" +
+"  \"fields\" : [" +
+"    { "+
+"      \"primaryData\" : \"abc\"" +
+"    }," +
+"    {" +
+"      \"name\" : \"tokens\"," +
+"      \"data\" : [" +
+"         [ \"s:a\", \"i:a\", \"_0#0-1\", \"-:t$<i>3\"]," +
+"         [ \"s:b\", \"i:b\", \"_1#1-2\" ]," +
+"         [ \"s:c\", \"i:c\", \"_2#2-3\" ]" +
+"      ]" +
+"    }" +
+"  ]" +
+"}");
 
-	Document doc = new Document();
-	FieldType textFieldWithTermVectors = new FieldType(TextField.TYPE_STORED);
-	textFieldWithTermVectors.setStoreTermVectors(true);
-	textFieldWithTermVectors.setStoreTermVectorOffsets(true);
-	textFieldWithTermVectors.setStoreTermVectorPositions(true);
+	FieldDocument fd = ki.addDoc(json);
+	ki.commit();
 
-	Field textFieldAnalyzed = new Field(
-            "text",
-	    "Er wagte nicht, sich zu ruehren. Er war starr vor Angst.",
-	    textFieldWithTermVectors
-	);
-    
-	MultiTermTokenStream ts = getTermVector(
-            "Er#0-2|PPER|er|c:nom;n:sg;g:masc;p:3|s:<$0-32 " +
-	    "wagte#3-8|VVFIN|wagen|p:3;n:sg;t:past;m:ind| " +
-	    "nicht#9-14|PTKNEG|nicht|| " +
-	    ",#14-15|$,|,|| " +
-	    "sich#16-20|PRF|sich|c:acc;p:3;n:sg| " +
-	    "zu#21-23|PTKZU|zu|| " +
-	    "ruehren#24-31|VVFIN|ruehren|| " +
-	    ".#31-32|$.|.||s:>$0-32 " +
-	    "Er#33-35|PPER|er|c:nom;p:3;n:sg;g:masc|s:<$33-56 " +
-	    "war#36-39|VAFIN|sein|p:3;n:sg;t:past;m:ind| " +
-	    "starr#40-45|ADJD|starr|comp:pos| " +
-	    "vor#46-49|APPR|vor|| " +
-	    "Angst#50-55|NN|angst|c:dat;n:sg;g:fem| " +
-	    ".#55-56|$.|.||s:>$33-56"
-        );
 
-	textFieldAnalyzed.setTokenStream( ts );
+	KorapQuery kq = new KorapQuery("tokens");
+	KorapResult kr = ki.search((SpanQuery) kq.seq(kq._(1, kq.seg("s:b"))).toQuery());
+	KorapMatch km = kr.getMatch(0);
+	assertEquals("<span class=\"context-left\">a</span><span class=\"match\"><em class=\"class-1 level-0\">b</em></span><span class=\"context-right\">c</span>", km.getSnippetHTML());
 
-	doc.add(textFieldAnalyzed);
-
-	// Add document to writer
-	w.addDocument(doc);
-
-	assertEquals(1, w.numDocs());
-
-	w.close();
-    
-	DirectoryReader reader = DirectoryReader.open( index );
-
-	// Check searcher
-	IndexSearcher searcher = new IndexSearcher( reader );
-
+	kr = ki.search((SpanQuery) kq.seq(kq._(1, kq.seg("s:b"))).append(kq._(2, kq.seg("s:c"))).toQuery());
+	km = kr.getMatch(0);
+	assertEquals("<span class=\"context-left\">a</span><span class=\"match\"><em class=\"class-1 level-0\">b</em><em class=\"class-2 level-0\">c</em></span><span class=\"context-right\"></span>", km.getSnippetHTML());
 
     };
 };
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 4762828..a99ce8a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestClassIndex.java
@@ -65,7 +65,7 @@
 	assertEquals("StartPos (0)", 7, kr.match(0).startPos);
 	assertEquals("EndPos (0)", 9, kr.match(0).endPos);
 	assertEquals("SnippetBrackets (0)", "... bcabca[ba]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>bcabca</span><span class=\"korap-match\">ba</span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">ba</span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	sq = new SpanTermQuery(new Term("base", "s:b"));
 	kr = ki.search(sq, (short) 10);
@@ -76,7 +76,7 @@
 	assertEquals("SnippetBrackets (0)", "a[b]cabcab ...", kr.match(0).snippetBrackets());
 
 
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-context-left\">a</span><span class=\"korap-match\">b</span><span class=\"korap-context-right\">cabcab<span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\">a</span><span class=\"match\">b</span><span class=\"context-right\">cabcab<span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("StartPos (1)", 4, kr.match(1).startPos);
 	assertEquals("EndPos (1)", 5, kr.match(1).endPos);
@@ -92,7 +92,7 @@
 	assertEquals("StartPos (0)", 1, kr.match(0).startPos);
 	assertEquals("EndPos (0)", 2, kr.match(0).endPos);
 	assertEquals("snippetBrackets (0)", "a[{b}]cabcab ...", kr.match(0).snippetBrackets());
-	assertEquals("snippetHTML (0)", "<span class=\"korap-context-left\">a</span><span class=\"korap-match\"><span class=\"korap-highlight korap-class-0\">b</span></span><span class=\"korap-context-right\">cabcab<span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("snippetHTML (0)", "<span class=\"context-left\">a</span><span class=\"match\"><em class=\"class-0 level-0\">b</em></span><span class=\"context-right\">cabcab<span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("StartPos (1)", 4, kr.match(1).startPos);
 	assertEquals("EndPos (1)", 5, kr.match(1).endPos);
@@ -114,7 +114,7 @@
 	assertEquals("EndPos (0)", 2, kr.match(0).endPos);
 	assertEquals("SnippetBrackets (0)", "[a{1:b}]cabcab ...", kr.match(0).snippetBrackets());
 
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-match\">a<span class=\"korap-highlight korap-class-1\">b</span></span><span class=\"korap-context-right\">cabcab<span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"></span><span class=\"match\">a<em class=\"class-1 level-0\">b</em></span><span class=\"context-right\">cabcab<span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("StartPos (1)", 3, kr.match(1).startPos);
 	assertEquals("EndPos (1)", 5, kr.match(1).endPos);
@@ -159,19 +159,19 @@
 
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "abcabc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-context-left\">abcabc</span><span class=\"korap-match\">a<span class=\"korap-highlight korap-class-2\">b<span class=\"korap-highlight korap-class-0\">a</span></span></span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\">abcabc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset tokens
 	kr = ki.search(sq, 0, (short) 10, true, (short) 2, true, (short) 2);
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>bc</span><span class=\"korap-match\">a<span class=\"korap-highlight korap-class-2\">b<span class=\"korap-highlight korap-class-0\">a</span></span></span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset Characters
 	kr = ki.search(sq, 0, (short) 10, false, (short) 2, false, (short) 2);
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "... bc[a{2:b{a}}]c", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>bc</span><span class=\"korap-match\">a<span class=\"korap-highlight korap-class-2\">b<span class=\"korap-highlight korap-class-0\">a</span></span></span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"><span class=\"more\"></span>bc</span><span class=\"match\">a<em class=\"class-2 level-0\">b<em class=\"class-0 level-1\">a</em></em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 
 	// System.err.println(kr.toJSON());
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 2472b2a..1b79347 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -129,8 +129,6 @@
 
 	KorapMatch km = kr.getMatch(0);
 
-	System.err.println("----");
-
 	assertEquals(km.getPrimaryData(),"abc");
 	assertEquals(km.getCorpusID(),"WPD");
 	assertEquals(km.getID(),"WPD-AAA-00001");
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 f2fe7aa..3576fc5 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMatchIndex.java
@@ -70,7 +70,7 @@
 	assertEquals("EndPos (0)", 9, kr.match(0).endPos);
 	assertEquals("SnippetBrackets (0)", "... bcabca[b{a}]c", kr.match(0).snippetBrackets());
 
-	assertEquals("Test no 'more' context", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>bcabca</span><span class=\"korap-match\">b<span class=\"korap-highlight korap-class-0\">a</span></span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("Test no 'more' context", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	sq = new SpanMatchModifyQuery(
             new SpanNextQuery(
@@ -101,13 +101,13 @@
 	assertEquals("EndPos (0)", 2, kr.match(0).endPos);
 	assertEquals("SnippetBrackets (0)", "a[b]cabcab ...", kr.match(0).snippetBrackets());
 
-	assertEquals("<span class=\"korap-context-left\">a</span><span class=\"korap-match\">b</span><span class=\"korap-context-right\">cabcab<span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("<span class=\"context-left\">a</span><span class=\"match\">b</span><span class=\"context-right\">cabcab<span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("StartPos (1)", 4, kr.match(1).startPos);
 	assertEquals("EndPos (1)", 5, kr.match(1).endPos);
 	assertEquals("SnippetBrackets (1)", "abca[b]cabac", kr.match(1).snippetBrackets());
 
-	assertEquals("<span class=\"korap-context-left\">abca</span><span class=\"korap-match\">b</span><span class=\"korap-context-right\">cabac</span>", kr.match(1).snippetHTML());
+	assertEquals("<span class=\"context-left\">abca</span><span class=\"match\">b</span><span class=\"context-right\">cabac</span>", kr.match(1).snippetHTML());
 
 	assertEquals("StartPos (2)", 7, kr.match(2).startPos);
 	assertEquals("EndPos (2)", 8, kr.match(2).endPos);
@@ -133,7 +133,7 @@
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "... bcabca[b{a}]c", kr.match(0).snippetBrackets());
 
-	assertEquals("SnippetHTML (0) 1", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>bcabca</span><span class=\"korap-match\">b<span class=\"korap-highlight korap-class-0\">a</span></span><span class=\"korap-context-right\">c</span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0) 1", "<span class=\"context-left\"><span class=\"more\"></span>bcabca</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\">c</span>", kr.match(0).snippetHTML());
 
 	// Offset tokens
 	kr = ki.search(sq, 0, (short) 10, true, (short) 2, true, (short) 2);
@@ -147,7 +147,7 @@
 	assertEquals("totalResults", 1, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "... a[b{a}] ...", kr.match(0).snippetBrackets());
 
-	assertEquals("SnippetHTML (0) 2", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>a</span><span class=\"korap-match\">b<span class=\"korap-highlight korap-class-0\">a</span></span><span class=\"korap-context-right\"><span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0) 2", "<span class=\"context-left\"><span class=\"more\"></span>a</span><span class=\"match\">b<em class=\"class-0 level-0\">a</em></span><span class=\"context-right\"><span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	// System.err.println(kr.toJSON());
 
@@ -232,27 +232,27 @@
 	kr = ki.search(sq, (short) 20);
 
 	assertEquals("totalResults", 7, kr.totalResults());
-	assertEquals("SnippetBrackets (0)", "<span class=\"korap-match\">a</span><span class=\"korap-context-right\">bcabca<span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetBrackets (0)", "<span class=\"context-left\"></span><span class=\"match\">a</span><span class=\"context-right\">bcabca<span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 	assertEquals("SnippetBrackets (0)", "[a]bcabca ...", kr.match(0).snippetBrackets());
 
 	assertEquals("SnippetBrackets (1)", "ab[c]abcaba ...", kr.match(1).snippetBrackets());
-	assertEquals("SnippetBrackets (1)", "<span class=\"korap-context-left\">ab</span><span class=\"korap-match\">c</span><span class=\"korap-context-right\">abcaba<span class=\"korap-more\"></span></span>", kr.match(1).snippetHTML());
+	assertEquals("SnippetBrackets (1)", "<span class=\"context-left\">ab</span><span class=\"match\">c</span><span class=\"context-right\">abcaba<span class=\"more\"></span></span>", kr.match(1).snippetHTML());
 
 	assertEquals("SnippetBrackets (6)", "... abcaba[c]", kr.match(6).snippetBrackets());
-	assertEquals("SnippetBrackets (6)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span>abcaba</span><span class=\"korap-match\">c</span>", kr.match(6).snippetHTML());
+	assertEquals("SnippetBrackets (6)", "<span class=\"context-left\"><span class=\"more\"></span>abcaba</span><span class=\"match\">c</span><span class=\"context-right\"></span>", kr.match(6).snippetHTML());
 
 
 	kr = ki.search(sq, 0, (short) 20, true, (short) 0, true, (short) 0);
 
 	assertEquals("totalResults", 7, kr.totalResults());
 	assertEquals("SnippetBrackets (0)", "[a] ...", kr.match(0).snippetBrackets());
-	assertEquals("SnippetHTML (0)", "<span class=\"korap-match\">a</span><span class=\"korap-context-right\"><span class=\"korap-more\"></span></span>", kr.match(0).snippetHTML());
+	assertEquals("SnippetHTML (0)", "<span class=\"context-left\"></span><span class=\"match\">a</span><span class=\"context-right\"><span class=\"more\"></span></span>", kr.match(0).snippetHTML());
 
 	assertEquals("SnippetBrackets (1)", "... [c] ...", kr.match(1).snippetBrackets());
-	assertEquals("SnippetHTML (1)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span></span><span class=\"korap-match\">c</span><span class=\"korap-context-right\"><span class=\"korap-more\"></span></span>", kr.match(1).snippetHTML());
+	assertEquals("SnippetHTML (1)", "<span class=\"context-left\"><span class=\"more\"></span></span><span class=\"match\">c</span><span class=\"context-right\"><span class=\"more\"></span></span>", kr.match(1).snippetHTML());
 
 	assertEquals("SnippetBrackets (6)", "... [c]", kr.match(6).snippetBrackets());
-	assertEquals("SnippetBrackets (6)", "<span class=\"korap-context-left\"><span class=\"korap-more\"></span></span><span class=\"korap-match\">c</span>", kr.match(6).snippetHTML());
+	assertEquals("SnippetBrackets (6)", "<span class=\"context-left\"><span class=\"more\"></span></span><span class=\"match\">c</span><span class=\"context-right\"></span>", kr.match(6).snippetHTML());
     };
 
 
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 8c7374a..8f40a7f 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWithinIndex.java
@@ -702,7 +702,7 @@
 	assertEquals("totalResults", 1, kr.totalResults());
 
 	assertEquals("... schrie: [\"{3:Das war ich}!\"] und ...",kr.match(0).snippetBrackets());
-	assertEquals("<span class=\"korap-context-left\"><span class=\"korap-more\"></span>schrie: </span><span class=\"korap-match\">&quot;<span class=\"korap-highlight korap-class-3\">Das war ich</span>!&quot;</span><span class=\"korap-context-right\"> und<span class=\"korap-more\"></span></span>",kr.match(0).snippetHTML());
+	assertEquals("<span class=\"context-left\"><span class=\"more\"></span>schrie: </span><span class=\"match\">&quot;<em class=\"class-3 level-0\">Das war ich</em>!&quot;</span><span class=\"context-right\"> und<span class=\"more\"></span></span>",kr.match(0).snippetHTML());
 
 
 	kr = ki.search(sq, 0, (short) 15, true, (short) 0, true, (short) 0);
