prefix korap -> koral
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
index 298d45d..dcdb802 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
@@ -98,7 +98,7 @@
     /**
      * Keeps a record of reference-class-mapping, i.e. which 'class' has been 
      * assigned to which #n reference. This is important when introducing 
-     * korap:reference spans to refer back to previously established classes for 
+     * koral:reference spans to refer back to previously established classes for 
      * entities.
      */
     private LinkedHashMap<String, Integer> refClassMapping = 
@@ -393,7 +393,7 @@
         }
         if (node.getChildCount() == 3) {  			
             // (foundry/)?layer=key specification
-            if (object.get("@type").equals("korap:token")) {
+            if (object.get("@type").equals("koral:token")) {
                 HashMap<String, Object> term = (HashMap<String, Object>) 
                         object.get("wrap");
                 term.putAll(parseTextSpec(node.getChild(2)));
@@ -722,10 +722,10 @@
 
     /**
      * Parses a unary_linguistic_operator node. Possible operators are: 
-     * root, arity, tokenarity. Operators are embedded into a korap:term,
-     * in turn wrapped by an 'attr' property in a korap:span.
+     * root, arity, tokenarity. Operators are embedded into a koral:term,
+     * in turn wrapped by an 'attr' property in a koral:span.
      * @param node The unary_linguistic_operator node
-     * @return A map containing the attr key, to be inserted into korap:span 
+     * @return A map containing the attr key, to be inserted into koral:span 
      */
     private LinkedHashMap<String, Object> parseUnaryOperator(ParseTree node) {
         LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
@@ -763,7 +763,7 @@
                 LinkedHashMap<String,Object> edgeSpec = 
                         parseEdgeSpec(edgeSpecNode);
                 String edgeSpecType = (String) edgeSpec.get("@type");
-                if (edgeSpecType.equals("korap:termGroup")) {
+                if (edgeSpecType.equals("koral:termGroup")) {
                     ((ArrayList<Object>) edgeSpec.get("operands")).add(term);
                     term = edgeSpec;
                 } else {
@@ -899,9 +899,8 @@
 
     private LinkedHashMap<String, Object> parseEdgeAnno(
             ParseTree edgeAnnoSpec) {
-        LinkedHashMap<String, Object> edgeAnno =
-                new LinkedHashMap<String, Object>();
-        edgeAnno.put("@type", "korap:term");
+        LinkedHashMap<String, Object> edgeAnno = 
+                KoralObjectGenerator.makeTerm();
         ParseTree textSpecNode= getFirstChildWithCat(edgeAnnoSpec, "textSpec");
         ParseTree layerNode = getFirstChildWithCat(edgeAnnoSpec, "layer");
         ParseTree foundryNode = getFirstChildWithCat(edgeAnnoSpec, "foundry");
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
index c5ea126..c3b0e2b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessor.java
@@ -314,7 +314,7 @@
                 // Step I: create group
                 String nodeCat = getNodeCat(node);
                 LinkedHashMap<String, Object> beggroup = new LinkedHashMap<String, Object>();
-                beggroup.put("@type", "korap:reference");
+                beggroup.put("@type", "koral:reference");
                 beggroup.put("operation", "operation:focus");
                 ArrayList<Integer> spanRef = new ArrayList<Integer>();
                 if (nodeCat.equals("OPBEG")) {
@@ -684,9 +684,8 @@
 
             private void processOPLABEL(Tree node) {
                 // Step I: create element
-                LinkedHashMap<String, Object> elem = new LinkedHashMap<String, Object>();
-                elem.put("@type", "korap:span");
-                elem.put("key", node.getChild(0).toStringTree().replaceAll("<|>", ""));
+                String key = node.getChild(0).toStringTree().replaceAll("<|>", "");
+                LinkedHashMap<String, Object> elem = KoralObjectGenerator.makeSpan(key);
                 // Step II: decide where to put
                 putIntoSuperObject(elem);
             }
@@ -810,8 +809,7 @@
                         return;
                     }
 
-                    fieldMap = new LinkedHashMap<String, Object>();
-                    fieldMap.put("@type", "korap:term");
+                    fieldMap = KoralObjectGenerator.makeTerm();
 
                     if (m.group(2) != null)
                         fieldMap.put("foundry", m.group(2));
@@ -871,16 +869,12 @@
             private void processOPWF_OPLEM(Tree node) {
                 String nodeCat = getNodeCat(node);
                 // Step I: get info
-                LinkedHashMap<String, Object> token = 
-                        new LinkedHashMap<String, Object>();
-                token.put("@type", "korap:token");
+                LinkedHashMap<String, Object> token = KoralObjectGenerator.makeToken();
                 objectStack.push(token);
                 stackedObjects++;
                 LinkedHashMap<String, Object> fieldMap = 
-                        new LinkedHashMap<String, Object>();
+                        KoralObjectGenerator.makeTerm();
                 token.put("wrap", fieldMap);
-
-                fieldMap.put("@type", "korap:term");
                 // make category-specific fieldMap entry
                 String attr = nodeCat.equals("OPWF") ? "orth" : "lemma";
                 String value = node.getChild(0).toStringTree().replaceAll("\"", "");
@@ -1036,9 +1030,7 @@
                         KoralObjectGenerator.makeSpanClass(128+classCounter++);
                 classGroup.put("operands", distributedOperands);
                 positionGroup.put("operands", posOperands);
-                LinkedHashMap<String, Object> span = new LinkedHashMap<String, Object>();
-                span.put("@type", "korap:span");
-                span.put("key", elem);
+                LinkedHashMap<String, Object> span = KoralObjectGenerator.makeSpan(elem);
                 objectStack.push(classGroup);
                 if (hitSpanRef != null) {
                     LinkedHashMap<String, Object> spanRefAroundHit = 
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
index 9064a0e..6ed5f6b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessor.java
@@ -71,12 +71,12 @@
 
     private Map<String, Object> sentenceWrapper(Map<String, Object> m) {
         Map<String, Object> map = new LinkedHashMap<String, Object>();
-        map.put("@type", "korap:group");
+        map.put("@type", "koral:group");
         map.put("operation", OPERATION_POSITION);
         map.put("frame", "frame:contains");
 
         Map<String, Object> sentence = new LinkedHashMap<String, Object>();
-        sentence.put("@type", "korap:span");
+        sentence.put("@type", "koral:span");
         sentence.put("key", "s");
 
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
@@ -146,13 +146,13 @@
         checkBooleanModifier(node);
 
         Map<String, Object> map = new LinkedHashMap<String, Object>();
-        map.put("@type", "korap:group");
+        map.put("@type", "koral:group");
         map.put("operation", OPERATION_SEQUENCE);
         map.put("inOrder", false);
 
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
         Map<String, Object> distanceMap = new LinkedHashMap<String, Object>();
-        distanceMap.put("@type", "korap:distance");
+        distanceMap.put("@type", "koral:distance");
         distanceMap.put("key", "s");
         distanceMap.put("min", "0");
         distanceMap.put("max", "0");
@@ -171,7 +171,7 @@
         checkBooleanModifier(node);
 
         Map<String, Object> map = new LinkedHashMap<String, Object>();
-        map.put("@type", "korap:group");
+        map.put("@type", "koral:group");
         map.put("operation", OPERATION_OR);
 
         List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
@@ -184,7 +184,7 @@
 
     private Map<String, Object> writeSequence(String str) {
         Map<String, Object> sequenceMap = new LinkedHashMap<String, Object>();
-        sequenceMap.put("@type", "korap:group");
+        sequenceMap.put("@type", "koral:group");
         sequenceMap.put("operation", OPERATION_SEQUENCE);
 
         List<Map<String, Object>> termList = new ArrayList<Map<String, Object>>();
@@ -199,7 +199,7 @@
 
     private Map<String, Object> writeTerm(String term) {
         Map<String, Object> map = new LinkedHashMap<String, Object>();
-        map.put("@type", "korap:term");
+        map.put("@type", "koral:term");
         if (!isCaseSensitive) {
             map.put("caseInsensitive", "true");
         }
@@ -208,7 +208,7 @@
         map.put("match", "match:eq");
 
         Map<String, Object> tokenMap = new LinkedHashMap<String, Object>();
-        tokenMap.put("@type", "korap:token");
+        tokenMap.put("@type", "koral:token");
         tokenMap.put("wrap", map);
         return tokenMap;
     }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
index 8fdf565..5550d51 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
@@ -17,26 +17,26 @@
 
     public static LinkedHashMap<String, Object> makeSpan() {
         LinkedHashMap<String, Object> span = new LinkedHashMap<String, Object>();
-        span.put("@type", "korap:span");
+        span.put("@type", "koral:span");
         return span;
     }
 
     public static LinkedHashMap<String, Object> makeSpan(String key) {
         LinkedHashMap<String, Object> span = new LinkedHashMap<String, Object>();
-        span.put("@type", "korap:span");
+        span.put("@type", "koral:span");
         span.put("key", key);
         return span;
     }
 
     public static LinkedHashMap<String, Object> makeTerm() {
         LinkedHashMap<String, Object> term = new LinkedHashMap<String, Object>();
-        term.put("@type", "korap:term");
+        term.put("@type", "koral:term");
         return term;
     }
 
     public static LinkedHashMap<String, Object> makeTermGroup(String relation) {
         LinkedHashMap<String, Object> term = new LinkedHashMap<String, Object>();
-        term.put("@type", "korap:termGroup");
+        term.put("@type", "koral:termGroup");
         term.put("relation", "relation:" + relation);
         term.put("operands", new ArrayList<Object>());
         return term;
@@ -44,13 +44,13 @@
 
     public static LinkedHashMap<String, Object> makeDoc() {
         LinkedHashMap<String, Object> term = new LinkedHashMap<String, Object>();
-        term.put("@type", "korap:doc");
+        term.put("@type", "koral:doc");
         return term;
     }
 
     public static LinkedHashMap<String, Object> makeDocGroup(String relation) {
         LinkedHashMap<String, Object> term = new LinkedHashMap<String, Object>();
-        term.put("@type", "korap:docGroup");
+        term.put("@type", "koral:docGroup");
         term.put("operation", "operation:" + relation);
         term.put("operands", new ArrayList<Object>());
         return term;
@@ -58,13 +58,13 @@
 
     public static LinkedHashMap<String, Object> makeToken() {
         LinkedHashMap<String, Object> token = new LinkedHashMap<String, Object>();
-        token.put("@type", "korap:token");
+        token.put("@type", "koral:token");
         return token;
     }
 
     public static LinkedHashMap<String, Object> makeGroup(String operation) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:" + operation);
         group.put("operands", new ArrayList<Object>());
         return group;
@@ -81,7 +81,7 @@
     @Deprecated
     public static LinkedHashMap<String, Object> makePosition(String frame) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:position");
         group.put("frame", "frame:" + frame);
         group.put("operands", new ArrayList<Object>());
@@ -91,7 +91,7 @@
     public static LinkedHashMap<String, Object> makePosition(
             String[] allowedFrames) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:position");
         group.put("frames", Arrays.asList(allowedFrames));
         group.put("operands", new ArrayList<Object>());
@@ -106,7 +106,7 @@
     public static LinkedHashMap<String, Object> makeSpanClass(int classId,
             boolean setBySystem) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:class");
         if (setBySystem) {
             classId += 128;
@@ -122,7 +122,7 @@
     public static LinkedHashMap<String, Object> makeClassRefCheck(
             ArrayList<String> check, Integer[] classIn, int classOut) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:class");
         group.put("classRefCheck", check);
         group.put("classIn", Arrays.asList(classIn));
@@ -134,7 +134,7 @@
     public static LinkedHashMap<String, Object> makeClassRefOp(
             String operation, Integer[] classIn, int classOut) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:group");
+        group.put("@type", "koral:group");
         group.put("operation", "operation:class");
         group.put("classRefOp", operation);
         group.put("classIn", Arrays.asList(classIn));
@@ -146,7 +146,7 @@
     @Deprecated
     public static LinkedHashMap<String, Object> makeTreeRelation(String reltype) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:treeRelation");
+        group.put("@type", "koral:treeRelation");
         if (reltype != null)
             group.put("reltype", reltype);
         return group;
@@ -154,14 +154,14 @@
 
     public static LinkedHashMap<String, Object> makeRelation() {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:relation");
+        group.put("@type", "koral:relation");
         return group;
     }
 
     public static LinkedHashMap<String, Object> makeBoundary(Integer min,
             Integer max) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:boundary");
+        group.put("@type", "koral:boundary");
         group.put("min", min);
         if (max != null) {
             group.put("max", max);
@@ -173,7 +173,7 @@
             Integer min, Integer max) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
         if (key.equals("w")) {
-            group.put("@type", "korap:distance");
+            group.put("@type", "koral:distance");
         }
         else {
             group.put("@type", "cosmas:distance");
@@ -193,7 +193,7 @@
     public static LinkedHashMap<String, Object> makeReference(
             ArrayList<Integer> classRefs, String operation) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:reference");
+        group.put("@type", "koral:reference");
         group.put("operation", "operation:" + operation);
         if (classRefs != null && !classRefs.isEmpty()) {
             group.put("classRef", classRefs);
@@ -233,7 +233,7 @@
     @Deprecated
     public static LinkedHashMap<String, Object> makeResetReference() {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:reference");
+        group.put("@type", "koral:reference");
         group.put("operation", "operation:focus");
         group.put("reset", true);
         group.put("operands", new ArrayList<Object>());
@@ -243,7 +243,7 @@
     public static LinkedHashMap<String, Object> makeSpanReference(
             Integer[] spanRef, String operation) {
         LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
-        group.put("@type", "korap:reference");
+        group.put("@type", "koral:reference");
         group.put("operation", "operation:" + operation);
         group.put("spanRef", Arrays.asList(spanRef));
         group.put("operands", new ArrayList<Object>());
@@ -257,9 +257,14 @@
   
     public static LinkedHashMap<String, Object> wrapInReference(
             LinkedHashMap<String, Object> group, Integer classId) {
-        return wrapInReference(group, classId, false);
+        LinkedHashMap<String, Object> refGroup = makeReference(classId);
+        ArrayList<Object> operands = new ArrayList<Object>();
+        operands.add(group);
+        refGroup.put("operands", operands);
+        return refGroup;
     }
     
+    @Deprecated
     public static LinkedHashMap<String, Object> wrapInReference(
             LinkedHashMap<String, Object> group, Integer classId, 
             boolean setBySystem) {
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessorTest.java
index add2e16..4901137 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessorTest.java
@@ -41,8 +41,8 @@
         query = "\"Mann\"";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			 res.at("/query/@type").asText());
-        assertEquals("korap:term",			 res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			 res.at("/query/@type").asText());
+        assertEquals("koral:term",			 res.at("/query/wrap/@type").asText());
         assertEquals("orth",				 res.at("/query/wrap/layer").asText());
         assertEquals("Mann",				 res.at("/query/wrap/key").asText());
         assertEquals("match:eq",			 res.at("/query/wrap/match").asText());
@@ -50,8 +50,8 @@
         query = "tok!=\"Frau\"";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			 res.at("/query/@type").asText());
-        assertEquals("korap:term",			 res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			 res.at("/query/@type").asText());
+        assertEquals("koral:term",			 res.at("/query/wrap/@type").asText());
         assertEquals("orth",				 res.at("/query/wrap/layer").asText());
         assertEquals("Frau",				 res.at("/query/wrap/key").asText());
         assertEquals("match:ne",			 res.at("/query/wrap/match").asText());
@@ -59,12 +59,12 @@
         query = "tok";  // special keyword for token
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			 res.at("/query/@type").asText());
+        assertEquals("koral:token",			 res.at("/query/@type").asText());
 
         query = "Mann"; // no special keyword -> defaults to layer name
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
         assertEquals("Mann",				 res.at("/query/layer").asText());
     }
 
@@ -73,19 +73,19 @@
         query = "node"; // special keyword for general span
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
 
         query = "cat=\"np\"";  // cat is special keyword for spans
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
         assertEquals("np",					 res.at("/query/key").asText());
         assertEquals("c",					 res.at("/query/layer").asText());
 
         query = "cat=\"NP\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
         assertEquals("NP",					 res.at("/query/key").asText());
         assertEquals("c",					 res.at("/query/layer").asText());
     }
@@ -95,8 +95,8 @@
         query = "/Mann/";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			 res.at("/query/@type").asText());
-        assertEquals("korap:term",			 res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			 res.at("/query/@type").asText());
+        assertEquals("koral:term",			 res.at("/query/wrap/@type").asText());
         assertEquals("type:regex",			 res.at("/query/wrap/type").asText());
         assertEquals("orth",				 res.at("/query/wrap/layer").asText());
         assertEquals("Mann",				 res.at("/query/wrap/key").asText());
@@ -114,14 +114,14 @@
         query = "c=\"np\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
         assertEquals("np",					 res.at("/query/key").asText());
         assertEquals("c",					 res.at("/query/layer").asText());
 
         query = "cnx/c=\"np\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",			 res.at("/query/@type").asText());
+        assertEquals("koral:span",			 res.at("/query/@type").asText());
         assertEquals("np",					 res.at("/query/key").asText());
         assertEquals("c",					 res.at("/query/layer").asText());
         assertEquals("cnx",					 res.at("/query/foundry").asText());
@@ -129,8 +129,8 @@
         query = "tt/pos=\"np\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			 res.at("/query/@type").asText());
-        assertEquals("korap:term",			 res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			 res.at("/query/@type").asText());
+        assertEquals("koral:term",			 res.at("/query/wrap/@type").asText());
         assertEquals("np",					 res.at("/query/wrap/key").asText());
         assertEquals("p",					 res.at("/query/wrap/layer").asText());
         assertEquals("tt",					 res.at("/query/wrap/foundry").asText());
@@ -141,26 +141,26 @@
         query = "node > node";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
 
         query = "node > cnx/c=\"np\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
         assertEquals("np",					res.at("/query/operands/1/key").asText());
         assertEquals("c",					res.at("/query/operands/1/layer").asText());
         assertEquals("cnx",					res.at("/query/operands/1/foundry").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
 
         query = "cnx/c=\"np\" > node";  
@@ -172,15 +172,15 @@
         query = "cat=/NP/ & cat=/PP/ > #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
         assertEquals("PP",					res.at("/query/operands/0/key").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
         assertEquals("NP",					res.at("/query/operands/1/key").asText());
         assertEquals(true,					res.at("/query/operands/2").isMissingNode());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
     }
 
@@ -189,19 +189,19 @@
         query = "#1 > #2 & cnx/cat=\"vp\" & cnx/cat=\"np\"";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
         assertEquals("vp",					res.at("/query/operands/0/key").asText());
         assertEquals("c",					res.at("/query/operands/0/layer").asText());
         assertEquals("cnx",					res.at("/query/operands/0/foundry").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
         assertEquals("np",					res.at("/query/operands/1/key").asText());
         assertEquals("c",					res.at("/query/operands/1/layer").asText());
         assertEquals("cnx",					res.at("/query/operands/1/foundry").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
     }
 
@@ -210,31 +210,31 @@
         query = "node & node & #2 > #1";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
 
         query = "\"Mann\" & node & #2 > #1";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:token",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/1/@type").asText());
         assertEquals("Mann",				res.at("/query/operands/1/wrap/key").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
 
         query = "\"Mann\" & node & #2 >[func=\"SB\"] #1";  //coordinates the func=SB term and requires a "c"-layer term (consituency relation/dominance)
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:termGroup",		res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:termGroup",		res.at("/query/relation/wrap/@type").asText());
         assertEquals("relation:and",		res.at("/query/relation/wrap/relation").asText());
         assertEquals("c",					res.at("/query/relation/wrap/operands/1/layer").asText());
         assertEquals("func",				res.at("/query/relation/wrap/operands/0/layer").asText());
@@ -243,8 +243,8 @@
         query = "cat=\"S\" & node & #1 >[func=\"SB\" func=\"MO\"] #2";  // quite meaningless (function is subject and modifier), but this is allowed by Annis, however its backend only regards the 1st option
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
-        assertEquals("korap:termGroup",		res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:termGroup",		res.at("/query/relation/wrap/@type").asText());
         assertEquals("relation:and",		res.at("/query/relation/wrap/relation").asText());
         assertEquals("func",				res.at("/query/relation/wrap/operands/0/layer").asText());
         assertEquals("SB",					res.at("/query/relation/wrap/operands/0/key").asText());
@@ -258,14 +258,14 @@
         assertEquals("operation:position",	res.at("/query/operation").asText());
         assertEquals("operation:relation",	res.at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith",	res.at("/query/frames/0").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("S",					res.at("/query/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(130,				    res.at("/query/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:span",			res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("NP",					res.at("/query/operands/0/operands/1/operands/0/key").asText());
-        assertEquals("korap:reference",		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operands/1/operation").asText());
         assertEquals(130,				    res.at("/query/operands/1/classRef/0").asInt());
 
@@ -275,14 +275,14 @@
         assertEquals("operation:position",	res.at("/query/operation").asText());
         assertEquals("operation:relation",	res.at("/query/operands/0/operation").asText());
         assertEquals("frames:endsWith",		res.at("/query/frames/0").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("S",					res.at("/query/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(130,					res.at("/query/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:span",			res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("NP",					res.at("/query/operands/0/operands/1/operands/0/key").asText());
-        assertEquals("korap:reference",		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operands/1/operation").asText());
         assertEquals(130,					res.at("/query/operands/1/classRef/0").asInt());
     }
@@ -292,14 +292,14 @@
         query = "node & node & #1 >2,4 #2";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:relation",		res.at("/query/relation/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/relation/@type").asText());
         assertEquals(2,						res.at("/query/relation/boundary/min").asInt());
         assertEquals(4,						res.at("/query/relation/boundary/max").asInt());
-        assertEquals("korap:term",			res.at("/query/relation/wrap/@type").asText());
+        assertEquals("koral:term",			res.at("/query/relation/wrap/@type").asText());
         assertEquals("c",					res.at("/query/relation/wrap/layer").asText());
 
         query = "node & node & #1 >* #2";  
@@ -315,36 +315,36 @@
         query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";  
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operation").asText());
-        assertEquals("korap:reference",		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,   			    res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",	res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:relation",		res.at("/query/operands/0/operands/0/relation/@type").asText());
+        assertEquals("koral:relation",		res.at("/query/operands/0/operands/0/relation/@type").asText());
         assertEquals("c",					res.at("/query/operands/0/operands/0/relation/wrap/layer").asText());
-        assertEquals("korap:span",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("c",					res.at("/query/operands/0/operands/0/operands/0/layer").asText());
         assertEquals("CP",					res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,   			    res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("VP",					res.at("/query/operands/0/operands/0/operands/1/operands/0/key").asText());
     }
     //		query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";
     //		String dom1 = 
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //							"{@type=korap:group, operation=operation:relation, operands=[" +
-    //								"{@type=korap:span, layer=cat, key=CP, match=match:eq}," +
-    //								"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //									"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //						"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //							"{@type=koral:group, operation=operation:relation, operands=[" +
+    //								"{@type=koral:span, layer=cat, key=CP, match=match:eq}," +
+    //								"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //									"{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
     //								"]}" +
-    //							"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //							"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //						"]}," +
-    //						"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
-    //				"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
+    //						"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
+    //				"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
     //				"}";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -352,24 +352,24 @@
     //		
     //		query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & cat=\"DP\" & #1 > #2 > #3 > #4";
     //		String dom2 = 
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //						"{@type=korap:reference, operation=operation:focus, classRef=[1], operands=[" +
-    //							"{@type=korap:group, operation=operation:relation, operands=[" +
-    //								"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //									"{@type=korap:group, operation=operation:relation, operands=[" +
-    //										"{@type=korap:span, layer=cat, key=CP, match=match:eq}," +
-    //										"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //											"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //						"{@type=koral:reference, operation=operation:focus, classRef=[1], operands=[" +
+    //							"{@type=koral:group, operation=operation:relation, operands=[" +
+    //								"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //									"{@type=koral:group, operation=operation:relation, operands=[" +
+    //										"{@type=koral:span, layer=cat, key=CP, match=match:eq}," +
+    //										"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //											"{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
     //										"]}" +
-    //									"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //									"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //								"]}," +
-    //								"{@type=korap:group, operation=operation:class, class=2, classOut=2, operands=[" +
-    //									"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
+    //								"{@type=koral:group, operation=operation:class, class=2, classOut=2, operands=[" +
+    //									"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
     //								"]}" +
-    //							"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //							"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //						"]}," +
-    //						"{@type=korap:span, layer=cat, key=DP, match=match:eq}" +
-    //					"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
+    //						"{@type=koral:span, layer=cat, key=DP, match=match:eq}" +
+    //					"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
     //				"}";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -380,10 +380,10 @@
     //	public void testPointingRelations() throws Exception {
     //		query = "node & node & #2 ->coref[val=\"true\"] #1";
     //		String dom1 = 
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //						"{@type=korap:span}," +
-    //						"{@type=korap:span}" +
-    //				"], relation={@type=korap:relation, wrap={@type=korap:term, layer=coref, key=true, match=match:eq}}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //						"{@type=koral:span}," +
+    //						"{@type=koral:span}" +
+    //				"], relation={@type=koral:relation, wrap={@type=koral:term, layer=coref, key=true, match=match:eq}}" +
     //				"}";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -391,10 +391,10 @@
     //		
     //		query = "node & node & #2 ->mate/coref[val=\"true\"] #1";
     //		String dom2 = 
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //						"{@type=korap:span}," +
-    //						"{@type=korap:span}" +
-    //				"], relation={@type=korap:relation, wrap={@type=korap:term, foundry=mate, layer=coref, key=true, match=match:eq}}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //						"{@type=koral:span}," +
+    //						"{@type=koral:span}" +
+    //				"], relation={@type=koral:relation, wrap={@type=koral:term, foundry=mate, layer=coref, key=true, match=match:eq}}" +
     //				"}";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -406,7 +406,7 @@
         query = "tok=\"der\" & tok=\"die\" & #1 . #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
         assertEquals("der",                 res.at("/query/operands/0/wrap/key").asText());
         assertEquals("die",                 res.at("/query/operands/1/wrap/key").asText());
@@ -416,21 +416,21 @@
         query = "tok=\"der\" & tok=\"die\" & #1 .2,3 #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
         assertEquals("der",                 res.at("/query/operands/0/wrap/key").asText());
         assertEquals("die",                 res.at("/query/operands/1/wrap/key").asText());
         assertEquals(true,                  res.at("/query/inOrder").asBoolean());
         assertEquals(true,                  res.at("/query/operands/2").isMissingNode());
-        assertEquals("korap:distance",      res.at("/query/distances/0/@type").asText());
-        assertEquals("korap:boundary",      res.at("/query/distances/0/boundary/@type").asText());
+        assertEquals("koral:distance",      res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:boundary",      res.at("/query/distances/0/boundary/@type").asText());
         assertEquals(2,                     res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(3,                     res.at("/query/distances/0/boundary/max").asInt());
 
         query = "tok=\"der\" & tok=\"die\" & #1 .* #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:boundary",      res.at("/query/distances/0/boundary/@type").asText());
+        assertEquals("koral:boundary",      res.at("/query/distances/0/boundary/@type").asText());
         assertEquals(0,                     res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(true,                  res.at("/query/distances/0/boundary/max").isMissingNode());
     }
@@ -440,7 +440,7 @@
         query = "tok=\"der\" & tok=\"die\" & #1 ^ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
         assertEquals("der",                 res.at("/query/operands/0/wrap/key").asText());
         assertEquals("die",                 res.at("/query/operands/1/wrap/key").asText());
@@ -450,21 +450,21 @@
         query = "tok=\"der\" & tok=\"die\" & #1 ^2,3 #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
         assertEquals("der",                 res.at("/query/operands/0/wrap/key").asText());
         assertEquals("die",                 res.at("/query/operands/1/wrap/key").asText());
         assertEquals(false,                 res.at("/query/inOrder").asBoolean());
         assertEquals(true,                  res.at("/query/operands/2").isMissingNode());
-        assertEquals("korap:distance",      res.at("/query/distances/0/@type").asText());
-        assertEquals("korap:boundary",      res.at("/query/distances/0/boundary/@type").asText());
+        assertEquals("koral:distance",      res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:boundary",      res.at("/query/distances/0/boundary/@type").asText());
         assertEquals(2,                     res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(3,                     res.at("/query/distances/0/boundary/max").asInt());
 
         query = "tok=\"der\" & tok=\"die\" & #1 ^* #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:boundary",      res.at("/query/distances/0/boundary/@type").asText());
+        assertEquals("koral:boundary",      res.at("/query/distances/0/boundary/@type").asText());
         assertEquals(0,                     res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(true,                  res.at("/query/distances/0/boundary/max").isMissingNode());
         assertEquals(false,                 res.at("/query/inOrder").asBoolean());
@@ -476,9 +476,9 @@
         query = "tok=\"a\" & tok=\"b\" & tok=\"c\" & #1 . #2 & #2 . #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
         assertEquals(res.at("/query/operands/0/classRef/0").asInt(), 
                 res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
@@ -488,18 +488,18 @@
     //		
     //		query = "node & node & node & #1 . #2 .1,3 #3";
     //		String seq5 = 
-    //				"{@type=korap:group, operation=operation:sequence, operands=[" +
-    //						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //							"{@type=korap:group, operation=operation:sequence, operands=[" +
-    //								"{@type=korap:span}," +
-    //								"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //									"{@type=korap:span}" +
+    //				"{@type=koral:group, operation=operation:sequence, operands=[" +
+    //						"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //							"{@type=koral:group, operation=operation:sequence, operands=[" +
+    //								"{@type=koral:span}," +
+    //								"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //									"{@type=koral:span}" +
     //								"]} "+
     //							"], inOrder=true}" +
     //						"]}," +
-    //						"{@type=korap:span}" +
+    //						"{@type=koral:span}" +
     //					"], distances=[" +
-    //							"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=3}, min=1, max=3}" +
+    //							"{@type=koral:distance, key=w, boundary={@type=koral:boundary, min=1, max=3}, min=1, max=3}" +
     //						"], inOrder=true" +
     //				"}";
     //		aqlt = new AqlTree(query);
@@ -508,27 +508,27 @@
     //		
     //		query = "tok=\"Sonne\" & tok=\"Mond\" & tok=\"Sterne\" & tok=\"Himmel\" & #1 .0,2 #2 .0,4 #3 . #4";
     //		String seq6 = 
-    //				"{@type=korap:group, operation=operation:sequence, operands=[" +
-    //					"{@type=korap:reference, operation=operation:focus, classRef=[1], operands=[" +
-    //						"{@type=korap:group, operation=operation:sequence, operands=[" +
-    //							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //								"{@type=korap:group, operation=operation:sequence, operands=[" +
-    //									"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sonne, match=match:eq}}," +
-    //									"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //										"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mond, match=match:eq}}" +
+    //				"{@type=koral:group, operation=operation:sequence, operands=[" +
+    //					"{@type=koral:reference, operation=operation:focus, classRef=[1], operands=[" +
+    //						"{@type=koral:group, operation=operation:sequence, operands=[" +
+    //							"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //								"{@type=koral:group, operation=operation:sequence, operands=[" +
+    //									"{@type=koral:token, wrap={@type=koral:term, layer=orth, key=Sonne, match=match:eq}}," +
+    //									"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //										"{@type=koral:token, wrap={@type=koral:term, layer=orth, key=Mond, match=match:eq}}" +
     //									"]}" +
     //								"], distances=[" +
-    //									"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=0, max=2}, min=0, max=2}" +
+    //									"{@type=koral:distance, key=w, boundary={@type=koral:boundary, min=0, max=2}, min=0, max=2}" +
     //								"], inOrder=true}" +
     //							"]}," +	
-    //							"{@type=korap:group, operation=operation:class, class=2, classOut=2, operands=[" +
-    //								"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sterne, match=match:eq}}" +
+    //							"{@type=koral:group, operation=operation:class, class=2, classOut=2, operands=[" +
+    //								"{@type=koral:token, wrap={@type=koral:term, layer=orth, key=Sterne, match=match:eq}}" +
     //							"]}" +
     //						"],distances=[" +
-    //							"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=0, max=4}, min=0, max=4}" +
+    //							"{@type=koral:distance, key=w, boundary={@type=koral:boundary, min=0, max=4}, min=0, max=4}" +
     //						"], inOrder=true}" +
     //					"]}," +
-    //					"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Himmel, match=match:eq}}" +
+    //					"{@type=koral:token, wrap={@type=koral:term, layer=orth, key=Himmel, match=match:eq}}" +
     //				"], inOrder=true}" ;
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -548,15 +548,15 @@
         // the resulting query should be equivalent to PQ+:  focus(2:dominates(focus(1:{1:<A>}<B>),{2:<C>}))<D> 
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operands/0/operands/0/operation").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals("A",                   res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/key").asText());
@@ -568,15 +568,15 @@
         // the resulting query should be equivalent to PQ+:   focus(3:dominates(focus(2:dominates(focus(1:{1:<A>}<B>),{2:<C>}))<D>,{3:<E>}))<F> 
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operands/0/operands/0/operation").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals("A",                   res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/key").asText());
@@ -599,16 +599,16 @@
         query = "tok=\"Sonne\" & tok=\"Mond\" & tok=\"Sterne\" & #1 > #2 .0,4 #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("Sonne",               res.at("/query/operands/0/operands/0/operands/0/wrap/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("Mond",                res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
@@ -620,16 +620,16 @@
         query = "tok=\"Sonne\" & tok=\"Mond\" & #1 > #2 .0,4  tok=\"Sterne\"";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("Sonne",               res.at("/query/operands/0/operands/0/operands/0/wrap/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("Mond",                res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
@@ -641,23 +641,23 @@
         query = "cat=\"NP\" & cat=\"VP\" & cat=\"PP\" & #1 $ #2 > #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(130,                   res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("NP",                  res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/1/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(130,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("VP",                  res.at("/query/operands/0/operands/0/operands/1/operands/0/key").asText());
@@ -669,22 +669,22 @@
         query = "cat=\"NP\" > cat=\"VP\" & #1 _l_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:position",  res.at("/query/operation").asText());
         assertEquals("frames:startsWith",   res.at("/query/frames/0").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("NP",                  res.at("/query/operands/0/operands/0/operands/0/operands/0/key").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(130,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("VP",                  res.at("/query/operands/0/operands/0/operands/1/operands/0/key").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/1/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/1/operation").asText());
         assertEquals(130,                   res.at("/query/operands/1/classRef/0").asInt());
 
@@ -694,49 +694,49 @@
         query = "node & node & #1 _=_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:position",  res.at("/query/operation").asText());
         assertEquals("frames:matches",      res.at("/query/frames/0").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
 
         query = "node & node & #1 _i_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:isAround",     res.at("/query/frames/0").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
 
         query = "node & node & #1 _l_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:startsWith",   res.at("/query/frames/0").asText());
         assertEquals("frames:matches",      res.at("/query/frames/1").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
 
         query = "node & node & #1 _r_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:endsWith",     res.at("/query/frames/0").asText());
         assertEquals("frames:matches",      res.at("/query/frames/1").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
 
         query = "node & \"Mann\" & #1 _r_ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:endsWith",     res.at("/query/frames/0").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:token",         res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/1/@type").asText());
         assertEquals("Mann",                res.at("/query/operands/1/wrap/key").asText());
 
         query = "node & \"Mann\" & #2 _r_ #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:endsWith",     res.at("/query/frames/0").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:token",         res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/0/@type").asText());
         assertEquals("Mann",                res.at("/query/operands/0/wrap/key").asText());
 
         query = "node & cat=\"VP\" & cat=\"NP\" & #1 _r_ #2 & #2 _l_ #3";
@@ -746,8 +746,8 @@
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("frames:endsWith",     res.at("/query/operands/0/operands/0/frames/0").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/operands/0/operands/0/@type").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("VP",                  res.at("/query/operands/0/operands/0/operands/1/operands/0/key").asText());
@@ -758,24 +758,24 @@
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:overlapsLeft",     res.at("/query/frames/0").asText());
         assertEquals("frames:overlapsRight",    res.at("/query/frames/1").asText());
-        assertEquals("korap:span",              res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:token",             res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",              res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",             res.at("/query/operands/0/@type").asText());
         assertEquals("Mann",                    res.at("/query/operands/0/wrap/key").asText());
 
         query = "node & \"Mann\" & #2 _ol_ #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:overlapsLeft",     res.at("/query/frames/0").asText());
-        assertEquals("korap:span",              res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:token",             res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",              res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",             res.at("/query/operands/0/@type").asText());
         assertEquals("Mann",                    res.at("/query/operands/0/wrap/key").asText());
 
         query = "node & \"Mann\" & #2 _or_ #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("frames:overlapsRight",    res.at("/query/frames/0").asText());
-        assertEquals("korap:span",              res.at("/query/operands/1/@type").asText());
-        assertEquals("korap:token",             res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",              res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",             res.at("/query/operands/0/@type").asText());
         assertEquals("Mann",                    res.at("/query/operands/0/wrap/key").asText());
     }
 
@@ -789,10 +789,10 @@
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("operation:sequence",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("p",                   res.at("/query/operands/0/operands/0/operands/0/wrap/layer").asText());
         assertEquals("N",                   res.at("/query/operands/0/operands/0/operands/0/wrap/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,                   res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("V",                   res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
@@ -805,10 +805,10 @@
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                     res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("operation:sequence",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("p",                   res.at("/query/operands/0/operands/0/operands/0/wrap/layer").asText());
         assertEquals("N",                   res.at("/query/operands/0/operands/0/operands/0/wrap/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,                     res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("V",                   res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
@@ -854,21 +854,21 @@
         query = "node & #1:tokenarity=2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",      res.at("/query/@type").asText());
-        assertEquals("korap:term",      res.at("/query/attr/@type").asText());
-        assertEquals("korap:boundary",  res.at("/query/attr/tokenarity/@type").asText());
+        assertEquals("koral:span",      res.at("/query/@type").asText());
+        assertEquals("koral:term",      res.at("/query/attr/@type").asText());
+        assertEquals("koral:boundary",  res.at("/query/attr/tokenarity/@type").asText());
         assertEquals(2,                 res.at("/query/attr/tokenarity/min").asInt());
         assertEquals(2,                 res.at("/query/attr/tokenarity/max").asInt());
 
         query = "cnx/cat=\"NP\" & #1:tokenarity=2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",      res.at("/query/@type").asText());
+        assertEquals("koral:span",      res.at("/query/@type").asText());
         assertEquals("cnx",             res.at("/query/foundry").asText());
         assertEquals("c",               res.at("/query/layer").asText());
         assertEquals("NP",              res.at("/query/key").asText());
-        assertEquals("korap:term",      res.at("/query/attr/@type").asText());
-        assertEquals("korap:boundary",  res.at("/query/attr/tokenarity/@type").asText());
+        assertEquals("koral:term",      res.at("/query/attr/@type").asText());
+        assertEquals("koral:boundary",  res.at("/query/attr/tokenarity/@type").asText());
         assertEquals(2,                 res.at("/query/attr/tokenarity/min").asInt());
         assertEquals(2,                 res.at("/query/attr/tokenarity/max").asInt());
 
@@ -881,43 +881,43 @@
         query = "cnx/cat=\"NP\" & #1:root";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",      res.at("/query/@type").asText());
+        assertEquals("koral:span",      res.at("/query/@type").asText());
         assertEquals("cnx",             res.at("/query/foundry").asText());
         assertEquals("c",               res.at("/query/layer").asText());
         assertEquals("NP",              res.at("/query/key").asText());
         assertEquals("match:eq",        res.at("/query/match").asText());
-        assertEquals("korap:term",      res.at("/query/attr/@type").asText());
+        assertEquals("koral:term",      res.at("/query/attr/@type").asText());
         assertEquals(true,              res.at("/query/attr/root").asBoolean());
         
         query = "cnx/cat=\"NP\" & #1:root & #1:arity=2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",      res.at("/query/@type").asText());
+        assertEquals("koral:span",      res.at("/query/@type").asText());
         assertEquals("cnx",             res.at("/query/foundry").asText());
         assertEquals("c",               res.at("/query/layer").asText());
         assertEquals("NP",              res.at("/query/key").asText());
-        assertEquals("korap:termGroup", res.at("/query/attr/@type").asText());
-        assertEquals("korap:term",      res.at("/query/attr/operands/0/@type").asText());
+        assertEquals("koral:termGroup", res.at("/query/attr/@type").asText());
+        assertEquals("koral:term",      res.at("/query/attr/operands/0/@type").asText());
         assertEquals(true,              res.at("/query/attr/operands/0/root").asBoolean());
-        assertEquals("korap:term",      res.at("/query/attr/operands/1/@type").asText());
-        assertEquals("korap:boundary",  res.at("/query/attr/operands/1/arity/@type").asText());
+        assertEquals("koral:term",      res.at("/query/attr/operands/1/@type").asText());
+        assertEquals("koral:boundary",  res.at("/query/attr/operands/1/arity/@type").asText());
         assertEquals(2,                 res.at("/query/attr/operands/1/arity/min").asInt());
         assertEquals(2,                 res.at("/query/attr/operands/1/arity/max").asInt());
         
         query = "cnx/cat=\"NP\" & node & #1>#2 & #1:tokenarity=2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",     res.at("/query/@type").asText());
+        assertEquals("koral:group",     res.at("/query/@type").asText());
         assertEquals("operation:relation",     res.at("/query/operation").asText());
-        assertEquals("korap:span",      res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",      res.at("/query/operands/0/@type").asText());
         assertEquals("cnx",             res.at("/query/operands/0/foundry").asText());
         assertEquals("c",               res.at("/query/operands/0/layer").asText());
         assertEquals("NP",              res.at("/query/operands/0/key").asText());
-        assertEquals("korap:term",      res.at("/query/operands/0/attr/@type").asText());
-        assertEquals("korap:boundary",  res.at("/query/operands/0/attr/tokenarity/@type").asText());
+        assertEquals("koral:term",      res.at("/query/operands/0/attr/@type").asText());
+        assertEquals("koral:boundary",  res.at("/query/operands/0/attr/tokenarity/@type").asText());
         assertEquals(2,                 res.at("/query/operands/0/attr/tokenarity/min").asInt());
         assertEquals(2,                 res.at("/query/operands/0/attr/tokenarity/max").asInt());
-        assertEquals("korap:span",      res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",      res.at("/query/operands/1/@type").asText());
 
     }
 
@@ -926,34 +926,34 @@
         query = "cat=\"NP\" & cat=\"VP\" & #1 $ #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                     res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,                     res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals(true,                  res.at("/query/operands/0/operands/0/operands/0/operands/0/key").isMissingNode());
-        assertEquals("korap:span",          res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("NP",                  res.at("/query/operands/0/operands/0/operands/1/key").asText());
         assertEquals("c",                   res.at("/query/operands/0/operands/0/operands/1/layer").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
         assertEquals("VP",                  res.at("/query/operands/1/key").asText());
         assertEquals("c",                   res.at("/query/operands/1/layer").asText());
         
         query = "cat=\"NP\" & cat=\"VP\" & cat=\"PP\" & #1 $ #2 $ #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operation").asText());
-        assertEquals("korap:reference",     res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:reference",     res.at("/query/operands/0/@type").asText());
         assertEquals("operation:focus",     res.at("/query/operands/0/operation").asText());
         assertEquals(129,                     res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("korap:group",         res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:relation",  res.at("/query/operands/0/operands/0/operation").asText());
     }
     
@@ -962,12 +962,12 @@
         query = "cat=\"NP\" | cat=\"VP\"";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:disjunction",  res.at("/query/operation").asText());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
         assertEquals("NP",                  res.at("/query/operands/0/key").asText());
         assertEquals("c",                   res.at("/query/operands/0/layer").asText());
-        assertEquals("korap:span",          res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/1/@type").asText());
         assertEquals("VP",                  res.at("/query/operands/1/key").asText());
         assertEquals("c",                   res.at("/query/operands/1/layer").asText());
     }
@@ -975,23 +975,23 @@
     //		
     //		query = "cat=\"NP\" & cat=\"VP\" & cat=\"PP\" & #1 $ #2 $ #3";
     //		String cp2 =
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //					"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //						"{@type=korap:group, operation=operation:relation, operands=[" +
-    //							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //								"{@type=korap:group, operation=operation:relation, operands=[" +
-    //									"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //										"{@type=korap:span}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //					"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //						"{@type=koral:group, operation=operation:relation, operands=[" +
+    //							"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //								"{@type=koral:group, operation=operation:relation, operands=[" +
+    //									"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //										"{@type=koral:span}" +
     //									"]}," +
-    //									"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
-    //								"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //									"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
+    //								"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //							"]}," +
-    //							"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
-    //						"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
+    //							"{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
+    //						"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
     //						"}" +
     //					"]}," +
-    //					"{@type=korap:span, layer=cat, key=PP, match=match:eq}" +
-    //				"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
+    //					"{@type=koral:span, layer=cat, key=PP, match=match:eq}" +
+    //				"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
     //				"}";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
@@ -999,27 +999,27 @@
     //		
     //		query = "cat=\"NP\" & cat=\"VP\" & cat=\"PP\" & cat=\"CP\" & #1 $ #2 $ #3 $ #4";
     //		String cp3 =
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //					"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //						"{@type=korap:group, operation=operation:relation, operands=[" +
-    //							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //								"{@type=korap:group, operation=operation:relation, operands=[" +
-    //									"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //										"{@type=korap:group, operation=operation:relation, operands=[" +
-    //											"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //												"{@type=korap:span}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //					"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //						"{@type=koral:group, operation=operation:relation, operands=[" +
+    //							"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //								"{@type=koral:group, operation=operation:relation, operands=[" +
+    //									"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //										"{@type=koral:group, operation=operation:relation, operands=[" +
+    //											"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //												"{@type=koral:span}" +
     //											"]}," +
-    //											"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
-    //										"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //											"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
+    //										"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //									"]}," +
-    //									"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
-    //								"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //									"{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
+    //								"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //							"]}," +
-    //							"{@type=korap:span, layer=cat, key=PP, match=match:eq}" +
-    //						"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
+    //							"{@type=koral:span, layer=cat, key=PP, match=match:eq}" +
+    //						"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
     //					"]}," +
-    //					"{@type=korap:span, layer=cat, key=CP, match=match:eq}" +
-    //				"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
+    //					"{@type=koral:span, layer=cat, key=CP, match=match:eq}" +
+    //				"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
     //				"}" +
     //				"";
     //		aqlt = new AqlTree(query);
@@ -1028,17 +1028,17 @@
     //		
     //		query = "cat=\"NP\" & cat=\"VP\" & #1 $* #2";
     //		String cp4 =
-    //				"{@type=korap:group, operation=operation:relation, operands=[" +
-    //						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //							"{@type=korap:group, operation=operation:relation, operands=[" +
-    //								"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //									"{@type=korap:span}" +
+    //				"{@type=koral:group, operation=operation:relation, operands=[" +
+    //						"{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
+    //							"{@type=koral:group, operation=operation:relation, operands=[" +
+    //								"{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
+    //									"{@type=koral:span}" +
     //								"]}," +
-    //								"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
-    //							"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c},boundary={@type=korap:boundary,min=1}}}" +
+    //								"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
+    //							"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c},boundary={@type=koral:boundary,min=1}}}" +
     //						"]}," +
-    //						"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
-    //					"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c},boundary={@type=korap:boundary,min=1}}}" +
+    //						"{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
+    //					"], relation={@type=koral:relation, wrap={@type=koral:term, layer=c},boundary={@type=koral:boundary,min=1}}}" +
     //					"";
     //		aqlt = new AqlTree(query);
     //		map = aqlt.getRequestMap().get("query").toString();
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessorTest.java
index 4a485f6..2f40075 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessorTest.java
@@ -39,7 +39,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/key").asText());
 		assertEquals("politik", 		res.at("/collection/value").asText());
 		assertEquals("match:eq", 		res.at("/collection/match").asText());
@@ -48,7 +48,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/key").asText());
 		assertEquals("politik", 		res.at("/collection/value").asText());
 		assertEquals("match:ne", 		res.at("/collection/match").asText());
@@ -60,7 +60,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("title", 			res.at("/collection/key").asText());
 		assertEquals("Mannheim", 		res.at("/collection/value").asText());
 		assertEquals("match:contains",  res.at("/collection/match").asText());
@@ -69,7 +69,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("title",	 		res.at("/collection/key").asText());
 		assertEquals("IDS Mannheim",	res.at("/collection/value").asText());
 		assertEquals("match:contains",	res.at("/collection/match").asText());
@@ -81,13 +81,13 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/type").asText());
@@ -97,13 +97,13 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/value").asText());
 		assertEquals(true,				res.at("/collection/operands/1/type").isMissingNode());
@@ -117,20 +117,20 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:docGroup", 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/operands/0/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/operands/0/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/operands/0/type").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("corpusId", 		res.at("/collection/operands/1/operands/1/key").asText());
 		assertEquals("WPD",				res.at("/collection/operands/1/operands/1/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/1/match").asText());
@@ -141,13 +141,13 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/type").asText());
@@ -160,20 +160,20 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:docGroup", 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/operands/0/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/operands/0/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/operands/0/type").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("corpusId", 		res.at("/collection/operands/1/operands/1/key").asText());
 		assertEquals("WPD",				res.at("/collection/operands/1/operands/1/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/1/match").asText());
@@ -185,20 +185,20 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:docGroup", 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/operands/0/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/operands/0/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/operands/0/type").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("corpusId", 		res.at("/collection/operands/1/operands/1/key").asText());
 		assertEquals("WPD",				res.at("/collection/operands/1/operands/1/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/1/match").asText());
@@ -207,20 +207,20 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/@type").asText());
 		assertEquals("textClass", 		res.at("/collection/operands/0/key").asText());
 		assertEquals("Sport",			res.at("/collection/operands/0/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/0/match").asText());
-		assertEquals("korap:docGroup", 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("pubDate",	 		res.at("/collection/operands/1/operands/0/key").asText());
 		assertEquals("2014",			res.at("/collection/operands/1/operands/0/value").asText());
 		assertEquals("type:date",		res.at("/collection/operands/1/operands/0/type").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/0/match").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("corpusId", 		res.at("/collection/operands/1/operands/1/key").asText());
 		assertEquals("WPD",				res.at("/collection/operands/1/operands/1/value").asText());
 		assertEquals("match:eq",		res.at("/collection/operands/1/operands/1/match").asText());
@@ -229,62 +229,62 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/0/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operands/0/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
-		assertEquals("korap:doc",	 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
+		assertEquals("koral:doc",	 	res.at("/collection/operands/1/@type").asText());
 		
 		collection = "(textClass=Sport & pubDate in 2014) & corpusId=WPD";
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/0/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/0/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
-		assertEquals("korap:doc",	 	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
+		assertEquals("koral:doc",	 	res.at("/collection/operands/1/@type").asText());
 		
 		collection = "(textClass=Sport & textClass=ausland) | (corpusID=WPD & author=White)";
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/0/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/0/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
 		assertEquals("Sport",	 		res.at("/collection/operands/0/operands/0/value").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
 		assertEquals("ausland",	 		res.at("/collection/operands/0/operands/1/value").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("WPD",		 		res.at("/collection/operands/1/operands/0/value").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("White",	 		res.at("/collection/operands/1/operands/1/value").asText());
 		
 		collection = "(textClass=Sport & textClass=ausland) | (corpusID=WPD & author=White & pubDate in 2000)";
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:docGroup", 	res.at("/collection/@type").asText());
+		assertEquals("koral:docGroup", 	res.at("/collection/@type").asText());
 		assertEquals("operation:or",	res.at("/collection/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/0/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/0/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/0/operation").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/1/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operation").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/0/@type").asText());
 		assertEquals("Sport",	 		res.at("/collection/operands/0/operands/0/value").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/0/operands/1/@type").asText());
 		assertEquals("ausland",	 		res.at("/collection/operands/0/operands/1/value").asText());
-		assertEquals("korap:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/operands/1/operands/0/@type").asText());
 		assertEquals("WPD",		 		res.at("/collection/operands/1/operands/0/value").asText());
-		assertEquals("korap:docGroup",	res.at("/collection/operands/1/operands/1/@type").asText());
+		assertEquals("koral:docGroup",	res.at("/collection/operands/1/operands/1/@type").asText());
 		assertEquals("operation:and",	res.at("/collection/operands/1/operands/1/operation").asText());
 		assertEquals("White",	 		res.at("/collection/operands/1/operands/1/operands/0/value").asText());
 		assertEquals("2000",	 		res.at("/collection/operands/1/operands/1/operands/1/value").asText());
@@ -296,7 +296,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000",	 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
@@ -306,7 +306,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000",	 		res.at("/collection/value").asText());
 		assertEquals(true, 				res.at("/collection/type").isMissingNode());
@@ -316,7 +316,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000",	 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
@@ -326,7 +326,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000",	 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
@@ -339,7 +339,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000-02",	 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
@@ -349,7 +349,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000-12",	 		res.at("/collection/value").asText());
 		assertEquals(true, 				res.at("/collection/type").isMissingNode());
@@ -359,7 +359,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000-02-01", 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
@@ -369,7 +369,7 @@
 		qs.setQuery(query,ql);
 		qs.setCollection(collection);
 		res = mapper.readTree(qs.toJSON());
-		assertEquals("korap:doc", 		res.at("/collection/@type").asText());
+		assertEquals("koral:doc", 		res.at("/collection/@type").asText());
 		assertEquals("pubDate", 		res.at("/collection/key").asText());
 		assertEquals("2000-01-01", 		res.at("/collection/value").asText());
 		assertEquals("type:date", 		res.at("/collection/type").asText());
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessorTest.java
index faabc82..d5cfcc4 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/Cosmas2QueryProcessorTest.java
@@ -43,8 +43,8 @@
         query = "der";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("der", 				res.at("/query/wrap/key").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -52,8 +52,8 @@
         query = "&Mann";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("Mann", 				res.at("/query/wrap/key").asText());
         assertEquals("lemma", 				res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -66,7 +66,7 @@
         query = "*der";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("type:wildcard",		res.at("/query/wrap/type").asText());
         assertEquals("*der", 				res.at("/query/wrap/key").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -83,7 +83,7 @@
         query = "$deutscher";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("deutscher",			res.at("/query/wrap/key").asText());
         assertEquals(true,					res.at("/query/wrap/caseInsensitive").asBoolean());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -92,9 +92,9 @@
         query = "$deutscher Bundestag";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:term", 			res.at("/query/operands/0/wrap/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/operands/0/wrap/@type").asText());
         assertEquals("deutscher",			res.at("/query/operands/0/wrap/key").asText());
         assertEquals(true,					res.at("/query/operands/0/wrap/caseInsensitive").asBoolean());
         assertEquals("orth", 				res.at("/query/operands/0/wrap/layer").asText());
@@ -108,8 +108,8 @@
         query = "MORPH(p=V)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("V",					res.at("/query/wrap/key").asText());
         assertEquals("p",					res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -117,16 +117,16 @@
         query = "MORPH(V)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("V",					res.at("/query/wrap/key").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
 
         query = "MORPH(tt/p=V)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("V",					res.at("/query/wrap/key").asText());
         assertEquals("p",					res.at("/query/wrap/layer").asText());
         assertEquals("tt",					res.at("/query/wrap/foundry").asText());
@@ -135,8 +135,8 @@
         query = "MORPH(tt/p=\"V.*\")";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",         res.at("/query/@type").asText());
-        assertEquals("korap:term",          res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",         res.at("/query/@type").asText());
+        assertEquals("koral:term",          res.at("/query/wrap/@type").asText());
         assertEquals("type:regex",          res.at("/query/wrap/type").asText());
         assertEquals("V.*",                 res.at("/query/wrap/key").asText());
         assertEquals("p",                   res.at("/query/wrap/layer").asText());
@@ -146,8 +146,8 @@
         query = "MORPH(mate/m=temp:pres)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			res.at("/query/@type").asText());
-        assertEquals("korap:term", 			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/@type").asText());
+        assertEquals("koral:term", 			res.at("/query/wrap/@type").asText());
         assertEquals("temp",				res.at("/query/wrap/key").asText());
         assertEquals("pres",				res.at("/query/wrap/value").asText());
         assertEquals("m",					res.at("/query/wrap/layer").asText());
@@ -157,8 +157,8 @@
         query = "MORPH(tt/p=V & mate/m!=temp:pres)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",			res.at("/query/@type").asText());
-        assertEquals("korap:termGroup",		res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/@type").asText());
+        assertEquals("koral:termGroup",		res.at("/query/wrap/@type").asText());
         assertEquals("V",					res.at("/query/wrap/operands/0/key").asText());
         assertEquals("p",					res.at("/query/wrap/operands/0/layer").asText());
         assertEquals("tt",					res.at("/query/wrap/operands/0/foundry").asText());
@@ -175,7 +175,7 @@
         query = "der Mann";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/1/wrap/key").asText());
@@ -184,7 +184,7 @@
         query = "der Mann schläft";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/1/wrap/key").asText());
@@ -194,7 +194,7 @@
         query = "der Mann schläft lang";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/1/wrap/key").asText());
@@ -205,28 +205,28 @@
         query = "der #ELEM(W)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("w",					res.at("/query/operands/1/key").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
         assertEquals(true,					res.at("/query/operands/2").isMissingNode());
 
         query = "der #ELEM(W) Mann";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("w",					res.at("/query/operands/1/key").asText());
-        assertEquals("korap:span",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span",			res.at("/query/operands/1/@type").asText());
         assertEquals("Mann",				res.at("/query/operands/2/wrap/key").asText());
         assertEquals(true,					res.at("/query/operands/3").isMissingNode());
 
         query = "der MORPH(p=ADJA) Mann";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("ADJA",				res.at("/query/operands/1/wrap/key").asText());
@@ -240,7 +240,7 @@
         query = "Sonne oder Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/wrap/key").asText());
@@ -249,9 +249,9 @@
         query = "(Sonne scheint) oder Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operation").asText());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("scheint",				res.at("/query/operands/0/operands/1/wrap/key").asText());
@@ -261,11 +261,11 @@
         query = "(Sonne scheint) oder (Mond scheint)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operation").asText());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/1/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("scheint",				res.at("/query/operands/0/operands/1/wrap/key").asText());
@@ -279,31 +279,31 @@
         query = "(Sonne oder Mond) und scheint";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operands/0/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/0/operands/1/wrap/key").asText());
-        assertEquals("korap:token",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/1/@type").asText());
         assertEquals("scheint",				res.at("/query/operands/1/wrap/key").asText());
 
         query = "scheint und (Sonne oder Mond)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/@type").asText());
         assertEquals("scheint",				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operands/1/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/1/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/operands/1/wrap/key").asText());
@@ -311,22 +311,22 @@
         query = "Regen und scheint und (Sonne oder Mond)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/@type").asText());
         assertEquals("Regen",				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/operands/1/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/operands/1/distances/0/key").asText());
         assertEquals(0,						res.at("/query/operands/1/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/operands/1/distances/0/max").asInt());
         assertEquals("scheint",				res.at("/query/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/1/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/operands/1/@type").asText());
         assertEquals("operation:disjunction",		res.at("/query/operands/1/operands/1/operation").asText());
         assertEquals("Sonne",				res.at("/query/operands/1/operands/1/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/operands/1/operands/1/wrap/key").asText());
@@ -337,30 +337,30 @@
         query = "Sonne nicht Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
         assertEquals(true,					res.at("/query/distances/0/exclude").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/@type").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/wrap/key").asText());
 
         query = "Sonne nicht Mond nicht Sterne";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
         assertEquals(true,					res.at("/query/distances/0/exclude").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/@type").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/1/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/operands/1/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/operands/1/distances/0/key").asText());
@@ -373,14 +373,14 @@
         query = "(Sonne nicht Mond) nicht Sterne";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/min").asInt());
         assertEquals(0,						res.at("/query/distances/0/max").asInt());
         assertEquals(true,					res.at("/query/distances/0/exclude").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operation").asText());
         assertEquals("cosmas:distance",		res.at("/query/operands/0/distances/0/@type").asText());
         assertEquals("t",					res.at("/query/operands/0/distances/0/key").asText());
@@ -389,7 +389,7 @@
         assertEquals(true,					res.at("/query/operands/0/distances/0/exclude").asBoolean());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/0/operands/1/wrap/key").asText());
-        assertEquals("korap:token",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/1/@type").asText());
         assertEquals("Sterne",				res.at("/query/operands/1/wrap/key").asText());
     }
 
@@ -398,27 +398,27 @@
         query = "Sonne /+w1:4 Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(1,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
         assertEquals(129,  					res.at("/query/operands/1/classOut").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/operands/0/wrap/key").asText());
 
         query = "Sonne /+w1:4,s0,p1:3 Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(1,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
@@ -428,18 +428,18 @@
         assertEquals(1,						res.at("/query/distances/2/boundary/min").asInt());
         assertEquals(3,						res.at("/query/distances/2/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
         assertEquals(129,  					res.at("/query/operands/1/classOut").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mond",				res.at("/query/operands/1/operands/0/wrap/key").asText());
 
         query = "Sonne /+w4 Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
@@ -447,7 +447,7 @@
         query = "Sonne /-w4 Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
@@ -457,7 +457,7 @@
         query = "Sonne /w4 Mond";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
@@ -471,14 +471,14 @@
         query = "Sonne /+w1:4 Mond /+w1:7 Sterne";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(1,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
         assertEquals("Sonne",				res.at("/query/operands/0/operands/0/wrap/key").asText());
@@ -502,14 +502,14 @@
         query = "Sonne /-w4 Mond /+w2 Sterne";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/distances/0/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/1/operation").asText());
         assertEquals(129,  					res.at("/query/operands/1/classOut").asInt());
         assertEquals("Sonne",				res.at("/query/operands/1/operands/0/wrap/key").asText());
@@ -530,49 +530,49 @@
         query = "wegen #IN <s>";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(130,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operation").asText());
         assertEquals("classRefCheck:includes",		res.at("/query/operands/0/classRefCheck/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals(true,							res.at("/query/operands/0/operands/0/frames/0").isMissingNode());
         assertEquals(129,  							res.at("/query/operands/0/classIn/0").asInt());
         assertEquals(130,  							res.at("/query/operands/0/classIn/1").asInt());
         assertEquals(131,                           res.at("/query/operands/0/classOut").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",					res.at("/query/operands/0/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",					res.at("/query/operands/0/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("wegen",						res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
 
         query = "wegen #IN(L) <s>";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",             res.at("/query/@type").asText());
+        assertEquals("koral:reference",             res.at("/query/@type").asText());
         assertEquals("operation:focus",             res.at("/query/operation").asText());
         assertEquals(130,                           res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",                 res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",                 res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",          res.at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith",           res.at("/query/operands/0/frames/0").asText());
         assertEquals("frames:matches",              res.at("/query/operands/0/frames/1").asText());
         assertEquals(true,                          res.at("/query/operands/0/frames/2").isMissingNode());
-        assertEquals("korap:group",                 res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",                 res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",             res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals(129,                           res.at("/query/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",                  res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",                  res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",                           res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",                 res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",                 res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",             res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(130,                           res.at("/query/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",                 res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",                 res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("wegen",                       res.at("/query/operands/0/operands/1/operands/0/wrap/key").asText());
 
         query = "wegen #IN(F) <s>";
@@ -637,28 +637,28 @@
         query = "wegen #OV <s>";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(130,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operation").asText());
         assertEquals("classRefCheck:intersects",	res.at("/query/operands/0/classRefCheck/0").asText());
         //		assertEquals("classRefOp:merge",            res.at("/query/operands/0/classRefOp").asText());
         assertEquals(131,                           res.at("/query/operands/0/classOut").asInt());
         assertEquals(129,                           res.at("/query/operands/0/classIn/0").asInt());
         assertEquals(130,                           res.at("/query/operands/0/classIn/1").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals(true,							res.at("/query/operands/0/operands/0/frames/0").isMissingNode());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",					res.at("/query/operands/0/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",					res.at("/query/operands/0/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("wegen",						res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
 
         query = "wegen #OV(L) <s>";
@@ -695,100 +695,100 @@
         query = "#BEG(der /w3:5 Mann)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",		res.at("/query/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operation").asText());
         assertEquals(0,						res.at("/query/spanRef/0").asInt());
         assertEquals(1,						res.at("/query/spanRef/1").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/0/distances/0/key").asText());
         assertEquals(3,						res.at("/query/operands/0/distances/0/boundary/min").asInt());
         assertEquals(5,						res.at("/query/operands/0/distances/0/boundary/max").asInt());
         assertEquals(false,					res.at("/query/operands/0/inOrder").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("der",					res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/0/operands/1/wrap/key").asText());
 
         query = "#BEG(der /w3:5 Mann) /+w10 kommt";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/distances/0/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
-        assertEquals("korap:reference",		res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals(0,						res.at("/query/operands/0/operands/0/spanRef/0").asInt());
         assertEquals(1,						res.at("/query/operands/0/operands/0/spanRef/1").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operands/0/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/0/operands/0/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/0/operands/0/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/0/operands/0/operands/0/distances/0/key").asText());
         assertEquals(3,						res.at("/query/operands/0/operands/0/operands/0/distances/0/boundary/min").asInt());
         assertEquals(5,						res.at("/query/operands/0/operands/0/operands/0/distances/0/boundary/max").asInt());
         assertEquals(false,					res.at("/query/operands/0/operands/0/operands/0/inOrder").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("der",					res.at("/query/operands/0/operands/0/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/0/operands/0/operands/0/operands/1/wrap/key").asText());
         assertEquals("operation:class",		res.at("/query/operands/1/operation").asText());
         assertEquals(129,  					res.at("/query/operands/1/classOut").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/1/operands/0/@type").asText());
         assertEquals("kommt",				res.at("/query/operands/1/operands/0/wrap/key").asText());
 
         query = "kommt /+w10 #BEG(der /w3:5 Mann)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(0,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/distances/0/boundary/max").asInt());
         assertEquals(true,					res.at("/query/inOrder").asBoolean());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/1/operation").asText());
         assertEquals(129,  					res.at("/query/operands/1/classOut").asInt());
-        assertEquals("korap:reference",		res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/operands/1/operands/0/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operands/1/operands/0/operation").asText());
         assertEquals(0,						res.at("/query/operands/1/operands/0/spanRef/0").asInt());
         assertEquals(1,						res.at("/query/operands/1/operands/0/spanRef/1").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/1/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/1/operands/0/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/1/operands/0/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/1/operands/0/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/1/operands/0/operands/0/distances/0/key").asText());
         assertEquals(3,						res.at("/query/operands/1/operands/0/operands/0/distances/0/boundary/min").asInt());
         assertEquals(5,						res.at("/query/operands/1/operands/0/operands/0/distances/0/boundary/max").asInt());
         assertEquals(false,					res.at("/query/operands/1/operands/0/operands/0/inOrder").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/1/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/1/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("der",					res.at("/query/operands/1/operands/0/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/1/operands/0/operands/0/operands/1/wrap/key").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("kommt",				res.at("/query/operands/0/operands/0/wrap/key").asText());
 
         query = "#END(der /w3:5 Mann)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",		res.at("/query/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operation").asText());
         assertEquals(-1,					res.at("/query/spanRef/0").asInt());
         assertEquals(1,						res.at("/query/spanRef/1").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/0/distances/0/key").asText());
         assertEquals(3,						res.at("/query/operands/0/distances/0/boundary/min").asInt());
         assertEquals(5,						res.at("/query/operands/0/distances/0/boundary/max").asInt());
         assertEquals(false,					res.at("/query/operands/0/inOrder").asBoolean());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("der",					res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mann",				res.at("/query/operands/0/operands/1/wrap/key").asText());
     }
@@ -798,15 +798,15 @@
         query = "#ELEM(S)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",		res.at("/query/@type").asText());
+        assertEquals("koral:span",		res.at("/query/@type").asText());
         assertEquals("s",				res.at("/query/key").asText());
 
         query = "#ELEM(W ANA=N)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",		res.at("/query/@type").asText());
+        assertEquals("koral:span",		res.at("/query/@type").asText());
         assertEquals("w",				res.at("/query/key").asText());
-        assertEquals("korap:term",		res.at("/query/attr/@type").asText());
+        assertEquals("koral:term",		res.at("/query/attr/@type").asText());
         assertEquals("N",				res.at("/query/attr/key").asText());
         assertEquals("p",				res.at("/query/attr/layer").asText());
         assertEquals("match:eq",		res.at("/query/attr/match").asText());
@@ -814,15 +814,15 @@
         query = "#ELEM(W ANA != 'N V')";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",		res.at("/query/@type").asText());
+        assertEquals("koral:span",		res.at("/query/@type").asText());
         assertEquals("w",				res.at("/query/key").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/relation").asText());
-        assertEquals("korap:term",		res.at("/query/attr/operands/0/@type").asText());
+        assertEquals("koral:term",		res.at("/query/attr/operands/0/@type").asText());
         assertEquals("N",				res.at("/query/attr/operands/0/key").asText());
         assertEquals("p",				res.at("/query/attr/operands/0/layer").asText());
         assertEquals("match:ne",		res.at("/query/attr/operands/0/match").asText());
-        assertEquals("korap:term",		res.at("/query/attr/operands/1/@type").asText());
+        assertEquals("koral:term",		res.at("/query/attr/operands/1/@type").asText());
         assertEquals("V",				res.at("/query/attr/operands/1/key").asText());
         assertEquals("p",				res.at("/query/attr/operands/1/layer").asText());
         assertEquals("match:ne",		res.at("/query/attr/operands/1/match").asText());
@@ -830,11 +830,11 @@
         query = "#ELEM(W ANA != 'N A V' Genre = Sport)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",		res.at("/query/@type").asText());
+        assertEquals("koral:span",		res.at("/query/@type").asText());
         assertEquals("w",				res.at("/query/key").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/relation").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/operands/0/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/operands/0/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/operands/0/relation").asText());
         assertEquals("N",				res.at("/query/attr/operands/0/operands/0/key").asText());
         assertEquals("A",				res.at("/query/attr/operands/0/operands/1/key").asText());
@@ -845,13 +845,13 @@
         query = "#ELEM(W ANA != 'N A V' Genre != 'Sport Politik')";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",		res.at("/query/@type").asText());
+        assertEquals("koral:span",		res.at("/query/@type").asText());
         assertEquals("w",				res.at("/query/key").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/relation").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/operands/0/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/operands/0/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/operands/0/relation").asText());
-        assertEquals("korap:termGroup",	res.at("/query/attr/operands/1/@type").asText());
+        assertEquals("koral:termGroup",	res.at("/query/attr/operands/1/@type").asText());
         assertEquals("relation:and",	res.at("/query/attr/operands/1/relation").asText());
         assertEquals("N",				res.at("/query/attr/operands/0/operands/0/key").asText());
         assertEquals("A",				res.at("/query/attr/operands/0/operands/1/key").asText());
@@ -868,11 +868,11 @@
         query = "#ALL(gehen /w1:10 voran)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("gehen",				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("voran",				res.at("/query/operands/1/wrap/key").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(1,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/distances/0/boundary/max").asInt());
@@ -880,16 +880,16 @@
         query = "#ALL(gehen /w1:10 (voran /w1:4 schnell))";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",			res.at("/query/@type").asText());
+        assertEquals("koral:group",			res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/distances/0/key").asText());
         assertEquals(1,						res.at("/query/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/distances/0/boundary/max").asInt());
         assertEquals("gehen",				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:group",			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/1/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/1/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/1/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/1/distances/0/key").asText());
         assertEquals(1,						res.at("/query/operands/1/distances/0/boundary/min").asInt());
         assertEquals(4,						res.at("/query/operands/1/distances/0/boundary/max").asInt());
@@ -904,48 +904,48 @@
         query = "#NHIT(gehen /w1:10 voran)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",		res.at("/query/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operation").asText());
         assertEquals(129,  					res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals("classRefOp:inversion",res.at("/query/operands/0/classRefOp").asText());
         assertEquals(130,  					res.at("/query/operands/0/classIn/0").asInt());
         assertEquals(131,  					res.at("/query/operands/0/classIn/1").asInt());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/0/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/0/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/0/operands/0/distances/0/key").asText());
         assertEquals(1,						res.at("/query/operands/0/operands/0/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/operands/0/operands/0/distances/0/boundary/max").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(130,  					res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
         assertEquals(131,  					res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",			res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("gehen",				res.at("/query/operands/0/operands/0/operands/0/operands/0/wrap/key").asText());
         assertEquals("voran",				res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
 
         query = "#NHIT(gehen /w1:10 voran /w1:10 Beispiel)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",		res.at("/query/@type").asText());
+        assertEquals("koral:reference",		res.at("/query/@type").asText());
         assertEquals("operation:focus",		res.at("/query/operation").asText());
         assertEquals(129,  					res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operation").asText());
         assertEquals("classRefOp:inversion",res.at("/query/operands/0/classRefOp").asText());
         assertEquals(130,  					res.at("/query/operands/0/classIn/0").asInt());
         assertEquals(131,  					res.at("/query/operands/0/classIn/1").asInt());
         assertEquals(129,  					res.at("/query/operands/0/classOut").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("korap:distance",		res.at("/query/operands/0/operands/0/distances/0/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/operands/0/operands/0/distances/0/@type").asText());
         assertEquals("w",					res.at("/query/operands/0/operands/0/distances/0/key").asText());
         assertEquals(1,						res.at("/query/operands/0/operands/0/distances/0/boundary/min").asInt());
         assertEquals(10,					res.at("/query/operands/0/operands/0/distances/0/boundary/max").asInt());
-        assertEquals("korap:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",			res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("operation:class",		res.at("/query/operands/0/operands/0/operands/0/operation").asText());
         assertEquals(130,  					res.at("/query/operands/0/operands/0/operands/0/classOut").asInt());
         assertEquals("gehen",				res.at("/query/operands/0/operands/0/operands/0/operands/0/wrap/key").asText());
@@ -964,40 +964,40 @@
         query = "#BED(der , sa)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/frames/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("der",							res.at("/query/operands/0/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/key").asText());
 
         query = "#BED(der Mann , +pe)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/frames/0").asText());
-        assertEquals("korap:reference",				res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals(-1,							res.at("/query/operands/0/operands/0/spanRef/0").asInt());
         assertEquals(1,								res.at("/query/operands/0/operands/0/spanRef/1").asInt());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("p",							res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:reference",				res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(0,								res.at("/query/operands/0/operands/1/spanRef/0").asInt());
         assertEquals(1,								res.at("/query/operands/0/operands/1/spanRef/1").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operands/0/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/1/operands/0/classOut").asInt());
         assertEquals("operation:sequence",			res.at("/query/operands/0/operands/1/operands/0/operands/0/operation").asText());
@@ -1007,32 +1007,32 @@
         query = "#BED(der Mann , sa,-pa)";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/frames/0").asText());
 
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/0/frames/0").asText());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("operation:sequence",			res.at("/query/operands/0/operands/0/operands/1/operands/0/operation").asText());
         assertEquals("der",							res.at("/query/operands/0/operands/0/operands/1/operands/0/operands/0/wrap/key").asText());
         assertEquals("Mann",						res.at("/query/operands/0/operands/0/operands/1/operands/0/operands/1/wrap/key").asText());
 
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/1/frames/0").asText());
         assertEquals(true,							res.at("/query/operands/0/operands/1/exclude").asBoolean());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("p",							res.at("/query/operands/0/operands/1/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/1/operands/1/classOut").asInt());
         assertEquals("operation:sequence",			res.at("/query/operands/0/operands/1/operands/1/operands/0/operation").asText());
@@ -1046,45 +1046,45 @@
         query = "der:sa";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/frames/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/1/classOut").asInt());
-        assertEquals("korap:token",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("der",							res.at("/query/operands/0/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/key").asText());
 
         query = "der:sa,-pa";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/frames/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/0/frames/0").asText());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("der",							res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/1/frames/0").asText());
         assertEquals(true,							res.at("/query/operands/0/operands/1/exclude").asBoolean());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("p",							res.at("/query/operands/0/operands/1/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/1/operands/1/classOut").asInt());
         assertEquals("der",							res.at("/query/operands/0/operands/1/operands/1/operands/0/wrap/key").asText());
@@ -1092,51 +1092,51 @@
         query = "der:sa,-pa,+te";
         qs.setQuery(query, "cosmas2");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference",				res.at("/query/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operation").asText());
         assertEquals(129,  							res.at("/query/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/frames/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/0/frames/0").asText());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("s",							res.at("/query/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(129,  							res.at("/query/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("der",							res.at("/query/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:reference",				res.at("/query/operands/0/operands/1/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/operands/0/operands/1/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operands/0/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/1/classRef/0").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/1/operands/0/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/operands/1/operands/0/frames/0").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/operands/0/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/1/operands/0/operands/0/operation").asText());
         assertEquals("frames:startsWith",			res.at("/query/operands/0/operands/1/operands/0/operands/0/frames/0").asText());
         assertEquals(true,							res.at("/query/operands/0/operands/1/operands/0/operands/0/exclude").asBoolean());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/0/@type").asText());
         assertEquals("p",							res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/0/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/1/operation").asText());
         assertEquals(130,  							res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/1/classOut").asInt());
         assertEquals("der",							res.at("/query/operands/0/operands/1/operands/0/operands/0/operands/1/operands/0/wrap/key").asText());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/operands/1/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/operands/1/@type").asText());
         assertEquals("operation:position",			res.at("/query/operands/0/operands/1/operands/0/operands/1/operation").asText());
         assertEquals("frames:matches",				res.at("/query/operands/0/operands/1/operands/0/operands/1/frames/0").asText());
-        assertEquals("korap:reference",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/operation").asText());
         assertEquals(-1,							res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/spanRef/0").asInt());
         assertEquals(1,								res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/spanRef/1").asInt());
-        assertEquals("korap:span",					res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/operands/0/@type").asText());
+        assertEquals("koral:span",					res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/operands/0/@type").asText());
         assertEquals("t",							res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/0/operands/0/key").asText());
-        assertEquals("korap:reference",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/@type").asText());
+        assertEquals("koral:reference",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/@type").asText());
         assertEquals("operation:focus",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operation").asText());
         assertEquals(0,								res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/spanRef/0").asInt());
         assertEquals(1,								res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/spanRef/1").asInt());
-        assertEquals("korap:group",					res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operands/0/@type").asText());
+        assertEquals("koral:group",					res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operands/0/@type").asText());
         assertEquals("operation:class",				res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operands/0/operation").asText());
         assertEquals(131,  							res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operands/0/classOut").asInt());
         assertEquals("der",							res.at("/query/operands/0/operands/1/operands/0/operands/1/operands/1/operands/0/operands/0/wrap/key").asText());
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
index 99dbe7e..92cf788 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/CqlQueryProcessorTest.java
@@ -66,12 +66,12 @@
 	public void testAndQuery() throws CQLParseException, IOException, Exception{
 		query="(Sonne) and (scheint)";	
 		String jsonLd = 
-			"{@type : korap:group, operation : operation:sequence, inOrder : false," +		
+			"{@type : koral:group, operation : operation:sequence, inOrder : false," +		
 			"distances:[ "+
-				"{@type : korap:distance, key : s, min : 0, max : 0 } ],"+
+				"{@type : koral:distance, key : s, min : 0, max : 0 } ],"+
 					"operands : ["+
-						"{@type : korap:token, wrap : {@type : korap:term,key : Sonne, layer : orth, match : match:eq}}," + 
-						"{@type : korap:token,wrap : {@type : korap:term,key : scheint,layer : orth,match : match:eq}" +
+						"{@type : koral:token, wrap : {@type : koral:term,key : Sonne, layer : orth, match : match:eq}}," + 
+						"{@type : koral:token,wrap : {@type : koral:term,key : scheint,layer : orth,match : match:eq}" +
 					"}]}";
 			
 			CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);		
@@ -87,14 +87,14 @@
 	public void testBooleanQuery() throws CQLParseException, IOException, Exception{		
 		query="((Sonne) or (Mond)) and (scheint)";		
 		String jsonLd = 
-			"{@type:korap:group, operation:operation:sequence, inOrder : false, distances:[" +
-				"{@type:korap:distance, key:s, min:0, max:0}" +
+			"{@type:koral:group, operation:operation:sequence, inOrder : false, distances:[" +
+				"{@type:koral:distance, key:s, min:0, max:0}" +
 				"], operands:[" +
-					"{@type:korap:group, operation:operation:or, operands:[" +
-						"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
-						"{@type:korap:token, wrap:{@type:korap:term, key:Mond, layer:orth, match:match:eq}}" +
+					"{@type:koral:group, operation:operation:or, operands:[" +
+						"{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}," +
+						"{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}" +
 					"]}," +
-					"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}" +
+					"{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}" +
 			"]}";
 		CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);		
 		String serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap().get("query"));
@@ -103,13 +103,13 @@
 		
 		query="(scheint) and ((Sonne) or (Mond))";
 		jsonLd = 
-				"{@type:korap:group, operation:operation:sequence, inOrder : false, distances:[" +
-						"{@type:korap:distance, key:s, min:0, max:0}" +
+				"{@type:koral:group, operation:operation:sequence, inOrder : false, distances:[" +
+						"{@type:koral:distance, key:s, min:0, max:0}" +
 					"], operands:[" +
-						"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}," +
-						"{@type:korap:group, operation:operation:or, operands:[" +
-							"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
-							"{@type:korap:token, wrap:{@type:korap:term, key:Mond, layer:orth, match:match:eq}}" +
+						"{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}," +
+						"{@type:koral:group, operation:operation:or, operands:[" +
+							"{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}," +
+							"{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}" +
 					"]}" +
 				"]}";
 		cqlTree = new CqlQueryProcessor(query, version);		
@@ -122,9 +122,9 @@
 	public void testOrQuery() throws CQLParseException, IOException, Exception{
 		query = "(Sonne) or (Mond)";		
 		String jsonLd = 
-			"{@type:korap:group, operation:operation:or, operands:[" +
-				"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
-				"{@type:korap:token, wrap:{@type:korap:term, key:Mond, layer:orth, match:match:eq}}" +
+			"{@type:koral:group, operation:operation:or, operands:[" +
+				"{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}," +
+				"{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}" +
 			"]}";		
 		
 		CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);		
@@ -133,12 +133,12 @@
 		
 		query="(\"Sonne scheint\") or (Mond)";		
 		jsonLd = 
-			"{@type:korap:group, operation:operation:or, operands:[" +
-				"{@type:korap:group, operation:operation:sequence, operands:[" +
-					"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
-					"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}" +
+			"{@type:koral:group, operation:operation:or, operands:[" +
+				"{@type:koral:group, operation:operation:sequence, operands:[" +
+					"{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}," +
+					"{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}" +
 				"]}," +
-				"{@type:korap:token, wrap:{@type:korap:term, key:Mond, layer:orth, match:match:eq}}" +
+				"{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}" +
 			"]}";
 		
 		cqlTree = new CqlQueryProcessor(query, version);		
@@ -147,14 +147,14 @@
 				
 		query="(\"Sonne scheint\") or (\"Mond scheint\")";		
 		jsonLd = 
-			"{@type:korap:group, operation:operation:or, operands:[" +
-					"{@type:korap:group, operation:operation:sequence, operands:[" +
-						"{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}," +
-						"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}" +
+			"{@type:koral:group, operation:operation:or, operands:[" +
+					"{@type:koral:group, operation:operation:sequence, operands:[" +
+						"{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}," +
+						"{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}" +
 					"]}," +
-					"{@type:korap:group, operation:operation:sequence, operands:[" +
-						"{@type:korap:token, wrap:{@type:korap:term, key:Mond, layer:orth, match:match:eq}}," +
-						"{@type:korap:token, wrap:{@type:korap:term, key:scheint, layer:orth, match:match:eq}}" +
+					"{@type:koral:group, operation:operation:sequence, operands:[" +
+						"{@type:koral:token, wrap:{@type:koral:term, key:Mond, layer:orth, match:match:eq}}," +
+						"{@type:koral:token, wrap:{@type:koral:term, key:scheint, layer:orth, match:match:eq}}" +
 					"]}" +
 				"]}";
 		cqlTree = new CqlQueryProcessor(query, version);		
@@ -165,7 +165,7 @@
 	@Test
 	public void testTermQuery() throws CQLParseException, IOException, Exception{
 		query = "Sonne";		
-		String jsonLd = "{@type:korap:token, wrap:{@type:korap:term, key:Sonne, layer:orth, match:match:eq}}";		
+		String jsonLd = "{@type:koral:token, wrap:{@type:koral:term, key:Sonne, layer:orth, match:match:eq}}";		
 		CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);		
 		String serializedQuery = mapper.writeValueAsString(cqlTree.getRequestMap().get("query"));		
 		assertEquals(jsonLd.replace(" ", ""), serializedQuery.replace("\"", ""));
@@ -175,9 +175,9 @@
 	public void testPhraseQuery() throws CQLParseException, IOException, Exception{
 		query="\"der Mann\"";				
 		String jsonLd = 
-			"{@type:korap:group, operation:operation:sequence, operands:[" +
-				"{@type:korap:token, wrap:{@type:korap:term, key:der, layer:orth, match:match:eq}}," +
-				"{@type:korap:token, wrap:{@type:korap:term, key:Mann, layer:orth, match:match:eq}}" +
+			"{@type:koral:group, operation:operation:sequence, operands:[" +
+				"{@type:koral:token, wrap:{@type:koral:term, key:der, layer:orth, match:match:eq}}," +
+				"{@type:koral:token, wrap:{@type:koral:term, key:Mann, layer:orth, match:match:eq}}" +
 			"]}";
 		
 		CqlQueryProcessor cqlTree = new CqlQueryProcessor(query, version);		
@@ -187,10 +187,10 @@
 		
 		query="der Mann schläft";
 		jsonLd = 
-			"{@type:korap:group, operation:operation:sequence, operands:[" +
-				"{@type:korap:token, wrap:{@type:korap:term, key:der, layer:orth, match:match:eq}}," +
-				"{@type:korap:token, wrap:{@type:korap:term, key:Mann, layer:orth, match:match:eq}}," +
-				"{@type:korap:token, wrap:{@type:korap:term, key:schläft, layer:orth, match:match:eq}}" +
+			"{@type:koral:group, operation:operation:sequence, operands:[" +
+				"{@type:koral:token, wrap:{@type:koral:term, key:der, layer:orth, match:match:eq}}," +
+				"{@type:koral:token, wrap:{@type:koral:term, key:Mann, layer:orth, match:match:eq}}," +
+				"{@type:koral:token, wrap:{@type:koral:term, key:schläft, layer:orth, match:match:eq}}" +
 			"]}";
 		
 		cqlTree = new CqlQueryProcessor(query, version);		
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
index 8efd140..7b7d89c 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessorTest.java
@@ -42,7 +42,7 @@
         query = "[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("Mann", 				res.at("/query/wrap/key").asText());
         assertEquals("lemma", 				res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -50,7 +50,7 @@
         query = "[orth!=Frau]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("Frau", 				res.at("/query/wrap/key").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
         assertEquals("match:ne",			res.at("/query/wrap/match").asText());
@@ -58,7 +58,7 @@
         query = "[p!=NN]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("NN", 					res.at("/query/wrap/key").asText());
         assertEquals("p", 					res.at("/query/wrap/layer").asText());
         assertEquals("match:ne",			res.at("/query/wrap/match").asText());
@@ -66,7 +66,7 @@
         query = "[!p!=NN]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("NN", 					res.at("/query/wrap/key").asText());
         assertEquals("p", 					res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -74,7 +74,7 @@
         query = "[base=schland/x]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals(".*?schland.*?",		res.at("/query/wrap/key").asText());
         assertEquals("lemma", 				res.at("/query/wrap/layer").asText());
         assertEquals("type:regex",			res.at("/query/wrap/type").asText());
@@ -86,7 +86,7 @@
         query = "![p!=NN]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",         res.at("/query/@type").asText());
+        assertEquals("koral:token",         res.at("/query/@type").asText());
         assertEquals("NN",                  res.at("/query/wrap/key").asText());
         assertEquals("p",                   res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",            res.at("/query/wrap/match").asText());
@@ -97,8 +97,8 @@
         query = "[mate/m=temp:pres]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("temp",				res.at("/query/wrap/key").asText());
         assertEquals("pres",				res.at("/query/wrap/value").asText());
         assertEquals("m",	 				res.at("/query/wrap/layer").asText());
@@ -111,8 +111,8 @@
         query = "[orth=\"M(a|ä)nn(er)?\"]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("M(a|ä)nn(er)?",		res.at("/query/wrap/key").asText());
         assertEquals("type:regex",			res.at("/query/wrap/type").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -121,8 +121,8 @@
         query = "[orth=\"M(a|ä)nn(er)?\"/x]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals(".*?M(a|ä)nn(er)?.*?",	res.at("/query/wrap/key").asText());
         assertEquals("type:regex",			res.at("/query/wrap/type").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -131,8 +131,8 @@
         query = "\".*?Mann.*?\"";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals(".*?Mann.*?",			res.at("/query/wrap/key").asText());
         assertEquals("type:regex",			res.at("/query/wrap/type").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -141,8 +141,8 @@
         query = "z.B./x";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals(".*?z\\.B\\..*?",		res.at("/query/wrap/key").asText());
         assertEquals("type:regex",			res.at("/query/wrap/type").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -154,8 +154,8 @@
         query = "[punct=.]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",         res.at("/query/@type").asText());
-        assertEquals("korap:term",          res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",         res.at("/query/@type").asText());
+        assertEquals("koral:term",          res.at("/query/wrap/@type").asText());
         assertEquals(".",                   res.at("/query/wrap/key").asText());
         assertEquals("type:punct",          res.at("/query/wrap/type").asText());
         assertEquals("orth",                res.at("/query/wrap/layer").asText());
@@ -164,8 +164,8 @@
         query = "[punct=\".\"]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",         res.at("/query/@type").asText());
-        assertEquals("korap:term",          res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token",         res.at("/query/@type").asText());
+        assertEquals("koral:term",          res.at("/query/wrap/@type").asText());
         assertEquals(".",                   res.at("/query/wrap/key").asText());
         assertEquals("type:punct",          res.at("/query/wrap/type").asText());
         assertEquals("orth",                res.at("/query/wrap/layer").asText());
@@ -177,8 +177,8 @@
         query = "[orth=deutscher/i]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("deutscher",			res.at("/query/wrap/key").asText());
         assertEquals("true",				res.at("/query/wrap/caseInsensitive").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -187,8 +187,8 @@
         query = "deutscher/i";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("deutscher",			res.at("/query/wrap/key").asText());
         assertEquals("true",				res.at("/query/wrap/caseInsensitive").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -197,8 +197,8 @@
         query = "deutscher/I";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("deutscher",			res.at("/query/wrap/key").asText());
         assertEquals("false",				res.at("/query/wrap/caseInsensitive").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
@@ -207,15 +207,15 @@
         query = "[orth=deutscher/i][orth=Bundestag]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("deutscher",			operands.get(0).at("/wrap/key").asText());
         assertEquals("orth",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
         assertEquals(true,					operands.get(0).at("/wrap/caseInsensitive").asBoolean());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Bundestag",			operands.get(1).at("/wrap/key").asText());
         assertEquals("orth",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -224,15 +224,15 @@
         query = "deutscher/i Bundestag";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("deutscher",			operands.get(0).at("/wrap/key").asText());
         assertEquals("orth",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
         assertEquals(true,					operands.get(0).at("/wrap/caseInsensitive").asBoolean());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Bundestag",			operands.get(1).at("/wrap/key").asText());
         assertEquals("orth",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -244,26 +244,26 @@
         query = "<s>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("s",					res.at("/query/key").asText());
         
         query = "<\".*\">";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span",          res.at("/query/@type").asText());
+        assertEquals("koral:span",          res.at("/query/@type").asText());
         assertEquals(".*",                  res.at("/query/key").asText());
         assertEquals("type:regex",          res.at("/query/type").asText());
 
         query = "<vp>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
 
         query = "<cnx/c=vp>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
         assertEquals("cnx",					res.at("/query/foundry").asText());
         assertEquals("c",					res.at("/query/layer").asText());
@@ -271,7 +271,7 @@
         query = "<cnx/c!=vp>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
         assertEquals("cnx",					res.at("/query/foundry").asText());
         assertEquals("c",					res.at("/query/layer").asText());
@@ -280,7 +280,7 @@
         query = "<cnx/c!=vp class!=header>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
         assertEquals("cnx",					res.at("/query/foundry").asText());
         assertEquals("c",					res.at("/query/layer").asText());
@@ -292,7 +292,7 @@
         query = "<cnx/c!=vp !(class!=header)>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
         assertEquals("cnx",					res.at("/query/foundry").asText());
         assertEquals("c",					res.at("/query/layer").asText());
@@ -304,19 +304,19 @@
         query = "<cnx/c!=vp !(class=header & id=7)>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/@type").asText());
         assertEquals("vp",					res.at("/query/key").asText());
         assertEquals("cnx",					res.at("/query/foundry").asText());
         assertEquals("c",					res.at("/query/layer").asText());
         assertEquals("match:ne",			res.at("/query/match").asText());
-        assertEquals("korap:termGroup",		res.at("/query/attr/@type").asText());
+        assertEquals("koral:termGroup",		res.at("/query/attr/@type").asText());
         assertEquals("relation:and",		res.at("/query/attr/relation").asText());
         operands = Lists.newArrayList( res.at("/query/attr/operands").elements());
-        assertEquals("korap:term",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:term",			operands.get(0).at("/@type").asText());
         assertEquals("class",				operands.get(0).at("/key").asText());
         assertEquals("header",				operands.get(0).at("/value").asText());
         assertEquals("match:ne",			operands.get(0).at("/match").asText());
-        assertEquals("korap:term",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:term",			operands.get(1).at("/@type").asText());
         assertEquals("id",					operands.get(1).at("/key").asText());
         assertEquals(7,						operands.get(1).at("/value").asInt());
         assertEquals("match:ne",			operands.get(1).at("/match").asText());
@@ -327,20 +327,20 @@
         query = "[base=der][][base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -348,20 +348,20 @@
         query = "[base=der][][][base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -369,20 +369,20 @@
         query = "[base=der][][]?[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -390,20 +390,20 @@
         query = "[base=der][]+[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(true,					res.at("/query/distances").elements().next().at("/boundary/max").isMissingNode());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(1).at("/@type").asText());
         assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
@@ -411,36 +411,36 @@
         query = "[base=der][]*[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(1,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(true,					res.at("/query/distances").elements().next().at("/boundary/max").isMissingNode());
 
         query = "[base=der][]{2,5}[base=Mann][]?[][base=Frau]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals("true",				res.at("/query/inOrder").asText());
-        assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
         assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
         assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
         assertEquals(6,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:group",			operands.get(1).at("/@type").asText());
         assertEquals("operation:sequence",	operands.get(1).at("/operation").asText());
-        assertEquals("korap:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
         assertEquals("w",					operands.get(1).get("distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
         assertEquals(2,						operands.get(1).get("distances").elements().next().at("/boundary/min").asInt());
         assertEquals(3,						operands.get(1).get("distances").elements().next().at("/boundary/max").asInt());
         operands = Lists.newArrayList(operands.get(1).get("operands").elements());
@@ -454,27 +454,27 @@
         query = "[base=geht][base=der][]*contains(<s>,<np>)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals(true,					res.at("/query/inOrder").isMissingNode());
         assertEquals(true,					res.at("/query/distances").isMissingNode());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals("geht",				operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:group",			operands.get(1).at("/@type").asText());
         assertEquals("operation:sequence",	operands.get(1).at("/operation").asText());
-        assertEquals("korap:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
+        assertEquals("koral:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
         assertEquals("w",					operands.get(1).get("distances").elements().next().at("/key").asText());
-        assertEquals("korap:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
+        assertEquals("koral:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
         assertEquals(1,						operands.get(1).get("distances").elements().next().at("/boundary/min").asInt());
         assertEquals(true,					operands.get(1).get("distances").elements().next().at("/boundary/max").isMissingNode());
         operands = Lists.newArrayList(operands.get(1).get("operands").elements());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
         assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-        assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:group",			operands.get(1).at("/@type").asText());
         assertEquals("operation:position",	operands.get(1).at("/operation").asText());
     }
 
@@ -483,18 +483,18 @@
         query = "[base=der]{[]}[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
         assertEquals(true,					res.at("/query/inOrder").isMissingNode());
         assertEquals(true,					res.at("/query/distances").isMissingNode());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
         assertEquals("der",					operands.get(0).at("/wrap/key").asText());
         assertEquals("Mann",				operands.get(2).at("/wrap/key").asText());
-        assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+        assertEquals("koral:group",			operands.get(1).at("/@type").asText());
         assertEquals("operation:class",		operands.get(1).at("/operation").asText());
         assertEquals(1,						operands.get(1).at("/classOut").asInt());
         operands = Lists.newArrayList(operands.get(1).at("/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals(true,					operands.get(0).at("/wrap").isMissingNode());
         assertEquals(1,                     res.at("/meta/highlight/0").asInt());
 
@@ -544,38 +544,38 @@
         query = "[]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token",         res.at("/query/@type").asText());
+        assertEquals("koral:token",         res.at("/query/@type").asText());
         assertEquals(true,                  res.at("/query/key").isMissingNode());
 
         query = "contains(<s>, [])";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:position",  res.at("/query/operation").asText());
         assertEquals("frames:isAround",     res.at("/query/frames/0").asText());
         assertEquals(true,                  res.at("/query/frames/1").isMissingNode());
-        assertEquals("korap:span",          res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span",          res.at("/query/operands/0/@type").asText());
         assertEquals("s",                   res.at("/query/operands/0/key").asText());
-        assertEquals("korap:token",         res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/1/@type").asText());
         assertEquals(true,                  res.at("/query/operands/1/key").isMissingNode());
 
         query = "contains(<s>, []{3})";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals("s",                   res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/1/@type").asText());
         assertEquals("operation:repetition",res.at("/query/operands/1/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/1/operands/0/@type").asText());
         assertEquals(true,                  res.at("/query/operands/1/operands/0/key").isMissingNode());
 
         query = "contains(<s>, {1:[]{3}})";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals("s",                   res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group",         res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group",         res.at("/query/operands/1/@type").asText());
         assertEquals("operation:class",     res.at("/query/operands/1/operation").asText());
         assertEquals("operation:repetition",res.at("/query/operands/1/operands/0/operation").asText());
-        assertEquals("korap:token",         res.at("/query/operands/1/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token",         res.at("/query/operands/1/operands/0/operands/0/@type").asText());
         assertEquals(true,                  res.at("/query/operands/1/operands/0/operands/0/key").isMissingNode());
 
     }
@@ -586,19 +586,19 @@
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals(true,					operands.get(0).at("/key").isMissingNode());
 
         query = "[][][base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         operands = Lists.newArrayList(res.at("/query/operands").elements());
-        assertEquals("korap:group",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:group",			operands.get(0).at("/@type").asText());
         assertEquals("operation:repetition",operands.get(0).at("/operation").asText());
         assertEquals(2,						operands.get(0).at("/boundary/min").asInt());
         assertEquals(2,						operands.get(0).at("/boundary/max").asInt());
         operands = Lists.newArrayList(operands.get(0).at("/operands").elements());
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals(true,					operands.get(0).at("/key").isMissingNode());
 
         query = "startswith(<s>, [][base=Mann])";
@@ -606,7 +606,7 @@
         res = mapper.readTree(qs.toJSON());
         operands = Lists.newArrayList(res.at("/query/operands"));
         operands = Lists.newArrayList(operands.get(1).at("/operands"));
-        assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+        assertEquals("koral:token",			operands.get(0).at("/@type").asText());
         assertEquals(true,					operands.get(0).at("/key").isMissingNode());
     }
 
@@ -615,7 +615,7 @@
         query = "der{3}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 			res.at("/query/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/@type").asText());
         assertEquals("operation:repetition", 	res.at("/query/operation").asText());
         assertEquals("der", 					res.at("/query/operands/0/wrap/key").asText());
         assertEquals(3, 						res.at("/query/boundary/min").asInt());
@@ -657,11 +657,11 @@
         query = "contains(<s>, (der){3})";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:position", 	res.at("/query/operation").asText());
-        assertEquals("korap:span", 			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/operands/0/@type").asText());
         assertEquals("s", 					res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:repetition",res.at("/query/operands/1/operation").asText());
 
         query = "contains(<s>, (der){3,})";
@@ -694,13 +694,13 @@
         query = "contains(<s>, der)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:position", 	res.at("/query/operation").asText());
         assertEquals("frames:isAround",		res.at("/query/frames/0").asText());
         assertEquals(true, 					res.at("/query/frames/1").isMissingNode());
-        assertEquals("korap:span", 			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/operands/0/@type").asText());
         assertEquals("s", 					res.at("/query/operands/0/key").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/@type").asText());
 
         query = "contains(<s>,<np>)";
         qs.setQuery(query, "poliqarpplus");
@@ -711,11 +711,11 @@
         query = "contains(<s>,[orth=der][orth=Mann])";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 			res.at("/query/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/@type").asText());
         assertEquals("operation:position", 		res.at("/query/operation").asText());
         assertEquals("frames:isAround", 		res.at("/query/frames/0").asText());
         assertEquals("s", 						res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:sequence", 		res.at("/query/operands/1/operation").asText());
         assertEquals("der", 					res.at("/query/operands/1/operands/0/wrap/key").asText());
         assertEquals("Mann", 					res.at("/query/operands/1/operands/1/wrap/key").asText());
@@ -723,11 +723,11 @@
         query = "contains(<s>,[orth=der][orth=Mann]*)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 			res.at("/query/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/@type").asText());
         assertEquals("operation:position", 		res.at("/query/operation").asText());
         assertEquals("frames:isAround", 		res.at("/query/frames/0").asText());
         assertEquals("s", 						res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:sequence", 		res.at("/query/operands/1/operation").asText());
         assertEquals("der", 					res.at("/query/operands/1/operands/0/wrap/key").asText());
         assertEquals("operation:repetition", 	res.at("/query/operands/1/operands/1/operation").asText());
@@ -739,7 +739,7 @@
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals("s", 						res.at("/query/operands/0/key").asText());
-        assertEquals("korap:group", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/operands/1/@type").asText());
         assertEquals("frames:startsWith", 		res.at("/query/operands/1/frames/0").asText());
         assertEquals("operation:position", 		res.at("/query/operands/1/operation").asText());
         assertEquals("np", 						res.at("/query/operands/1/operands/0/key").asText());
@@ -748,28 +748,28 @@
         query = "[base=Auto]overlaps(<s>, der)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 			res.at("/query/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/@type").asText());
         assertEquals("operation:sequence", 		res.at("/query/operation").asText());
-        assertEquals("korap:group", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:position", 		res.at("/query/operands/1/operation").asText());
         assertEquals("frames:overlapsLeft", 	res.at("/query/operands/1/frames/0").asText());
         assertEquals("frames:overlapsRight", 	res.at("/query/operands/1/frames/1").asText());
-        assertEquals("korap:span", 				res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span", 				res.at("/query/operands/1/operands/0/@type").asText());
         assertEquals("s", 						res.at("/query/operands/1/operands/0/key").asText());
-        assertEquals("korap:token", 			res.at("/query/operands/1/operands/1/@type").asText());
+        assertEquals("koral:token", 			res.at("/query/operands/1/operands/1/@type").asText());
 
         query = "[base=Auto]            overlaps(<s>, der)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 			res.at("/query/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/@type").asText());
         assertEquals("operation:sequence", 		res.at("/query/operation").asText());
-        assertEquals("korap:group", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 			res.at("/query/operands/1/@type").asText());
         assertEquals("operation:position", 		res.at("/query/operands/1/operation").asText());
         assertEquals("frames:overlapsLeft", 	res.at("/query/operands/1/frames/0").asText());
         assertEquals("frames:overlapsRight", 	res.at("/query/operands/1/frames/1").asText());
-        assertEquals("korap:span", 				res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:span", 				res.at("/query/operands/1/operands/0/@type").asText());
         assertEquals("s", 						res.at("/query/operands/1/operands/0/key").asText());
-        assertEquals("korap:token", 			res.at("/query/operands/1/operands/1/@type").asText());
+        assertEquals("koral:token", 			res.at("/query/operands/1/operands/1/@type").asText());
     };
 
     @Test
@@ -777,11 +777,11 @@
         query = "[base=Mann&(cas=N|cas=A)]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("relation:and", 		res.at("/query/wrap/relation").asText());
         assertEquals("Mann", 				res.at("/query/wrap/operands/0/key").asText());
         assertEquals("lemma", 				res.at("/query/wrap/operands/0/layer").asText());
-        assertEquals("korap:termGroup", 	res.at("/query/wrap/operands/1/@type").asText());
+        assertEquals("koral:termGroup", 	res.at("/query/wrap/operands/1/@type").asText());
         assertEquals("relation:or", 		res.at("/query/wrap/operands/1/relation").asText());
         assertEquals("N", 					res.at("/query/wrap/operands/1/operands/0/key").asText());
         assertEquals("cas", 				res.at("/query/wrap/operands/1/operands/0/layer").asText());
@@ -791,11 +791,11 @@
         query = "[base=Mann&cas=N&gen=m]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
         assertEquals("relation:and", 		res.at("/query/wrap/relation").asText());
         assertEquals("Mann", 				res.at("/query/wrap/operands/0/key").asText());
         assertEquals("lemma", 				res.at("/query/wrap/operands/0/layer").asText());
-        assertEquals("korap:termGroup", 	res.at("/query/wrap/operands/1/@type").asText());
+        assertEquals("koral:termGroup", 	res.at("/query/wrap/operands/1/@type").asText());
         assertEquals("relation:and", 		res.at("/query/wrap/operands/1/relation").asText());
         assertEquals("N", 					res.at("/query/wrap/operands/1/operands/0/key").asText());
         assertEquals("cas", 				res.at("/query/wrap/operands/1/operands/0/layer").asText());
@@ -808,7 +808,7 @@
         query = "[base=Mann][orth=Frau]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
         assertEquals("Mann", 				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("lemma", 				res.at("/query/operands/0/wrap/layer").asText());
@@ -833,10 +833,10 @@
         query = "[base=der]|[base=das]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/@type").asText());
         assertEquals("der", 				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("lemma", 				res.at("/query/operands/0/wrap/layer").asText());
         assertEquals("das", 				res.at("/query/operands/1/wrap/key").asText());
@@ -845,27 +845,27 @@
         query = "([base=der]|[base=das])[base=Schild]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
         assertEquals("Schild", 				res.at("/query/operands/1/wrap/key").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/0/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operands/0/operation").asText());
 
         query = "[base=Schild]([base=der]|[base=das])";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals("Schild", 				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operands/1/operation").asText());
 
         query = "([orth=der][base=katze])|([orth=eine][base=baum])";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("der", 				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("katze",				res.at("/query/operands/0/operands/1/wrap/key").asText());
         assertEquals("eine", 				res.at("/query/operands/1/operands/0/wrap/key").asText());
@@ -874,11 +874,11 @@
         query = "[orth=der][base=katze]|[orth=eine][base=baum]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/0/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operands/0/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/operands/0/@type").asText());
         assertEquals("der", 				res.at("/query/operands/0/operands/0/wrap/key").asText());
         assertEquals("katze", 				res.at("/query/operands/0/operands/1/wrap/key").asText());
         assertEquals("eine", 				res.at("/query/operands/1/operands/0/wrap/key").asText());
@@ -887,12 +887,12 @@
         query = "[orth=der]([base=katze]|[orth=eine])[base=baum]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operands/1/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/2/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/2/@type").asText());
         assertEquals("der", 				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("katze", 				res.at("/query/operands/1/operands/0/wrap/key").asText());
         assertEquals("eine", 				res.at("/query/operands/1/operands/1/wrap/key").asText());
@@ -907,14 +907,14 @@
         query = "[orth=der]([base=katze]|[base=hund]|[base=baum])";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:disjunction", 		res.at("/query/operands/1/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/operands/0/@type").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/operands/1/@type").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/operands/2/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/operands/1/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/operands/2/@type").asText());
         assertEquals("katze", 				res.at("/query/operands/1/operands/0/wrap/key").asText());
         assertEquals("hund", 				res.at("/query/operands/1/operands/1/wrap/key").asText());
         assertEquals("baum", 				res.at("/query/operands/1/operands/2/wrap/key").asText());
@@ -925,27 +925,27 @@
         query = "[base=Mann]<vp>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/0/@type").asText());
         assertEquals("Mann", 				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:span", 			res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/operands/1/@type").asText());
         assertEquals("vp", 					res.at("/query/operands/1/key").asText());
 
         query = "<vp>[base=Mann]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:span", 			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/operands/0/@type").asText());
         assertEquals("vp", 					res.at("/query/operands/0/key").asText());
-        assertEquals("korap:token", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/operands/1/@type").asText());
         assertEquals("Mann", 				res.at("/query/operands/1/wrap/key").asText());
 
         query = "<vp>[base=Mann]<pp>";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:span", 			res.at("/query/operands/2/@type").asText());
+        assertEquals("koral:span", 			res.at("/query/operands/2/@type").asText());
         assertEquals("pp", 					res.at("/query/operands/2/key").asText());
 
         query = "<vp>[base=Mann]<pp><np>";
@@ -960,7 +960,7 @@
         query = "{[base=Mann]}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:class", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/classOut").asInt());
         assertEquals(true, 					res.at("/query/classIn").isMissingNode());
@@ -969,7 +969,7 @@
         query = "{[base=Mann][orth=Frau]}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:class", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/classOut").asInt());
         assertEquals(true, 					res.at("/query/classIn").isMissingNode());
@@ -979,7 +979,7 @@
         query = "{[base=Mann]}{[orth=Frau]}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group",         res.at("/query/@type").asText());
+        assertEquals("koral:group",         res.at("/query/@type").asText());
         assertEquals("operation:sequence",  res.at("/query/operation").asText());
         assertEquals("operation:class",     res.at("/query/operands/0/operation").asText());
         assertEquals(1,                     res.at("/query/operands/0/classOut").asInt());
@@ -992,9 +992,9 @@
         query = "[p=NN]{[base=Mann][orth=Frau]}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/1/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/1/@type").asText());
         assertEquals("operation:class", 	res.at("/query/operands/1/operation").asText());
         assertEquals(1, 					res.at("/query/operands/1/classOut").asInt());
         assertEquals(true, 					res.at("/query/operands/1/classIn").isMissingNode());
@@ -1004,9 +1004,9 @@
         query = "{[base=Mann][orth=Frau]}[p=NN]";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence", 	res.at("/query/operation").asText());
-        assertEquals("korap:group", 		res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/operands/0/@type").asText());
         assertEquals("operation:class", 	res.at("/query/operands/0/operation").asText());
         assertEquals(1, 					res.at("/query/operands/0/classOut").asInt());
         assertEquals(true, 					res.at("/query/operands/0/classIn").isMissingNode());
@@ -1017,7 +1017,7 @@
         query = "{2:{1:[tt/p=ADJA]}[mate/p=NN]}";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:class", 	res.at("/query/operation").asText());
         assertEquals("operation:sequence", 	res.at("/query/operands/0/operation").asText());
         assertEquals(2, 					res.at("/query/classOut").asInt());
@@ -1031,7 +1031,7 @@
         query = "focus([orth=Der]{[orth=Mann]})";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/classRef/0").asInt());
         assertEquals("operation:sequence", 	res.at("/query/operands/0/operation").asText());
@@ -1058,7 +1058,7 @@
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals(3, 					res.at("/query/classRef/0").asInt());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals("operation:position", 	res.at("/query/operands/0/operation").asText());
         assertEquals("operation:class", 	res.at("/query/operands/0/operands/1/operation").asText());
@@ -1077,7 +1077,7 @@
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals(3, 					res.at("/query/classRef/0").asInt());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals("operation:position", 	res.at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith", 	res.at("/query/operands/0/frames/0").asText());
@@ -1095,7 +1095,7 @@
         res = mapper.readTree(qs.toJSON());
         assertEquals(3, 					res.at("/query/classRef/0").asInt());
         assertEquals(true, 					res.at("/query/classRef/1").isMissingNode());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:split", 	res.at("/query/operation").asText());
 
         query = "split(2|3: startswith(<s>, {3:[base=der]{1:[mate/p=ADJA]{2:[tt/p=NN]}}}))";
@@ -1104,7 +1104,7 @@
         assertEquals(2, 						res.at("/query/classRef/0").asInt());
         assertEquals(3, 						res.at("/query/classRef/1").asInt());
         assertEquals("classRefOp:intersection", res.at("/query/classRefOp").asText());
-        assertEquals("korap:reference", 		res.at("/query/@type").asText());
+        assertEquals("koral:reference", 		res.at("/query/@type").asText());
         assertEquals("operation:split", 		res.at("/query/operation").asText());
         assertEquals(3,                     res.at("/meta/highlight/0").asInt());
         assertEquals(1,                     res.at("/meta/highlight/1").asInt());
@@ -1123,7 +1123,7 @@
         query = "submatch(1:<s>)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/spanRef/0").asInt());
         assertEquals(true, 					res.at("/query/spanRef/1").isMissingNode());
@@ -1132,7 +1132,7 @@
         query = "submatch(1,4:<s>)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/spanRef/0").asInt());
         assertEquals(4, 					res.at("/query/spanRef/1").asInt());
@@ -1140,7 +1140,7 @@
         query = "submatch(1,4:contains(<s>,[base=Haus]))";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:reference", 	res.at("/query/@type").asText());
+        assertEquals("koral:reference", 	res.at("/query/@type").asText());
         assertEquals("operation:focus", 	res.at("/query/operation").asText());
         assertEquals(1, 					res.at("/query/spanRef/0").asInt());
         assertEquals(4, 					res.at("/query/spanRef/1").asInt());
@@ -1153,9 +1153,9 @@
         query = "dominates(<s>,<np>)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:relation", 	res.at("/query/operation").asText());
-        assertEquals("korap:relation", 		res.at("/query/relation/@type").asText());
+        assertEquals("koral:relation", 		res.at("/query/relation/@type").asText());
         assertEquals("c",                   res.at("/query/relation/wrap/layer").asText());
         assertEquals("s", 					res.at("/query/operands/0/key").asText());
         assertEquals("np", 					res.at("/query/operands/1/key").asText());
@@ -1163,9 +1163,9 @@
         query = "relatesTo([base=Baum],<np>)";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:relation", 	res.at("/query/operation").asText());
-        assertEquals("korap:relation", 		res.at("/query/relation/@type").asText());
+        assertEquals("koral:relation", 		res.at("/query/relation/@type").asText());
         assertEquals("Baum", 				res.at("/query/operands/0/wrap/key").asText());
         assertEquals("np", 					res.at("/query/operands/1/key").asText());
 
@@ -1180,7 +1180,7 @@
         res = mapper.readTree(qs.toJSON());
         assertEquals("lemma", 				res.at("/query/operands/1/wrap/layer").asText());
         assertEquals("Baum", 				res.at("/query/operands/1/wrap/key").asText());
-        assertEquals("korap:relation", 		res.at("/query/relation/@type").asText());
+        assertEquals("koral:relation", 		res.at("/query/relation/@type").asText());
         assertEquals("mate", 				res.at("/query/relation/wrap/foundry").asText());
         assertEquals("d", 					res.at("/query/relation/wrap/layer").asText());
         assertEquals("HEAD", 				res.at("/query/relation/wrap/key").asText());
@@ -1192,7 +1192,7 @@
         assertEquals("fällen",              res.at("/query/operands/0/wrap/key").asText());
         assertEquals("lemma",               res.at("/query/operands/1/wrap/layer").asText());
         assertEquals("Baum",                res.at("/query/operands/1/wrap/key").asText());
-        assertEquals("korap:relation",      res.at("/query/relation/@type").asText());
+        assertEquals("koral:relation",      res.at("/query/relation/@type").asText());
         assertEquals("d",                   res.at("/query/relation/wrap/layer").asText());
 
         query = "dominates(Baum,<np>)";
@@ -1200,7 +1200,7 @@
         res = mapper.readTree(qs.toJSON());
         assertEquals("orth", 				res.at("/query/operands/0/wrap/layer").asText());
         assertEquals("Baum", 				res.at("/query/operands/0/wrap/key").asText());
-        assertEquals("korap:relation", 		res.at("/query/relation/@type").asText());
+        assertEquals("koral:relation", 		res.at("/query/relation/@type").asText());
         assertEquals("c", 					res.at("/query/relation/wrap/layer").asText());
 
         query = "dominates(cnx/c:<vp>,<np>)";
@@ -1294,8 +1294,8 @@
         query = "Baum";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:token", 		res.at("/query/@type").asText());
-        assertEquals("korap:term",			res.at("/query/wrap/@type").asText());
+        assertEquals("koral:token", 		res.at("/query/@type").asText());
+        assertEquals("koral:term",			res.at("/query/wrap/@type").asText());
         assertEquals("Baum",				res.at("/query/wrap/key").asText());
         assertEquals("orth", 				res.at("/query/wrap/layer").asText());
         assertEquals("match:eq",			res.at("/query/wrap/match").asText());
@@ -1303,10 +1303,10 @@
         query = "Der Baum";
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("korap:group", 		res.at("/query/@type").asText());
+        assertEquals("koral:group", 		res.at("/query/@type").asText());
         assertEquals("operation:sequence",	res.at("/query/operation").asText());
-        assertEquals("korap:token",			res.at("/query/operands/0/@type").asText());
-        assertEquals("korap:term",			res.at("/query/operands/0/wrap/@type").asText());
+        assertEquals("koral:token",			res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:term",			res.at("/query/operands/0/wrap/@type").asText());
         assertEquals("Der",					res.at("/query/operands/0/wrap/key").asText());
         assertEquals("Baum",				res.at("/query/operands/1/wrap/key").asText());
         assertEquals("orth", 				res.at("/query/operands/0/wrap/layer").asText());
@@ -1367,7 +1367,7 @@
         qs.setQuery(query, "poliqarpplus");
         res = mapper.readTree(qs.toJSON());
         assertEquals("x",                   res.at("/query/wrap/key").asText());
-        assertEquals("korap:doc",           res.at("/collection/@type").asText());
+        assertEquals("koral:doc",           res.at("/collection/@type").asText());
         assertEquals("textClass",           res.at("/collection/key").asText());
         assertEquals("Sport",               res.at("/collection/value").asText());
 
@@ -1376,7 +1376,7 @@
         qs.setCollection("author=Smith");
         res = mapper.readTree(qs.toJSON());
         assertEquals("x",                   res.at("/query/wrap/key").asText());
-        assertEquals("korap:docGroup",      res.at("/collection/@type").asText());
+        assertEquals("koral:docGroup",      res.at("/collection/@type").asText());
         assertEquals("operation:and",       res.at("/collection/operation").asText());
         assertEquals("textClass",           res.at("/collection/operands/0/key").asText());
         assertEquals("Sport",               res.at("/collection/operands/0/value").asText());