diff --git a/src/main/java/de/ids_mannheim/korap/KrillCollection.java b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
index f9fcc14..ceb6671 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillCollection.java
@@ -48,7 +48,7 @@
     private KrillIndex index;
     private JsonNode json;
     private CollectionBuilder cb = new CollectionBuilder();
-    private CollectionBuilder.CollectionBuilderInterface cbi;
+    private CollectionBuilder.Interface cbi;
     private byte[] pl = new byte[4];
     private static ByteBuffer bb = ByteBuffer.allocate(4);
 
@@ -155,7 +155,7 @@
     };
 
 
-    private CollectionBuilder.CollectionBuilderInterface _fromJson (JsonNode json) throws QueryException {
+    private CollectionBuilder.Interface _fromJson (JsonNode json) throws QueryException {
 
         if (!json.has("@type")) {
             throw new QueryException(701,
@@ -261,7 +261,7 @@
             if (!json.has("operands") || !json.get("operands").isArray())
                 throw new QueryException(842, "Document group needs operand list");
 
-            CollectionBuilder.CollectionBuilderGroup group;
+            CollectionBuilder.Group group;
 
             String operation = "operation:and";
             if (json.has("operation"))
@@ -296,12 +296,12 @@
      * 
      * @param cb The CollectionBuilder object.
      */
-    public KrillCollection fromBuilder (CollectionBuilder.CollectionBuilderInterface cbi) {
+    public KrillCollection fromBuilder (CollectionBuilder.Interface cbi) {
         this.cbi = cbi;
         return this;
     };
 
-    public CollectionBuilder.CollectionBuilderInterface getBuilder () {
+    public CollectionBuilder.Interface getBuilder () {
         return this.cbi;
     };
 
@@ -310,11 +310,11 @@
         return this.cb;
     };
 
-    public KrillCollection filter (CollectionBuilder.CollectionBuilderInterface filter) {
+    public KrillCollection filter (CollectionBuilder.Interface filter) {
         return this.fromBuilder(this.cb.andGroup().with(this.cbi).with(filter));
     };
 
-    public KrillCollection extend (CollectionBuilder.CollectionBuilderInterface extension) {
+    public KrillCollection extend (CollectionBuilder.Interface extension) {
         return this.fromBuilder(this.cb.orGroup().with(this.cbi).with(extension));
     };
 
@@ -331,28 +331,13 @@
      * @return The {@link KrillCollection} object for chaining.
      */
     public KrillCollection filterUIDs (String ... uids) {
-        CollectionBuilder.CollectionBuilderInterface root = this.getBuilder();
-        CollectionBuilder.CollectionBuilderGroup cbg = this.cb.orGroup();
-        CollectionBuilder.CollectionBuilderGroup filter = this.cb.andGroup();
+        CollectionBuilder.Interface root = this.getBuilder();
+        CollectionBuilder.Group cbg = this.cb.orGroup();
+        CollectionBuilder.Group filter = this.cb.andGroup();
         for (String uid : uids) {
             cbg.with(this.cb.term("UID", uid));
         };
-        this.filter(cbg);
-        /*
-        if (this.getBuilder() != null)
-            filter.with(this.getBuilder());
-        filter.with(cbg);
-
-        this.fromBuilder(filter);
-        */
-        /*
-        BooleanFilter filter = new BooleanFilter();
-        filter.or("UID", uids);
-        if (DEBUG)
-            log.debug("UID based filter: {}", filter.toString());
-        return this.filter(filter);
-        */
-        return this;
+        return this.filter(cbg);
     };
 
 
@@ -684,13 +669,13 @@
 
 
     /*
-    @Deprecated
-    public HashMap getTermRelation (String field) throws Exception {
-        return this.getTermRelation(new KrillCollection(this), field);
-    };
-*/
+      @Deprecated
+      public HashMap getTermRelation (String field) throws Exception {
+          return this.getTermRelation(new KrillCollection(this), field);
+      };
+    */
 
-    /**
+    /*
      * Analyze how terms relate
      */
     /*
diff --git a/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java b/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
index fb26168..836aaa1 100644
--- a/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/CollectionBuilder.java
@@ -17,8 +17,9 @@
 
 /*
  * TODO: Optimize!
- * - Remove multiple times the same object in Boolean groups.
+ * - Remove identical object in Boolean groups
  * - Flatten boolean groups
+ * - create "between" ranges for multiple date objects
  */
 
 public class CollectionBuilder {
@@ -29,30 +30,30 @@
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
 
-    public CollectionBuilderInterface term (String field, String term) {
-        return new CollectionBuilderTerm(field, term);
+    public CollectionBuilder.Interface term (String field, String term) {
+        return new CollectionBuilder.Term(field, term);
     };
 
-    public CollectionBuilderInterface re (String field, String term) {
-        return new CollectionBuilderTerm(field, term, true);
+    public CollectionBuilder.Interface re (String field, String term) {
+        return new CollectionBuilder.Term(field, term, true);
     };
 
-    public CollectionBuilderInterface since (String field, String date) {
+    public CollectionBuilder.Interface since (String field, String date) {
         int since = new KrillDate(date).floor();
 
         if (since == 0 || since == KrillDate.BEGINNING)
             return null;
 
-        return new CollectionBuilderRange(field, since, KrillDate.END);
+        return new CollectionBuilder.Range(field, since, KrillDate.END);
     };
 
-    public CollectionBuilderInterface till (String field, String date) {
+    public CollectionBuilder.Interface till (String field, String date) {
         try {
             int till = new KrillDate(date).ceil();
             if (till == 0 || till == KrillDate.END)
                 return null;
 
-            return new CollectionBuilderRange(field, KrillDate.BEGINNING, till);
+            return new CollectionBuilder.Range(field, KrillDate.BEGINNING, till);
         }
         catch (NumberFormatException e) {
             log.warn("Parameter of till(date) is invalid");
@@ -60,7 +61,20 @@
         return null;
     };
 
-    public CollectionBuilderInterface date (String field, String date) {
+    // This will be optimized away in future versions
+    public CollectionBuilder.Interface between (String field, String start, String end) {
+        CollectionBuilder.Interface startObj = this.since(field, start);
+        if (startObj == null)
+            return null;
+
+        CollectionBuilder.Interface endObj = this.till(field, end);
+        if (endObj == null)
+            return null;
+
+        return this.andGroup().with(startObj).with(endObj);
+    };
+
+    public CollectionBuilder.Interface date (String field, String date) {
         KrillDate dateDF = new KrillDate(date);
 
         if (dateDF.year == 0)
@@ -74,39 +88,39 @@
                 || (begin == KrillDate.BEGINNING && end == KrillDate.END))
                 return null;
 
-            return new CollectionBuilderRange(field, begin, end);
+            return new CollectionBuilder.Range(field, begin, end);
         };
 
-        return new CollectionBuilderRange(field, dateDF.floor(), dateDF.ceil());
+        return new CollectionBuilder.Range(field, dateDF.floor(), dateDF.ceil());
     };
 
-    public CollectionBuilderGroup andGroup () {
-        return new CollectionBuilderGroup(false);
+    public CollectionBuilder.Group andGroup () {
+        return new CollectionBuilder.Group(false);
     };
 
-    public CollectionBuilderGroup orGroup () {
-        return new CollectionBuilderGroup(true);
+    public CollectionBuilder.Group orGroup () {
+        return new CollectionBuilder.Group(true);
     };
 
-    public interface CollectionBuilderInterface {
+    public interface Interface {
         public String toString ();
         public Filter toFilter ();
         public boolean isNegative ();
-        public CollectionBuilderInterface not ();
+        public CollectionBuilder.Interface not ();
     };
 
-    public class CollectionBuilderTerm implements CollectionBuilderInterface {
+    public class Term implements CollectionBuilder.Interface {
         private boolean isNegative = false;
         private boolean regex = false;
         private String field;
         private String term;
 
-        public CollectionBuilderTerm (String field, String term) {
+        public Term (String field, String term) {
             this.field = field;
             this.term = term;
         };
 
-        public CollectionBuilderTerm (String field, String term, boolean regex) {
+        public Term (String field, String term, boolean regex) {
             this.field = field;
             this.term = term;
             this.regex = regex;
@@ -116,15 +130,18 @@
             // Regular expression
             if (this.regex)
                 return new QueryWrapperFilter(
-                    new RegexpQuery(new Term(this.field, this.term))
+                    new RegexpQuery(new org.apache.lucene.index.Term(this.field, this.term))
                 );
             
             // Simple term
-            return new TermsFilter(new Term(this.field, this.term));
+            return new TermsFilter(new org.apache.lucene.index.Term(this.field, this.term));
         };
 
         public String toString () {
-            return this.toFilter().toString();
+            Filter filter = this.toFilter();
+            if (filter == null)
+                return "";
+            return filter.toString();
         };
 
         public boolean isNegative () {
@@ -132,13 +149,13 @@
         };
 
 
-        public CollectionBuilderInterface not () {
+        public CollectionBuilder.Interface not () {
             this.isNegative = true;
             return this;
         };
     };
 
-    public class CollectionBuilderGroup implements CollectionBuilderInterface {
+    public class Group implements CollectionBuilder.Interface {
         private boolean isOptional = false;
         private boolean isNegative = true;
 
@@ -150,14 +167,14 @@
             return this.isOptional;
         };
 
-        private ArrayList<CollectionBuilderInterface> operands;
+        private ArrayList<CollectionBuilder.Interface> operands;
 
-        public CollectionBuilderGroup (boolean optional) {
+        public Group (boolean optional) {
             this.isOptional = optional;
-            this.operands = new ArrayList<CollectionBuilderInterface>(3);
+            this.operands = new ArrayList<CollectionBuilder.Interface>(3);
         };
 
-        public CollectionBuilderGroup with (CollectionBuilderInterface cb) {
+        public Group with (CollectionBuilder.Interface cb) {
             if (cb == null)
                 return this;
 
@@ -167,6 +184,11 @@
             return this;
         };
 
+        public Group with (String field, String term) {
+            if (field == null || term == null)
+                return this;
+            return this.with(new CollectionBuilder.Term(field, term));
+        };
 
         public Filter toFilter () {
             if (this.operands == null || this.operands.isEmpty())
@@ -178,9 +200,9 @@
             // BooleanFilter bool = new BooleanFilter();
             BooleanGroupFilter bool = new BooleanGroupFilter(this.isOptional);
 
-            Iterator<CollectionBuilderInterface> i = this.operands.iterator();
+            Iterator<CollectionBuilder.Interface> i = this.operands.iterator();
             while (i.hasNext()) {
-                CollectionBuilderInterface cb = i.next();
+                CollectionBuilder.Interface cb = i.next();
                 if (cb.isNegative()) {
                     bool.without(cb.toFilter());
                 }
@@ -193,21 +215,24 @@
         };
 
         public String toString () {
-            return this.toFilter().toString();
+            Filter filter = this.toFilter();
+            if (filter == null)
+                return "";
+            return filter.toString();
         };
 
-        public CollectionBuilderInterface not () {
+        public CollectionBuilder.Interface not () {
             this.isNegative = true;
             return this;
         };
     };
 
-    public class CollectionBuilderRange implements CollectionBuilderInterface {
+    public class Range implements CollectionBuilder.Interface {
         private boolean isNegative = false;
         private String field;
         private int start, end;
 
-        public CollectionBuilderRange (String field, int start, int end) {
+        public Range (String field, int start, int end) {
             this.field = field;
             this.start = start;
             this.end = end;
@@ -218,7 +243,10 @@
         };
 
         public String toString () {
-            return this.toFilter().toString();
+            Filter filter = this.toFilter();
+            if (filter == null)
+                return "";
+            return filter.toString();
         };
 
         public Filter toFilter () {
@@ -229,7 +257,7 @@
                                                   true);
         };
 
-        public CollectionBuilderInterface not () {
+        public CollectionBuilder.Interface not () {
             this.isNegative = true;
             return this;
         };
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilder.java b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilder.java
new file mode 100644
index 0000000..9dd7baf
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilder.java
@@ -0,0 +1,416 @@
+package de.ids_mannheim.korap.collection;
+
+import java.util.*;
+import java.io.*;
+
+import de.ids_mannheim.korap.collection.CollectionBuilder;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.Ignore;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+// TODO: More extensive testing!
+
+
+@RunWith(JUnit4.class)
+public class TestCollectionBuilder {
+
+    @Test
+    public void builderTerm () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("author:tree",
+                     kc.term("author", "tree").toString());
+    };
+
+    @Test
+    public void builderRegex () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("QueryWrapperFilter(author:/tre*?/)",
+                     kc.re("author", "tre*?").toString());
+    };
+
+    @Test
+    public void builderDateYear () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("pubDate:[20050000 TO 20059999]",
+                     kc.date("pubDate", "2005").toString());
+    };
+
+    @Test
+    public void builderDateMonth () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("pubDate:[20051000 TO 20051099]",
+                     kc.date("pubDate", "2005-10").toString());
+    };
+
+    @Test
+    public void builderDateDay () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("pubDate:[20051011 TO 20051011]",
+                     kc.date("pubDate", "2005-10-11").toString());
+    };
+
+    @Test
+    public void builderDateBorders () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        // CollectionBuilderNew.Interface kbi = ;
+        assertNull(kc.date("pubDate", ""));
+
+        assertEquals("pubDate:[20051580 TO 20051580]",
+                     kc.date("pubDate", "2005-15-80").toString());
+
+        assertNull(kc.date("pubDate", "2005-15-8"));
+        assertNull(kc.date("pubDate", "2005-5-18"));
+        assertNull(kc.date("pubDate", "200-05-18"));
+    };
+
+    @Test
+    public void builderSince () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("pubDate:[20050000 TO 99999999]",
+                     kc.since("pubDate", "2005").toString());
+
+        assertEquals("pubDate:[20051000 TO 99999999]",
+                     kc.since("pubDate", "2005-10").toString());
+
+        assertEquals("pubDate:[20051012 TO 99999999]",
+                     kc.since("pubDate", "2005-10-12").toString());
+    };
+
+
+    @Test
+    public void builderTill () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("pubDate:[0 TO 20059999]",
+                     kc.till("pubDate", "2005").toString());
+
+        assertEquals("pubDate:[0 TO 20051299]",
+                     kc.till("pubDate", "2005-12").toString());
+
+        assertEquals("pubDate:[0 TO 20051204]",
+                     kc.till("pubDate", "2005-12-04").toString());
+    };
+
+
+    @Test
+    public void builderAndSimple () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("author:tree", kc.andGroup().with(kc.term("author", "tree")).toString());
+    };
+
+    @Test
+    public void builderOrSimple () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("author:tree", kc.orGroup().with(kc.term("author", "tree")).toString());
+    };
+
+    @Test
+    public void builderAndCombined () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("AndGroup(author:tree title:name)",
+                     kc.andGroup().with(kc.term("author", "tree"))
+                     .with(kc.term("title", "name")).toString());
+    };
+
+    @Test
+    public void builderAndNestedSimple () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("AndGroup(author:tree title:name)",
+                     kc.andGroup().with(kc.andGroup().with(kc.term("author", "tree")).with(kc.term("title", "name"))).toString());
+    };
+
+
+    @Test
+    public void builderOrCombined () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("OrGroup(author:tree title:name)",
+                     kc.orGroup().with(kc.term("author", "tree"))
+                     .with(kc.term("title", "name")).toString());
+    };
+
+    @Test
+    public void builderOrNestedSimple () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        assertEquals("OrGroup(author:tree title:name)",
+                     kc.orGroup().with(kc.orGroup().with(kc.term("author", "tree"))
+                                .with(kc.term("title", "name"))).toString()
+                     );
+    };
+
+    @Test
+    public void builderGroups () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        String g = kc.orGroup().with(
+                                     kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"))
+        ).with(
+               kc.andGroup().with(kc.term("author", "tree2")).with(kc.term("title", "name2"))
+               ).toString();
+        assertEquals("OrGroup(OrGroup(author:tree1 title:name1) AndGroup(author:tree2 title:name2))", g);
+    };
+
+    @Test
+    public void builderNegationRoot () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        CollectionBuilder.Interface kbi = kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"));
+        assertEquals(
+                     "OrGroup(author:tree1 title:name1)",
+                     kbi.toString());
+        assertFalse(kbi.isNegative());
+
+        kbi = kc.andGroup().with(
+                                 kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"))
+              ).not();
+        assertEquals("OrGroup(author:tree1 title:name1)", kbi.toString());
+        assertTrue(kbi.isNegative());
+    };
+
+
+    @Test
+    public void builderNegation () throws IOException {
+        CollectionBuilder kc = new CollectionBuilder();
+        CollectionBuilder.Interface kbi =
+            kc.term("author", "tree").not();
+        assertEquals("author:tree", kbi.toString());
+        assertTrue(kbi.isNegative());
+
+        kbi = kc.andGroup().with(kc.term("author", "tree").not());
+        assertEquals("author:tree", kbi.toString());
+        assertTrue(kbi.isNegative());
+
+        kbi = kc.orGroup().with(kc.term("author", "tree").not());
+        assertEquals("author:tree", kbi.toString());
+        assertTrue(kbi.isNegative());
+    };
+
+    // The legacy tests were adopted from the legacy collection builder and reformuated
+
+    @Test
+    public void LegacyFilterExample () throws IOException {
+        CollectionBuilder kf = new CollectionBuilder();
+
+        /*
+        assertEquals("+textClass:tree", kf.and("textClass", "tree").toString());
+        */
+        assertEquals("textClass:tree", kf.andGroup().with(kf.term("textClass", "tree")).toString());
+
+        /*
+        assertEquals("+textClass:tree +textClass:sport",
+                kf.and("textClass", "tree").and("textClass", "sport")
+                        .toString());
+        */
+        assertEquals("AndGroup(textClass:tree textClass:sport)", kf.andGroup().with(kf.term("textClass", "tree")).with(kf.term("textClass", "sport")).toString());
+
+        /*
+        assertEquals(
+                "+textClass:tree +textClass:sport textClass:news",
+                kf.and("textClass", "tree").and("textClass", "sport")
+                        .or("textClass", "news").toString());
+        */
+        assertEquals("OrGroup(AndGroup(textClass:tree textClass:sport) textClass:news)", kf.orGroup().with(kf.andGroup().with("textClass", "tree").with("textClass", "sport")).with("textClass", "news").toString());
+
+        /*
+        assertEquals("+textClass:tree +textClass:sport +textClass:news", kf
+                .and("textClass", "tree", "sport", "news").toString());
+        */
+        assertEquals("AndGroup(textClass:tree textClass:sport textClass:news)", kf.andGroup().with("textClass", "tree").with("textClass", "sport").with("textClass", "news").toString());
+
+        /*
+        assertEquals("corpusID:c-1 corpusID:c-2 corpusID:c-3",
+                kf.or("corpusID", "c-1", "c-2", "c-3").toString());
+        */
+        assertEquals("OrGroup(corpusID:c-1 corpusID:c-2 corpusID:c-3)", kf.orGroup().with("corpusID", "c-1").with("corpusID", "c-2").with("corpusID", "c-3").toString());
+
+    };
+
+    @Test
+    public void LegacyRangeExample () throws IOException {
+        CollectionBuilder kf = new CollectionBuilder();
+        /*
+        assertEquals("+pubDate:[20030604 TO 20030899]",
+                kf.between("2003-06-04", "2003-08-99").toString());
+        */
+        // This will be optimized and probably crash
+        assertEquals("AndGroup(pubDate:[20030604 TO 99999999] pubDate:[0 TO 20030899])", kf.andGroup().with(kf.since("pubDate", "2003-06-04")).with(kf.till("pubDate", "2003-08-99")).toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20030604]", kf.till("2003-06-04")
+                .toString());
+        */
+        assertEquals("pubDate:[0 TO 20030604]", kf.till("pubDate", "2003-06-04")
+                .toString());
+
+
+        /*
+        assertEquals("+pubDate:[20030604 TO 99999999]", kf.since("2003-06-04")
+                .toString());
+        */
+        assertEquals("pubDate:[20030604 TO 99999999]", kf.since("pubDate", "2003-06-04")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:20030604", kf.date("2003-06-04").toString());
+        */
+        assertEquals("pubDate:[20030604 TO 20030604]", kf.date("pubDate", "2003-06-04").toString());
+    };
+
+
+    @Test
+    public void LegacyRangeLimited () throws IOException {
+        CollectionBuilder kf = new CollectionBuilder();
+        /*
+        assertEquals("+pubDate:[20050000 TO 20099999]",
+                kf.between("2005", "2009").toString());
+        */
+        assertEquals("AndGroup(pubDate:[20050000 TO 99999999] pubDate:[0 TO 20099999])",
+                     kf.between("pubDate", "2005", "2009").toString());
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 20090899]",
+                kf.between("200510", "200908").toString());
+        */
+        assertEquals("AndGroup(pubDate:[20051000 TO 99999999] pubDate:[0 TO 20090899])",
+                     kf.between("pubDate", "200510", "200908").toString());
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 20090899]",
+                kf.between("2005-10", "2009-08").toString());
+        */
+        assertEquals("AndGroup(pubDate:[20051000 TO 99999999] pubDate:[0 TO 20090899])",
+                     kf.between("pubDate", "2005-10", "2009-08").toString());
+
+
+        /*
+        assertEquals("+pubDate:[20051006 TO 20090803]",
+                kf.between("2005-1006", "2009-0803").toString());
+         */
+        assertEquals("AndGroup(pubDate:[20051006 TO 99999999] pubDate:[0 TO 20090803])",
+                     kf.between("pubDate", "2005-1006", "2009-0803").toString());
+
+        /*
+        assertEquals("+pubDate:[20051006 TO 20090803]",
+                kf.between("2005-10-06", "2009-08-03").toString());
+        */
+        assertEquals("AndGroup(pubDate:[20051006 TO 99999999] pubDate:[0 TO 20090803])",
+                     kf.between("pubDate", "2005-10-06", "2009-08-03").toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20059999]", kf.till("2005").toString());
+        */
+        assertEquals("pubDate:[0 TO 20059999]", kf.till("pubDate", "2005").toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20051099]", kf.till("200510").toString());
+        */
+        assertEquals("pubDate:[0 TO 20051099]", kf.till("pubDate", "200510").toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20051099]", kf.till("200510").toString());
+        */
+        assertEquals("pubDate:[0 TO 20051099]", kf.till("pubDate", "200510").toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20051099]", kf.till("2005-10").toString());
+        */
+        assertEquals("pubDate:[0 TO 20051099]", kf.till("pubDate", "2005-10").toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20051006]", kf.till("2005-1006")
+                .toString());
+         */
+        assertEquals("pubDate:[0 TO 20051006]", kf.till("pubDate", "2005-1006")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[0 TO 20051006]", kf.till("2005-10-06")
+                .toString());
+        */
+        assertEquals("pubDate:[0 TO 20051006]", kf.till("pubDate", "2005-10-06")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20050000 TO 99999999]", kf.since("2005")
+                .toString());
+        */
+        assertEquals("pubDate:[20050000 TO 99999999]", kf.since("pubDate", "2005")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 99999999]", kf.since("200510")
+                .toString());
+        */
+        assertEquals("pubDate:[20051000 TO 99999999]", kf.since("pubDate", "200510")
+                .toString());
+
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 99999999]", kf.since("2005-10")
+                .toString());
+        */
+        assertEquals("pubDate:[20051000 TO 99999999]", kf.since("pubDate", "2005-10")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20051006 TO 99999999]", kf.since("2005-1006")
+                .toString());
+        */
+        assertEquals("pubDate:[20051006 TO 99999999]", kf.since("pubDate", "2005-1006")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20051006 TO 99999999]", kf.since("2005-10-06")
+                .toString());
+        */
+        assertEquals("pubDate:[20051006 TO 99999999]", kf.since("pubDate", "2005-10-06")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20050000 TO 20059999]", kf.date("2005")
+                .toString());
+        */
+        assertEquals("pubDate:[20050000 TO 20059999]", kf.date("pubDate", "2005")
+                .toString());
+
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 20051099]", kf.date("200510")
+                .toString());
+        */
+        assertEquals("pubDate:[20051000 TO 20051099]", kf.date("pubDate", "200510")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:[20051000 TO 20051099]", kf.date("2005-10")
+                .toString());
+        */
+        assertEquals("pubDate:[20051000 TO 20051099]", kf.date("pubDate", "2005-10")
+                .toString());
+
+        /*
+        assertEquals("+pubDate:20051006", kf.date("2005-1006").toString());
+        */
+        assertEquals("pubDate:[20051006 TO 20051006]", kf.date("pubDate", "2005-1006").toString());
+
+        /*
+        assertEquals("+pubDate:20051006", kf.date("2005-10-06").toString());
+        */
+        assertEquals("pubDate:[20051006 TO 20051006]", kf.date("pubDate", "2005-10-06").toString());
+    };
+
+
+    @Test
+    public void LegacyRangeFailure () throws IOException {
+        CollectionBuilder kf = new CollectionBuilder();
+        /*
+        assertEquals("", kf.between("aaaa-bb-cc", "aaaabbcc").toString());
+        assertEquals("", kf.till("aaaa-bb-cc").toString());
+        assertEquals("", kf.since("aaaa-bb-cc").toString());
+        assertEquals("", kf.date("aaaa-bb-cc").toString());
+         */
+        assertNull(kf.between("pubDate", "aaaa-bb-cc", "aaaabbcc"));
+        assertNull(kf.till("pubDate", "aaaa-bb-cc"));
+        assertNull(kf.since("pubDate", "aaaa-bb-cc"));
+        assertNull(kf.date("pubDate", "aaaa-bb-cc"));
+    };
+};
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilderLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilderLegacy.java
index b8f0019..a52a575 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilderLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionBuilderLegacy.java
@@ -19,6 +19,7 @@
 public class TestCollectionBuilderLegacy {
 
     @Test
+    @Ignore
     public void filterExample () throws IOException {
         CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
 
@@ -39,6 +40,7 @@
 
 
     @Test
+    @Ignore
     public void rangeExample () throws IOException {
         CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
         assertEquals("+pubDate:[20030604 TO 20030899]",
@@ -52,6 +54,7 @@
 
 
     @Test
+    @Ignore
     public void rangeLimited () throws IOException {
         CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
         assertEquals("+pubDate:[20050000 TO 20099999]",
@@ -96,6 +99,7 @@
 
 
     @Test
+    @Ignore
     public void rangeFailure () throws IOException {
         CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
         assertEquals("", kf.between("aaaa-bb-cc", "aaaabbcc").toString());
@@ -103,7 +107,4 @@
         assertEquals("", kf.since("aaaa-bb-cc").toString());
         assertEquals("", kf.date("aaaa-bb-cc").toString());
     };
-
-
-    // TODO: More extensive testing!
 };
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
index da311c0..a504bf2 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSON.java
@@ -147,6 +147,92 @@
     };
 
 
+    @Test
+    public void metaQuery1Legacy () {
+        String metaQuery = getString(getClass().getResource(
+                "/queries/metaquery.jsonld").getFile());
+        KrillCollection kc = new KrillCollection(metaQuery);
+
+        /*
+        assertEquals("filter with QueryWrapperFilter(+textClass:wissenschaft)",
+                kc.getFilter(0).toString());
+        assertEquals(
+                "filter with QueryWrapperFilter(+(+pubPlace:Erfurt +author:Hesse))",
+                kc.getFilter(1).toString());
+        assertEquals(
+                "extend with QueryWrapperFilter(+(+pubDate:[20110429 TO 20131231] +textClass:freizeit))",
+                kc.getFilter(2).toString());
+        assertEquals(3, kc.getCount());
+        */
+
+        // This will and should fail on optimization
+        assertEquals("OrGroup(AndGroup(textClass:wissenschaft AndGroup(pubPlace:Erfurt author:Hesse)) AndGroup(AndGroup(pubDate:[20110429 TO 99999999] pubDate:[0 TO 20131231]) textClass:freizeit))", kc.toString());
+    };
+
+    @Test
+    public void metaQuery2Legacy () {
+        String metaQuery = getString(getClass().getResource(
+                "/queries/metaquery2.jsonld").getFile());
+        KrillCollection kc = new KrillCollection(metaQuery);
+        /*
+        assertEquals(1, kc.getCount());
+        assertEquals(
+                "filter with QueryWrapperFilter(+(+author:Hesse +pubDate:[0 TO 20131205]))",
+                kc.getFilter(0).toString());
+        */
+        assertEquals("AndGroup(author:Hesse pubDate:[0 TO 20131205])", kc.toString());
+    };
+
+
+    @Test
+    public void metaQuery3Legacy () {
+        String metaQuery = getString(getClass().getResource(
+                "/queries/metaquery4.jsonld").getFile());
+        KrillCollection kc = new KrillCollection(metaQuery);
+        /*
+        assertEquals(1, kc.getCount());
+        assertEquals(
+                     // "filter with QueryWrapperFilter(+pubDate:[20000101 TO 20131231])"
+                     "filter with QueryWrapperFilter(+(+pubDate:[20000101 TO 99999999] +pubDate:[0 TO 20131231]))",
+                kc.getFilter(0).toString());
+        */
+        assertEquals("AndGroup(pubDate:[20000101 TO 99999999] pubDate:[0 TO 20131231])", kc.toString());
+    };
+
+
+    @Test
+    public void metaQuery7Legacy () {
+        String metaQuery = getString(getClass().getResource(
+                "/queries/metaquery7.jsonld").getFile());
+        KrillCollection kc = new KrillCollection(metaQuery);
+        /*
+        assertEquals(2, kc.getCount());
+        assertEquals(
+                "filter with QueryWrapperFilter(+(corpusID:c-1 corpusID:c-2))",
+                kc.getFilter(0).toString());
+        assertEquals(
+                "filter with QueryWrapperFilter(+(+corpusID:d-1 +corpusID:d-2))",
+                kc.getFilter(1).toString());
+        */
+        // TODO: This is subject to optimization and may change in further versions
+        assertEquals("AndGroup(OrGroup(corpusID:c-1 corpusID:c-2) AndGroup(corpusID:d-1 corpusID:d-2))", kc.toString());
+    };
+
+
+    @Test
+    public void metaQuery9 () {
+        String metaQuery = getString(getClass().getResource(
+                "/queries/metaquery9.jsonld").getFile());
+        KrillCollection kc = new KrillCollection(metaQuery);
+        /*
+        assertEquals(1, kc.getCount());
+        assertEquals("filter with QueryWrapperFilter(+corpusID:WPD)", kc
+                .getFilter(0).toString());
+        */
+        assertEquals("corpusID:WPD", kc.toString());
+    };
+
+
     private String _getJSONString (String file) {
         return getString(getClass().getResource(path + file).getFile());
     };
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
index bfa1098..d9a8cff 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionJSONLegacy.java
@@ -17,6 +17,7 @@
 public class TestKrillCollectionJSONLegacy {
 
     @Test
+    @Ignore
     public void metaQuery1 () {
         String metaQuery = getString(getClass().getResource(
                 "/queries/metaquery.jsonld").getFile());
@@ -35,6 +36,7 @@
 
 
     @Test
+    @Ignore
     public void metaQuery2 () {
         String metaQuery = getString(getClass().getResource(
                 "/queries/metaquery2.jsonld").getFile());
@@ -47,6 +49,7 @@
 
 
     @Test
+    @Ignore
     public void metaQuery3 () {
         String metaQuery = getString(getClass().getResource(
                 "/queries/metaquery4.jsonld").getFile());
@@ -60,6 +63,7 @@
 
 
     @Test
+    @Ignore
     public void metaQuery7 () {
         String metaQuery = getString(getClass().getResource(
                 "/queries/metaquery7.jsonld").getFile());
@@ -75,6 +79,7 @@
 
 
     @Test
+    @Ignore
     public void metaQuery9 () {
         String metaQuery = getString(getClass().getResource(
                 "/queries/metaquery9.jsonld").getFile());
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
deleted file mode 100644
index 0a3f51f..0000000
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionLegacy.java
+++ /dev/null
@@ -1,256 +0,0 @@
-package de.ids_mannheim.korap.collection;
-
-import java.io.*;
-
-import de.ids_mannheim.korap.KrillIndex;
-import de.ids_mannheim.korap.index.FieldDocument;
-import de.ids_mannheim.korap.KrillCollectionLegacy;
-import de.ids_mannheim.korap.response.Result;
-import de.ids_mannheim.korap.KrillQuery;
-import de.ids_mannheim.korap.query.QueryBuilder;
-import de.ids_mannheim.korap.collection.BooleanFilter;
-
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.spans.SpanOrQuery;
-import org.apache.lucene.search.spans.SpanQuery;
-import org.apache.lucene.search.spans.SpanTermQuery;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-import org.junit.Ignore;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-@RunWith(JUnit4.class)
-public class TestKrillCollectionLegacy {
-
-    @Test
-    @Ignore
-    public void filterExample () throws Exception {
-
-        // Construct index
-        KrillIndex ki = new KrillIndex();
-        // Indexing test files
-        for (String i : new String[] { "00001", "00002", "00003", "00004",
-                "00005", "00006", "02439" }) {
-            ki.addDoc(
-                    getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
-                    true);
-        };
-        ki.commit();
-
-        CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
-
-        // Create Virtual collections:
-        KrillCollectionLegacy kc = new KrillCollectionLegacy(ki);
-
-        assertEquals("Documents", 7, kc.numberOf("documents"));
-
-        // The virtual collection consists of all documents that have
-        // the textClass "reisen" and "freizeit"
-
-        kc.filter(kf.and("textClass", "reisen").and("textClass",
-                "freizeit-unterhaltung"));
-
-        assertEquals("Documents", 5, kc.numberOf("documents"));
-        assertEquals("Tokens", 1678, kc.numberOf("tokens"));
-        assertEquals("Sentences", 194, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 139, kc.numberOf("paragraphs"));
-
-        // Subset this to all documents that have also the text
-        kc.filter(kf.and("textClass", "kultur"));
-
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-        assertEquals("Tokens", 405, kc.numberOf("tokens"));
-        assertEquals("Sentences", 75, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
-
-        kc.filter(kf.and("corpusID", "WPD"));
-
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-        assertEquals("Tokens", 405, kc.numberOf("tokens"));
-        assertEquals("Sentences", 75, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
-
-        // Create a query
-        QueryBuilder kq = new QueryBuilder("tokens");
-        SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
-
-        Result kr = kc.search(query);
-        assertEquals(kr.getTotalResults(), 70);
-
-        kc.extend(kf.and("textClass", "uninteresting"));
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-
-        kc.extend(kf.and("textClass", "wissenschaft"));
-
-        assertEquals("Documents", 3, kc.numberOf("documents"));
-        assertEquals("Tokens", 1669, kc.numberOf("tokens"));
-        assertEquals("Sentences", 188, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 130, kc.numberOf("paragraphs"));
-        // System.err.println(kr.toJSON());
-    };
-
-
-    @Test
-    @Ignore
-    public void filterExampleAtomic () throws Exception {
-
-        // That's exactly the same test class, but with multiple atomic indices
-
-        // Construct index
-        KrillIndex ki = new KrillIndex();
-        // Indexing test files
-        for (String i : new String[] { "00001", "00002", "00003", "00004",
-                "00005", "00006", "02439" }) {
-            ki.addDoc(
-                    getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
-                    true);
-            ki.commit();
-        };
-
-        CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
-
-        // Create Virtual collections:
-        KrillCollectionLegacy kc = new KrillCollectionLegacy(ki);
-
-        assertEquals("Documents", 7, kc.numberOf("documents"));
-
-        // If this is set - everything is fine automatically ...
-        kc.filter(kf.and("corpusID", "WPD"));
-        assertEquals("Documents", 7, kc.numberOf("documents"));
-
-
-        // The virtual collection consists of all documents that have the textClass "reisen" and "freizeit"
-
-        kc.filter(kf.and("textClass", "reisen").and("textClass",
-                "freizeit-unterhaltung"));
-
-        assertEquals("Documents", 5, kc.numberOf("documents"));
-        assertEquals("Tokens", 1678, kc.numberOf("tokens"));
-        assertEquals("Sentences", 194, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 139, kc.numberOf("paragraphs"));
-
-        // Subset this to all documents that have also the text
-        kc.filter(kf.and("textClass", "kultur"));
-
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-        assertEquals("Tokens", 405, kc.numberOf("tokens"));
-        assertEquals("Sentences", 75, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
-
-        // This is already filtered though ...
-        kc.filter(kf.and("corpusID", "WPD"));
-
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-        assertEquals("Tokens", 405, kc.numberOf("tokens"));
-        assertEquals("Sentences", 75, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 48, kc.numberOf("paragraphs"));
-
-        // Create a query
-        QueryBuilder kq = new QueryBuilder("tokens");
-        SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
-
-        Result kr = kc.search(query);
-        assertEquals(kr.getTotalResults(), 70);
-
-        kc.extend(kf.and("textClass", "uninteresting"));
-        assertEquals("Documents", 1, kc.numberOf("documents"));
-
-        kc.extend(kf.and("textClass", "wissenschaft"));
-
-        assertEquals("Documents", 3, kc.numberOf("documents"));
-        assertEquals("Tokens", 1669, kc.numberOf("tokens"));
-        assertEquals("Sentences", 188, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 130, kc.numberOf("paragraphs"));
-    };
-
-
-
-    @Test
-    @Ignore
-    public void filterExample2 () throws Exception {
-
-        // Construct index
-        KrillIndex ki = new KrillIndex();
-        // Indexing test files
-        for (String i : new String[] { "00001", "00002", "00003", "00004",
-                "00005", "00006", "02439" }) {
-            ki.addDoc(
-                    getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
-                    true);
-        };
-        ki.commit();
-
-        ki.addDoc(getClass()
-                .getResourceAsStream("/wiki/00012-fakemeta.json.gz"), true);
-
-        ki.commit();
-
-        CollectionBuilderLegacy kf = new CollectionBuilderLegacy();
-
-        // Create Virtual collections:
-        KrillCollectionLegacy kc = new KrillCollectionLegacy(ki);
-        kc.filter(kf.and("textClass", "reisen").and("textClass",
-                "freizeit-unterhaltung"));
-        assertEquals("Documents", 5, kc.numberOf("documents"));
-        assertEquals("Tokens", 1678, kc.numberOf("tokens"));
-        assertEquals("Sentences", 194, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 139, kc.numberOf("paragraphs"));
-
-        // Create a query
-        QueryBuilder kq = new QueryBuilder("tokens");
-        SpanQuery query = kq.seg("opennlp/p:NN").with("tt/p:NN").toQuery();
-
-        Result kr = kc.search(query);
-
-        assertEquals(kr.getTotalResults(), 369);
-
-        kc.filter(kf.and("corpusID", "QQQ"));
-
-        assertEquals("Documents", 0, kc.numberOf("documents"));
-        assertEquals("Tokens", 0, kc.numberOf("tokens"));
-        assertEquals("Sentences", 0, kc.numberOf("sentences"));
-        assertEquals("Paragraphs", 0, kc.numberOf("paragraphs"));
-    };
-
-
-    @Test
-    @Ignore
-    public void uidCollection () throws IOException {
-
-        // Construct index
-        KrillIndex ki = new KrillIndex();
-        // Indexing test files
-        int uid = 1;
-        for (String i : new String[] { "00001", "00002", "00003", "00004",
-                "00005", "00006", "02439" }) {
-            FieldDocument fd = ki.addDoc(uid++,
-                    getClass().getResourceAsStream("/wiki/" + i + ".json.gz"),
-                    true);
-        };
-        ki.commit();
-
-        assertEquals("Documents", 7, ki.numberOf("documents"));
-        assertEquals("Paragraphs", 174, ki.numberOf("paragraphs"));
-        assertEquals("Sentences", 281, ki.numberOf("sentences"));
-        assertEquals("Tokens", 2661, ki.numberOf("tokens"));
-
-        SpanQuery sq = new SpanTermQuery(new Term("tokens", "s:der"));
-        Result kr = ki.search(sq, (short) 10);
-        assertEquals(86, kr.getTotalResults());
-
-        // Create Virtual collections:
-        KrillCollectionLegacy kc = new KrillCollectionLegacy();
-        kc.filterUIDs(new String[] { "2", "3", "4" });
-        kc.setIndex(ki);
-        assertEquals("Documents", 3, kc.numberOf("documents"));
-
-        assertEquals("Paragraphs", 46, kc.numberOf("paragraphs"));
-        assertEquals("Sentences", 103, kc.numberOf("sentences"));
-        assertEquals("Tokens", 1229, kc.numberOf("tokens"));
-
-        kr = kc.search(sq);
-        assertEquals((long) 39, kr.getTotalResults());
-    };
-};
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionNew.java b/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionNew.java
deleted file mode 100644
index 52dc59d..0000000
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKrillCollectionNew.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package de.ids_mannheim.korap.collection;
-
-import java.util.*;
-import java.io.*;
-
-import de.ids_mannheim.korap.collection.CollectionBuilder;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-import org.junit.Ignore;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-
-@RunWith(JUnit4.class)
-public class TestKrillCollectionNew {
-
-    @Test
-    public void builderTerm () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("author:tree",
-                     kc.term("author", "tree").toString());
-    };
-
-    @Test
-    public void builderRegex () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("QueryWrapperFilter(author:/tre*?/)",
-                     kc.re("author", "tre*?").toString());
-    };
-
-    @Test
-    public void builderDateYear () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("pubDate:[20050000 TO 20059999]",
-                     kc.date("pubDate", "2005").toString());
-    };
-
-    @Test
-    public void builderDateMonth () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("pubDate:[20051000 TO 20051099]",
-                     kc.date("pubDate", "2005-10").toString());
-    };
-
-    @Test
-    public void builderDateDay () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("pubDate:[20051011 TO 20051011]",
-                     kc.date("pubDate", "2005-10-11").toString());
-    };
-
-    @Test
-    public void builderDateBorders () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        // CollectionBuilderNew.CollectionBuilderInterface kbi = ;
-        assertNull(kc.date("pubDate", ""));
-
-        assertEquals("pubDate:[20051580 TO 20051580]",
-                     kc.date("pubDate", "2005-15-80").toString());
-
-        assertNull(kc.date("pubDate", "2005-15-8"));
-        assertNull(kc.date("pubDate", "2005-5-18"));
-        assertNull(kc.date("pubDate", "200-05-18"));
-    };
-
-    @Test
-    public void builderSince () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("pubDate:[20050000 TO 99999999]",
-                     kc.since("pubDate", "2005").toString());
-
-        assertEquals("pubDate:[20051000 TO 99999999]",
-                     kc.since("pubDate", "2005-10").toString());
-
-        assertEquals("pubDate:[20051012 TO 99999999]",
-                     kc.since("pubDate", "2005-10-12").toString());
-    };
-
-
-    @Test
-    public void builderTill () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("pubDate:[0 TO 20059999]",
-                     kc.till("pubDate", "2005").toString());
-
-        assertEquals("pubDate:[0 TO 20051299]",
-                     kc.till("pubDate", "2005-12").toString());
-
-        assertEquals("pubDate:[0 TO 20051204]",
-                     kc.till("pubDate", "2005-12-04").toString());
-    };
-
-
-    @Test
-    public void builderAndSimple () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("author:tree", kc.andGroup().with(kc.term("author", "tree")).toString());
-    };
-
-    @Test
-    public void builderOrSimple () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("author:tree", kc.orGroup().with(kc.term("author", "tree")).toString());
-    };
-
-    @Test
-    public void builderAndCombined () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("AndGroup(author:tree title:name)",
-                     kc.andGroup().with(kc.term("author", "tree"))
-                     .with(kc.term("title", "name")).toString());
-    };
-
-    @Test
-    public void builderAndNestedSimple () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("AndGroup(author:tree title:name)",
-                     kc.andGroup().with(kc.andGroup().with(kc.term("author", "tree")).with(kc.term("title", "name"))).toString());
-    };
-
-
-    @Test
-    public void builderOrCombined () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("OrGroup(author:tree title:name)",
-                     kc.orGroup().with(kc.term("author", "tree"))
-                     .with(kc.term("title", "name")).toString());
-    };
-
-    @Test
-    public void builderOrNestedSimple () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        assertEquals("OrGroup(author:tree title:name)",
-                     kc.orGroup().with(kc.orGroup().with(kc.term("author", "tree"))
-                                .with(kc.term("title", "name"))).toString()
-                     );
-    };
-
-    @Test
-    public void builderGroups () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        String g = kc.orGroup().with(
-                                     kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"))
-        ).with(
-               kc.andGroup().with(kc.term("author", "tree2")).with(kc.term("title", "name2"))
-               ).toString();
-        assertEquals("OrGroup(OrGroup(author:tree1 title:name1) AndGroup(author:tree2 title:name2))", g);
-    };
-
-    @Test
-    public void builderNegationRoot () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        CollectionBuilder.CollectionBuilderInterface kbi = kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"));
-        assertEquals(
-                     "OrGroup(author:tree1 title:name1)",
-                     kbi.toString());
-        assertFalse(kbi.isNegative());
-
-        kbi = kc.andGroup().with(
-                                 kc.orGroup().with(kc.term("author", "tree1")).with(kc.term("title", "name1"))
-              ).not();
-        assertEquals("OrGroup(author:tree1 title:name1)", kbi.toString());
-        assertTrue(kbi.isNegative());
-    };
-
-
-    @Test
-    public void builderNegation () throws IOException {
-        CollectionBuilder kc = new CollectionBuilder();
-        CollectionBuilder.CollectionBuilderInterface kbi =
-            kc.term("author", "tree").not();
-        assertEquals("author:tree", kbi.toString());
-        assertTrue(kbi.isNegative());
-
-        kbi = kc.andGroup().with(kc.term("author", "tree").not());
-        assertEquals("author:tree", kbi.toString());
-        assertTrue(kbi.isNegative());
-
-        kbi = kc.orGroup().with(kc.term("author", "tree").not());
-        assertEquals("author:tree", kbi.toString());
-        assertTrue(kbi.isNegative());
-    };
-
-
-};
diff --git a/src/test/resources/queries/metaquery.jsonld b/src/test/resources/queries/metaquery.jsonld
index b0b4c55..7d785c7 100644
--- a/src/test/resources/queries/metaquery.jsonld
+++ b/src/test/resources/queries/metaquery.jsonld
@@ -1,115 +1,180 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "meta" : {
-      "startPage" : 2,
-      "count" : 5,
-      "context" : {
-	"left" : [ "token", 3 ],
-	"right" : [ "char", 6 ]
-      }
-    },
-   "query":{
-      "@type":"koral:group",
-      "operation":"operation:or",
-      "operands":[
-         {
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "meta" : {
+    "startPage" : 2,
+    "count" : 5,
+    "context" : {
+      "left" : [ "token", 3 ],
+      "right" : [ "char", 6 ]
+    }
+  },
+  "query":{
+    "@type":"koral:group",
+    "operation":"operation:or",
+    "operands":[
+      {
+        "@type":"koral:token",
+        "wrap":{
+          "@type":"koral:term",
+          "foundry":"mate",
+	  "layer" : "lemma",
+	  "key" : "Vokal",
+          "match":"match:eq"
+        }
+      },
+      {
+        "@type":"koral:group",
+	"operation": "operation:sequence",
+        "operands":[
+          {
             "@type":"koral:token",
             "wrap":{
-               "@type":"koral:term",
-               "foundry":"mate",
-	      "layer" : "lemma",
-	      "key" : "Vokal",
-               "match":"match:eq"
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "base",
+	      "key" : "der",
+              "match":"match:eq"
             }
-         },
-         {
-            "@type":"koral:group",
-	   "operation": "operation:sequence",
-            "operands":[
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                    "@type":"koral:term",
-                    "foundry":"mate",
-		    "layer" : "base",
-		    "key" : "der",
-                    "match":"match:eq"
-                  }
-               },
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-                     "foundry":"mate",
-		      "layer" : "pos",
-		      "key" : "ADJA",
-                     "match":"match:eq"
-                  }
-               }
-            ]
-         }
-      ]
-   },
-    "collections": [
-        {
-            "@type": "koral:meta-filter",
-            "@id": "korap-filter#id-1223232",
-            "@value": {
-                "@type": "koral:term",
-                "@field": "koral:field#textClass",
-                "@value": "wissenschaft"
+          },
+          {
+            "@type":"koral:token",
+            "wrap":{
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "pos",
+	      "key" : "ADJA",
+              "match":"match:eq"
             }
-        },
-        {
-            "@type": "koral:meta-filter",
-            "@id": "korap-filter#id-34345454",
-            "@value": {
-                "@type": "koral:group",
-                "relation": "and",
-                "operands": [
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#pubPlace",
-                        "@value": "Erfurt"
-                    },
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#author",
-                        "@value": "Hesse"
-                    }
-                ]
-            }
-        },
-        {
-            "@type": "koral:meta-extend",
-            "@value": {
-                "@type": "koral:group",
-                "relation": "and",
-                "operands": [
-                    {
-                        "@type": "koral:group",
-                        "comment": "other values can be 'since','until' in combination with a simple korap:term",
-                        "relation": "between",
-                        "field": "koral:field#pubDate",
-                        "operands": [
-                            {
-                                "@type": "koral:date",
-                                "comment": "either long value or String representation '2013-04-29'",
-                                "@value": "2011-04-29"
-                            },
-                            {
-                                "@type": "koral:date",
-                                "@value": "2013-12-31"
-                            }
-                        ]
-                    },
-                    {
-                        "@type": "koral:term",
-                        "@field": "koral:field#textClass",
-                        "@value": "freizeit"
-                    }
-                ]
-            }
-        }
+          }
+        ]
+      }
     ]
+  },
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation": "operation:or",
+    "operands" : [
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:and",
+	"operands" : [
+	  {
+            "@type": "koral:doc",
+            "key": "textClass",
+            "value": "wissenschaft"
+	  },
+	  {
+	    "@type" : "koral:docGroup",
+	    "operation" : "operation:and",
+	    "operands": [
+              {
+		"@type": "koral:doc",
+		"key": "pubPlace",
+		"value": "Erfurt"
+              },
+              {
+		"@type": "koral:doc",
+		"key": "author",
+		"value": "Hesse"
+              }
+	    ]
+	  }
+	]
+      },
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:and",
+        "operands": [
+          {
+            "@type": "koral:docGroup",
+            "comment": "other values can be 'since','until' in combination with a simple korap:term",
+	    "operation" : "operation:and",
+            "operands": [
+              {
+                "@type": "koral:doc",
+		"type": "type:date",
+                "comment": "either long value or String representation '2013-04-29'",
+		"key" : "pubDate",
+		"match": "match:geq",
+                "value": "2011-04-29"
+              },
+              {
+                "@type": "koral:doc",
+		"type": "type:date",
+		"key" : "pubDate",
+		"match": "match:leq",
+                "value": "2013-12-31"
+              }
+            ]
+          },
+          {
+            "@type": "koral:doc",
+            "key": "textClass",
+            "value": "freizeit"
+          }
+        ]
+      }]
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+        "@type": "koral:term",
+        "@field": "koral:field#textClass",
+        "@value": "wissenschaft"
+      }
+    },
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-34345454",
+      "@value": {
+        "@type": "koral:group",
+        "relation": "and",
+        "operands": [
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#pubPlace",
+            "@value": "Erfurt"
+          },
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#author",
+            "@value": "Hesse"
+          }
+        ]
+      }
+    },
+    {
+      "@type": "koral:meta-extend",
+      "@value": {
+        "@type": "koral:group",
+        "relation": "and",
+        "operands": [
+          {
+            "@type": "koral:group",
+            "comment": "other values can be 'since','until' in combination with a simple korap:term",
+            "relation": "between",
+            "field": "koral:field#pubDate",
+            "operands": [
+              {
+                "@type": "koral:date",
+                "comment": "either long value or String representation '2013-04-29'",
+                "@value": "2011-04-29"
+              },
+              {
+                "@type": "koral:date",
+                "@value": "2013-12-31"
+              }
+            ]
+          },
+          {
+            "@type": "koral:term",
+            "@field": "koral:field#textClass",
+            "@value": "freizeit"
+          }
+        ]
+      }
+    }
+  ]
 }
diff --git a/src/test/resources/queries/metaquery2.jsonld b/src/test/resources/queries/metaquery2.jsonld
index f7c906a..2586b06 100644
--- a/src/test/resources/queries/metaquery2.jsonld
+++ b/src/test/resources/queries/metaquery2.jsonld
@@ -76,5 +76,23 @@
         ]
       }
     }
-  ]
+  ],
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation": "operation:and",
+    "operands" : [
+      {
+	"@type" : "koral:doc",
+	"key" : "author",
+	"value" : "Hesse"
+      },
+      {
+	"@type" : "koral:doc",
+	"key" : "pubDate",
+	"type" : "type:date",
+	"match" : "match:leq",
+	"value" : "2013-12-05"
+      }
+    ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery3.jsonld b/src/test/resources/queries/metaquery3.jsonld
index a9fca44..5fbd487 100644
--- a/src/test/resources/queries/metaquery3.jsonld
+++ b/src/test/resources/queries/metaquery3.jsonld
@@ -1,5 +1,5 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
   "meta":{
     "startPage" : 2,
     "count" : 5,
@@ -7,47 +7,47 @@
       "left" : [ "token", 3 ],
       "right" : [ "char", 6 ]
     }
-},
-   "query":{
-      "@type":"koral:group",
-      "operation":"operation:or",
-      "operands":[
-         {
+  },
+  "query":{
+    "@type":"koral:group",
+    "operation":"operation:or",
+    "operands":[
+      {
+        "@type":"koral:token",
+        "wrap":{
+          "@type":"koral:term",
+	  "foundry" : "mate",
+          "layer":"l",
+	  "key":"Vokal",
+          "match":"match:eq"
+        }
+      },
+      {
+        "@type":"koral:group",
+	"operation" : "operation:sequence",
+        "operands":[
+          {
             "@type":"koral:token",
             "wrap":{
-               "@type":"koral:term",
-	        "foundry" : "mate",
-               "layer":"l",
-	       "key":"Vokal",
-               "match":"match:eq"
+              "@type":"koral:term",
+	      "foundry" : "mate",
+              "layer":"l",
+	      "key" : "der",
+              "match":"match:eq"
             }
-         },
-         {
-            "@type":"koral:group",
-	   "operation" : "operation:sequence",
-            "operands":[
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-		     "foundry" : "mate",
-                     "layer":"l",
-		     "key" : "der",
-                     "match":"match:eq"
-                  }
-               },
-               {
-                  "@type":"koral:token",
-                  "wrap":{
-                     "@type":"koral:term",
-                     "foundry":"mate",
-		      "layer" : "p",
-		      "key" : "ADJA",
-                     "match":"match:eq"
-                  }
-               }
-            ]
-         }
-      ]
-   }
+          },
+          {
+            "@type":"koral:token",
+            "wrap":{
+              "@type":"koral:term",
+              "foundry":"mate",
+	      "layer" : "p",
+	      "key" : "ADJA",
+              "match":"match:eq"
+            }
+          }
+        ]
+      }
+    ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery7.jsonld b/src/test/resources/queries/metaquery7.jsonld
index 0b664ed..0c6ce9e 100644
--- a/src/test/resources/queries/metaquery7.jsonld
+++ b/src/test/resources/queries/metaquery7.jsonld
@@ -1,60 +1,98 @@
 {
-    "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
-    "meta":{
-	"startPage" : 1,
-	"count" : 5,
-	"context" : {
-	    "left" : [ "token", 3 ],
-	    "right" : [ "char", 6 ]
-	}
+  "@context": "http://ids-mannheim.de/ns/KorAP/json-ld/v0.1/context.jsonld",
+  "meta":{
+    "startPage" : 1,
+    "count" : 5,
+    "context" : {
+      "left" : [ "token", 3 ],
+      "right" : [ "char", 6 ]
+    }
+  },
+  "query":{
+    "@type":"koral:token",
+    "wrap":{
+      "@type":"koral:term",
+      "foundry":"mate",
+      "layer":"l",
+      "key":"lediglich"
+    }
+  },
+  "collections": [
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "or",
+	"@field": "koral:field#corpusID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "c-1"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "c-2"
+	  }
+	]
+      }
     },
-    "query":{
-	"@type":"koral:token",
-	"wrap":{
-	    "@type":"koral:term",
-	    "foundry":"mate",
-	    "layer":"l",
-	    "key":"lediglich"
-	}
-    },
-    "collections": [
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "or",
-		"@field": "koral:field#corpusID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "c-1"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "c-2"
-		    }
-		]
-	    }
-	},
-	{
-	    "@type": "koral:meta-filter",
-	    "@id": "korap-filter#id-1223232",
-	    "@value": {
-		"@type": "koral:group",
-		"relation": "and",
-		"@field": "koral:field#corpusID",
-		"operands": [
-		    {
-			"@type": "koral:term",
-			"@value": "d-1"
-		    },
-		    {
-			"@type": "koral:term",
-			"@value": "d-2"
-		    }
-		]
-	    }
-	}
+    {
+      "@type": "koral:meta-filter",
+      "@id": "korap-filter#id-1223232",
+      "@value": {
+	"@type": "koral:group",
+	"relation": "and",
+	"@field": "koral:field#corpusID",
+	"operands": [
+	  {
+	    "@type": "koral:term",
+	    "@value": "d-1"
+	  },
+	  {
+	    "@type": "koral:term",
+	    "@value": "d-2"
+	  }
+	]
+      }
+    }
+  ],
+  "collection" : {
+    "@type" : "koral:docGroup",
+    "operation" : "operation:and",
+    "operands" : [
+      {
+	"@type" : "koral:docGroup",
+	"operation" : "operation:or",
+	"operands" : [
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "c-1"
+	  },
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "c-2"
+	  }
+	]
+      },
+      {
+        "@type" : "koral:docGroup",
+	"operation" : "operation:and",
+	"operands" : [
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "d-1"
+	  },
+	  {
+	    "@type" : "koral:doc",
+	    "key" : "corpusID",
+	    "value" : "d-2"
+	  }
+	]
+      }
     ]
+  }
 }
diff --git a/src/test/resources/queries/metaquery9.jsonld b/src/test/resources/queries/metaquery9.jsonld
index 5a812ec..a89b584 100644
--- a/src/test/resources/queries/metaquery9.jsonld
+++ b/src/test/resources/queries/metaquery9.jsonld
@@ -1,12 +1,17 @@
 {
-    "collections":[
-	{
-	    "@type":"koral:meta-filter",
-	    "@value":{
-		"@type":"koral:term",
-		"@field":"koral:field#corpusID",
-		"@value":"WPD"
-	    }
-	}
-    ]
+  "collections":[
+    {
+      "@type":"koral:meta-filter",
+      "@value":{
+	"@type":"koral:term",
+	"@field":"koral:field#corpusID",
+	"@value":"WPD"
+      }
+    }
+  ],
+  "collection" : {
+    "@type" : "koral:doc",
+    "key" : "corpusID",
+    "value" : "WPD"
+  }
 }
