diff --git a/pom.xml b/pom.xml
index ff64201..dd918d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>de.ids_mannheim.korap</groupId>
     <artifactId>Kustvakt-core</artifactId>
-    <version>0.59.1</version>
+    <version>0.59.2</version>
     <packaging>jar</packaging>
     <name>Kustvakt core</name>
     <description>Kustvakt core, basic rest api for testing purposes and default
@@ -131,6 +131,7 @@
                     <compilerCompliance>1.7</compilerCompliance>
                     <compilerTargetPlatform>1.7</compilerTargetPlatform>
                 </configuration>
+                <!--
                 <executions>
                     <execution>
                         <goals>
@@ -138,6 +139,7 @@
                         </goals>
                     </execution>
                 </executions>
+                -->
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/de/ids_mannheim/korap/config/JWTSigner.java b/src/main/java/de/ids_mannheim/korap/config/JWTSigner.java
index 8d1d08b..afca427 100644
--- a/src/main/java/de/ids_mannheim/korap/config/JWTSigner.java
+++ b/src/main/java/de/ids_mannheim/korap/config/JWTSigner.java
@@ -7,7 +7,6 @@
 import com.nimbusds.jwt.SignedJWT;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.TimeUtils;
diff --git a/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java b/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
index d9b5d8a..5352435 100644
--- a/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -1,7 +1,6 @@
 package de.ids_mannheim.korap.config;
 
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.utils.TimeUtils;
 import lombok.Getter;
 import org.apache.log4j.PropertyConfigurator;
diff --git a/src/main/java/de/ids_mannheim/korap/config/Scopes.java b/src/main/java/de/ids_mannheim/korap/config/Scopes.java
index a280c10..aea1dbd 100644
--- a/src/main/java/de/ids_mannheim/korap/config/Scopes.java
+++ b/src/main/java/de/ids_mannheim/korap/config/Scopes.java
@@ -1,6 +1,5 @@
 package de.ids_mannheim.korap.config;
 
-import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 import java.util.ArrayList;
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/OAuthDb.java b/src/main/java/de/ids_mannheim/korap/handlers/OAuthDb.java
index e2ad1e2..f72140a 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/OAuthDb.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/OAuthDb.java
@@ -5,7 +5,7 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.exceptions.dbException;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.BooleanUtils;
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java b/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
index dd2657a..aeeb58a 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
@@ -7,7 +7,7 @@
 import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.resources.ResourceFactory;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.SqlBuilder;
 import org.slf4j.Logger;
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java b/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
index 43d5af5..d18ea69 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
@@ -4,7 +4,7 @@
 import de.ids_mannheim.korap.config.URIParam;
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.resources.ResourceFactory;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.ShibUser;
 import de.ids_mannheim.korap.user.User;
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/defaults/KustvaktEncryption.java b/src/main/java/de/ids_mannheim/korap/interfaces/defaults/KustvaktEncryption.java
index 632b0e4..f45437e 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/defaults/KustvaktEncryption.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/defaults/KustvaktEncryption.java
@@ -4,7 +4,7 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.web.utils.KustvaktMap;
 import edu.emory.mathcs.backport.java.util.Collections;
diff --git a/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java b/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
index ebe4a2e..44e367d 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/LayerMapper.java
@@ -1,7 +1,7 @@
 package de.ids_mannheim.korap.resource;
 
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.Userdata;
 
 /**
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanupFilter.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanupFilter.java
index 14fcf15..46c39f9 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanupFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionCleanupFilter.java
@@ -57,29 +57,6 @@
         return root;
     }
 
-
-    // return null deletes node, if node return replace at level -1
-    @Deprecated
-    private JsonNode processNodes (JsonNode jsonNode) {
-        if (jsonNode.isObject()) {
-            if (jsonNode.has("operands")) {
-                JsonNode node = jsonNode.at("/operands");
-                int count = node.size();
-                if (count == 1) {
-                    // move to super node if any
-                    return node.path(0);
-                }
-                else if (count == 0) {
-                    // remove container
-                    return null;
-                }
-                return jsonNode;
-            }
-        }
-        return JsonUtils.createArrayNode();
-    }
-
-
     @Override
     public JsonNode postProcess (KoralNode node) {
         return null;
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionConstraint.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionConstraint.java
index 4173bbd..13e6196 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionConstraint.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/CollectionConstraint.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeanInjectable;
 import de.ids_mannheim.korap.config.ContextHolder;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
@@ -20,7 +21,7 @@
     public JsonNode preProcess (KoralNode node, KustvaktConfiguration config,
             User user) {
         if (node.get("@type").equals("koral:doc")) {
-            if (node.get("key").equals("corpusID") && !check(node, user)) {
+            if (node.get("key").equals(Attributes.CORPUS_SIGLE) && !check(node, user)) {
                 node.removeNode();
                 // todo: add message that node was removed!
             }
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
index 86026aa..f0b1200 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/IdWriter.java
@@ -14,7 +14,6 @@
 
     private int counter;
 
-
     public IdWriter () {
         this.counter = 0;
     }
@@ -31,8 +30,6 @@
         return node.rawNode();
     }
 
-
-    // fixme: koral token --> how does grouping behave?!
     private String extractToken (JsonNode token) {
         JsonNode wrap = token.path("wrap");
         if (!wrap.isMissingNode())
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
index fe3f6cb..16debc8 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/KoralNode.java
@@ -18,19 +18,17 @@
     private JsonNode node;
     private KoralRewriteBuilder builder;
     private boolean remove;
-    private final String target;
 
 
-    private KoralNode (String target, JsonNode node) {
+    private KoralNode (JsonNode node) {
         this.node = node;
-        this.target = target;
         this.builder = new KoralRewriteBuilder();
         this.remove = false;
     }
 
 
     public static KoralNode wrapNode (JsonNode node) {
-        return new KoralNode(null, node) {};
+        return new KoralNode(node) {};
     }
 
 
@@ -40,22 +38,6 @@
     }
 
 
-    @Deprecated
-    public boolean setNode (Object path) {
-        JsonNode n = null;
-        if (this.node.isObject() && this.node.has((String) path))
-            n = this.node.path((String) path);
-        else if (this.node.isArray() && this.node.has((int) path))
-            n = this.node.path((int) path);
-
-        if (n != null) {
-            this.node = n;
-            return true;
-        }
-        return false;
-    }
-
-
     public void put (String name, Object value) {
 
         if (this.node.isObject() && this.node.path(name).isMissingNode()) {
@@ -64,6 +46,8 @@
                 node.put(name, (String) value);
             else if (value instanceof Integer)
                 node.put(name, (Integer) value);
+            else if (value instanceof JsonNode)
+                node.put(name, (JsonNode) value);
             builder.setOperation("injection");
             builder.build(this.node);
         }
@@ -92,15 +76,34 @@
     }
 
 
-    public void replace (String name, String value) {
+    public void replace (String name, Object value) {
         if (this.node.isObject() && this.node.has(name)) {
             ObjectNode n = (ObjectNode) this.node;
-            n.put(name, value);
+            if (value instanceof String)
+                n.put(name, (String) value);
+            else if (value instanceof Integer)
+                n.put(name, (Integer) value);
+            else if (value instanceof JsonNode)
+                n.put(name, (JsonNode) value);
             builder.setOperation("override");
             builder.build(this.node);
         }
     }
 
+    public void set (String name, Object value) {
+        if (this.node.isObject()) {
+            ObjectNode n = (ObjectNode) this.node;
+            if (value instanceof String)
+                n.put(name, (String) value);
+            else if (value instanceof Integer)
+                n.put(name, (Integer) value);
+            else if (value instanceof JsonNode)
+                n.put(name, (JsonNode) value);
+            builder.setOperation("insertion");
+            builder.build(this.node);
+        }
+    }
+
 
     public String get (String name) {
         if (this.node.isObject())
@@ -109,8 +112,8 @@
     }
 
 
-    public JsonNode at (String name) {
-        return this.node.at(name);
+    public KoralNode at (String name) {
+        return KoralNode.wrapNode(this.node.at(name));
     }
 
 
@@ -138,12 +141,8 @@
     }
 
 
-    public final String target () {
-        return this.target;
-    }
-
     //todo: 21.10.15 -- redo with better return policies!
-    private static class KoralRewriteBuilder {
+    public static class KoralRewriteBuilder {
 
         private Map<String, String> map;
 
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/PublicCollection.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/PublicCollection.java
index 597a407..a8efce3 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/PublicCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/PublicCollection.java
@@ -1,21 +1,25 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import de.ids_mannheim.korap.config.BeanInjectable;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.resources.Corpus;
+import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.utils.CollectionQueryBuilder3;
+import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
+import de.ids_mannheim.korap.utils.JsonUtils;
 
+import java.util.ArrayList;
 import java.util.Set;
 
 /**
  * @author hanl
  * @date 04/07/2015
  */
-public class PublicCollection implements RewriteTask.RewriteNodeAt {
+public class PublicCollection implements RewriteTask.RewriteBefore {
 
     public PublicCollection () {
         super();
@@ -27,43 +31,35 @@
     public JsonNode preProcess (KoralNode node, KustvaktConfiguration config,
             User user) {
         JsonNode subnode = node.rawNode();
-        // todo: test
+
         if (!subnode.at("/collection").findValuesAsText("key")
-                .contains("corpusID")) {
-            //todo: inject public collection node
-            if (user != null) {
-                try {
-                    ResourceFinder finder = ResourceFinder.init(user,
-                            Corpus.class);
-                    Set<String> ids = finder.getIds();
-                    createNode(ids);
+                .contains(Attributes.CORPUS_SIGLE)) {
+            KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+            if (subnode.has("collection"))
+                b.setBaseQuery(JsonUtils.toJSON(subnode));
+
+            try {
+                Set resources = ResourceFinder.search(user, Corpus.class);
+                ArrayList<KustvaktResource> list = new ArrayList(resources);
+
+                if (list.isEmpty())
+                    throw new KustvaktException(StatusCodes.REQUEST_INVALID,
+                            "No resources found for user", user.getUsername());
+
+                for (int i = 0; i < list.size(); i++) {
+                    if (i > 0)
+                        b.or();
+                    b.with(Attributes.CORPUS_SIGLE+"=" + list.get(i).getPersistentID());
                 }
-                catch (KustvaktException e) {
-                    e.printStackTrace();
-                    //todo: 20.10.15 - 21.10.15
-                }
+                JsonNode rewritten = JsonUtils.readTree(b.toJSON());
+                node.set("collection", rewritten.at("/collection"));
+            }
+            catch (KustvaktException e) {
+                e.printStackTrace();
+                // todo:
             }
         }
-        return subnode;
+
+        return node.rawNode();
     }
-
-
-    //todo: 20.10.15
-    private JsonNode createNode (Set<String> ids) {
-        JsonNode node = CollectionQueryBuilder3.Utils.buildDocGroup();
-        return node;
-    }
-
-
-    @Override
-    public JsonNode postProcess (KoralNode node) {
-        return null;
-    }
-
-
-    @Override
-    public String at () {
-        return "/collection";
-    }
-
 }
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
index 3569834..746c3a0 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
@@ -7,6 +7,7 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
+import org.apache.xpath.SourceTree;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -174,6 +175,7 @@
     }
 
 
+    // fixme: redo with first, second iteration and push clean up filters into second run
     public String preProcess (String json, User user) {
         return JsonUtils.toJSON(preProcess(JsonUtils.readTree(json), user));
     }
@@ -246,17 +248,18 @@
                 if ((rwa.at() != null && !node.at(rwa.at()).isMissingNode()))
                     next = node.at(rwa.at());
             }
+
             try {
-                if (!post && task instanceof RewriteTask.RewriteBefore)
+                if (!post & task instanceof RewriteTask.RewriteBefore)
                     ((RewriteTask.RewriteBefore) task).preProcess(
                             KoralNode.wrapNode(next), this.config, user);
-                else
+                else if (task instanceof RewriteTask.RewriteAfter)
                     ((RewriteTask.RewriteAfter) task).postProcess(KoralNode
                             .wrapNode(next));
             }
             catch (KustvaktException e) {
                 jlog.error("Error in rewrite processor {} for node {}", task
-                        .getClass().getSimpleName(), node.toString());
+                        .getClass().getSimpleName(), next.toString());
                 e.printStackTrace();
             }
         }
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
index d9a3e4b..2c7fa06 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteTask.java
@@ -11,6 +11,10 @@
  */
 public interface RewriteTask {
 
+
+    /**
+     * unspecified query rewrite that gets injected the entire root node during preprocessing
+     */
     interface RewriteBefore extends RewriteTask {
         /**
          * @param node
@@ -70,27 +74,4 @@
      */
     interface RewriteKoralToken extends RewriteBefore {}
 
-    /**
-     * query rewrites get injected the entire query from root
-     * containing all child nodes
-     * <p/> {@link RewriteQuery} does not allow the deletion of the
-     * root node or subnode through KoralNode.
-     * The
-     * {@link de.ids_mannheim.korap.resource.rewrite.RewriteHandler}
-     * will igonore respecitve invalid requests
-     */
-    @Deprecated
-    interface RewriteQuery extends RewriteBefore, RewriteAfter {}
-
-    /**
-     * Koral term nodes that are subject to rewrites
-     * Be aware that node rewrites are processed before query
-     * rewrites. Thus query rewrite may override previous node
-     * rewrites
-     * <p/> {@link RewriteNode} rewrite supports the deletion of the
-     * respective node by simply setting the node invalid in KoralNode
-     */
-    @Deprecated
-    interface RewriteNode extends RewriteBefore {}
-
 }
diff --git a/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java b/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java
index 6ec5450..a7adbf8 100644
--- a/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java
+++ b/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java
@@ -1,6 +1,6 @@
 package de.ids_mannheim.korap.security;
 
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import lombok.Getter;
 
 import java.util.HashMap;
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
index e0e33ce..181d435 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/PolicyDao.java
@@ -10,7 +10,7 @@
 import de.ids_mannheim.korap.security.Parameter;
 import de.ids_mannheim.korap.security.PolicyCondition;
 import de.ids_mannheim.korap.security.SecurityPolicy;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.BooleanUtils;
 import de.ids_mannheim.korap.utils.StringUtils;
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java b/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
index 4dffda5..d31a2f7 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/ResourceFinder.java
@@ -11,7 +11,7 @@
 import de.ids_mannheim.korap.security.PermissionsBuffer;
 import de.ids_mannheim.korap.security.PolicyCondition;
 import de.ids_mannheim.korap.security.SecurityPolicy;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import lombok.NonNull;
 import org.slf4j.Logger;
@@ -123,7 +123,12 @@
     // todo: should this be working?
     public static <T extends KustvaktResource> Set<T> search (User user,
             Class<T> clazz) throws KustvaktException {
-        return search(null, true, user, clazz, Permissions.Permission.READ);
+        Set set = new HashSet();
+        if (user != null && !User.UserFactory.isDemo(user.getUsername()))
+            set = search(null, true, user, clazz, Permissions.Permission.READ);
+        if (set.isEmpty())
+            set = searchPublic(clazz);
+        return set;
     }
 
 
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/APIAuthentication.java b/src/main/java/de/ids_mannheim/korap/security/auth/APIAuthentication.java
index 97b0e1b..69ef5bf 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/APIAuthentication.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/APIAuthentication.java
@@ -7,11 +7,10 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.NamingUtils;
-import de.ids_mannheim.korap.utils.StringUtils;
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java b/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
index 16e0298..ccad916 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/BasicHttpAuth.java
@@ -7,12 +7,11 @@
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.NamingUtils;
-import de.ids_mannheim.korap.utils.StringUtils;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.oltu.oauth2.common.utils.OAuthUtils;
 
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
index 28cb802..97e67af 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManager.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.security.auth;
 
 import de.ids_mannheim.korap.auditing.AuditRecord;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.config.URIParam;
@@ -13,7 +14,6 @@
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.user.*;
 import de.ids_mannheim.korap.utils.NamingUtils;
-import de.ids_mannheim.korap.utils.StringUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/OpenIDconnectAuthentication.java b/src/main/java/de/ids_mannheim/korap/security/auth/OpenIDconnectAuthentication.java
index 98a8268..e8de6c7 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/OpenIDconnectAuthentication.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/OpenIDconnectAuthentication.java
@@ -8,11 +8,10 @@
 import de.ids_mannheim.korap.handlers.OAuthDb;
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.NamingUtils;
-import de.ids_mannheim.korap.utils.StringUtils;
 import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
 import org.springframework.cache.annotation.CacheEvict;
diff --git a/src/main/java/de/ids_mannheim/korap/security/auth/SessionAuthentication.java b/src/main/java/de/ids_mannheim/korap/security/auth/SessionAuthentication.java
index ceb1284..5caab24 100644
--- a/src/main/java/de/ids_mannheim/korap/security/auth/SessionAuthentication.java
+++ b/src/main/java/de/ids_mannheim/korap/security/auth/SessionAuthentication.java
@@ -5,7 +5,7 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.TokenContext;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.TimeUtils;
diff --git a/src/main/java/de/ids_mannheim/korap/user/Attributes.java b/src/main/java/de/ids_mannheim/korap/user/Attributes.java
deleted file mode 100644
index 9d4761b..0000000
--- a/src/main/java/de/ids_mannheim/korap/user/Attributes.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package de.ids_mannheim.korap.user;
-
-public class Attributes {
-
-    public static final String AUTHORIZATION = "Authorization";
-    public static final String SESSION_AUTHENTICATION = "session_token";
-    public static final String API_AUTHENTICATION = "api_token";
-    public static final String OAUTH2_AUTHORIZATION = "bearer";
-    public static final String OPENID_AUTHENTICATION = "id_token";
-    public static final String BASIC_AUTHENTICATION = "basic";
-
-    public static final String CLIENT_ID = "client_id";
-    public static final String CLIENT_SECRET = "client_secret";
-    public static final String SCOPES = "scopes";
-
-    public static final String PUBLIC_GROUP = "public";
-
-    public static final String SERVICE_ACCESS = "service_access";
-    public static final String USER = "KorapUser";
-    public static final String SHIBUSER = "ShibUser";
-    public static final String DEMO_DISPLAY = "Anonymous";
-    public static final String DEMOUSER_PASSWORD = "demo";
-
-    public static final String SETTINGS = "LocalSettings";
-    //    public static final String STORAGE_SETTINGS = "StorageSettings";
-
-    public static final String QUERY_ABBREVIATION = "Q";
-    public static final String LAYER = "layer";
-
-    public static final String TYPE = "type";
-
-    public static final String ID = "ID";
-    @Deprecated
-    //refactor
-    public static final String UID = "accountID";
-    public static final String USERNAME = "username";
-    public static final String PASSWORD = "password";
-    public static final String GENDER = "gender";
-    public static final String FIRSTNAME = "firstName";
-    public static final String LASTNAME = "lastName";
-    public static final String PHONE = "phone";
-    public static final String INSTITUTION = "institution";
-    public static final String EMAIL = "email";
-    public static final String ADDRESS = "address";
-    public static final String COUNTRY = "country";
-    public static final String IPADDRESS = "ipaddress";
-    // deprcated, use created
-    public static final String ACCOUNT_CREATION = "account_creation";
-    public static final String ACCOUNTLOCK = "account_lock";
-    public static final String ACCOUNTLINK = "account_link";
-    public static final String URI = "uri";
-    public static final String URI_FRAGMENT = "uri_fragment";
-    public static final String URI_EXPIRATION = "uri_expiration";
-    public static final String PRIVATE_USAGE = "privateUsage";
-
-    /**
-     * token context
-     */
-    public static final String TOKEN = "authToken";
-    public static final String TOKEN_EXPIRATION = "tokenExpires";
-    public static final String TOKEN_CREATION = "tokenCreated";
-    public static final String USER_AGENT = "User-Agent";
-    public static final String HOST = "userIP";
-
-    public static final String QUERY_PARAM_URI = "uri";
-    public static final String QUERY_PARAM_USER = "user";
-
-    /**
-     * shibboleth attribute names
-     */
-    public static final String EPPN = "eppn";
-    public static final String COMMON_NAME = "cn";
-    public static final String SURNAME = "sn";
-
-    public static final String EDUPERSON = "eduPersonPrincipalName";
-    public static final String CN = "cn";
-    public static final String MAIL = "mail";
-    public static final String EDU_AFFIL = "eduPersonScopedAffiliation";
-
-    /**
-     * resource mappings
-     */
-
-    public static final String RID = "id";
-    public static final String OWNER = "owner";
-    public static final String NAME = "name";
-    public static final String DESCRIPTION = "description";
-
-    public static final String REF_CORPUS = "refCorpus";
-    public static final String QUERY = "query";
-    public static final String CACHE = "cache";
-    public static final String DOCIDS = "docIDs";
-    public static final String FOUNDRIES = "foundries";
-    public static final String DEFAULT_VALUE = "defaultColl";
-
-    public static final String FILE_FORMAT_FOR_EXPORT = "fileFormatForExport";
-    public static final String FILENAME_FOR_EXPORT = "fileNameForExport";
-    @Deprecated
-    public static final String ITEM_FOR_SIMPLE_ANNOTATION = "itemForSimpleAnnotation";
-    public static final String LEFT_CONTEXT_ITEM_FOR_EXPORT = "leftContextItemForExport";
-    public static final String LEFT_CONTEXT_SIZE_FOR_EXPORT = "leftContextSizeForExport";
-    public static final String LOCALE = "locale";
-    public static final String LEFT_CONTEXT_ITEM = "leftContextItem";
-    public static final String LEFT_CONTEXT_SIZE = "leftContextSize";
-    public static final String RIGHT_CONTEXT_ITEM = "rightContextItem";
-    public static final String RIGHT_CONTEXT_ITEM_FOR_EXPORT = "rightContextItemForExport";
-    public static final String RIGHT_CONTEXT_SIZE = "rightContextSize";
-    public static final String RIGHT_CONTEXT_SIZE_FOR_EXPORT = "rightContextSizeForExport";
-    public static final String SELECTED_COLLECTION = "selectedCollection";
-    public static final String QUERY_LANGUAGE = "queryLanguage";
-    public static final String PAGE_LENGTH = "pageLength";
-    public static final String METADATA_QUERY_EXPERT_MODUS = "metadataQueryExpertModus";
-    @Deprecated
-    public static final String SEARCH_SETTINGS_TAB = "searchSettingsTab";
-    @Deprecated
-    public static final String SELECTED_BROWSER_PROPERTY = "selectedBrowserProperty";
-    @Deprecated
-    public static final String SELECTED_CONTEXT_ITEM = "selectedContextItem";
-    @Deprecated
-    public static final String SELECTED_GRAPH_TYPE = "selectedGraphType";
-    @Deprecated
-    public static final String SELECTED_SORT_TYPE = "selectedSortType";
-    @Deprecated
-    public static final String SELECTED_VIEW_FOR_SEARCH_RESULTS = "selectedViewForSearchResults";
-    public static final String COLLECT_AUDITING_DATA = "collectData";
-
-    /**
-     * default layers
-     */
-    public static final String DEFAULT_POS_FOUNDRY = "POSFoundry";
-    public static final String DEFAULT_LEMMA_FOUNDRY = "lemmaFoundry";
-    public static final String DEFAULT_CONST_FOUNDRY = "constFoundry";
-    public static final String DEFAULT_REL_FOUNDRY = "relFoundry";
-
-    /**
-     * db column keys
-     */
-
-    public static final String SELF_REF = "self";
-
-    public static final String SYM_USE = "sym_use";
-    public static final String COMMERCIAL = "commercial";
-    public static final String LICENCE = "licence";
-    public static final String QUERY_ONLY = "query_only";
-    public static final String EXPORT = "export";
-    public static final String TIME_SPANS = "spans";
-    public static final String RANGE = "range";
-
-    public static final String GROUP_ID = "group_id";
-    public static final String CREATED = "created";
-    public static final String CREATOR = "creator";
-    public static final String ENABLED = "enabled";
-    public static final String EXPIRE = "expired";
-    public static final String TARGET_ID = "target_id";
-    public static final String IP_RANG = "ip_range";
-    public static final String PERSISTENT_ID = "persistent_id";
-    public static final String DISABLED = "disabled";
-    public static final String USER_ID = "user_id";
-    public static final String PARENT_ID = "parent_id";
-    //    public static final String
-
-}
diff --git a/src/main/java/de/ids_mannheim/korap/user/TokenContext.java b/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
index 8cf5ad8..c7da851 100644
--- a/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
+++ b/src/main/java/de/ids_mannheim/korap/user/TokenContext.java
@@ -2,6 +2,7 @@
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import lombok.AccessLevel;
 import lombok.Data;
diff --git a/src/main/java/de/ids_mannheim/korap/user/User.java b/src/main/java/de/ids_mannheim/korap/user/User.java
index 99f52d1..af1e90a 100644
--- a/src/main/java/de/ids_mannheim/korap/user/User.java
+++ b/src/main/java/de/ids_mannheim/korap/user/User.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.user;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.ParamFields;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.utils.TimeUtils;
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserDetails.java b/src/main/java/de/ids_mannheim/korap/user/UserDetails.java
index a994eee..d4e84c6 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserDetails.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserDetails.java
@@ -1,5 +1,7 @@
 package de.ids_mannheim.korap.user;
 
+import de.ids_mannheim.korap.config.Attributes;
+
 /**
  * @author hanl
  * @date 22/01/2016
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserSettings.java b/src/main/java/de/ids_mannheim/korap/user/UserSettings.java
index 8eb855a..763b180 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserSettings.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserSettings.java
@@ -1,5 +1,7 @@
 package de.ids_mannheim.korap.user;
 
+import de.ids_mannheim.korap.config.Attributes;
+
 /**
  * @author hanl
  * @date 28/01/2016
diff --git a/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java b/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java
deleted file mode 100644
index d26d910..0000000
--- a/src/main/java/de/ids_mannheim/korap/utils/CollectionQueryBuilder3.java
+++ /dev/null
@@ -1,191 +0,0 @@
-package de.ids_mannheim.korap.utils;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import de.ids_mannheim.korap.query.serialize.CollectionQueryProcessor;
-
-import java.util.Map;
-
-/**
- * convenience builder class for collection query
- * 
- * @author hanl
- * @date 16/09/2014
- */
-public class CollectionQueryBuilder3 {
-
-    public enum EQ {
-        EQUAL, UNEQUAL
-    }
-
-    private boolean verbose;
-    private JsonNode base;
-    private StringBuilder builder;
-
-
-    public CollectionQueryBuilder3 () {
-        this(false);
-    }
-
-
-    public CollectionQueryBuilder3 (boolean verbose) {
-        this.verbose = verbose;
-        this.builder = new StringBuilder();
-        this.base = null;
-    }
-
-
-    //    /**
-    //     * convencience method for equal field value search operation
-    //     * @param field
-    //     * @param value
-    //     * @return
-    //     */
-    //    public CollectionQueryBuilder3 eq(String field, String value) {
-    //        fieldValue(field, "match:eq", value);
-    //        return this;
-    //    }
-    //
-    //    /**
-    //     * convencience method for unequal field value search operation
-    //     * @param field
-    //     * @param value
-    //     * @return
-    //     */
-    //    public CollectionQueryBuilder3 uneq(String field, String value) {
-    //        fieldValue(field, "match:ne", value);
-    //        return this;
-    //    }
-
-    /**
-     * raw method for field - value pair adding. Supports all
-     * operators (leq, geq, contains, etc.)
-     * 
-     * @param field
-     * @param op
-     * @param value
-     * @return
-     */
-    public CollectionQueryBuilder3 fieldValue (String field, String op,
-            String value) {
-        if (base == null)
-            this.builder.append(field + op + value);
-        else {
-            JsonNode node = Utils.buildDoc(field, value, op);
-            appendToBaseGroup(node);
-        }
-        return this;
-    }
-
-
-    /**
-     * element can be a more complex sub query like
-     * (textClass=freizeit & corpusID=WPD)
-     * 
-     * @param query
-     *            will be parenthised in order to make sub query
-     *            element
-     * @return
-     */
-    public CollectionQueryBuilder3 addQuery (String query) {
-        if (!query.startsWith("(") && !query.endsWith(")"))
-            query = "(" + query + ")";
-
-        if (base != null) {
-            CollectionQueryProcessor tree = new CollectionQueryProcessor(
-                    this.verbose);
-            tree.process(query);
-            JsonNode map = JsonUtils.valueToTree(tree.getRequestMap().get(
-                    "collection"));
-            appendToBaseGroup(map);
-        }
-        else
-            this.builder.append(query);
-        return this;
-    }
-
-
-    public CollectionQueryBuilder3 and () {
-        this.builder.append(" & ");
-        return this;
-    }
-
-
-    public CollectionQueryBuilder3 or () {
-        this.builder.append(" | ");
-        return this;
-    }
-
-
-    private Object build () {
-        Object request = base;
-        if (request == null) {
-            CollectionQueryProcessor tree = new CollectionQueryProcessor(
-                    this.verbose);
-            tree.process(this.builder.toString());
-            Map r = tree.getRequestMap();
-            r.remove("query");
-            r.remove("meta");
-            request = r;
-        }
-        return request;
-    }
-
-
-    /**
-     * sets base query. All consequent queries are added to the first
-     * koral:docGroup within the collection base query
-     * If no group in base query, consequent queries are skipped.
-     * 
-     * @param query
-     */
-    public CollectionQueryBuilder3 setBaseQuery (String query) {
-        this.base = JsonUtils.readTree(query);
-        return this;
-    }
-
-
-    public String toJSON () {
-        return JsonUtils.toJSON(build());
-    }
-
-
-    private CollectionQueryBuilder3 appendToBaseGroup (JsonNode node) {
-        if (base.at("/collection/@type").asText().equals("koral:docGroup")) {
-            ArrayNode group = (ArrayNode) base.at("/collection/operands");
-            if (node instanceof ArrayNode)
-                group.addAll((ArrayNode) node);
-            else
-                group.add(node);
-        }
-        else
-            throw new IllegalArgumentException("No group found to add to!");
-        // fixme: if base is a doc only, this function is not supported. requirement is a koral:docGroup, since
-        // combination operator is unknown otherwise
-        return this;
-    }
-
-    public static class Utils {
-
-        public static JsonNode buildDoc (String key, String value, String op) {
-            ObjectNode node = JsonUtils.createObjectNode();
-            node.put("@type", "koral:doc");
-            // eq.equals(EQ.EQUAL) ? "match:eq" : "match:ne"
-            node.put("match", op);
-            node.put("key", key);
-            node.put("value", value);
-
-            return node;
-        }
-
-
-        public static JsonNode buildDocGroup () {
-            ObjectNode node = JsonUtils.createObjectNode();
-
-            return node;
-        }
-
-    }
-
-}
diff --git a/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java b/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
index 7cd7b56..e5ab428 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
@@ -136,35 +136,4 @@
         return StringEscapeUtils.unescapeHtml(value);
     }
 
-
-    /**
-     * constructs a lucene query from query string and corpus
-     * parameters as set
-     * 
-     * @param query
-     * @param corpusIDs
-     * @return
-     */
-    public static String queryBuilder (String query,
-            Collection<String> corpusIDs) {
-        String completeQuery; // holds original query and corpus
-        // selection
-        /**
-         * find documents with metadataquery TODO: does not intercept
-         * with
-         * parameters foundries and corpusIDs
-         */
-
-        /* add corpus ids to corpus query */
-        StringBuilder corpusQuery = new StringBuilder("corpus:/(");
-        for (String corpusId : corpusIDs) {
-            corpusQuery.append(corpusId + "|");
-        }
-        corpusQuery.deleteCharAt(corpusQuery.length() - 1);
-        corpusQuery.append(")/");
-        completeQuery = "(" + query + ") AND " + corpusQuery.toString();
-        jlog.debug("Searching documents matching '" + completeQuery + "'.");
-        return completeQuery;
-    }
-
 }
diff --git a/src/main/java/de/ids_mannheim/korap/web/filter/PiwikFilter.java b/src/main/java/de/ids_mannheim/korap/web/filter/PiwikFilter.java
index fc32b67..26cde36 100644
--- a/src/main/java/de/ids_mannheim/korap/web/filter/PiwikFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/web/filter/PiwikFilter.java
@@ -10,6 +10,7 @@
 import com.sun.jersey.spi.container.ContainerRequestFilter;
 import com.sun.jersey.spi.container.ContainerResponseFilter;
 import com.sun.jersey.spi.container.ResourceFilter;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.interfaces.AuthenticationManagerIface;
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/CollectionLoader.java b/src/main/java/de/ids_mannheim/korap/web/service/CollectionLoader.java
index a88cb1b..be4593f 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/CollectionLoader.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/CollectionLoader.java
@@ -9,9 +9,9 @@
 import de.ids_mannheim.korap.security.ac.PolicyBuilder;
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.security.ac.SecurityManager;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.utils.CollectionQueryBuilder3;
+import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
@@ -28,8 +28,8 @@
         User user = User.UserFactory
                 .toUser(KustvaktConfiguration.KUSTVAKT_USER);
 
-        CollectionQueryBuilder3 bui = new CollectionQueryBuilder3();
-        bui.addQuery("creationDate since 1775");
+        KoralCollectionQueryBuilder bui = new KoralCollectionQueryBuilder();
+        bui.with("creationDate since 1775");
 
         VirtualCollection c1 = new VirtualCollection();
         c1.setName("Weimarer Werke");
@@ -37,16 +37,16 @@
 
         c1.setDescription("Goethe-Werke in Weimar (seit 1775)");
 
-        bui = new CollectionQueryBuilder3();
-        bui.addQuery("textType = Aphorismus");
+        bui = new KoralCollectionQueryBuilder();
+        bui.with("textType = Aphorismus");
 
         VirtualCollection c2 = new VirtualCollection();
         c2.setName("Aphorismen");
         c2.addField(Attributes.QUERY, bui.toJSON());
         c2.setDescription("Aphorismentexte Goethes");
 
-        bui = new CollectionQueryBuilder3();
-        bui.addQuery("title ~ \"Werther\"");
+        bui = new KoralCollectionQueryBuilder();
+        bui.with("title ~ \"Werther\"");
 
         VirtualCollection c3 = new VirtualCollection();
         c3.setName("Werther");
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
index 23852b1..6d2e309 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/AuthService.java
@@ -2,6 +2,7 @@
 
 import com.sun.jersey.spi.container.ContainerRequest;
 import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
index 73e3047..0bfab1e 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
@@ -3,6 +3,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.sun.jersey.core.util.MultivaluedMapImpl;
 import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.EmptyResultException;
@@ -92,6 +93,8 @@
         Class cl_type = ResourceFactory.getResourceClass(type);
         if (cl_type == null) {
             //todo return bad request response
+            throw KustvaktResponseHandler.throwit(StatusCodes.REQUEST_INVALID,
+                    "Resource type not available!", "");
         }
 
         try {
@@ -105,25 +108,8 @@
         }
 
         Set values = new HashSet();
-        for (KustvaktResource resource : resources) {
-            // fixme: remove -- to costly
-            //            if (cl_type.equals(VirtualCollection.class)) {
-            //                VirtualCollection c = (VirtualCollection) resource;
-            //                CollectionQueryBuilder3 query = new CollectionQueryBuilder3();
-            //                query.setBaseQuery(c.getQuery());
-            //                String stats = searchKrill.getStatistics(query.toJSON());
-            //
-            //                c.setStats(JsonUtils.readSimple(stats, Map.class));
-            //
-            //            }else if (cl_type.equals(Corpus.class)) {
-            //                Corpus c = (Corpus) resource;
-            //                CollectionQueryBuilder3 query = new CollectionQueryBuilder3();
-            //                query.addQuery("corpusID=" + c.getPersistentID());
-            //                String stats = searchKrill.getStatistics(query.toJSON());
-            //                c.setStats(JsonUtils.readSimple(stats, Map.class));
-            //            }
+        for (KustvaktResource resource : resources)
             values.add(resource.toMap());
-        }
         return Response.ok(JsonUtils.toJSON(values)).build();
     }
 
@@ -166,16 +152,6 @@
         catch (KustvaktException e) {
             throw KustvaktResponseHandler.throwit(e);
         }
-        CollectionQueryBuilder3 query = new CollectionQueryBuilder3();
-        if (cl_type.equals(VirtualCollection.class)) {
-            VirtualCollection c = (VirtualCollection) resource;
-            query.setBaseQuery((String) c.getData());
-        }
-        else if (cl_type.equals(Corpus.class)) {
-            Corpus c = (Corpus) resource;
-            query.addQuery("corpusID=" + c.getPersistentID());
-        }
-
         return Response.ok(JsonUtils.toJSON(resource.toMap())).build();
     }
 
@@ -191,7 +167,7 @@
     //            @QueryParam("paths") Boolean wPaths) {
     //        TokenContext tokenContext = (TokenContext) ctx.getUserPrincipal();
     //        ColloQuery.ColloQueryBuilder builder;
-    //        CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
+    //        KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
     //        String result;
     //        try {
     //            User user = controller.getUser(tokenContext.getUsername());
@@ -238,7 +214,7 @@
     //        TokenContext tokenContext = (TokenContext) ctx.getUserPrincipal();
     //        String result;
     //        try {
-    //            CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
+    //            KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
     //            try {
     //                User user = controller.getUser(tokenContext.getUsername());
     //
@@ -312,30 +288,16 @@
             @QueryParam("ref") String reference, @QueryParam("cq") String cq) {
         TokenContext ctx = (TokenContext) securityContext.getUserPrincipal();
         QuerySerializer ss;
-        CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
-        if (cq != null)
-            cquery.setBaseQuery(cq);
 
         User user;
         try {
             user = controller.getUser(ctx.getUsername());
-            Set<Corpus> resources = new HashSet<>();
-
-            if (User.UserFactory.isDemo(ctx.getUsername()))
-                resources = ResourceFinder.searchPublic(Corpus.class);
-            else
-                resources = ResourceFinder.search(user, Corpus.class);
-            System.out.println("RESOURCES FOUND " + resources);
-
-            for (KustvaktResource corpus : resources)
-                cquery.addQuery("corpusID=" + corpus.getPersistentID());
         }
         catch (KustvaktException e) {
             throw KustvaktResponseHandler.throwit(e);
         }
 
         ss = new QuerySerializer().setQuery(q, ql, v);
-        ss.setCollection(cquery.toJSON());
 
         MetaQueryBuilder meta = new MetaQueryBuilder();
         if (pageIndex != null)
@@ -369,7 +331,7 @@
      * @return
      */
 
-    //todo: does cq have any sensable worth here?
+    //todo: does cq have any sensible worth here?
     @TRACE
     @Path("{type}/{id}/search")
     public Response buildQuery (@Context Locale locale,
@@ -385,36 +347,8 @@
         TokenContext ctx = (TokenContext) securityContext.getUserPrincipal();
         type = StringUtils.normalize(type);
         id = StringUtils.decodeHTML(id);
-        QuerySerializer ss;
-        //fixme: not used anywhere!
-        CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
-        if (cq != null)
-            cquery.setBaseQuery(cq);
 
-        try {
-            User user = controller.getUser(ctx.getUsername());
-
-            //todo: instead of throwing exception, build notification and rewrites into result query
-            KustvaktResource resource;
-            if (StringUtils.isInteger(id))
-                resource = this.resourceHandler.findbyIntId(
-                        Integer.valueOf(id), user);
-            else
-                resource = this.resourceHandler.findbyStrId(id, user,
-                        ResourceFactory.getResourceClass(type));
-
-            if (resource instanceof VirtualCollection)
-                cquery.addQuery((String) resource.getData());
-            else if (resource instanceof Corpus)
-                cquery.addQuery("corpusID=" + resource.getPersistentID());
-
-        }
-        catch (KustvaktException e) {
-            jlog.error("Exception encountered!", e);
-            //throw KustvaktResponseHandler.throwit(e);
-        }
-
-        ss = new QuerySerializer().setQuery(q, ql, v);
+        QuerySerializer ss = new QuerySerializer().setQuery(q, ql, v);
 
         MetaQueryBuilder meta = new MetaQueryBuilder();
         if (pageIndex != null)
@@ -429,6 +363,35 @@
             meta.addEntry("cutOff", cutoff);
 
         ss.setMeta(meta.raw());
+        if (cq != null)
+            ss.setCollection(cq);
+
+        KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
+        cquery.setBaseQuery(ss.toJSON());
+
+        try {
+            User user = controller.getUser(ctx.getUsername());
+
+            //todo: instead of throwing exception, build notification and rewrites into result query
+            KustvaktResource resource;
+            if (StringUtils.isInteger(id))
+                resource = this.resourceHandler.findbyIntId(
+                        Integer.valueOf(id), user);
+            else
+                resource = this.resourceHandler.findbyStrId(id, user,
+                        ResourceFactory.getResourceClass(type));
+
+            if (resource instanceof VirtualCollection)
+                cquery.with((String) resource.getData());
+            else if (resource instanceof Corpus)
+                cquery.with(Attributes.CORPUS_SIGLE + resource.getPersistentID());
+
+        }
+        catch (KustvaktException e) {
+            jlog.error("Exception encountered!", e);
+            //throw KustvaktResponseHandler.throwit(e);
+        }
+
 
         // todo: policy parsing before return
         return Response.ok(ss.toJSON()).build();
@@ -441,8 +404,6 @@
             @Context Locale locale, @QueryParam("engine") String engine,
             String jsonld) {
         TokenContext ctx = (TokenContext) context.getUserPrincipal();
-        //        KustvaktConfiguration.BACKENDS eng = KustvaktConfiguration
-        //                .chooseBackend(engine);
 
         // todo: should be possible to add the meta part to the query serialization
         try {
@@ -473,15 +434,12 @@
             @QueryParam("cq") String cq, @QueryParam("engine") String engine) {
         TokenContext context = (TokenContext) securityContext
                 .getUserPrincipal();
-        CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
+        KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
         KustvaktConfiguration.BACKENDS eng = this.config.chooseBackend(engine);
         User user;
         // todo: not added to query!!
         try {
             user = controller.getUser(context.getUsername());
-            Set<Corpus> resources = ResourceFinder.search(user, Corpus.class);
-            for (KustvaktResource resource : resources)
-                cquery.addQuery("corpusID=" + resource.getPersistentID());
         }
         catch (KustvaktException e) {
             jlog.error("Exception encountered!", e);
@@ -492,8 +450,9 @@
         serializer.setQuery(q, ql, v);
 
         // todo: parse for security reasons
-        if (cq != null)
-            serializer.setCollection(cq);
+        // todo: remove cq parameter
+        // if (cq != null)
+        //    serializer.setCollection(cq);
 
         MetaQueryBuilder meta = new MetaQueryBuilder();
         meta.addEntry("startIndex", pageIndex);
@@ -576,7 +535,9 @@
             if (!raw) {
                 QuerySerializer s = new QuerySerializer();
                 s.setQuery(query, ql, v);
-                CollectionQueryBuilder3 builder = new CollectionQueryBuilder3();
+
+                // fixme: be replaced by public collection rewrite
+                KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
 
                 KustvaktResource resource;
                 if (StringUtils.isInteger(id))
@@ -589,7 +550,7 @@
                 if (resource instanceof VirtualCollection)
                     builder.setBaseQuery((String) resource.getData());
                 else if (resource instanceof Corpus)
-                    builder.addQuery("corpusID=" + resource.getPersistentID());
+                    builder.with(Attributes.CORPUS_SIGLE+ resource.getPersistentID());
                 else
                     throw KustvaktResponseHandler.throwit(
                             StatusCodes.ILLEGAL_ARGUMENT,
@@ -656,8 +617,8 @@
     @Path("stats")
     public Response getStats (@Context SecurityContext context,
             @Context Locale locale, String json) {
-        CollectionQueryBuilder3 builder = new CollectionQueryBuilder3();
-        builder.addQuery(json);
+        KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
+        builder.with(json);
         String stats = searchKrill.getStatistics(builder.toJSON());
 
         if (stats.contains("-1"))
@@ -702,16 +663,19 @@
                         ResourceFactory.getResourceClass(type));
 
             //todo ?!
-            CollectionQueryBuilder3 query = new CollectionQueryBuilder3();
+            KoralCollectionQueryBuilder query = new KoralCollectionQueryBuilder();
             if (resource instanceof VirtualCollection) {
                 query.setBaseQuery(resource.getData());
             }
             else if (resource instanceof Corpus) {
-                query.addQuery("corpusID=" + resource.getName());
+                query.with("corpusID=" + resource.getName());
             }
 
+            String res = query.toJSON();
+            jlog.info("BEFORE REWRITE " + res);
             // rewrite process
-            String qstr = processor.preProcess(query.toJSON(), user);
+            String qstr = processor.preProcess(res, user);
+            jlog.info("AFTER REWRITE " + qstr);
             return Response.ok(searchKrill.getStatistics(qstr)).build();
         }
         catch (KustvaktException e) {
@@ -744,7 +708,7 @@
         VirtualCollection tmp = resourceHandler.getCache(cache.getId(),
                 VirtualCollection.class);
         if (tmp == null) {
-            CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3()
+            KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder()
                     .setBaseQuery((String) cache.getData());
             String query = this.processor.preProcess((String) cache.getData(),
                     user);
@@ -842,7 +806,7 @@
                 // todo: throw exception response for no resource to save!
                 return null;
 
-            CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
+            KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
             cquery.setBaseQuery(base);
 
             cachetmp = ResourceFactory.getCachedCollection(cquery.toJSON());
@@ -915,10 +879,10 @@
             VirtualCollection cachetmp, collection;
             // todo: ??
             Object read = JsonUtils.readTree(query);
-            CollectionQueryBuilder3 cquery = new CollectionQueryBuilder3();
+            KoralCollectionQueryBuilder cquery = new KoralCollectionQueryBuilder();
             if (reference != null && !reference.equals("null")) {
                 try {
-                    cquery.addQuery((String) resourceHandler.findbyStrId(
+                    cquery.with((String) resourceHandler.findbyStrId(
                             reference, user, VirtualCollection.class).getData());
                 }
                 catch (KustvaktException e) {
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
index 9273171..5aa25c9 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/UserService.java
@@ -4,6 +4,7 @@
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.sun.jersey.spi.container.ContainerRequest;
 import com.sun.jersey.spi.container.ResourceFilters;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.config.Scopes;
 import de.ids_mannheim.korap.config.URIParam;
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java b/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
index 1d7e556..9c5a74a 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
@@ -10,7 +10,7 @@
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resource.rewrite.FoundryInject;
 import de.ids_mannheim.korap.resource.rewrite.RewriteHandler;
-import de.ids_mannheim.korap.utils.CollectionQueryBuilder3;
+import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
 import de.ids_mannheim.korap.utils.KustvaktLogger;
 import de.ids_mannheim.korap.web.ClientsHandler;
 import de.ids_mannheim.korap.web.SearchKrill;
@@ -89,7 +89,6 @@
             @QueryParam("count") Integer pageLength,
             @QueryParam("offset") Integer pageIndex,
             @QueryParam("page") Integer startPage,
-            // fixme: remove cq from light service
             @QueryParam("cq") String cq) {
         QuerySerializer ss = new QuerySerializer().setQuery(q, ql, v);
 
@@ -251,8 +250,8 @@
     @POST
     @Path("stats")
     public Response getStats (String json) {
-        CollectionQueryBuilder3 builder = new CollectionQueryBuilder3();
-        builder.addQuery(json);
+        KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
+        builder.with(json);
 
         // todo: policy override in extension!
         String stats = searchKrill.getStatistics(builder.toJSON());
diff --git a/src/test/java/CollectionQueryBuilderTest.java b/src/test/java/CollectionQueryBuilderTest.java
index 0840e20..38a5ac4 100644
--- a/src/test/java/CollectionQueryBuilderTest.java
+++ b/src/test/java/CollectionQueryBuilderTest.java
@@ -1,11 +1,11 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.utils.CollectionQueryBuilder3;
+import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import org.junit.Assert;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 
 /**
@@ -16,28 +16,28 @@
 
     @Test
     public void testsimpleAdd () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("corpusID=WPD");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("corpusSigle=WPD");
 
         JsonNode node = JsonUtils.readTree(b.toJSON());
 
         assertNotNull(node);
         assertEquals("koral:doc", node.at("/collection/@type").asText());
-        assertEquals("corpusID", node.at("/collection/key").asText());
+        assertEquals("corpusSigle", node.at("/collection/key").asText());
     }
 
 
     @Test
     public void testSimpleConjunction () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("corpusID=WPD & textClass=freizeit");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("corpusSigle=WPD & textClass=freizeit");
         JsonNode node = JsonUtils.readTree(b.toJSON());
 
         assertNotNull(node);
         assertEquals("koral:docGroup", node.at("/collection/@type").asText());
         assertEquals("operation:and", node.at("/collection/operation").asText());
 
-        assertEquals("corpusID", node.at("/collection/operands/0/key").asText());
+        assertEquals("corpusSigle", node.at("/collection/operands/0/key").asText());
         assertEquals("textClass", node.at("/collection/operands/1/key")
                 .asText());
     }
@@ -45,17 +45,14 @@
 
     @Test
     public void testSimpleDisjunction () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("corpusID=WPD | textClass=freizeit");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("corpusSigle=WPD | textClass=freizeit");
         JsonNode node = JsonUtils.readTree(b.toJSON());
 
-        System.out.println("_____________________________________________");
-        System.out.println(node);
-
-        assert node != null;
+        assertNotNull(node);
         assert node.at("/collection/operation").asText().equals("operation:or");
         assert node.at("/collection/operands/0/key").asText()
-                .equals("corpusID");
+                .equals("corpusSigle");
         assert node.at("/collection/operands/1/key").asText()
                 .equals("textClass");
     }
@@ -63,17 +60,14 @@
 
     @Test
     public void testComplexSubQuery () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("(corpusID=WPD) | (textClass=freizeit & corpusID=WPD)");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("(corpusSigle=WPD) | (textClass=freizeit & corpusSigle=BRZ13)");
         JsonNode node = JsonUtils.readTree(b.toJSON());
 
-        System.out
-                .println("_____________________________________________ COMPLEX");
-        System.out.println(node);
-        assert node != null;
+        assertNotNull(node);
         assert node.at("/collection/operation").asText().equals("operation:or");
         assert node.at("/collection/operands/0/key").asText()
-                .equals("corpusID");
+                .equals("corpusSigle");
         assert node.at("/collection/operands/1/@type").asText()
                 .equals("koral:docGroup");
 
@@ -82,60 +76,128 @@
 
     @Test
     public void testAddResourceQueryAfter () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("(corpusID=ADF) | (textClass=freizeit & corpusID=WPD)");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("(textClass=politik & title=\"random title\") | textClass=wissenschaft");
 
-        CollectionQueryBuilder3 c = new CollectionQueryBuilder3();
+        KoralCollectionQueryBuilder c = new KoralCollectionQueryBuilder();
         c.setBaseQuery(b.toJSON());
-        c.addQuery("textClass=wissenschaft");
+        c.with("corpusSigle=WPD");
 
         JsonNode node = JsonUtils.readTree(c.toJSON());
 
-        assert node != null;
-        assert node.at("/collection/operands/2/@type").asText()
-                .equals("koral:doc");
-        assert node.at("/collection/operands/2/value").asText()
-                .equals("wissenschaft");
+        assertNotNull(node);
+        assertEquals("koral:doc", node.at("/collection/operands/0/@type")
+                .asText());
+        assertEquals("WPD", node.at("/collection/operands/0/value").asText());
+        assertEquals(2, node.at("/collection/operands").size());
     }
 
 
     @Test
     public void testAddComplexResourceQueryAfter () {
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("(corpusID=ADF) | (textClass=freizeit & corpusID=WPD)");
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("(title=\"random title\") | (textClass=wissenschaft)");
 
-        CollectionQueryBuilder3 c = new CollectionQueryBuilder3();
+        KoralCollectionQueryBuilder c = new KoralCollectionQueryBuilder();
         c.setBaseQuery(b.toJSON());
-        c.addQuery("(textClass=politik & corpusID=AZPS)");
+        c.with("(corpusSigle=BRZ13 | corpusSigle=AZPS)");
 
         JsonNode node = JsonUtils.readTree(c.toJSON());
-
-        assert node != null;
-        assert node.at("/collection/operands/2/@type").asText()
-                .equals("koral:docGroup");
-        assert node.at("/collection/operands/2/operands/0/value").asText()
-                .equals("politik");
-        assert node.at("/collection/operands/2/operands/1/value").asText()
-                .equals("AZPS");
-
+        assertNotNull(node);
+        assertEquals("koral:docGroup", node.at("/collection/operands/0/@type")
+                .asText());
+        assertEquals("koral:docGroup", node.at("/collection/operands/1/@type")
+                .asText());
+        assertEquals("BRZ13", node
+                .at("/collection/operands/0/operands/0/value").asText());
+        assertEquals("AZPS", node.at("/collection/operands/0/operands/1/value")
+                .asText());
+        assertEquals("random title",
+                node.at("/collection/operands/1/operands/0/value").asText());
+        assertEquals("wissenschaft",
+                node.at("/collection/operands/1/operands/1/value").asText());
     }
 
 
     @Test
-    public void buildQuery () {
+    public void testBuildQuery () {
+        String coll = "corpusSigle=WPD";
         String query = "[base=Haus]";
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery(query, "poliqarp");
-        CollectionQueryBuilder3 b = new CollectionQueryBuilder3();
-        b.addQuery("corpusID=WPD");
-        s.setCollection("corpusID=WPD");
+        QuerySerializer check = new QuerySerializer();
+        check.setQuery(query, "poliqarp");
+        check.setCollection(coll);
 
-        System.out.println("QUERY " + s.toJSON());
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.setBaseQuery(check.toJSON());
+        b.with("textClass=freizeit");
+
+        JsonNode res = (JsonNode) b.rebaseCollection();
+        assertNotNull(res);
+        assertEquals("koral:docGroup", res.at("/collection/@type").asText());
+        assertEquals("operation:and", res.at("/collection/operation").asText());
+        assertEquals("koral:doc", res.at("/collection/operands/0/@type")
+                .asText());
+        assertEquals("freizeit", res.at("/collection/operands/0/value")
+                .asText());
+        assertEquals("textClass", res.at("/collection/operands/0/key").asText());
+
+        assertEquals("koral:doc", res.at("/collection/operands/1/@type")
+                .asText());
+        assertEquals("WPD", res.at("/collection/operands/1/value").asText());
+        assertEquals("corpusSigle", res.at("/collection/operands/1/key").asText());
+
+        // check also that query is still there
+        assertEquals("koral:token", res.at("/query/@type").asText());
+        assertEquals("koral:term", res.at("/query/wrap/@type").asText());
+        assertEquals("Haus", res.at("/query/wrap/key").asText());
+        assertEquals("lemma", res.at("/query/wrap/layer").asText());
     }
 
 
     @Test
     public void testBaseQueryBuild () {
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.with("(corpusSigle=ADF) | (textClass=freizeit & corpusSigle=WPD)");
+
+        KoralCollectionQueryBuilder c = new KoralCollectionQueryBuilder();
+        c.setBaseQuery(b.toJSON());
+
+        c.with("corpusSigle=BRZ13");
+        JsonNode base = (JsonNode) c.rebaseCollection();
+        assertNotNull(base);
+        assertEquals(base.at("/collection/@type").asText(), "koral:docGroup");
+        assertEquals(base.at("/collection/operands/0/@type").asText(),
+                "koral:doc");
+        assertEquals(base.at("/collection/operands/0/value").asText(), "BRZ13");
+        assertEquals(base.at("/collection/operands/1/@type").asText(),
+                "koral:docGroup");
+        assertEquals(base.at("/collection/operands/1/operands").size(), 2);
+    }
+
+    @Test
+    public void testNodeMergeWithBase() {
+        String coll = "corpusSigle=WPD";
+        String query = "[base=Haus]";
+        QuerySerializer check = new QuerySerializer();
+        check.setQuery(query, "poliqarp");
+        check.setCollection(coll);
+
+        KoralCollectionQueryBuilder b = new KoralCollectionQueryBuilder();
+        b.setBaseQuery(check.toJSON());
+
+        KoralCollectionQueryBuilder test = new KoralCollectionQueryBuilder();
+        test.with("textClass=wissenschaft | textClass=politik");
+        JsonNode node = (JsonNode) test.rebaseCollection();
+        node = b.mergeWith(node);
+        assertNotNull(node);
+        assertEquals("koral:docGroup", node.at("/collection/@type").asText());
+        assertEquals("operation:and", node.at("/collection/operation").asText());
+        assertEquals(2, node.at("/collection/operands").size());
+    }
+
+
+    @Test
+    public void testStoredCollectionBaseQueryBuild () {
 
     }
 
diff --git a/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java b/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
index fe2201f..c11b7e3 100644
--- a/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
+++ b/src/test/java/de/ids_mannheim/korap/config/ConfigTest.java
@@ -1,7 +1,6 @@
 package de.ids_mannheim.korap.config;
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.utils.ServiceInfo;
 import de.ids_mannheim.korap.utils.TimeUtils;
 import de.ids_mannheim.korap.web.service.BootableBeanInterface;
diff --git a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
index 0746293..2c36b66 100644
--- a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -12,7 +12,6 @@
 import de.ids_mannheim.korap.security.auth.APIAuthentication;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
 import de.ids_mannheim.korap.security.auth.KustvaktAuthenticationManager;
-import de.ids_mannheim.korap.user.Attributes;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.web.service.BootableBeanInterface;
 import org.apache.commons.dbcp2.BasicDataSource;
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
index 0c7035b..4e4aa3f 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
@@ -5,11 +5,15 @@
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
+import de.ids_mannheim.korap.resources.Corpus;
+import de.ids_mannheim.korap.resources.KustvaktResource;
+import de.ids_mannheim.korap.security.ac.ResourceFinder;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -29,6 +33,7 @@
 
     @Override
     public void initMethod () throws KustvaktException {
+        helper().runBootInterfaces();
         config = helper().getContext().getConfiguration();
     }
 
@@ -181,5 +186,45 @@
     }
 
 
+    @Test
+    public void testPublicCollectionRewriteEmptyAdd () throws KustvaktException {
+        RewriteHandler handler = new RewriteHandler();
+        handler.insertBeans(helper().getContext());
+        handler.add(PublicCollection.class);
+
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery(simple_add_query, "poliqarp");
+        String org = s.toJSON();
+        JsonNode node = JsonUtils.readTree(handler.preProcess(org,
+                User.UserFactory.getUser("test_user")));
+        assertNotNull(node);
+        System.out.println("EMPTY " + node);
+    }
+
+
+    @Test
+    public void testPublicCollectionRewriteNonEmptyAdd ()
+            throws KustvaktException {
+        RewriteHandler handler = new RewriteHandler();
+        handler.insertBeans(helper().getContext());
+        handler.add(PublicCollection.class);
+
+        try {
+            QuerySerializer s = new QuerySerializer();
+            s.setQuery(simple_add_query, "poliqarp");
+            s.setCollection("(docSigle=WPD_AAA & textClass=wissenschaft)");
+            String org = s.toJSON();
+            JsonNode node = JsonUtils.readTree(handler.preProcess(org,
+                    User.UserFactory.getUser("test_user")));
+            assertNotNull(node);
+            System.out.println("NON EMPTY " + node);
+            Set<Corpus> resourceSet = ResourceFinder.searchPublic(Corpus.class);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
 
 }
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
index cb7d38d..032b9f7 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/FoundryRewriteTest.java
@@ -9,7 +9,7 @@
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resource.LayerMapper;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.UserSettings;
 import de.ids_mannheim.korap.utils.JsonUtils;
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
index 91ee4e0..78db747 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/PostRewriteTest.java
@@ -16,7 +16,6 @@
  * @author hanl
  * @date 12/11/2015
  */
-//fixme: tests only work with singleconnection data sources
 // todo: logging!
 public class PostRewriteTest extends BeanConfigTest {
 
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
index 5eea4e2..070e0bb 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
@@ -6,7 +6,7 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.UserSettings;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import org.junit.Test;
diff --git a/src/test/java/de/ids_mannheim/korap/security/PolicyDaoTest.java b/src/test/java/de/ids_mannheim/korap/security/PolicyDaoTest.java
index 404b86a..8c2a00d 100644
--- a/src/test/java/de/ids_mannheim/korap/security/PolicyDaoTest.java
+++ b/src/test/java/de/ids_mannheim/korap/security/PolicyDaoTest.java
@@ -8,7 +8,7 @@
 import de.ids_mannheim.korap.resources.Permissions;
 import de.ids_mannheim.korap.resources.VirtualCollection;
 import de.ids_mannheim.korap.security.ac.PolicyBuilder;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.user.User;
 import edu.emory.mathcs.backport.java.util.Arrays;
 import org.junit.Ignore;
diff --git a/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java b/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
index 973087b..2c0d83e 100644
--- a/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
+++ b/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
@@ -1,5 +1,6 @@
 package de.ids_mannheim.korap.security.auth;
 
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeanConfigTest;
 import de.ids_mannheim.korap.config.KustvaktBaseDaoInterface;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
@@ -8,8 +9,6 @@
 import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
 import de.ids_mannheim.korap.user.*;
 import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Assert;
 import org.junit.Test;
 
 import static org.junit.Assert.assertNotEquals;
diff --git a/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java b/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
index 65b93c8..9295cf3 100644
--- a/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
+++ b/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
@@ -1,5 +1,6 @@
 package de.ids_mannheim.korap.user;
 
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeanConfigTest;
 import de.ids_mannheim.korap.config.BeansFactory;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java
index 5392eec..1da69b9 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/FilterTest.java
@@ -4,7 +4,7 @@
 import de.ids_mannheim.korap.config.TestHelper;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.web.service.FastJerseyTest;
 import org.eclipse.jetty.server.Response;
 import org.junit.BeforeClass;
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java
index 60b7267..a1a5d5f 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/OAuth2EndpointTest.java
@@ -5,7 +5,7 @@
 import de.ids_mannheim.korap.config.TestHelper;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.web.service.FastJerseyTest;
 import org.junit.BeforeClass;
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
index d9e761c..6cb7700 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/ResourceServiceTest.java
@@ -4,17 +4,14 @@
 import com.sun.jersey.api.client.ClientResponse;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.security.auth.BasicHttpAuth;
-import de.ids_mannheim.korap.user.Attributes;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.web.service.FastJerseyTest;
-import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.*;
 
 /**
  * @author hanl
@@ -37,7 +34,6 @@
                 .path("search")
                 .queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp")
-                //                .queryParam("cq", "corpusID=GOE")
                 .header(Attributes.AUTHORIZATION,
                         BasicHttpAuth.encode("kustvakt", "kustvakt2015"))
                 .get(ClientResponse.class);
@@ -98,7 +94,7 @@
         assertNotNull(node);
         int docs = node.path("documents").asInt();
         assertNotEquals(0, docs);
-        Assert.assertTrue(docs < 15);
+        assertTrue(docs < 15);
     }
 
 
@@ -121,6 +117,8 @@
                 .path("corpus/WPD/search").queryParam("q", "[base=Haus]")
                 .queryParam("ql", "poliqarp").queryParam("context", "base/s:s")
                 .method("TRACE", ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
         System.out.println("RESPONSE 1 " + response);
         String ent = response.getEntity(String.class);
         System.out.println("Entity 1 " + ent);
@@ -133,6 +131,8 @@
                 .path("search").queryParam("q", "[base=Haus]")
                 .queryParam("ql", "poliqarp").queryParam("context", "sentence")
                 .method("TRACE", ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
         System.out.println("PUBLIC COLLECTION");
@@ -146,6 +146,8 @@
                 .path("search").queryParam("q", "[base=Haus]")
                 .queryParam("ql", "poliqarp").queryParam("context", "sentence")
                 .get(ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
         String ent = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(ent);
         assertNotNull(node);
@@ -161,6 +163,8 @@
                 .path("search").queryParam("context", "sentence")
                 .queryParam("q", "[pos=ADJA]").queryParam("ql", "poliqarp")
                 .get(ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
     }
 
 
@@ -169,6 +173,8 @@
     public void testSerializationCollection () {
         ClientResponse response = resource().path(getAPIVersion()).path("")
                 .get(ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
     }
 
 
@@ -178,6 +184,19 @@
     }
 
 
+    @Test
+    public void testGetResources () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("corpus").get(ClientResponse.class);
+        assertEquals(response.getStatus(),
+                ClientResponse.Status.OK.getStatusCode());
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertNotNull(node);
+        System.out.println("NODE 1 " + node);
+    }
+
+
     @Override
     public void initMethod () throws KustvaktException {
         helper().runBootInterfaces();
