diff --git a/CHANGES b/CHANGES
index 3b0f651..7cf9e58 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
-0.45 2014-10-01
+0.45 2014-10-06
         - [bugfix] Correctly respond request in JSON results (diewald)
+        - [cleanup] Made SpanQueryWrapper an abstract class instead
+	  of an interface (diewald)
 
 0.44.1 2014-09-29
         - [cleanup] Prepare test suite for publication (diewald)
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);
