diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index e693b48..f07ce51 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -102,7 +102,7 @@
 	};
     };
 
-    public SpanQueryWrapperInterface fromJSON (String jsonString) throws QueryException {
+    public SpanQueryWrapper fromJSON (String jsonString) throws QueryException {
 	JsonNode json;
 	try {
 	    json = this.json.readValue(jsonString, JsonNode.class);
@@ -122,7 +122,7 @@
     // TODO: Use the shortcuts implemented in this class instead of the wrapper constructors
     // TODO: Check for isArray()
     // TODO: Rename this span context!
-    public SpanQueryWrapperInterface fromJSON (JsonNode json) throws QueryException {
+    public SpanQueryWrapper fromJSON (JsonNode json) throws QueryException {
 
 	int number = 0;
 
@@ -374,6 +374,7 @@
 		if (min > max)
 		    max = max;
 
+		// This may be an empty repetitor
 		return new SpanRepetitionQueryWrapper(
 		    this.fromJSON(operands.get(0)), min, max
 		);
@@ -420,8 +421,9 @@
 	    );
 
 	case "korap:token":
+
 	    if (!json.has("wrap"))
-		throw new QueryException("Empty Tokens are not supported yet");
+		return new SpanEmptyTokenWrapper();
 
 	    return this._segFromJSON(json.get("wrap"));
 
@@ -436,7 +438,7 @@
 
 
 
-    private SpanQueryWrapperInterface _segFromJSON (JsonNode json) throws QueryException {
+    private SpanQueryWrapper _segFromJSON (JsonNode json) throws QueryException {
 	String type = json.get("@type").asText();
 
 	if (DEBUG)
@@ -477,7 +479,7 @@
 	    case "relation:and":
 
 		for (JsonNode operand : json.get("operands")) {
-		    SpanQueryWrapperInterface part = this._segFromJSON(operand);
+		    SpanQueryWrapper part = this._segFromJSON(operand);
 		    if (part instanceof SpanAlterQueryWrapper) {
 			ssegqw.with((SpanAlterQueryWrapper) part);			
 		    }
@@ -506,7 +508,7 @@
 
 
 
-    private SpanQueryWrapperInterface _termFromJSON (JsonNode json) throws QueryException {
+    private SpanQueryWrapper _termFromJSON (JsonNode json) throws QueryException {
 	if (!json.has("key") || json.get("key").asText().length() < 1)
 	    throw new QueryException("Terms and spans have to provide key attributes");
 	    
@@ -681,9 +683,9 @@
      * Create a segment alternation query object.
      * @param terms[] An array of alternative terms.
      */
-    public SpanAlterQueryWrapper or (SpanQueryWrapperInterface ... terms) {
+    public SpanAlterQueryWrapper or (SpanQueryWrapper ... terms) {
 	SpanAlterQueryWrapper ssaq = new SpanAlterQueryWrapper(this.field);
-	for (SpanQueryWrapperInterface t : terms) {
+	for (SpanQueryWrapper t : terms) {
 	    ssaq.or(t);
 	};
 	return ssaq;
@@ -711,9 +713,9 @@
      * Create a sequence of segments query object.
      * @param terms[] An array of segment defining terms.
      */
-    public SpanSequenceQueryWrapper seq (SpanQueryWrapperInterface ... terms) {
+    public SpanSequenceQueryWrapper seq (SpanQueryWrapper ... terms) {
 	SpanSequenceQueryWrapper sssq = new SpanSequenceQueryWrapper(this.field);
-	for (SpanQueryWrapperInterface t : terms) {
+	for (SpanQueryWrapper t : terms) {
 	    sssq.append(t);
 	};
 	return sssq;
@@ -732,8 +734,8 @@
     public SpanSequenceQueryWrapper seq (Object ... terms) {
 	SpanSequenceQueryWrapper ssq = new SpanSequenceQueryWrapper(this.field);
 	for (Object t : terms) {
-	    if (t instanceof SpanQueryWrapperInterface) {
-		ssq.append((SpanQueryWrapperInterface) t);
+	    if (t instanceof SpanQueryWrapper) {
+		ssq.append((SpanQueryWrapper) t);
 	    }
 	    else if (t instanceof SpanRegexQueryWrapper) {
 		ssq.append((SpanRegexQueryWrapper) t);
@@ -756,79 +758,78 @@
      * @param embedded A SpanQuery that is wrapped in the element.
      */
     @Deprecated
-    public SpanWithinQueryWrapper within (SpanQueryWrapperInterface element,
-					  SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper within (SpanQueryWrapper element,
+					  SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded);
     };
 
-    public SpanWithinQueryWrapper contains (SpanQueryWrapperInterface element,
-					  SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper contains (SpanQueryWrapper element,
+					  SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded, WITHIN);
     };
 
-    public SpanWithinQueryWrapper startswith (SpanQueryWrapperInterface element,
-					      SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper startswith (SpanQueryWrapper element,
+					      SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded, STARTSWITH);
     };
 
-    public SpanWithinQueryWrapper endswith (SpanQueryWrapperInterface element,
-					    SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper endswith (SpanQueryWrapper element,
+					    SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded, ENDSWITH);
     };
 
-    public SpanWithinQueryWrapper overlaps (SpanQueryWrapperInterface element,
-					    SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper overlaps (SpanQueryWrapper element,
+					    SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded, OVERLAP);
     }; 
 
-    public SpanWithinQueryWrapper matches (SpanQueryWrapperInterface element,
-					   SpanQueryWrapperInterface embedded) {
+    public SpanWithinQueryWrapper matches (SpanQueryWrapper element,
+					   SpanQueryWrapper embedded) {
 	return new SpanWithinQueryWrapper(element, embedded, MATCH);
     }; 
 
     // Class
-    public SpanClassQueryWrapper _ (byte number, SpanQueryWrapperInterface element) {
+    public SpanClassQueryWrapper _ (byte number, SpanQueryWrapper element) {
 	return new SpanClassQueryWrapper(element, number);
     };
 
-    public SpanClassQueryWrapper _ (int number, SpanQueryWrapperInterface element) {
+    public SpanClassQueryWrapper _ (int number, SpanQueryWrapper element) {
 	return new SpanClassQueryWrapper(element, number);
     };
 
-    public SpanClassQueryWrapper _ (short number, SpanQueryWrapperInterface element) {
+    public SpanClassQueryWrapper _ (short number, SpanQueryWrapper element) {
 	return new SpanClassQueryWrapper(element, number);
     };
 
-    public SpanClassQueryWrapper _ (SpanQueryWrapperInterface element) {
+    public SpanClassQueryWrapper _ (SpanQueryWrapper element) {
 	return new SpanClassQueryWrapper(element);
     };
 
     // MatchModify
-    public SpanMatchModifyQueryWrapper shrink (byte number, SpanQueryWrapperInterface element) {
+    public SpanMatchModifyQueryWrapper shrink (byte number, SpanQueryWrapper element) {
 	return new SpanMatchModifyQueryWrapper(element, number);
     };
 
-    public SpanMatchModifyQueryWrapper shrink (int number, SpanQueryWrapperInterface element) {
+    public SpanMatchModifyQueryWrapper shrink (int number, SpanQueryWrapper element) {
 	return new SpanMatchModifyQueryWrapper(element, number);
     };
 
-    public SpanMatchModifyQueryWrapper shrink (short number, SpanQueryWrapperInterface element) {
+    public SpanMatchModifyQueryWrapper shrink (short number, SpanQueryWrapper element) {
 	return new SpanMatchModifyQueryWrapper(element, number);
     };
 
-    public SpanMatchModifyQueryWrapper shrink (SpanQueryWrapperInterface element) {
+    public SpanMatchModifyQueryWrapper shrink (SpanQueryWrapper element) {
 	return new SpanMatchModifyQueryWrapper(element);
     };
 
     // Repetition
-    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapperInterface element, int exact) {
+    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapper element, int exact) {
 	return new SpanRepetitionQueryWrapper(element, exact);
     };
 
-    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapperInterface element, int min, int max) {
+    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapper element, int min, int max) {
 	return new SpanRepetitionQueryWrapper(element, min, max);
     };
 
-
     // split
 };
diff --git a/src/main/java/de/ids_mannheim/korap/KorapSearch.java b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
index 6d14e7e..bdb059d 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapSearch.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapSearch.java
@@ -3,7 +3,7 @@
 import java.io.*;
 
 import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.KorapCollection;
 import de.ids_mannheim.korap.KorapIndex;
 import de.ids_mannheim.korap.KorapResult;
@@ -54,7 +54,7 @@
 	    // "query" value
 	    if (this.request.has("query")) {
 		try {
-		    SpanQueryWrapperInterface queryIface = new KorapQuery("tokens").fromJSON(this.request.get("query"));
+		    SpanQueryWrapper queryIface = new KorapQuery("tokens").fromJSON(this.request.get("query"));
 		    
 		    this.query = queryIface.toQuery();
 		    if (queryIface.isOptional())
@@ -116,7 +116,7 @@
     };
 
     // Maybe accept queryWrapperStuff
-    public KorapSearch (SpanQueryWrapperInterface sqwi) {
+    public KorapSearch (SpanQueryWrapper sqwi) {
 	this.query = sqwi.toQuery();
     };
 
@@ -150,7 +150,7 @@
 	return this.request;
     };
 
-    public KorapSearch setQuery (SpanQueryWrapperInterface sqwi) {
+    public KorapSearch setQuery (SpanQueryWrapper sqwi) {
 	this.query = sqwi.toQuery();
 	return this;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
index 7f6f394..2a04554 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAlterQueryWrapper.java
@@ -3,7 +3,7 @@
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanWildcardQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
@@ -12,13 +12,10 @@
 
 import java.util.*;
 
-public class SpanAlterQueryWrapper implements SpanQueryWrapperInterface {
+public class SpanAlterQueryWrapper extends SpanQueryWrapper {
     private String field;
     private SpanQuery query;
     private List<SpanQuery> alternatives;
-    private boolean isNull = true;
-    private boolean isOptional = false;
-    private boolean isNegative = false;
 
     public SpanAlterQueryWrapper (String field) {
 	this.field = field;
@@ -50,7 +47,7 @@
 	return this;
     };
 
-    public SpanAlterQueryWrapper or (SpanQueryWrapperInterface term) {
+    public SpanAlterQueryWrapper or (SpanQueryWrapper term) {
 	if (term.isNull())
 	    return this;
 
@@ -94,16 +91,4 @@
 	};
 	return (SpanQuery) soquery;
     };
-
-    public boolean isOptional () {
-	return this.isOptional;
-    };
-
-    public boolean isNull () {
-	return this.isNull;
-    };
-
-    public boolean isNegative () {
-	return this.isNegative;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
index bb43edc..865c61e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanClassQueryWrapper.java
@@ -3,31 +3,31 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.query.SpanClassQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import java.util.*;
 
 
-public class SpanClassQueryWrapper implements SpanQueryWrapperInterface {
-    private SpanQueryWrapperInterface subquery;
+public class SpanClassQueryWrapper extends SpanQueryWrapper {
+    private SpanQueryWrapper subquery;
     private byte number = (byte) 0;
 
-    public SpanClassQueryWrapper (SpanQueryWrapperInterface subquery, byte number) {
+    public SpanClassQueryWrapper (SpanQueryWrapper subquery, byte number) {
 	this.subquery = subquery;
 	this.number = number;
     };
 
-    public SpanClassQueryWrapper (SpanQueryWrapperInterface subquery, short number) {
+    public SpanClassQueryWrapper (SpanQueryWrapper subquery, short number) {
 	this.subquery = subquery;
 	this.number = (byte) number;
     };
 
-    public SpanClassQueryWrapper (SpanQueryWrapperInterface subquery, int number) {
+    public SpanClassQueryWrapper (SpanQueryWrapper subquery, int number) {
 	this.subquery = subquery;
 	this.number = (byte) number;
     };
 
-    public SpanClassQueryWrapper (SpanQueryWrapperInterface subquery) {
+    public SpanClassQueryWrapper (SpanQueryWrapper subquery) {
 	this.subquery = subquery;
 	this.number = (byte) 0;
     };
@@ -35,6 +35,9 @@
     public SpanQuery toQuery () {
 	if (this.subquery.isNull())
 	    return (SpanQuery) null;
+
+	// TODO: If this.subquery.isNegative(), it may be an Expansion!
+	// SpanExpansionQuery(x, y.negative, min, max. direction???, classNumber, true)
 	
 	if (this.number == (byte) 0) {
 	    return new SpanClassQuery((SpanQuery) this.subquery.toQuery());
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
index 4add693..92a7090 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanElementQueryWrapper.java
@@ -3,9 +3,9 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.query.SpanElementQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
-public class SpanElementQueryWrapper implements SpanQueryWrapperInterface {
+public class SpanElementQueryWrapper extends SpanQueryWrapper {
     String element;
     String field;
 
@@ -18,15 +18,7 @@
 	return (SpanQuery) new SpanElementQuery(this.field, this.element);
     };
 
-    public boolean isOptional () {
-	return false;
-    };
-
     public boolean isNull () {
 	return false;
     };
-
-    public boolean isNegative () {
-	return false;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanEmptyTokenWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanEmptyTokenWrapper.java
new file mode 100644
index 0000000..a4691f0
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanEmptyTokenWrapper.java
@@ -0,0 +1,12 @@
+package de.ids_mannheim.korap.query.wrap;
+
+import org.apache.lucene.search.spans.SpanQuery;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
+
+import java.util.*;
+
+/**
+ * Implement an empty token
+ */
+public class SpanEmptyTokenWrapper extends SpanQueryWrapper {
+};
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
index 252ee0a..8e9a812 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanMatchModifyQueryWrapper.java
@@ -3,31 +3,31 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.query.SpanMatchModifyClassQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import java.util.*;
 
 
-public class SpanMatchModifyQueryWrapper implements SpanQueryWrapperInterface {
-    private SpanQueryWrapperInterface subquery;
+public class SpanMatchModifyQueryWrapper extends SpanQueryWrapper {
+    private SpanQueryWrapper subquery;
     private byte number;
 
-    public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, byte number) {
+    public SpanMatchModifyQueryWrapper (SpanQueryWrapper subquery, byte number) {
 	this.subquery = subquery;
 	this.number = number;
     };
 
-    public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, short number) {
+    public SpanMatchModifyQueryWrapper (SpanQueryWrapper subquery, short number) {
 	this.subquery = subquery;
 	this.number = (byte) number;
     };
 
-    public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery, int number) {
+    public SpanMatchModifyQueryWrapper (SpanQueryWrapper subquery, int number) {
 	this.subquery = subquery;
 	this.number = (byte) number;
     };
 
-    public SpanMatchModifyQueryWrapper (SpanQueryWrapperInterface subquery) {
+    public SpanMatchModifyQueryWrapper (SpanQueryWrapper subquery) {
 	this.subquery = subquery;
 	this.number = (byte) 0;
     };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
index f6d3718..1926310 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQuantifierQueryWrapper.java
@@ -5,12 +5,12 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.Query;
 
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import org.apache.lucene.search.spans.SpanQuery;
 
 // This might be irrelevant now with repetition!
 
-public class SpanQuantifierQueryWrapper implements SpanQueryWrapperInterface {
+public class SpanQuantifierQueryWrapper extends SpanQueryWrapper {
     private String field;
 
     public SpanQuantifierQueryWrapper (String field) {
@@ -21,19 +21,10 @@
 	return (SpanQuery) null;
     };
 
-    public boolean isOptional () {
-	return false;
-    };
-
     public boolean isNull () {
 	return false;
     };
 
-    public boolean isNegative () {
-	return false;
-    };
-
-
     /*
 
 Only support spans with minimal one occurrence and then
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
new file mode 100644
index 0000000..30fe7b9
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapper.java
@@ -0,0 +1,56 @@
+package de.ids_mannheim.korap.query.wrap;
+
+import org.apache.lucene.search.spans.SpanQuery;
+
+// TODO: Add warning and error
+
+/**
+ * A wrapper class for Lucene Spanqueries that add certain information
+ * to the queries, necessary for correct deserialization of nested queries.
+ *
+ * @author Nils Diewald
+ */
+public class SpanQueryWrapper {
+    protected boolean isNull = true,
+	              isOptional = false,
+	              isNegative = false;
+    protected int min = 1,
+	          max = 1;
+
+    // Serialize query to Lucene SpanQuery
+    public SpanQuery toQuery () {
+	return (SpanQuery) null;
+    };
+
+    // The subquery is not necessary, like in
+    // "the [pos=ADJ]? tree"
+    // The adjective can be there, but it's not necessary
+    public boolean isOptional () {
+	return this.isOptional;
+    };
+
+    // The subquery won't match anything at all,
+    // like in
+    // "the [pos=ADJ]{0} tree"
+    public boolean isNull () {
+	return this.isNull;
+    };
+
+    // The subquery should match if the condition does not hold true like in
+    // "the [base!=tree]"
+    public boolean isNegative () {
+	return this.isNegative;
+    };
+
+    // Repetition queries may be more specific regarding repetition
+    // This is a minimum repetition value
+    public int min () {
+	return this.min;
+    };
+
+    // Repetition queries may be more specific regarding repetition
+    // This is a maximum repetition value
+    public int max () {
+	return this.max;
+    };
+};
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
deleted file mode 100644
index 9a24a50..0000000
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package de.ids_mannheim.korap.query.wrap;
-
-import org.apache.lucene.search.spans.SpanQuery;
-
-// Todo: Make this an abstract class to deal with regexes
-// in a parent abstract class!
-// Add warning and error
-
-public interface SpanQueryWrapperInterface {
-    public SpanQuery toQuery    ();
-    public boolean   isOptional ();
-    public boolean   isNull     ();
-    public boolean   isNegative ();
-};
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
index 8be32cc..d39a960 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRegexQueryWrapper.java
@@ -5,6 +5,7 @@
 import org.apache.lucene.search.spans.SpanMultiTermQueryWrapper;
 import org.apache.lucene.util.automaton.RegExp;
 import org.apache.lucene.index.Term;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import java.util.*;
 
@@ -12,7 +13,7 @@
   TODO: Don't allow queries like ".*?"!!!
 */
 
-public class SpanRegexQueryWrapper {
+public class SpanRegexQueryWrapper extends SpanQueryWrapper {
     private SpanQuery query;
 
     public SpanRegexQueryWrapper (String field, String re) {
@@ -43,15 +44,7 @@
 	return this.query;
     };
 
-    public boolean isOptional () {
-	return false;
-    };
-
     public boolean isNull () {
 	return false;
     };
-
-    public boolean isNegative () {
-	return false;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
index 3ad592d..b46d929 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
@@ -3,22 +3,21 @@
 import org.apache.lucene.search.spans.SpanQuery;
 
 import de.ids_mannheim.korap.query.SpanRepetitionQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 
-public class SpanRepetitionQueryWrapper implements SpanQueryWrapperInterface {
-    private SpanQueryWrapperInterface subquery;
-    private int min = 1;
-    private int max = 1;
-    private boolean isOptional = false;
-    private boolean isNull = false;
+public class SpanRepetitionQueryWrapper extends SpanQueryWrapper {
+    private SpanQueryWrapper subquery;
 
-    public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int exact) {
+    // This is for exact enumbered repetition, like in a{3}
+    public SpanRepetitionQueryWrapper (SpanQueryWrapper subquery, int exact) {
 	this.subquery = subquery;
 
 	if (exact < 1 || this.subquery.isNull()) {
 	    this.isNull = true;
 	    this.isOptional = true;
+	    this.min = 0;
+	    this.max = 0;
 	    return;
 	};
 	
@@ -26,12 +25,18 @@
 	this.max = exact;
     };
 
-    public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int min, int max) {
+    // This is for a range of repetitions, like in a{2,3}, a{,4}, a{3,}, a+, a*, a?
+    public SpanRepetitionQueryWrapper (SpanQueryWrapper subquery, int min, int max) {
+
 	this.subquery = subquery;
 
+	// Subquery may be an empty token
 	if (this.subquery.isNull()) {
 	    this.isNull = true;
 	    return;
+	}
+	else {
+	    this.isNull = false;
 	};
 	
 	if (min == 0) {
@@ -40,24 +45,30 @@
 	    if (max == 0)
 		this.isNull = true;
 	};
+
 	this.min = min;
 	this.max = max;
     };
 
+
+    // Serialize to Lucene SpanQuery
     public SpanQuery toQuery () {
+
+	// The query is null
 	if (this.isNull)
 	    return (SpanQuery) null;
+
+	// The query is not a repetition query at all, but may be optional
 	if (this.min == 1 && this.max == 1)
 	    return this.subquery.toQuery();
-	return new SpanRepetitionQuery(this.subquery.toQuery(), this.min, this.max, true);
-    };
 
-    public boolean isOptional () {
-	return this.isOptional;
-    };
-
-    public boolean isNull () {
-	return this.isNull;
+	// That's a fine repetition query
+	return new SpanRepetitionQuery(
+	    this.subquery.toQuery(),
+	    this.min,
+	    this.max,
+	    true
+	);
     };
 
     public boolean isNegative () {
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
index e72c566..21032a9 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSegmentQueryWrapper.java
@@ -8,6 +8,7 @@
 import org.apache.lucene.search.spans.SpanTermQuery;
 import org.apache.lucene.search.spans.SpanNotQuery;
 import org.apache.lucene.search.spans.SpanOrQuery;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanWildcardQueryWrapper;
 import de.ids_mannheim.korap.query.SpanSegmentQuery;
@@ -21,12 +22,10 @@
  * regular expressions and alternatives. These elements can also be excluded.
  */
 
-public class SpanSegmentQueryWrapper implements SpanQueryWrapperInterface {
+public class SpanSegmentQueryWrapper extends SpanQueryWrapper {
     public ArrayList<SpanQuery> inclusive;
     public ArrayList<SpanQuery> exclusive;
     private String field;
-    private boolean isNull = true;
-    private boolean isNegative = false;
 
     /**
      * Constructor.
@@ -220,10 +219,6 @@
 	return false;
     };
 
-    public boolean isNull () {
-	return this.isNull;
-    };
-
     public boolean isNegative () {
 	if (this.inclusive.size() == 0 && this.exclusive.size() >= 1) {
 	    return true;
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
index b316fdf..2afb15b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanSequenceQueryWrapper.java
@@ -5,8 +5,10 @@
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
+import de.ids_mannheim.korap.query.SpanExpansionQuery;
 import de.ids_mannheim.korap.query.SpanMultipleDistanceQuery;
 
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanAlterQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
@@ -15,7 +17,6 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanTermQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -26,9 +27,11 @@
 
 
 /**
+ * Deserialize complexe sequence queries to Lucene SpanQueries.
+ *
  * @author Nils Diewald
  */
-public class SpanSequenceQueryWrapper implements SpanQueryWrapperInterface {
+public class SpanSequenceQueryWrapper extends SpanQueryWrapper {
     private String field;
     private ArrayList<SpanQuery> segments;
     private ArrayList<DistanceConstraint> constraints;
@@ -37,15 +40,13 @@
     private final static Logger log = LoggerFactory.getLogger(SpanSequenceQueryWrapper.class);
 
     // This advices the java compiler to ignore all loggings
-    public static final boolean DEBUG = false;
+    public static final boolean DEBUG = true;
     
     private boolean
 	isInOrder = true,
-	isNull = true,
 	isOptional = true,
 	lastIsOptional = false,
-	firstIsOptional = false,
-	isNegative = false;
+	firstIsOptional = false;
 
     public SpanSequenceQueryWrapper (String field) {
 	this.field = field;
@@ -70,7 +71,7 @@
 	this.isNull = false;
     };
 
-    public SpanSequenceQueryWrapper (String field, SpanQueryWrapperInterface sswq) {
+    public SpanSequenceQueryWrapper (String field, SpanQueryWrapper sswq) {
 	this(field);
 
 	if (!sswq.isNull()) {
@@ -141,6 +142,7 @@
 
 	    SpanAlterQueryWrapper saqw = new SpanAlterQueryWrapper(field, query);
 	    SpanSequenceQueryWrapper ssqw = new SpanSequenceQueryWrapper(field, query);
+
 	    // Remove last element of the list and prepend it
 	    ssqw.prepend(this.segments.remove(this.segments.size() - 1));
 	    saqw.or(ssqw);
@@ -164,22 +166,30 @@
 	return this;
     };
 
-    public SpanSequenceQueryWrapper append (SpanQueryWrapperInterface ssq) {
+    public SpanSequenceQueryWrapper append (SpanQueryWrapper ssq) {
+
+	if (DEBUG)
+	    log.trace("Try to append query {}", ssq.toString());
+
 	if (!ssq.isNull()) {
 
+	    if (DEBUG)
+		log.trace("THe query {} is not null", ssq.toString());
+
 	    if (ssq.isNegative())
 		this.isNegative = true;
 	    
 	    SpanQuery appendQuery = ssq.toQuery();
 	    if (!ssq.isOptional()) {
 		if (DEBUG)
-		    log.trace("Append non-opt query to non-opt query " +
+		    log.trace("Append non-opt query to non-opt query {}",
 			      appendQuery.toString());
 		return this.append(appendQuery);
 	    };
 	    
 	    // Situation is ab? or a?b?
 	    if (this.segments.size() != 0) {
+
 		// Remove last element of the list and prepend it
 		SpanQuery lastQuery = this.segments.remove(this.segments.size() - 1);
 		SpanAlterQueryWrapper saqw = new SpanAlterQueryWrapper(field, lastQuery);
@@ -191,12 +201,12 @@
 		    saqw.or(appendQuery);
 		    // last stays optional
 		    if (DEBUG)
-			log.trace("Append opt query to opt query " +
+			log.trace("Append opt query to opt query {}",
 				  appendQuery.toString());
 
 		}
 		else if (DEBUG) {
-		    log.trace("Append opt query to non-opt query " +
+		    log.trace("Append opt query to non-opt query {}",
 			      appendQuery.toString());
 		};
 
@@ -209,7 +219,7 @@
 		this.segments.add(appendQuery);
 
 		if (DEBUG)
-		    log.trace("Append opt query " +
+		    log.trace("Append opt query {}",
 			      appendQuery.toString());
 
 		// Update boundary optionality
@@ -265,7 +275,7 @@
 	return this;
     };
 
-    public SpanSequenceQueryWrapper prepend (SpanQueryWrapperInterface ssq) {
+    public SpanSequenceQueryWrapper prepend (SpanQueryWrapper ssq) {
 	if (!ssq.isNull()) {
 
 	    if (ssq.isNegative())
@@ -436,16 +446,4 @@
 	    return false;
 	return true;
     };
-
-    public boolean isOptional () {
-	return this.isOptional;
-    };
-
-    public boolean isNull () {
-	return this.isNull;
-    };
-
-    public boolean isNegative () {
-	return this.isNegative;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
index 38d60ce..87d777a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWildcardQueryWrapper.java
@@ -3,11 +3,12 @@
 import org.apache.lucene.search.WildcardQuery;
 import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.search.spans.SpanMultiTermQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import org.apache.lucene.index.Term;
 
 import java.util.*;
 
-public class SpanWildcardQueryWrapper {
+public class SpanWildcardQueryWrapper extends SpanQueryWrapper {
     private SpanQuery query;
 
     public SpanWildcardQueryWrapper (String field, String wc) {
@@ -29,15 +30,7 @@
 	return this.query;
     };
 
-    public boolean isOptional () {
-	return false;
-    };
-
     public boolean isNull () {
 	return false;
     };
-
-    public boolean isNegative () {
-	return false;
-    };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
index d67505c..0707882 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanWithinQueryWrapper.java
@@ -4,7 +4,7 @@
 import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
 import de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import java.util.*;
 
@@ -51,13 +51,12 @@
 */
 
 
-public class SpanWithinQueryWrapper implements SpanQueryWrapperInterface {
-    private SpanQueryWrapperInterface element;
-    private SpanQueryWrapperInterface wrap;
+public class SpanWithinQueryWrapper extends SpanQueryWrapper {
+    private SpanQueryWrapper element;
+    private SpanQueryWrapper wrap;
     private byte flag;
-    private boolean isNull = true;
 
-    public SpanWithinQueryWrapper (SpanQueryWrapperInterface element, SpanQueryWrapperInterface wrap) {
+    public SpanWithinQueryWrapper (SpanQueryWrapper element, SpanQueryWrapper wrap) {
 	this.element = element;
 	this.wrap = wrap;
 
@@ -68,7 +67,7 @@
 	    this.isNull = false;
     };
 
-    public SpanWithinQueryWrapper (SpanQueryWrapperInterface element, SpanQueryWrapperInterface wrap, byte flag) {
+    public SpanWithinQueryWrapper (SpanQueryWrapper element, SpanQueryWrapper wrap, byte flag) {
 	this.element = element;
 	this.wrap = wrap;
 	this.flag = flag;
@@ -88,14 +87,6 @@
 	return new SpanWithinQuery(this.element.toQuery(), this.wrap.toQuery(), this.flag);
     };
 
-    public boolean isOptional () {
-	return false;
-    };
-
-    public boolean isNull () {
-	return this.isNull;
-    };
-
     public boolean isNegative () {
 	if (this.element.isNegative())
 	    return true;
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 48c48d1..2ed007e 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,6 +1,6 @@
 ## logger file can be used with
 
-log4j.rootLogger = ERROR, stdout
+# log4j.rootLogger = ERROR, stdout
 
 # Spans:
 #log4j.logger.de.ids_mannheim.korap.query.spans.ElementSpans = TRACE, stdout
@@ -15,8 +15,8 @@
 #log4j.logger.de.ids_mannheim.korap.query.spans.MatchSpans = TRACE, stdout
 
 # Wrapper
-#log4j.logger.de.ids_mannheim.korap.KorapQuery = TRACE, stdout
-#log4j.logger.de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.KorapQuery = TRACE, stdout
+# log4j.logger.de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper = TRACE, stdout
 
 # Collections
 #log4j.logger.de.ids_mannheim.korap.KorapFilter = TRACE, stdout
diff --git a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
index a41a983..78e3909 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -13,7 +13,7 @@
 import org.apache.lucene.store.MMapDirectory;
 import de.ids_mannheim.korap.filter.BooleanFilter;
 import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.util.QueryException;
 
 import static org.junit.Assert.*;
@@ -366,8 +366,8 @@
 	return contentBuilder.toString();
     };
 
-    public static SpanQueryWrapperInterface jsonQuery (String jsonFile) {
-	SpanQueryWrapperInterface sqwi;
+    public static SpanQueryWrapper jsonQuery (String jsonFile) {
+	SpanQueryWrapper sqwi;
 	
 	try {
 	    String json = getString(jsonFile);
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
index 7263d01..c94a7fc 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestElementDistanceIndex.java
@@ -23,7 +23,7 @@
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;
 import de.ids_mannheim.korap.query.SpanNextQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.util.QueryException;
 
 @RunWith(JUnit4.class)
@@ -209,7 +209,7 @@
         }                
         json = sb.toString();
         
-        SpanQueryWrapperInterface sqwi;
+        SpanQueryWrapper sqwi;
         try {    	    
     	    sqwi = new KorapQuery("tokens").fromJSON(json);
     	}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
index 6ab2f47..0b47add 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestFieldDocument.java
@@ -28,7 +28,7 @@
 import de.ids_mannheim.korap.index.FieldDocument;
 import de.ids_mannheim.korap.analysis.MultiTermTokenStream;
 
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import de.ids_mannheim.korap.util.QueryException;
 
@@ -223,7 +223,7 @@
 	};
 	ki.commit();
 
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp18.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp18.jsonld").getFile());
 
 	KorapResult kr = ki.search(sqwi.toQuery(), 0, (short) 5, true, (short) 2, false, (short) 5);
 
@@ -246,8 +246,8 @@
 	return contentBuilder.toString();
     };
 
-    public static SpanQueryWrapperInterface jsonQuery (String jsonFile) {
-	SpanQueryWrapperInterface sqwi;
+    public static SpanQueryWrapper jsonQuery (String jsonFile) {
+	SpanQueryWrapper sqwi;
 	
 	try {
 	    String json = getString(jsonFile);
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
index 842cead..486d0c3 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
@@ -4,7 +4,7 @@
 import java.io.*;
 
 import org.apache.lucene.search.spans.SpanQuery;
-import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 
 import de.ids_mannheim.korap.KorapQuery;
 import de.ids_mannheim.korap.util.QueryException;
@@ -22,7 +22,7 @@
 
     @Test
     public void queryJSONBsp1 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp1.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp1.jsonld").getFile());
 
 	// There is a repetition in here
 	// ([base=foo]|[base=bar])[base=foobar]
@@ -34,7 +34,7 @@
     @Test
     public void queryJSONBsp1b () {
 
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp1b.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp1b.jsonld").getFile());
 
 	// [base=foo]|([base=foo][base=bar]) meta author=Goethe&year=1815
 	assertEquals(sqwi.toQuery().toString(), "spanOr([tokens:"+defaultFoundry+"l:foo, spanNext(tokens:"+defaultFoundry+"l:foo, tokens:"+defaultFoundry+"l:bar)])");
@@ -43,7 +43,7 @@
 
     @Test
     public void queryJSONBsp2 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp2.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp2.jsonld").getFile());
 
 	// ([base=foo]|[base=bar])[base=foobar]
 	assertEquals(sqwi.toQuery().toString(), "spanNext(spanOr([tokens:"+defaultFoundry+"l:foo, tokens:"+defaultFoundry+"l:bar]), tokens:"+defaultFoundry+"l:foobar)");
@@ -51,7 +51,7 @@
 
     @Test
     public void queryJSONBsp3 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp3.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp3.jsonld").getFile());
 
 	// shrink({[base=Mann]})
 	assertEquals(sqwi.toQuery().toString(), "shrink(0: {0: tokens:"+defaultFoundry+"l:Mann})");
@@ -59,7 +59,7 @@
 
     @Test
     public void queryJSONBsp4 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp4.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp4.jsonld").getFile());
 
 	// shrink({[base=foo]}[orth=bar])
 	assertEquals(sqwi.toQuery().toString(), "shrink(0: spanNext({0: tokens:"+defaultFoundry+"l:foo}, tokens:s:bar))");
@@ -67,7 +67,7 @@
 
     @Test
     public void queryJSONBsp5 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp5.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp5.jsonld").getFile());
 
 	// shrink(1:[base=Der]{1:[base=Mann]}) 
 	assertEquals(sqwi.toQuery().toString(), "shrink(1: spanNext(tokens:"+defaultFoundry+"l:Der, {1: tokens:"+defaultFoundry+"l:Mann}))");
@@ -75,7 +75,7 @@
 
     @Test
     public void queryJSONBsp6 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp6.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp6.jsonld").getFile());
 
 	// [base=katze]
 	assertEquals(sqwi.toQuery().toString(), "tokens:"+defaultFoundry+"l:Katze");
@@ -83,7 +83,7 @@
 
     @Test
     public void queryJSONBsp7 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp7.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp7.jsonld").getFile());
 
 	// [!base=Katze]
 	assertEquals("tokens:mate/l:Katze", sqwi.toQuery().toString());
@@ -92,7 +92,7 @@
 
     @Test
     public void queryJSONBsp9 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp9.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp9.jsonld").getFile());
 
 	// [base=Katze&orth=Katzen]
 	assertEquals(sqwi.toQuery().toString(), "spanSegment(tokens:"+defaultFoundry+"l:Katze, tokens:s:Katzen)");
@@ -100,7 +100,7 @@
 
     @Test
     public void queryJSONBsp9b () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp9b.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp9b.jsonld").getFile());
 
 	// [base=Katze&orth=Katzen]
 	assertEquals(sqwi.toQuery().toString(), "spanSegment(tokens:mate/m:number:pl, tokens:tt/p:NN)");
@@ -109,7 +109,7 @@
 
     @Test
     public void queryJSONBsp10 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp10.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp10.jsonld").getFile());
 
 	// [base=Katze][orth=und][orth=Hunde]
 	assertEquals(sqwi.toQuery().toString(), "spanNext(spanNext(tokens:"+defaultFoundry+"l:Katze, tokens:s:und), tokens:s:Hunde)");
@@ -117,7 +117,7 @@
 
     @Test
     public void queryJSONBsp11 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp11.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp11.jsonld").getFile());
 
 	// [base!=Katze | orth!=Katzen]
 	/*
@@ -131,7 +131,7 @@
 
     @Test
     public void queryJSONBsp12 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp12.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp12.jsonld").getFile());
 
 	// contains(<np>,[base=Mann])
 	assertEquals(sqwi.toQuery().toString(), "spanContain(<tokens:np />, tokens:"+defaultFoundry+"l:Mann)");
@@ -139,14 +139,14 @@
 
     @Test
     public void queryJSONBsp13 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp13.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp13.jsonld").getFile());
 
 	assertEquals(sqwi.toQuery().toString(), "spanStartsWith(<tokens:np />, tokens:mate/p:Det)");
     };
 
     @Test
     public void queryJSONBsp13b () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp13b.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp13b.jsonld").getFile());
 
 	// startswith(<np>,[pos=Det])
 	assertEquals(sqwi.toQuery().toString(), "spanStartsWith(<tokens:np />, tokens:mate/p:Det)");
@@ -154,7 +154,7 @@
 
     @Test
     public void queryJSONBsp14 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp14.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp14.jsonld").getFile());
 
 	// 'vers{2,3}uch'
 	assertEquals(sqwi.toQuery().toString(), "SpanMultiTermQueryWrapper(tokens:/s:vers{2,3}uch/)");
@@ -162,7 +162,7 @@
 
     @Test
     public void queryJSONBsp15 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp15.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp15.jsonld").getFile());
 
 	// [orth='vers.*ch']
 	assertEquals(sqwi.toQuery().toString(), "SpanMultiTermQueryWrapper(tokens:/s:vers.*ch/)");
@@ -170,7 +170,7 @@
 
     @Test
     public void queryJSONBsp16 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp16.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp16.jsonld").getFile());
 
 	// [(base=bar|base=foo)&orth=foobar]
 	assertEquals(sqwi.toQuery().toString(), "spanSegment(spanOr([tokens:"+defaultFoundry+"l:bar, tokens:"+defaultFoundry+"l:foo]), tokens:s:foobar)");
@@ -178,7 +178,7 @@
 
     @Test
     public void queryJSONBsp17 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp17.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp17.jsonld").getFile());
 
 	// within(<np>,[base=Mann])
 	assertEquals(sqwi.toQuery().toString(), "spanContain(<tokens:np />, tokens:"+defaultFoundry+"l:Mann)");
@@ -186,14 +186,14 @@
 
     @Test
     public void queryJSONDemo () throws QueryException {
-	SpanQueryWrapperInterface sqwi = new KorapQuery("tokens").fromJSON("{ \"query\" : { \"@type\" : \"korap:token\", \"wrap\" : { \"@type\" : \"korap:term\", \"foundry\" : \"base\", \"layer\" : \"p\", \"key\" : \"foo\", \"match\" : \"match:eq\" }}}");
+	SpanQueryWrapper sqwi = new KorapQuery("tokens").fromJSON("{ \"query\" : { \"@type\" : \"korap:token\", \"wrap\" : { \"@type\" : \"korap:term\", \"foundry\" : \"base\", \"layer\" : \"p\", \"key\" : \"foo\", \"match\" : \"match:eq\" }}}");
 
 	assertEquals(sqwi.toQuery().toString(), "tokens:base/p:foo");
     };
 
     @Test
     public void queryJSONBspClass () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp-class.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp-class.jsonld").getFile());
 
 	// within(<np>,[base=Mann])
 	assertEquals(sqwi.toQuery().toString(), "{0: spanNext(tokens:tt/p:ADJA, tokens:mate/p:NN)}");
@@ -202,7 +202,7 @@
 
     @Test
     public void queryJSONcosmas3 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas3.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas3.json").getFile());
 
 	// "das /+w1:3 Buch"
 	assertEquals(sqwi.toQuery().toString(), "spanDistance(tokens:s:das, tokens:s:Buch, [(w[1:3], ordered, notExcluded)])");
@@ -210,7 +210,7 @@
 
     @Test
     public void queryJSONcosmas4 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas4.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas4.json").getFile());
 
 	// "das /+w1:3,s1:1 Buch"
 	assertEquals(sqwi.toQuery().toString(), "spanMultipleDistance(tokens:s:das, tokens:s:Buch, [(w[1:3], ordered, notExcluded), (s[1:1], ordered, notExcluded)])");
@@ -218,7 +218,7 @@
 
     @Test
     public void queryJSONcosmas4b () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas4b.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas4b.json").getFile());
 
 	// "das /+w1:3,s1 Buch"
 	assertEquals(sqwi.toQuery().toString(), "spanMultipleDistance(tokens:s:das, tokens:s:Buch, [(w[1:3], ordered, notExcluded), (s[0:1], ordered, notExcluded)])");
@@ -226,7 +226,7 @@
 
     @Test
     public void queryJSONcosmas10 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas10.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas10.json").getFile());
 
 	// "Institut für $deutsche Sprache"
 	assertEquals(sqwi.toQuery().toString(), "spanNext(spanNext(spanNext(tokens:s:Institut, tokens:s:für), tokens:i:deutsche), tokens:s:Sprache)");
@@ -234,7 +234,7 @@
 
     @Test
     public void queryJSONcosmas10b () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas10b.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas10b.json").getFile());
 
 	// "Institut $FÜR $deutsche Sprache"
 	assertEquals(sqwi.toQuery().toString(), "spanNext(spanNext(spanNext(tokens:s:Institut, tokens:i:für), tokens:i:deutsche), tokens:s:Sprache)");
@@ -242,7 +242,7 @@
 
     @Test
     public void queryJSONcosmas16 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas16.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas16.json").getFile());
 
 	// "$wegen #IN(L) <s>"
 	assertEquals(sqwi.toQuery().toString(), "shrink(1: spanStartsWith(<tokens:s />, {1: tokens:i:wegen}))");
@@ -250,7 +250,7 @@
 
     @Test
     public void queryJSONcosmas17 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas17.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas17.json").getFile());
 
 	// "#BED($wegen , +sa)"
 	assertEquals(sqwi.toQuery().toString(), "spanStartsWith(<tokens:s />, tokens:i:wegen)");
@@ -258,7 +258,7 @@
 
     @Test
     public void queryJSONcosmas20 () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/cosmas20.json").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/cosmas20.json").getFile());
 
 	//     "MORPH(V) #IN(R) #ELEM(S)"
 	// TODO: Uses defaultfoundry!
@@ -268,7 +268,7 @@
 
     @Test
     public void queryJSONrepetition () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp-repetition.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp-repetition.jsonld").getFile());
 
 	// der[cnx/p=A]{0,2}[tt/p=NN]
 	assertEquals(sqwi.toQuery().toString(), "spanNext(spanOr([tokens:s:der, spanNext(tokens:s:der, spanRepetition(tokens:cnx/p:A{1,2}))]), tokens:tt/p:NN)");
@@ -277,7 +277,7 @@
 
     @Test
     public void queryJSONboundaryBug () {
-	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp-boundary.jsonld").getFile());
+	SpanQueryWrapper sqwi = jsonQuery(getClass().getResource("/queries/bsp-boundary.jsonld").getFile());
 
 	// Tal []{1,} Wald
 	assertEquals(sqwi.toQuery().toString(), "spanDistance(tokens:s:Tal, tokens:s:Wald, [(w[2:100], ordered, notExcluded)])");
@@ -301,8 +301,8 @@
 	return contentBuilder.toString();
     };
 
-    public static SpanQueryWrapperInterface jsonQuery (String jsonFile) {
-	SpanQueryWrapperInterface sqwi;
+    public static SpanQueryWrapper jsonQuery (String jsonFile) {
+	SpanQueryWrapper sqwi;
 	
 	try {
 	    String json = getString(jsonFile);
