diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
index 4c1e340..1c42d5e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
@@ -6,14 +6,12 @@
 import java.util.List;
 import java.util.Set;
 
-import org.omg.CosNaming.IstringHelper;
-
 import de.ids_mannheim.korap.query.object.KoralMatchOperator;
 import de.ids_mannheim.korap.query.object.KoralObject;
-import de.ids_mannheim.korap.query.object.KoralTermGroupRelation;
 import de.ids_mannheim.korap.query.object.KoralTerm;
 import de.ids_mannheim.korap.query.object.KoralTerm.KoralTermType;
 import de.ids_mannheim.korap.query.object.KoralTermGroup;
+import de.ids_mannheim.korap.query.object.KoralTermGroupRelation;
 import de.ids_mannheim.korap.query.object.KoralToken;
 import de.ids_mannheim.korap.query.serialize.util.KoralException;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLComplexTest.java b/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLComplexTest.java
index 7417644..35305c1 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLComplexTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLComplexTest.java
@@ -41,8 +41,8 @@
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
         // group and disjunction
-        query = "([pos=\"NN\"]|[cnx:pos=\"N\"]|[text=\"Mann\"])";
-        jsonLd = "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:cnx,layer:p,type:type:regex,match:match:eq}}";
+        query = "([pos=\"NN\"]|[corenlp:pos=\"N\"]|[text=\"Mann\"])";
+        jsonLd = "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}";
         FCSQLQueryProcessorTest
                 .validateNode(query, "/query/operands/1", jsonLd);
 
@@ -111,31 +111,31 @@
                 .validateNode(query, "/query/operands/1", jsonLd);
 
         // sequence and disjunction
-        query = "([pos=\"NN\"]|[cnx:pos=\"N\"])[text=\"Mann\"]";
+        query = "([pos=\"NN\"]|[corenlp:pos=\"N\"])[text=\"Mann\"]";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:sequence,"
                 + "operands:["
                 + "{@type:koral:group,"
                 + "operation:operation:disjunction,"
                 + "operands:[{@type:koral:token,wrap:{@type:koral:term,key:NN,foundry:tt,layer:p,type:type:regex,match:match:eq}},"
-                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:cnx,layer:p,type:type:regex,match:match:eq}}"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}"
                 + "]},"
                 + "{@type:koral:token,wrap:{@type:koral:term,key:Mann,foundry:opennlp,layer:orth,type:type:regex,match:match:eq}}"
                 + "]}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
         
-        query = "[text=\"Mann\"]([pos=\"NN\"]|[cnx:pos=\"N\"])";
+        query = "[text=\"Mann\"]([pos=\"NN\"]|[corenlp:pos=\"N\"])";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:disjunction,"
                 + "operands:[{@type:koral:token,wrap:{@type:koral:term,key:NN,foundry:tt,layer:p,type:type:regex,match:match:eq}},"
-                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:cnx,layer:p,type:type:regex,match:match:eq}}"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}"
                 + "]}";
         FCSQLQueryProcessorTest.validateNode(query, "/query/operands/1", jsonLd);
     }
 
     @Test
     public void testSequenceOfQueryGroups() throws IOException {
-        query = "(\"blaue\"|\"grüne\")([pos=\"NN\"]|[cnx:pos=\"N\"])";
+        query = "(\"blaue\"|\"grüne\")([pos=\"NN\"]|[corenlp:pos=\"N\"])";
         FCSQLQueryProcessorTest.validateNode(query, "/query/@type",
                 "koral:group");
         FCSQLQueryProcessorTest.validateNode(query, "/query/operation",
@@ -153,7 +153,7 @@
         jsonLd = "{@type:koral:group,operation:operation:disjunction,"
                 + "operands:["
                 + "{@type:koral:token,wrap:{@type:koral:term,key:NN,foundry:tt,layer:p,type:type:regex,match:match:eq}},"
-                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:cnx,layer:p,type:type:regex,match:match:eq}}"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:N,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}"
                 + "]}";
         FCSQLQueryProcessorTest
                 .validateNode(query, "/query/operands/1", jsonLd);
@@ -200,10 +200,10 @@
         FCSQLQueryProcessorTest.validateNode(query, "/query/boundary", jsonLd);
 
         // segment query with quantifier
-        query = "[cnx:pos=\"A\"]*";
+        query = "[corenlp:pos=\"A\"]*";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:repetition,"
-                + "operands:[{@type:koral:token,wrap:{@type:koral:term,key:A,foundry:cnx,layer:p,type:type:regex,match:match:eq}}],"
+                + "operands:[{@type:koral:token,wrap:{@type:koral:term,key:A,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}],"
                 + "boundary:{@type:koral:boundary,min:0}}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
     }
@@ -254,9 +254,9 @@
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
         // sequence with extension
-        query = "[cnx:pos=\"A\"] \"Hund\"[]{2}";
+        query = "[corenlp:pos=\"A\"] \"Hund\"[]{2}";
         jsonLd = "["
-                + "{@type:koral:token,wrap:{@type:koral:term,key:A,foundry:cnx,layer:p,type:type:regex,match:match:eq}},"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:A,foundry:corenlp,layer:p,type:type:regex,match:match:eq}},"
                 + "{@type:koral:token,wrap:{@type:koral:term,key:Hund,foundry:opennlp,layer:orth,type:type:regex,match:match:eq}},"
                 + "{@type:koral:group,operation:operation:repetition,operands:["
                 + "{@type:koral:token}],boundary:{@type:koral:boundary,min:2,max:2}}"
@@ -320,7 +320,7 @@
                 jsonLd);
 
         // multiple occurrences of wildcards
-        query = "\"Katze\" []{3} \"Hund\" []{1,2} [cnx:pos=\"V\"]";
+        query = "\"Katze\" []{3} \"Hund\" []{1,2} [corenlp:pos=\"V\"]";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:sequence,"
                 + "inOrder:true,"
@@ -337,7 +337,7 @@
                 + "],"
                 + "operands:["
                 + "{@type:koral:token,wrap:{@type:koral:term,key:Hund,foundry:opennlp,layer:orth,type:type:regex,match:match:eq}},"
-                + "{@type:koral:token,wrap:{@type:koral:term,key:V,foundry:cnx,layer:p,type:type:regex,match:match:eq}}]}"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:V,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}]}"
                 + "]}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
     }
@@ -359,29 +359,29 @@
                 + "]}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
         
-        query = "[cnx:pos=\"VVFIN\"] within s";
+        query = "[corenlp:pos=\"VVFIN\"] within s";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:position,"
                 + "operands:["
                 + "{@type:koral:span,wrap:{@type:koral:term,key:s,foundry:base,layer:s}},"
-                + "{@type:koral:token,wrap:{@type:koral:term,key:VVFIN,foundry:cnx,layer:p,type:type:regex,match:match:eq}}"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:VVFIN,foundry:corenlp,layer:p,type:type:regex,match:match:eq}}"
                 + "]}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
-        query = "[cnx:pos=\"VVFIN\"] within sentence";
+        query = "[corenlp:pos=\"VVFIN\"] within sentence";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
-        query = "[cnx:pos=\"VVFIN\"] within p";
+        query = "[corenlp:pos=\"VVFIN\"] within p";
         jsonLd = "{@type:koral:span,wrap:{@type:koral:term,key:p,foundry:base,layer:s}}";
         FCSQLQueryProcessorTest
                 .validateNode(query, "/query/operands/0", jsonLd);
 
-        query = "[cnx:pos=\"VVFIN\"] within text";
+        query = "[corenlp:pos=\"VVFIN\"] within text";
         jsonLd = "{@type:koral:span,wrap:{@type:koral:term,key:t,foundry:base,layer:s}}";
         FCSQLQueryProcessorTest
                 .validateNode(query, "/query/operands/0", jsonLd);
 
-        query = "[cnx:pos=\"VVFIN\"] within u";
+        query = "[corenlp:pos=\"VVFIN\"] within u";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query));
         assertEquals(311, error.get(0));
         assertEquals(
@@ -433,12 +433,12 @@
         String errorMessage = "Query cannot be parsed, an unexpcected occured exception while parsing";
         
         // expression should always be within a segment
-        query = "!(mate:lemma=\"sein\" | mate:pos=\"PPOSS\")";
+        query = "!(tt:lemma=\"sein\" | tt:pos=\"PPOSS\")";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query));
         assertEquals(399, error.get(0));
         assertEquals(errorMessage, error.get(1).toString());
 
-        query = "![mate:lemma=\"sein\" | mate:pos=\"PPOSS\"]";
+        query = "![tt:lemma=\"sein\" | tt:pos=\"PPOSS\"]";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query));
         assertEquals(errorMessage, error.get(1).toString());
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLQueryProcessorTest.java
index 3d8bfaa..01881ee 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/fcsql/FCSQLQueryProcessorTest.java
@@ -120,9 +120,9 @@
     // | "!=" /* non-equals */
     @Test
     public void testOperator() throws IOException {
-        query = "[cnx:pos != \"N\"]";
+        query = "[corenlp:pos != \"N\"]";
         jsonLd = "{@type:koral:token, wrap:{@type:koral:term, key:N, "
-                + "foundry:cnx, layer:p, type:type:regex, match:match:ne}}";
+                + "foundry:corenlp, layer:p, type:type:regex, match:match:ne}}";
         runAndValidate(query, jsonLd);
     }
 
@@ -153,14 +153,14 @@
     // qualified-attribute ::= identifier ":" identifier
     @Test
     public void testTermQueryWithQualifier() throws JsonProcessingException {
-        query = "[mate:lemma = \"sein\"]";
+        query = "[tt:lemma = \"sein\"]";
         jsonLd = "{@type:koral:token, wrap:{@type:koral:term, key:sein, "
-                + "foundry:mate, layer:l, type:type:regex, match:match:eq}}";
+                + "foundry:tt, layer:l, type:type:regex, match:match:eq}}";
         runAndValidate(query, jsonLd);
 
-        query = "[cnx:pos = \"N\"]";
+        query = "[corenlp:pos = \"N\"]";
         jsonLd = "{@type:koral:token, wrap:{@type:koral:term, key:N, "
-                + "foundry:cnx, layer:p, type:type:regex, match:match:eq}}";
+                + "foundry:corenlp, layer:p, type:type:regex, match:match:eq}}";
         runAndValidate(query, jsonLd);
     }
 
@@ -174,17 +174,17 @@
     // | expression "|" expression /* or */
     @Test
     public void testExpressionOr() throws IOException {
-        query = "[mate:lemma=\"sein\" | mate:pos=\"PPOSS\"]";
+        query = "[tt:lemma=\"sein\" | tt:pos=\"PPOSS\"]";
         jsonLd = "{@type: koral:token,"
                 + " wrap: { @type: koral:termGroup,"
                 + "relation: relation:or,"
                 + " operands:["
-                + "{@type: koral:term, key: sein, foundry: mate, layer: l, type:type:regex, match: match:eq},"
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:eq}]}}";
+                + "{@type: koral:term, key: sein, foundry: tt, layer: l, type:type:regex, match: match:eq},"
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:eq}]}}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
-        query = "[cnx:lemma=\"sein\" | mate:lemma=\"sein\" | mate:pos=\"PPOSS\"]";
-        jsonLd = "{@type: koral:term, key: sein, foundry: cnx, layer: l, type:type:regex, match: match:eq}";
+        query = "[corenlp:lemma=\"sein\" | tt:lemma=\"sein\" | tt:pos=\"PPOSS\"]";
+        jsonLd = "{@type: koral:term, key: sein, foundry: corenlp, layer: l, type:type:regex, match: match:eq}";
         FCSQLQueryProcessorTest.validateNode(query, "/query/wrap/operands/0",
                 jsonLd);
     }
@@ -192,13 +192,13 @@
     // | expression "&" expression /* and */
     @Test
     public void testExpressionAnd() throws IOException {
-        query = "[mate:lemma=\"sein\" & mate:pos=\"PPOSS\"]";
+        query = "[tt:lemma=\"sein\" & tt:pos=\"PPOSS\"]";
         jsonLd = "{@type: koral:token,"
                 + " wrap: { @type: koral:termGroup,"
                 + "relation: relation:and,"
                 + " operands:["
-                + "{@type: koral:term, key: sein, foundry: mate, layer: l, type:type:regex, match: match:eq},"
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:eq}]}}";
+                + "{@type: koral:term, key: sein, foundry: tt, layer: l, type:type:regex, match: match:eq},"
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:eq}]}}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
     }
 
@@ -224,27 +224,27 @@
 
     @Test
     public void testMultipleBooleanExpressions() throws IOException {
-        query = "[mate:lemma=\"sein\" & (mate:pos=\"PPOSS\"|mate:pos=\"VAFIN\")]";
+        query = "[tt:lemma=\"sein\" & (tt:pos=\"PPOSS\"|tt:pos=\"VAFIN\")]";
         jsonLd = "{@type: koral:termGroup,"
                 + "relation: relation:or,"
                 + " operands:["
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:eq},"
-                + "{@type: koral:term, key: VAFIN, foundry: mate, layer: p, type:type:regex, match: match:eq}]}";
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:eq},"
+                + "{@type: koral:term, key: VAFIN, foundry: tt, layer: p, type:type:regex, match: match:eq}]}";
         FCSQLQueryProcessorTest.validateNode(query, "/query/wrap/operands/1",
                 jsonLd);
         FCSQLQueryProcessorTest.validateNode(query, "/query/wrap/relation",
                 "relation:and");
         
-        query = "[(cnx:lemma=\"sein\" | mate:pos=\"PPOSS\") | mate:pos=\"VAFIN\"]";
+        query = "[(corenlp:lemma=\"sein\" | tt:pos=\"PPOSS\") | tt:pos=\"VAFIN\"]";
         jsonLd = "{@type: koral:termGroup,"
                 + "relation: relation:or,"
                 + " operands:["
-                + "{@type: koral:term, key: sein, foundry: cnx, layer: l, type:type:regex, match: match:eq},"
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:eq}]}";
+                + "{@type: koral:term, key: sein, foundry: corenlp, layer: l, type:type:regex, match: match:eq},"
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:eq}]}";
         FCSQLQueryProcessorTest.validateNode(query, "/query/wrap/operands/0",
                 jsonLd);
         
-        query = "[(cnx:lemma=\"sein\" | mate:pos=\"PPOSS\") & text=\"ist\"]";
+        query = "[(corenlp:lemma=\"sein\" | tt:pos=\"PPOSS\") & text=\"ist\"]";
         jsonLd = "{@type: koral:term, key: ist, foundry: opennlp, layer: orth, type:type:regex, match: match:eq}";
         FCSQLQueryProcessorTest.validateNode(query, "/query/wrap/operands/1",
                 jsonLd);
@@ -262,27 +262,27 @@
         query = "[!!!pos != \"NN\"]";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
 
-        query = "[mate:lemma=\"sein\" & !mate:pos=\"PPOSS\"]";
+        query = "[tt:lemma=\"sein\" & !tt:pos=\"PPOSS\"]";
         jsonLd = "{@type: koral:token,"
                 + " wrap: { "
                 + "@type: koral:termGroup,"
                 + "relation: relation:and,"
                 + " operands:["
-                + "{@type: koral:term, key: sein, foundry: mate, layer: l, type:type:regex, match: match:eq},"
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:ne}]}}";
+                + "{@type: koral:term, key: sein, foundry: tt, layer: l, type:type:regex, match: match:eq},"
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:ne}]}}";
         FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
     }
     
     @Test
     public void testNotExpressionGroup() throws JsonProcessingException {
-        query = "[!(mate:lemma=\"sein\" & mate:pos=\"PPOSS\")]";
+        query = "[!(tt:lemma=\"sein\" & tt:pos=\"PPOSS\")]";
         jsonLd = "{@type: koral:token,"
                 + " wrap: { "
                 + "@type: koral:termGroup,"
                 + "relation: relation:or,"
                 + " operands:["
-                + "{@type: koral:term, key: sein, foundry: mate, layer: l, type:type:regex, match: match:ne},"
-                + "{@type: koral:term, key: PPOSS, foundry: mate, layer: p, type:type:regex, match: match:ne}]}}";
+                + "{@type: koral:term, key: sein, foundry: tt, layer: l, type:type:regex, match: match:ne},"
+                + "{@type: koral:term, key: PPOSS, foundry: tt, layer: p, type:type:regex, match: match:ne}]}}";
         //FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
         
         error = getError(new FCSQLQueryProcessor(query));
@@ -316,17 +316,17 @@
                 error.get(1));
 
         // unsupported layer
-        query = "[cnx:morph = \"heit\"]";
+        query = "[corenlp:morph = \"heit\"]";
         error = getError(new FCSQLQueryProcessor(query));
         assertEquals(306, error.get(0));
         assertEquals("Layer morph is unsupported.",
                 error.get(1));
 
         // missing layer
-        query = "[cnx=\"V\"]";
+        query = "[corenlp=\"V\"]";
         error = getError(new FCSQLQueryProcessor(query));
         assertEquals(306, error.get(0));
-        assertEquals("Layer cnx is unsupported.",
+        assertEquals("Layer corenlp is unsupported.",
                 error.get(1));
     }
 }
