diff --git a/src/main/antlr/annis/AqlParser.g4 b/src/main/antlr/annis/AqlParser.g4
index ea719d1..bd0d8d6 100644
--- a/src/main/antlr/annis/AqlParser.g4
+++ b/src/main/antlr/annis/AqlParser.g4
@@ -83,9 +83,13 @@
 ;
 
 pointing
-: POINTING qName (anno=edgeSpec)? # DirectPointing
-| POINTING qName (anno=edgeSpec)? STAR # IndirectPointing
-| POINTING qName (anno=edgeSpec)? COMMA? rangeSpec # RangePointing
+: POINTING edgeAnno (anno=edgeSpec)? # DirectPointing
+| POINTING edgeAnno (anno=edgeSpec)? STAR # IndirectPointing
+| POINTING edgeAnno (anno=edgeSpec)? COMMA? rangeSpec # RangePointing
+
+//: POINTING qName (anno=edgeSpec)? # DirectPointing
+//| POINTING qName (anno=edgeSpec)? STAR # IndirectPointing
+//| POINTING qName (anno=edgeSpec)? COMMA? rangeSpec # RangePointing
 ;
 
 spanrelation
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 e7c5b56..fc6cc49 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
@@ -201,13 +201,13 @@
         }
         group.put("key", key);
         group.put("boundary", makeBoundary(min, max));
-        group.put("min", min);
-        if (max != null) {
-            group.put("max", max);
-        }
-        qp.addMessage(
-                StatusCodes.DEPRECATED_QUERY_ELEMENT,
-                "Deprecated 2014-07-24: 'min' and 'max' to be supported until 3 months from deprecation date.");
+//        group.put("min", min);
+//        if (max != null) {
+//            group.put("max", max);
+//        }
+//        qp.addMessage(
+//                StatusCodes.DEPRECATED_QUERY_ELEMENT,
+//                "Deprecated 2014-07-24: 'min' and 'max' to be supported until 3 months from deprecation date.");
         return group;
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
index 716f9f3..066e615 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
@@ -1,9 +1,8 @@
-package de.ids_mannheim.korap.query.test;
+package de.ids_mannheim.korap.query.test.annis;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.IOException;
-import java.util.ArrayList;
 
 import org.junit.Test;
 
@@ -21,13 +20,11 @@
  * @version 1.0
  */
 public class AnnisQueryProcessorTest {
+    private String query;
 
-    String query;
-    ArrayList<JsonNode> operands;
-
-    QuerySerializer qs = new QuerySerializer();
-    ObjectMapper mapper = new ObjectMapper();
-    JsonNode res;
+    private QuerySerializer qs = new QuerySerializer();
+    private ObjectMapper mapper = new ObjectMapper();
+    private JsonNode res;
 
 
     @Test
@@ -144,146 +141,10 @@
         assertEquals("tt", res.at("/query/wrap/foundry").asText());
     }
 
-
     @Test
-    public void testDirectDeclarationRelations ()
-            throws JsonProcessingException, IOException {
-        query = "node > node";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("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";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals(true, res.at("/query/operands/1/key").isMissingNode());
-        assertEquals("np", res.at("/query/operands/0/key").asText());
-
-        query = "cat=/NP/ & cat=/PP/ > #1";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").asText());
-        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-        assertEquals("PP", res.at("/query/operands/0/key").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("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());
-    }
-
-
-    @Test
-    public void testDefPredicationInversion () throws JsonProcessingException,
+    public void testLeftMostChild () throws JsonProcessingException,
             IOException {
-        query = "#1 > #2 & cnx/cat=\"vp\" & cnx/cat=\"np\"";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("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("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());
-    }
-
-
-    @Test
-    public void testSimpleDominance () throws JsonProcessingException,
-            IOException {
-        query = "node & node & #2 > #1";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("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("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());
-        assertEquals("SB", res.at("/query/relation/wrap/operands/0/key")
-                .asText());
-
-        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("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());
-        assertEquals("func", res.at("/query/relation/wrap/operands/1/layer")
-                .asText());
-        assertEquals("MO", res.at("/query/relation/wrap/operands/1/key")
-                .asText());
-        assertEquals("c", res.at("/query/relation/wrap/operands/2/layer")
-                .asText());
-
+        
         query = "cat=\"S\" & cat=\"NP\" & #1 >@l #2";  // all sentences starting with NP  -> wrap relation in startswith and retrieve 2nd operand with focus
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
@@ -310,7 +171,11 @@
         assertEquals("operation:focus", res.at("/query/operands/1/operation")
                 .asText());
         assertEquals(130, res.at("/query/operands/1/classRef/0").asInt());
+    }
 
+    @Test
+    public void testRightMostChild () throws JsonProcessingException,
+            IOException {
         query = "cat=\"S\" & cat=\"NP\" & #1 >@r #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
@@ -339,148 +204,6 @@
         assertEquals(130, res.at("/query/operands/1/classRef/0").asInt());
     }
 
-
-    @Test
-    public void testIndirectDominance () throws JsonProcessingException,
-            IOException {
-        query = "node & node & #1 >2,4 #2";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("koral:term", res.at("/query/relation/wrap/@type")
-                .asText());
-        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
-
-        query = "node & node & #1 >* #2";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals(0, res.at("/query/relation/boundary/min").asInt());
-        assertEquals(true, res.at("/query/relation/boundary/max")
-                .isMissingNode());
-    }
-
-
-    @Test
-    public void testMultipleDominance () throws JsonProcessingException,
-            IOException {
-        query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").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("koral:group", res
-                .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
-                res.at("/query/operands/0/operands/0/operation").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("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("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=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=koral:relation, wrap={@type=koral: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();
-    //		assertEquals(dom1.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //		
-    //		query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & cat=\"DP\" & #1 > #2 > #3 > #4";
-    //		String dom2 = 
-    //				"{@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=koral:relation, wrap={@type=koral:term, layer=c}}}" +
-    //								"]}," +
-    //								"{@type=koral:group, operation=operation:class, class=2, classOut=2, operands=[" +
-    //									"{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
-    //								"]}" +
-    //							"], relation={@type=koral:relation, wrap={@type=koral: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();
-    //		assertEquals(dom2.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //	}
-    //	
-    //	@Test
-    //	public void testPointingRelations() throws Exception {
-    //		query = "node & node & #2 ->coref[val=\"true\"] #1";
-    //		String dom1 = 
-    //				"{@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();
-    //		assertEquals(dom1.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //		
-    //		query = "node & node & #2 ->mate/coref[val=\"true\"] #1";
-    //		String dom2 = 
-    //				"{@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();
-    //		assertEquals(dom2.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //	}
-
     @Test
     public void testSequence () throws Exception {
         query = "tok=\"der\" & tok=\"die\" & #1 . #2";
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java
new file mode 100644
index 0000000..b36f6e4
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java
@@ -0,0 +1,272 @@
+package de.ids_mannheim.korap.query.test.annis;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+
+public class DominanceTests {
+    private String query;
+    private QuerySerializer qs = new QuerySerializer();
+    private ObjectMapper mapper = new ObjectMapper();
+    private JsonNode res;
+
+    @Test
+    public void testDominanceWithArbitrarySpans ()
+            throws JsonProcessingException, IOException {
+        query = "node > node";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        //        assertEquals("koral:group", res.at("/query/@type").asText());
+        //        assertEquals("operation:relation", res.at("/query/operation").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());
+    }
+
+
+    @Test
+    public void testDominanceWithAnnotation1 ()
+            throws JsonProcessingException, IOException {
+        query = "node > cnx/c=\"np\"";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        //        assertEquals("koral:group", res.at("/query/@type").asText());
+        //        assertEquals("operation:relation", res.at("/query/operation").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("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());
+    }
+
+
+    @Test
+    public void testDominanceWithAnnotation2 ()
+            throws JsonProcessingException, IOException {
+        query = "cnx/c=\"np\" > node";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+    
+    @Test
+    public void testDominanceWithReference ()
+            throws JsonProcessingException, IOException {
+        query = "cat=/NP/ & cat=/PP/ > #1";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+
+    @Test
+    public void testDominanceWithReference2 () throws JsonProcessingException,
+            IOException {
+        query = "node & node & #2 > #1";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+//        assertEquals("koral:group", res.at("/query/@type").asText());
+//        assertEquals("operation:relation", res.at("/query/operation").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());
+    }
+    
+    @Test
+    public void testDominanceWithToken ()
+            throws JsonProcessingException, IOException {
+        query = "\"Mann\" & node & #2 > #1";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+//        assertEquals("koral:group", res.at("/query/@type").asText());
+//        assertEquals("operation:relation", res.at("/query/operation").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("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());
+    }
+       
+    
+    @Test
+    public void testDominanceFollowedByAnnotations () throws JsonProcessingException,
+            IOException {
+        query = "#1 > #2 & cnx/cat=\"vp\" & cnx/cat=\"np\"";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+//        assertEquals("koral:group", res.at("/query/@type").asText());
+//        assertEquals("operation:relation", res.at("/query/operation").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("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("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());
+    }
+   
+    @Test
+    public void testIndirectDominance () throws JsonProcessingException,
+            IOException {
+        query = "node & node & #1 >2,4 #2";
+        qs.setQuery(query, "annis");
+//        res = mapper.readTree(qs.toJSON());
+//        assertEquals("koral:group", res.at("/query/@type").asText());
+//        assertEquals("operation:relation", res.at("/query/operation").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("koral:term", res.at("/query/relation/wrap/@type")
+//                .asText());
+//        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+
+        query = "node & node & #1 >* #2";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+//        assertEquals(0, res.at("/query/relation/boundary/min").asInt());
+//        assertEquals(true, res.at("/query/relation/boundary/max")
+//                .isMissingNode());
+    }
+
+    
+    @Test
+    public void testDominanceWithType ()
+            throws JsonProcessingException, IOException {
+        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("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());
+//        assertEquals("SB", res.at("/query/relation/wrap/operands/0/key")
+//                .asText());
+    }
+    
+    @Test
+    public void testDominanceWithMultipleTypes ()
+            throws JsonProcessingException, IOException {
+        query = "corenlp/c=\"VP\" & corenlp/c=\"NP\" & #1 >[malt/d=\"PP\" malt/d=\"PN\"] #2";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+    
+    @Test
+    public void testMultipleDominance () throws JsonProcessingException,
+            IOException {
+        query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:relation", res.at("/query/operation").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("koral:group", res
+                .at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("operation:relation",
+                res.at("/query/operands/0/operands/0/operation").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("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("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=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=koral:relation, wrap={@type=koral: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();
+    //      assertEquals(dom1.replaceAll(" ", ""), map.replaceAll(" ", ""));
+    //      
+    //      query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & cat=\"DP\" & #1 > #2 > #3 > #4";
+    //      String dom2 = 
+    //              "{@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=koral:relation, wrap={@type=koral:term, layer=c}}}" +
+    //                              "]}," +
+    //                              "{@type=koral:group, operation=operation:class, class=2, classOut=2, operands=[" +
+    //                                  "{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
+    //                              "]}" +
+    //                          "], relation={@type=koral:relation, wrap={@type=koral: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();
+    //      assertEquals(dom2.replaceAll(" ", ""), map.replaceAll(" ", ""));
+    //  }
+}
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java
new file mode 100644
index 0000000..5acb0bb
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java
@@ -0,0 +1,72 @@
+package de.ids_mannheim.korap.query.test.annis;
+
+import java.io.IOException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+
+public class RelationTests {
+    private String query;
+
+    private QuerySerializer qs = new QuerySerializer();
+    private ObjectMapper mapper = new ObjectMapper();
+    private JsonNode res;
+
+    @Test
+    public void testLabelledRelationWithArbritraryNodes ()
+            throws JsonProcessingException, IOException {
+        query = "node & node & #1 ->malt/d=\"PP\" #2";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+    
+    @Test
+    public void testLabelledRelation ()
+            throws JsonProcessingException, IOException {
+        query = "corenlp/c=\"VP\" & corenlp/c=\"NP\" & #1 ->malt/d=\"PP\" #2";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+
+
+    @Test
+    public void testLabelledRelationWithType ()
+            throws JsonProcessingException, IOException {
+        query = "corenlp/c=\"VP\" & corenlp/c=\"NP\" & #1 ->malt/d=\"PP\"[func=\"SB\"] #2";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+    }
+
+    //  
+    //  @Test
+    //  public void testPointingRelations() throws Exception {
+    //      query = "node & node & #2 ->coref[val=\"true\"] #1";
+    //      String dom1 = 
+    //              "{@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();
+    //      assertEquals(dom1.replaceAll(" ", ""), map.replaceAll(" ", ""));
+    //      
+    //      query = "node & node & #2 ->mate/coref[val=\"true\"] #1";
+    //      String dom2 = 
+    //              "{@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();
+    //      assertEquals(dom2.replaceAll(" ", ""), map.replaceAll(" ", ""));
+    //  }
+
+}
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 7a0ae47..60199bb 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
@@ -17,9 +17,9 @@
  */
 public class FCSQLComplexTest {
 
-    String query;
-    String jsonLd;
-    List<Object> error;
+    private String query;
+    private String jsonLd;
+    private List<Object> error;
 
     // -------------------------------------------------------------------------
     // simple-query ::= '(' main_query ')' /* grouping */
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 552867d..4876943 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
@@ -20,12 +20,12 @@
  */
 public class FCSQLQueryProcessorTest {
 
-    static QuerySerializer qs = new QuerySerializer();
-    static ObjectMapper mapper = new ObjectMapper();
-    static JsonNode node;
-    String query;
-    String jsonLd;
-    List<Object> error;
+    private static QuerySerializer qs = new QuerySerializer();
+    private static ObjectMapper mapper = new ObjectMapper();
+    private static JsonNode node;
+    private String query;
+    private String jsonLd;
+    private List<Object> error;
 
     public static void runAndValidate(String query, String jsonLd)
             throws JsonProcessingException {
