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 52c5c78..34e8aac 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
@@ -23,7 +23,7 @@
 import de.ids_mannheim.korap.query.parse.annis.AqlLexer;
 import de.ids_mannheim.korap.query.parse.annis.AqlParser;
 import de.ids_mannheim.korap.query.serialize.util.Antlr4DescriptiveErrorListener;
-import de.ids_mannheim.korap.query.serialize.util.CqlfObjectGenerator;
+import de.ids_mannheim.korap.query.serialize.util.KoralObjectGenerator;
 
 /**
  * Map representation of ANNIS QL syntax tree as returned by ANTLR
@@ -88,7 +88,7 @@
 	private LinkedHashMap<String, Integer> nodeReferencesProcessed = new LinkedHashMap<String, Integer>();
 
 	public AnnisQueryProcessor(String query) {
-		CqlfObjectGenerator.setQueryProcessor(this);
+		KoralObjectGenerator.setQueryProcessor(this);
 		process(query);
 	}
 
@@ -119,6 +119,7 @@
 
 		if (verbose) {
 			System.err.println(" "+objectStack);
+			System.err.println(" "+operandStack);
 			System.out.println(openNodeCats);
 		}
 
@@ -224,7 +225,7 @@
 	private void processExprTop(ParseTree node) {
 		List<ParseTree> andTopExprs = getChildrenWithCat(node, "andTopExpr");
 		if (andTopExprs.size() > 1) {
-			LinkedHashMap<String, Object> topOr = CqlfObjectGenerator.makeGroup("or");
+			LinkedHashMap<String, Object> topOr = KoralObjectGenerator.makeGroup("or");
 			requestMap.put("query", topOr);
 			objectStack.push(topOr);
 		}
@@ -235,11 +236,11 @@
 		String firstChildNodeCat = getNodeCat(node.getChild(0));
 		LinkedHashMap<String, Object> object = null;
 		if (firstChildNodeCat.equals("node")) {
-			object = CqlfObjectGenerator.makeSpan();
+			object = KoralObjectGenerator.makeSpan();
 		} else if (firstChildNodeCat.equals("tok")) {
-			object = CqlfObjectGenerator.makeToken();
+			object = KoralObjectGenerator.makeToken();
 			if (node.getChildCount() > 1) { // empty tokens do not wrap a term
-				LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeTerm();
+				LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
 				term.put("layer", "orth");
 				object.put("wrap", term);
 			}
@@ -248,17 +249,17 @@
 			// TODO generalize the list below -> look up layers associated with tokens rather than spans somewhere
 			HashMap<String, Object> qNameParse = parseQNameNode(node.getChild(0));
 			if (Arrays.asList(new String[]{"p", "lemma", "m", "orth"}).contains(qNameParse.get("layer"))) { 
-				object = CqlfObjectGenerator.makeToken();
-				LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeTerm();
+				object = KoralObjectGenerator.makeToken();
+				LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
 				object.put("wrap", term);
 				term.putAll(qNameParse);
 			} else {
-				object = CqlfObjectGenerator.makeSpan();
+				object = KoralObjectGenerator.makeSpan();
 				object.putAll(qNameParse);
 			}
 		} else if (firstChildNodeCat.equals("textSpec")) {
-			object = CqlfObjectGenerator.makeToken();
-			LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeTerm();
+			object = KoralObjectGenerator.makeToken();
+			LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
 			object.put("wrap", term);
 			term.put("layer", "orth");
 			term.putAll(parseTextSpec(node.getChild(0)));
@@ -309,12 +310,12 @@
 			if (nodeReferencesTotal.get(ref) > 1) {
 				if (nodeReferencesProcessed.get(ref)==0) {
 					refClassMapping.put(ref, classCounter);
-					operand = CqlfObjectGenerator.wrapInClass(operand, classCounter++);
+					operand = KoralObjectGenerator.wrapInClass(operand, classCounter++);
 				} else if (nodeReferencesProcessed.get(ref)>0 && nodeReferencesTotal.get(ref)>1) {
 					try {
-						operand = CqlfObjectGenerator.wrapInReference(operandStack.pop(), refClassMapping.get(ref), true);
+						operand = KoralObjectGenerator.wrapInReference(operandStack.pop(), refClassMapping.get(ref), true);
 					} catch (NoSuchElementException e) {
-						operand = CqlfObjectGenerator.makeReference(refClassMapping.get(ref));
+						operand = KoralObjectGenerator.makeReference(refClassMapping.get(ref), true);
 					}
 				}
 				nodeReferencesProcessed.put(ref, nodeReferencesProcessed.get(ref)+1);
@@ -348,14 +349,14 @@
 			// This is modeled here...
 			if (reltype.equals("commonparent") || reltype.equals("commonancestor")) {
 				// make an (outer) group and an inner group containing the dummy node or previous relations
-				group = CqlfObjectGenerator.makeGroup("relation");
-				LinkedHashMap<String,Object> innerGroup = CqlfObjectGenerator.makeGroup("relation");
-				LinkedHashMap<String,Object> relation = CqlfObjectGenerator.makeRelation();
-				LinkedHashMap<String,Object> term = CqlfObjectGenerator.makeTerm();
+				group = KoralObjectGenerator.makeGroup("relation");
+				LinkedHashMap<String,Object> innerGroup = KoralObjectGenerator.makeGroup("relation");
+				LinkedHashMap<String,Object> relation = KoralObjectGenerator.makeRelation();
+				LinkedHashMap<String,Object> term = KoralObjectGenerator.makeTerm();
 				term.put("layer", "c");
 				relation.put("wrap", term);
 				// commonancestor is an indirect commonparent relation
-				if (reltype.equals("commonancestor")) relation.put("boundary", CqlfObjectGenerator.makeBoundary(1, null));
+				if (reltype.equals("commonancestor")) relation.put("boundary", KoralObjectGenerator.makeBoundary(1, null));
 				group.put("relation", relation);
 				innerGroup.put("relation", relation);
 				// Get operands list before possible re-assignment of 'group' (see following 'if')
@@ -363,23 +364,23 @@
 				ArrayList<Object> innerOperands  = (ArrayList<Object>) innerGroup.get("operands");
 				// for lowest level, add the underspecified node as first operand and wrap it in a class group
 				if (i == 1) {
-					innerOperands.add(CqlfObjectGenerator.wrapInClass(CqlfObjectGenerator.makeSpan(), classCounter));
+					innerOperands.add(KoralObjectGenerator.wrapInClass(KoralObjectGenerator.makeSpan(), classCounter));
 					// add the first operand and wrap the whole group in a focusing reference 
 					innerOperands.add(operand1);
-					innerGroup = CqlfObjectGenerator.wrapInReference(innerGroup, classCounter, true);
+					innerGroup = KoralObjectGenerator.wrapInReference(innerGroup, classCounter, true);
 					outerOperands.add(innerGroup);
 				} else {
 					outerOperands.add(operandStack.pop());
 				}
 				// Lookahead: if next operator is not commonparent or commonancestor, wrap in class for accessibility
 				if (i < node.getChildCount()-2 && !getNodeCat(node.getChild(i+2).getChild(0)).startsWith("common")) {
-					operand2 = CqlfObjectGenerator.wrapInClass(operand2, ++classCounter);
+					operand2 = KoralObjectGenerator.wrapInClass(operand2, ++classCounter);
 				}
 				outerOperands.add(operand2);
 
 				// Wrap in another reference object in case other relations are following
 				if (i < node.getChildCount()-2) {
-					group = CqlfObjectGenerator.wrapInReference(group, classCounter, true);
+					group = KoralObjectGenerator.wrapInReference(group, classCounter, true);
 				}
 				// All other n-ary linguistic relations have special 'relation' attributes defined in CQLF and can be
 				// handled more easily...
@@ -392,12 +393,12 @@
 					groupType = "relation";
 				}
 				if (groupType.equals("relation") || groupType.equals("treeRelation")) {
-					group = CqlfObjectGenerator.makeGroup(groupType);
+					group = KoralObjectGenerator.makeGroup(groupType);
 					LinkedHashMap<String, Object> relation = new LinkedHashMap<String, Object>();
 					putAllButGroupType(relation, operatorGroup);
 					group.put("relation", relation);
 				} else if (groupType.equals("sequence")) {
-					group = CqlfObjectGenerator.makeGroup(groupType);
+					group = KoralObjectGenerator.makeGroup(groupType);
 					putAllButGroupType(group, operatorGroup);
 				} else if (groupType.equals("position")) {
 					group = new LinkedHashMap<String,Object>();
@@ -411,16 +412,16 @@
 				ParseTree rightChildSpec = getFirstChildWithCat(node.getChild(i).getChild(0), "@r");
 				if (leftChildSpec != null || rightChildSpec != null) {
 					String frame = (leftChildSpec!=null) ? "frames:startswith" : "frames:endswith";
-					LinkedHashMap<String,Object> positionGroup = CqlfObjectGenerator.makePosition(new String[]{frame}, null);
-					operand2 = CqlfObjectGenerator.wrapInClass(operand2, ++classCounter);
+					LinkedHashMap<String,Object> positionGroup = KoralObjectGenerator.makePosition(new String[]{frame}, null);
+					operand2 = KoralObjectGenerator.wrapInClass(operand2, ++classCounter);
 					((ArrayList<Object>) positionGroup.get("operands")).add(group);
-					((ArrayList<Object>) positionGroup.get("operands")).add(CqlfObjectGenerator.makeReference(classCounter,true));
+					((ArrayList<Object>) positionGroup.get("operands")).add(KoralObjectGenerator.makeReference(classCounter,true));
 					group = positionGroup;
 				}
 				
 				// Wrap in reference object in case other relations are following
 				if (i < node.getChildCount()-2) {
-					group = CqlfObjectGenerator.wrapInReference(group, classCounter, true);
+					group = KoralObjectGenerator.wrapInReference(group, classCounter, true);
 				}
 
 				// Inject operands.
@@ -436,14 +437,14 @@
 					if (i == 1) {
 						// for the first operator, include both operands
 						if (operand1 != null) operands.add(operand1);
-						if (operand2 != null) operands.add(CqlfObjectGenerator.wrapInClass(operand2, classCounter++));
+						if (operand2 != null) operands.add(KoralObjectGenerator.wrapInClass(operand2, classCounter++));
 						// Don't put this into the super object directly but store on operandStack 
 						// (because this group will have to be an operand of a subsequent operator)
 						operandStack.push(group);
 						// for all subsequent operators, only take the 2nd operand (first was already added by previous operator)
 					} else if (i < node.getChildCount()-2) {
 						// for all intermediate operators, include other previous groups and 2nd operand. Store this on the operandStack, too.
-						if (operand2 != null) operands.add(CqlfObjectGenerator.wrapInClass(operand2, classCounter++));
+						if (operand2 != null) operands.add(KoralObjectGenerator.wrapInClass(operand2, classCounter++));
 						operands.add(0, operandStack.pop());
 						operandStack.push(group);
 					} else if (i == node.getChildCount()-2) {
@@ -453,6 +454,7 @@
 				}
 			}
 			// Final step: decide what to do with the 'group' object, depending on whether all relations have been processed
+			System.err.println(i == node.getChildCount()-2 && relationCounter == totalRelationCount);
 			if (i == node.getChildCount()-2 && relationCounter == totalRelationCount) {
 				putIntoSuperObject(group);
 				if (!operandStack.isEmpty()) {
@@ -476,7 +478,7 @@
 	 */
 	private LinkedHashMap<String, Object> parseUnaryOperator(ParseTree node) {
 		LinkedHashMap<String, Object> attr = new LinkedHashMap<String, Object>();
-		LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeTerm();
+		LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
 		String op = node.getChild(1).toStringTree(parser).substring(1);
 		if (op.equals("arity") || op.equals("tokenarity")) {
 			LinkedHashMap<String, Object> boundary = boundaryFromRangeSpec(node.getChild(3), false);
@@ -494,13 +496,13 @@
 		String operator = getNodeCat(operatorNode);
 		// DOMINANCE
 		if (operator.equals("dominance")) {
-			relation = CqlfObjectGenerator.makeRelation();
+			relation = KoralObjectGenerator.makeRelation();
 			relation.put("groupType", "relation");
 			ParseTree qName = getFirstChildWithCat(operatorNode, "qName");
 			ParseTree edgeSpecNode = getFirstChildWithCat(operatorNode, "edgeSpec");
 			ParseTree star = getFirstChildWithCat(operatorNode, "*");
 			ParseTree rangeSpec = getFirstChildWithCat(operatorNode, "rangeSpec");
-			LinkedHashMap<String,Object> term = CqlfObjectGenerator.makeTerm();
+			LinkedHashMap<String,Object> term = KoralObjectGenerator.makeTerm();
 			term.put("layer", "c");
 			if (qName != null) term = parseQNameNode(qName);
 			if (edgeSpecNode != null) {
@@ -510,31 +512,31 @@
 					((ArrayList<Object>) edgeSpec.get("operands")).add(term);
 					term = edgeSpec;
 				} else {
-					term = CqlfObjectGenerator.makeTermGroup("and");
+					term = KoralObjectGenerator.makeTermGroup("and");
 					ArrayList<Object> termGroupOperands = (ArrayList<Object>) term.get("operands");
 					termGroupOperands.add(edgeSpec);
-					LinkedHashMap<String,Object> constTerm = CqlfObjectGenerator.makeTerm();
+					LinkedHashMap<String,Object> constTerm = KoralObjectGenerator.makeTerm();
 					constTerm.put("layer", "c");
 					termGroupOperands.add(constTerm);
 				}
 			}
-			if (star != null) relation.put("boundary", CqlfObjectGenerator.makeBoundary(0, null));
+			if (star != null) relation.put("boundary", KoralObjectGenerator.makeBoundary(0, null));
 			if (rangeSpec != null) relation.put("boundary", boundaryFromRangeSpec(rangeSpec));
 			relation.put("wrap", term);
 		}
 		else if (operator.equals("pointing")) {
 			//			String reltype = operatorNode.getChild(1).toStringTree(parser);
-			relation = CqlfObjectGenerator.makeRelation();
+			relation = KoralObjectGenerator.makeRelation();
 			relation.put("groupType", "relation");
 			ParseTree qName = getFirstChildWithCat(operatorNode, "qName");
 			ParseTree edgeSpec = getFirstChildWithCat(operatorNode, "edgeSpec");
 			ParseTree star = getFirstChildWithCat(operatorNode, "*");
 			ParseTree rangeSpec = getFirstChildWithCat(operatorNode, "rangeSpec");
 			//			if (qName != null) relation.putAll(parseQNameNode(qName));
-			LinkedHashMap<String,Object> term = CqlfObjectGenerator.makeTerm();
+			LinkedHashMap<String,Object> term = KoralObjectGenerator.makeTerm();
 			if (qName != null) term.putAll(parseQNameNode(qName));
 			if (edgeSpec != null) term.putAll(parseEdgeSpec(edgeSpec));
-			if (star != null) relation.put("boundary", CqlfObjectGenerator.makeBoundary(0, null));
+			if (star != null) relation.put("boundary", KoralObjectGenerator.makeBoundary(0, null));
 			if (rangeSpec != null) relation.put("boundary", boundaryFromRangeSpec(rangeSpec));
 			relation.put("wrap", term);
 		}
@@ -545,7 +547,7 @@
 			ParseTree star = getFirstChildWithCat(operatorNode, "*");
 			ArrayList<Object> distances = new ArrayList<Object>();
 			if (star != null) {
-				distances.add(CqlfObjectGenerator.makeDistance("w", 0, null));
+				distances.add(KoralObjectGenerator.makeDistance("w", 0, null));
 				relation.put("distances", distances);
 			}
 			if (rangeSpec != null) {
@@ -583,7 +585,7 @@
 			}
 //			relation.put("frames", frames);
 //			relation.put("sharedClasses", sharedClasses);
-			relation = CqlfObjectGenerator.makePosition(frames, new String[]{});
+			relation = KoralObjectGenerator.makePosition(frames, new String[]{});
 			relation.put("groupType", "position");
 		}
 		else if (operator.equals("identity")) {
@@ -603,7 +605,7 @@
 		List<ParseTree> annos = getChildrenWithCat(edgeSpec, "edgeAnno");
 		if (annos.size() == 1) return parseEdgeAnno(annos.get(0));
 		else {
-			LinkedHashMap<String,Object> termGroup = CqlfObjectGenerator.makeTermGroup("and");
+			LinkedHashMap<String,Object> termGroup = KoralObjectGenerator.makeTermGroup("and");
 			ArrayList<Object> operands = (ArrayList<Object>) termGroup.get("operands");
 			for (ParseTree anno : annos) {
 				operands.add(parseEdgeAnno(anno));
@@ -636,7 +638,7 @@
 		if (expandToMax) max = null;
 		if (rangeSpec.getChildCount()==3) 
 			max = Integer.parseInt(rangeSpec.getChild(2).toStringTree(parser));
-		return CqlfObjectGenerator.makeBoundary(min, max);
+		return KoralObjectGenerator.makeBoundary(min, max);
 	}
 
 	private LinkedHashMap<String, Object> parseDistance(ParseTree rangeSpec) {
@@ -644,7 +646,7 @@
 		Integer max = null;
 		if (rangeSpec.getChildCount()==3) 
 			max = Integer.parseInt(rangeSpec.getChild(2).toStringTree(parser));
-		return CqlfObjectGenerator.makeDistance("w", min, max);
+		return KoralObjectGenerator.makeDistance("w", min, max);
 	}
 
 	private LinkedHashMap<String, Object> parseTextSpec(ParseTree node) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessor.java
index b76ad29..acad4d6 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQueryProcessor.java
@@ -3,7 +3,7 @@
 import de.ids_mannheim.korap.query.parse.collection.CollectionQueryLexer;
 import de.ids_mannheim.korap.query.parse.collection.CollectionQueryParser;
 import de.ids_mannheim.korap.query.serialize.util.Antlr4DescriptiveErrorListener;
-import de.ids_mannheim.korap.query.serialize.util.CqlfObjectGenerator;
+import de.ids_mannheim.korap.query.serialize.util.KoralObjectGenerator;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
 
 import org.antlr.v4.runtime.*;
@@ -42,16 +42,16 @@
     Integer stackedObjects = 0;
     
     public CollectionQueryProcessor() {
-    	CqlfObjectGenerator.setQueryProcessor(this);
+    	KoralObjectGenerator.setQueryProcessor(this);
 	}
     
     public CollectionQueryProcessor(boolean verbose) {
-    	CqlfObjectGenerator.setQueryProcessor(this);
+    	KoralObjectGenerator.setQueryProcessor(this);
     	CollectionQueryProcessor.verbose = verbose;
 	}
     
     public CollectionQueryProcessor(String query) {
-    	CqlfObjectGenerator.setQueryProcessor(this);
+    	KoralObjectGenerator.setQueryProcessor(this);
     	process(query);
 	}
 
@@ -94,7 +94,7 @@
 
         if (nodeCat.equals("relation")) {
         	String operator = node.getChild(1).getChild(0).toStringTree(parser).equals("&") ? "and" : "or"; 
-            LinkedHashMap<String, Object> relationGroup = CqlfObjectGenerator.makeDocGroup(operator);
+            LinkedHashMap<String, Object> relationGroup = KoralObjectGenerator.makeDocGroup(operator);
             putIntoSuperObject(relationGroup);
             objectStack.push(relationGroup);
             stackedObjects++;
@@ -105,7 +105,7 @@
             String field = fieldNode.getChild(0).toStringTree(parser);
             ParseTree operatorNode = getFirstChildWithCat(node, "operator");
             ParseTree valueNode = getFirstChildWithCat(node, "value");
-            LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeDoc();
+            LinkedHashMap<String, Object> term = KoralObjectGenerator.makeDoc();
             term.put("key", field);
             term.putAll(parseValue(valueNode));
             String match = operatorNode.getText();
@@ -128,7 +128,7 @@
             ParseTree dateOpNode = getFirstChildWithCat(node, "dateOp");
             ParseTree dateNode = getFirstChildWithCat(node, "date");
 
-            LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeDoc();
+            LinkedHashMap<String, Object> term = KoralObjectGenerator.makeDoc();
             term.put("key", field);
             term.putAll(parseValue(dateNode));
             String match = dateOpNode.getText();
@@ -141,7 +141,7 @@
         }
         
         if (nodeCat.equals("token")) {
-			LinkedHashMap<String,Object> token = CqlfObjectGenerator.makeToken();
+			LinkedHashMap<String,Object> token = KoralObjectGenerator.makeToken();
 			// handle negation
 			List<ParseTree> negations = getChildrenWithCat(node, "!");
 			boolean negated = false;
@@ -149,7 +149,7 @@
 			if (negations.size() % 2 == 1) negated = true;
 			if (getNodeCat(node.getChild(0)).equals("key")) {
 				// no 'term' child, but direct key specification: process here
-				LinkedHashMap<String,Object> term = CqlfObjectGenerator.makeTerm();
+				LinkedHashMap<String,Object> term = KoralObjectGenerator.makeTerm();
 				String key = node.getChild(0).getText();
 				if (getNodeCat(node.getChild(0).getChild(0)).equals("regex")) {
 					isRegex = true;
@@ -373,7 +373,7 @@
 	private LinkedHashMap<String, Object> parseTermOrTermGroup(ParseTree node, boolean negatedGlobal, String mode) {
 		if (getNodeCat(node).equals("term")) {
 			String key = null;
-			LinkedHashMap<String,Object> term = CqlfObjectGenerator.makeTerm();
+			LinkedHashMap<String,Object> term = KoralObjectGenerator.makeTerm();
 			// handle negation
 			boolean negated = negatedGlobal;
 			boolean isRegex = false;
@@ -441,7 +441,7 @@
 			// establish boolean relation
 			ParseTree boolOp = getFirstChildWithCat(node, "booleanOp"); 
 			String operator = boolOp.getText().equals("&") ? "and" : "or";
-			termGroup = CqlfObjectGenerator.makeTermGroup(operator);
+			termGroup = KoralObjectGenerator.makeTermGroup(operator);
 			ArrayList<Object> operands = (ArrayList<Object>) termGroup.get("operands");
 			// recursion with left/right operands
 			operands.add(parseTermOrTermGroup(leftOp, negatedGlobal, mode));
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
index db161a0..8ff5474 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusQueryProcessor.java
@@ -3,7 +3,7 @@
 import de.ids_mannheim.korap.query.parse.poliqarpplus.PoliqarpPlusLexer;
 import de.ids_mannheim.korap.query.parse.poliqarpplus.PoliqarpPlusParser;
 import de.ids_mannheim.korap.query.serialize.util.Antlr4DescriptiveErrorListener;
-import de.ids_mannheim.korap.query.serialize.util.CqlfObjectGenerator;
+import de.ids_mannheim.korap.query.serialize.util.KoralObjectGenerator;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
 
 import org.antlr.v4.runtime.*;
@@ -39,7 +39,7 @@
      * @throws QueryException
      */
     public PoliqarpPlusQueryProcessor (String query) {
-        CqlfObjectGenerator.setQueryProcessor(this);
+        KoralObjectGenerator.setQueryProcessor(this);
         process(query);
         log.info(">>> " + requestMap.get("query") + " <<<");
     }
@@ -195,10 +195,10 @@
         ParseTree quantification = getFirstChildWithCat(node, "repetition");
         if (quantification != null) {
             LinkedHashMap<String, Object> quantGroup = 
-                    CqlfObjectGenerator.makeGroup("repetition");
+                    KoralObjectGenerator.makeGroup("repetition");
             Integer[] minmax = parseRepetition(quantification);
             quantGroup.put("boundary",
-                    CqlfObjectGenerator.makeBoundary(minmax[0], minmax[1]));
+                    KoralObjectGenerator.makeBoundary(minmax[0], minmax[1]));
             putIntoSuperObject(quantGroup);
             objectStack.push(quantGroup);
             stackedObjects++;
@@ -207,13 +207,13 @@
 
     private void processSequence(ParseTree node) {
         LinkedHashMap<String, Object> sequence = 
-                CqlfObjectGenerator.makeGroup("sequence");
+                KoralObjectGenerator.makeGroup("sequence");
         ParseTree distanceNode = getFirstChildWithCat(node, "distance");
 
         if (distanceNode != null) {
             Integer[] minmax = parseDistance(distanceNode);
             LinkedHashMap<String, Object> distance = 
-                    CqlfObjectGenerator.makeDistance("w", minmax[0], minmax[1]);
+                    KoralObjectGenerator.makeDistance("w", minmax[0], minmax[1]);
             sequence.put("inOrder", true);
             ArrayList<Object> distances = new ArrayList<Object>();
             distances.add(distance);
@@ -237,9 +237,9 @@
         // token
         LinkedHashMap<String, Object> object;
         LinkedHashMap<String, Object> emptyToken = 
-                CqlfObjectGenerator.makeToken();
+                KoralObjectGenerator.makeToken();
         if (minmax[0] != 1 || minmax[1] == null || minmax[1] != 1) {
-            object = CqlfObjectGenerator.makeRepetition(minmax[0], minmax[1]);
+            object = KoralObjectGenerator.makeRepetition(minmax[0], minmax[1]);
             ((ArrayList<Object>) object.get("operands")).add(emptyToken);
         }
         else {
@@ -257,14 +257,14 @@
                     .toStringTree(parser));
         }
         LinkedHashMap<String, Object> classGroup = 
-                CqlfObjectGenerator.makeSpanClass(classId, false);
+                KoralObjectGenerator.makeSpanClass(classId, false);
         putIntoSuperObject(classGroup);
         objectStack.push(classGroup);
         stackedObjects++;
     }
 
     private void processToken(ParseTree node) {
-        LinkedHashMap<String, Object> token = CqlfObjectGenerator.makeToken();
+        LinkedHashMap<String, Object> token = KoralObjectGenerator.makeToken();
         // handle negation
         List<ParseTree> negations = getChildrenWithCat(node, "!");
         boolean negated = false;
@@ -273,7 +273,7 @@
             negated = true;
         if (getNodeCat(node.getChild(0)).equals("key")) {
             // no 'term' child, but direct key specification: process here
-            LinkedHashMap<String, Object> term = CqlfObjectGenerator.makeTerm();
+            LinkedHashMap<String, Object> term = KoralObjectGenerator.makeTerm();
             String key = node.getChild(0).getText();
             if (getNodeCat(node.getChild(0).getChild(0)).equals("regex")) {
                 isRegex = true;
@@ -317,7 +317,7 @@
     @SuppressWarnings("unchecked")
     private void processAlignment(ParseTree node) {
         LinkedHashMap<String, Object> alignClass = 
-                CqlfObjectGenerator.makeSpanClass(++classCounter, false);
+                KoralObjectGenerator.makeSpanClass(++classCounter, false);
         LinkedHashMap<String, Object> metaMap = 
                 (LinkedHashMap<String, Object>) requestMap.get("meta");
         if (metaMap.containsKey("alignment")) {
@@ -345,7 +345,7 @@
         boolean negated = false;
         if (negations.size() % 2 == 1)
             negated = true;
-        LinkedHashMap<String, Object> span = CqlfObjectGenerator.makeSpan();
+        LinkedHashMap<String, Object> span = KoralObjectGenerator.makeSpan();
         ParseTree keyNode = getFirstChildWithCat(node, "key");
         ParseTree layerNode = getFirstChildWithCat(node, "layer");
         ParseTree foundryNode = getFirstChildWithCat(node, "foundry");
@@ -385,7 +385,7 @@
 
     private void processDisjunction(ParseTree node) {
         LinkedHashMap<String, Object> disjunction = 
-                CqlfObjectGenerator.makeGroup("or");
+                KoralObjectGenerator.makeGroup("or");
         putIntoSuperObject(disjunction);
         objectStack.push(disjunction);
         stackedObjects++;
@@ -400,9 +400,9 @@
 
     private void processRelation(ParseTree node) {
         LinkedHashMap<String, Object> relationGroup = 
-                CqlfObjectGenerator.makeGroup("relation");
+                KoralObjectGenerator.makeGroup("relation");
         LinkedHashMap<String, Object> relation = 
-                CqlfObjectGenerator.makeRelation();
+                KoralObjectGenerator.makeRelation();
         relationGroup.put("relation", relation);
         if (node.getChild(0).getText().equals("dominates")) {
             relation.put("layer", "c");
@@ -423,7 +423,7 @@
         if (repetition != null) {
             Integer[] minmax = parseRepetition(repetition);
             relation.put("boundary",
-                    CqlfObjectGenerator.makeBoundary(minmax[0], minmax[1]));
+                    KoralObjectGenerator.makeBoundary(minmax[0], minmax[1]));
         }
         putIntoSuperObject(relationGroup);
         objectStack.push(relationGroup);
@@ -453,7 +453,7 @@
             }
         }
         LinkedHashMap<String, Object> classGroup = 
-                CqlfObjectGenerator.makeSpanClass(classId, false);
+                KoralObjectGenerator.makeSpanClass(classId, false);
         putIntoSuperObject(classGroup);
         objectStack.push(classGroup);
         stackedObjects++;
@@ -497,7 +497,7 @@
             classRefs.add(1);
         }
         LinkedHashMap<String, Object> referenceGroup = 
-                CqlfObjectGenerator.makeReference(classRefs);
+                KoralObjectGenerator.makeReference(classRefs);
 
         String type = node.getChild(0).toStringTree(parser);
         // Default is focus(), if deviating catch here
@@ -525,7 +525,7 @@
 
     private void processSubmatch(ParseTree node) {
         LinkedHashMap<String, Object> submatch = 
-                CqlfObjectGenerator.makeReference(null);
+                KoralObjectGenerator.makeReference(null);
         submatch.put("operands", new ArrayList<Object>());
         ParseTree startpos = getFirstChildWithCat(node, "startpos");
         ParseTree length = getFirstChildWithCat(node, "length");
@@ -558,9 +558,9 @@
     private void processWithin(ParseTree node) {
         ParseTree domainNode = node.getChild(1);
         String domain = getNodeCat(domainNode);
-        LinkedHashMap<String, Object> span = CqlfObjectGenerator.makeSpan(domain);
+        LinkedHashMap<String, Object> span = KoralObjectGenerator.makeSpan(domain);
         LinkedHashMap<String, Object> queryObj = (LinkedHashMap<String, Object>) requestMap.get("query");
-        LinkedHashMap<String, Object> contains = CqlfObjectGenerator.makePosition(new String[]{"frames:contains"}, null);
+        LinkedHashMap<String, Object> contains = KoralObjectGenerator.makePosition(new String[]{"frames:contains"}, null);
         ArrayList<Object> operands = (ArrayList<Object>) contains.get("operands");
         operands.add(span);
         operands.add(queryObj);
@@ -650,7 +650,7 @@
                 classRefCheck = new String[] { "classRefCheck:intersects" };
                 break;
         }
-        return CqlfObjectGenerator.makePosition(frames, classRefCheck);
+        return KoralObjectGenerator.makePosition(frames, classRefCheck);
     }
 
     private LinkedHashMap<String, Object> parseTermOrTermGroup(ParseTree node,
@@ -676,7 +676,7 @@
         if (nodeCat.equals("term")) {
             String key = null;
             LinkedHashMap<String, Object> term = 
-                    CqlfObjectGenerator.makeTerm();
+                    KoralObjectGenerator.makeTerm();
             // handle negation
             boolean negated = negatedGlobal;
             boolean isRegex = false;
@@ -767,7 +767,7 @@
             // establish boolean relation
             ParseTree boolOp = getFirstChildWithCat(node, "boolOp");
             String operator = boolOp.getText().equals("&") ? "and" : "or";
-            termGroup = CqlfObjectGenerator.makeTermGroup(operator);
+            termGroup = KoralObjectGenerator.makeTermGroup(operator);
             ArrayList<Object> operands = (ArrayList<Object>) termGroup
                     .get("operands");
             // recursion with left/right operands
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/TreeTemplate.java b/src/main/java/de/ids_mannheim/korap/query/serialize/TreeTemplate.java
index 9c74336..27caa3d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/TreeTemplate.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/TreeTemplate.java
@@ -18,7 +18,7 @@
 import de.ids_mannheim.korap.query.parse.annis.AqlLexer;
 //TODO replace AqlParser with parser for your Antlr4 grammar!
 import de.ids_mannheim.korap.query.parse.annis.AqlParser;
-import de.ids_mannheim.korap.query.serialize.util.CqlfObjectGenerator;
+import de.ids_mannheim.korap.query.serialize.util.KoralObjectGenerator;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
 
 /**
@@ -34,7 +34,7 @@
 	 * @param parser The ANTLR parser instance that generated the parse tree
 	 */
 	public TreeTemplate(String query) {
-		CqlfObjectGenerator.setQueryProcessor(this);
+		KoralObjectGenerator.setQueryProcessor(this);
 		process(query);
 	}
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/util/CqlfObjectGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
similarity index 99%
rename from src/main/java/de/ids_mannheim/korap/query/serialize/util/CqlfObjectGenerator.java
rename to src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
index 50b71a6..45135ef 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/util/CqlfObjectGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
@@ -6,13 +6,13 @@
 
 import de.ids_mannheim.korap.query.serialize.AbstractQueryProcessor;
 
-public class CqlfObjectGenerator {
+public class KoralObjectGenerator {
 
     protected static final Integer MAXIMUM_DISTANCE = 100;
     private static AbstractQueryProcessor qp;
 
     public static void setQueryProcessor(AbstractQueryProcessor qp) {
-        CqlfObjectGenerator.qp = qp;
+        KoralObjectGenerator.qp = qp;
     }
 
     public static LinkedHashMap<String, Object> makeSpan() {
