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();
