diff --git a/src/main/java/de/ids_mannheim/korap/KrillQuery.java b/src/main/java/de/ids_mannheim/korap/KrillQuery.java
index 45290e8..5a0ccd7 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillQuery.java
@@ -85,6 +85,10 @@
 
     private static final int MAX_CLASS_NUM = 255; // 127;
 
+    // Variables used for relation queries
+    private String direction;
+    private byte[] classNumbers;
+    
     // Private class for koral:boundary objects
     private class Boundary {
         public int min, max;
@@ -129,6 +133,10 @@
      */
     public KrillQuery (String field) {
         this.field = field;
+        this.direction = ">:";
+        this.classNumbers = new byte[2];
+        this.classNumbers[0] = (byte) 1;
+        this.classNumbers[1] = (byte) 2;
     };
 
 
@@ -177,10 +185,6 @@
         return this.fromJson(jsonN);
     };
 
-    public SpanQueryWrapper fromJson(JsonNode json) throws QueryException {
-        return fromJson(json, null);
-    }
-
     /**
      * <p>Deserialize JSON-LD query as a {@link JsonNode} object
      * to a {@link SpanQueryWrapper} object.</p>
@@ -194,8 +198,7 @@
     // TODO: Use the shortcuts implemented in the builder
     //       instead of the wrapper constructors
     // TODO: Rename this span context!
-    public SpanQueryWrapper fromJson(JsonNode json, String direction)
-            throws QueryException {
+    public SpanQueryWrapper fromJson(JsonNode json) throws QueryException {
         int number = 0;
 
         // Only accept @typed objects for the moment
@@ -437,21 +440,17 @@
                     "Number of operands is not acceptable");
         }
 
-        String direction = null;
         SpanQueryWrapper operand1 = fromJson(operands.get(0));
         SpanQueryWrapper operand2 = fromJson(operands.get(1));
 
         if (operand1.isEmpty()) {
             direction = "<:";
         }
-        else {// if (operand2.isEmpty()) {
-            direction = ">:";
-        }
 
-        SpanQueryWrapper relationWrapper = fromJson(relation, direction);
+        SpanQueryWrapper relationWrapper = fromJson(relation);
 
-        return new SpanRelationWrapper(relationWrapper,
-                operand1, operand2);
+        return new SpanRelationWrapper(relationWrapper, operand1, operand2,
+                classNumbers);
 
     }
 
@@ -692,6 +691,9 @@
                 throw new QueryException(709, "Valid class numbers exceeded");
             };
 
+            this.classNumbers[0] = (byte) number;
+            this.classNumbers[1] = (byte) 0;
+
             // Serialize operand
             SpanQueryWrapper sqw = this.fromJson(operands.get(0));
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
index 1f1c799..c4dd49b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRelationWrapper.java
@@ -13,9 +13,11 @@
     private SpanQueryWrapper relationQuery;
     private SpanQueryWrapper subQuery1;
     private SpanQueryWrapper subQuery2;
+    private byte[] classNumbers;
 
     public SpanRelationWrapper (SpanQueryWrapper relationWrapper,
-            SpanQueryWrapper operand1, SpanQueryWrapper operand2) {
+            SpanQueryWrapper operand1, SpanQueryWrapper operand2,
+            byte[] classNumbers) {
 
         this.relationQuery = relationWrapper;
         if (relationQuery != null) {
@@ -31,6 +33,7 @@
 
         this.subQuery1 = operand1;
         this.subQuery2 = operand2;
+        this.classNumbers = classNumbers;
     }
 
     @Override
@@ -44,8 +47,11 @@
         if (sq == null) return null;
 
         ArrayList<Byte> classNumbers = new ArrayList<Byte>();
-        classNumbers.add((byte) 1);
-        classNumbers.add((byte) 2);
+        for (byte c : this.classNumbers) {
+            if (c > 0) {
+                classNumbers.add(c);
+            }
+        }
 
         SpanQuery subq1, subq2;
         if (subQuery1.isEmpty) {
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
index 02787b1..7e28e1e 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRelationIndex.java
@@ -116,7 +116,7 @@
     }
 
 
-    private FieldDocument createFieldDoc2 () {
+    public static FieldDocument createFieldDoc2() {
         FieldDocument fd = new FieldDocument();
         fd.addString("ID", "doc-2");
         fd.addTV(
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
index 9179301..7de20c6 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestSpanRelationQueryJSON.java
@@ -82,4 +82,25 @@
         SpanQuery sq = sqwi.toQuery();
         assertEquals("focus([1,2]tokens:<:mate/d:HEAD)", sq.toString());
     }
+
+    public void testFocusSource() throws QueryException {
+        //
+        String filepath = getClass().getResource(
+                "/queries/relation/focus-source.json").getFile();
+        SpanQueryWrapper sqwi = getJSONQuery(filepath);
+        SpanQuery sq = sqwi.toQuery();
+        assertEquals(
+                "focus([1]spanSegment(focus(2: spanSegment(tokens:>:mate/d:HEAD, <tokens:c:s />)), <tokens:c:vp />))",
+                sq.toString());
+    }
+
+    public void testFocusTarget() throws QueryException {
+        String filepath = getClass().getResource(
+                "/queries/relation/match-source.json").getFile();
+        SpanQueryWrapper sqwi = getJSONQuery(filepath);
+        SpanQuery sq = sqwi.toQuery();
+        assertEquals(
+                "focus([2]spanSegment(tokens:>:mate/d:HEAD, <tokens:c:s />))",
+                sq.toString());
+    }
 }
diff --git a/src/test/resources/queries/relation/focus-source.json b/src/test/resources/queries/relation/focus-source.json
new file mode 100644
index 0000000..8ac35c7
--- /dev/null
+++ b/src/test/resources/queries/relation/focus-source.json
@@ -0,0 +1,31 @@
+{
+    "query": {
+        "@type": "korap:reference",
+        "operation": "operation:focus",
+        "classRef": [1],
+        "operands": [{
+            "@type": "korap:group",
+            "operation": "operation:relation",
+            "operands": [
+                {
+                    "@type": "korap:span",
+                    "key": "s"
+                },
+                {
+                    "@type": "korap:span",
+                    "key": "np"
+                }
+            ],
+            "relation": {
+                "@type": "korap:relation",
+                "wrap": {
+                    "@type": "korap:term",
+                    "foundry": "mate",
+                    "layer": "d",
+                    "key": "HEAD"
+                }
+            }
+        }]
+    },
+    "meta": {}
+}
diff --git a/src/test/resources/queries/relation/focus-target.json b/src/test/resources/queries/relation/focus-target.json
new file mode 100644
index 0000000..ce7ae66
--- /dev/null
+++ b/src/test/resources/queries/relation/focus-target.json
@@ -0,0 +1,30 @@
+{
+    "query": {
+        "@type": "korap:reference",
+        "operation": "operation:focus",
+        "classRef": [2],
+        "operands": [{
+            "@type": "korap:group",
+            "operation": "operation:relation",
+            "operands": [
+                {
+                    "@type": "korap:span",
+                    "key": "s"
+                },
+                {
+                    "@type": "korap:token"
+                }
+            ],
+            "relation": {
+                "@type": "korap:relation",
+                "wrap": {
+                    "@type": "korap:term",
+                    "foundry": "mate",
+                    "layer": "d",
+                    "key": "HEAD"
+                }
+            }
+        }]
+    },
+    "meta": {}
+}
