diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
index e485c69..47cef40 100644
--- a/dependency-reduced-pom.xml
+++ b/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
   <groupId>de.ids_mannheim.korap</groupId>
   <artifactId>Kustvakt-core</artifactId>
   <name>Kustvakt core</name>
-  <version>0.4</version>
+  <version>0.5</version>
   <description>Kustvakt core, basic rest api for testing purposes and default
         interfaces</description>
   <build>
@@ -23,7 +23,7 @@
     <testResources>
       <testResource>
         <filtering>true</filtering>
-        <directory>src/main/resources</directory>
+        <directory>src/test/resources</directory>
         <includes>
           <include>**/*.prop</include>
           <include>**/*.xml</include>
@@ -31,10 +31,31 @@
           <include>**/*.properties</include>
         </includes>
       </testResource>
+      <testResource>
+        <filtering>true</filtering>
+        <directory>src/main/resources</directory>
+        <includes>
+          <include>**/*.prop</include>
+          <include>**/*.xml</include>
+          <include>**/*.conf</include>
+          <include>**/*.properties</include>
+          <include>**/*.sql</include>
+        </includes>
+      </testResource>
     </testResources>
     <plugins>
       <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.3</version>
+        <configuration>
+          <compilerVersion>1.7</compilerVersion>
+          <source>1.7</source>
+          <target>1.7</target>
+        </configuration>
+      </plugin>
+      <plugin>
         <artifactId>maven-jar-plugin</artifactId>
+        <version>2.1</version>
         <executions>
           <execution>
             <phase>package</phase>
@@ -52,7 +73,7 @@
             <exclude>**/*APITest.java</exclude>
           </excludes>
           <includes>
-            <include>**/TestSuite.java</include>
+            <include>**/*.java</include>
           </includes>
         </configuration>
       </plugin>
@@ -198,7 +219,7 @@
     <dependency>
       <groupId>org.projectlombok</groupId>
       <artifactId>lombok</artifactId>
-      <version>0.11.8</version>
+      <version>1.16.6</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
diff --git a/pom.xml b/pom.xml
index c28e0ef..54386dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -183,7 +183,7 @@
                                 </transformer>
                             </transformers>
                             <!-- Additional configuration. -->
-                            <!-- apparently there is a securityexception -->
+                            <!-- apparently there is a securityException -->
                             <filters>
                                 <filter>
                                     <artifact>*:*</artifact>
diff --git a/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java b/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
index 07acf8d..a854bc5 100644
--- a/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
+++ b/src/main/java/de/ids_mannheim/korap/exceptions/EmptyResultException.java
@@ -4,6 +4,7 @@
  * @author hanl
  * @date 25/03/2014
  */
+@Deprecated // even useful anymore?
 public class EmptyResultException extends KustvaktException {
 
     public EmptyResultException(String message, String entity) {
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
index b81dc3d..77d4150 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
@@ -43,8 +43,8 @@
     }
 
     @Override
-    public UserSettings getUserSettings(Integer userid) throws
-            KustvaktException {
+    public UserSettings getUserSettings(Integer userid)
+            throws KustvaktException {
         MapSqlParameterSource np = new MapSqlParameterSource();
         np.addValue("us", userid);
         final String sql =
@@ -100,8 +100,8 @@
      * @throws KustvaktException
      */
 
-    private void createSettings(UserSettings settings) throws
-            KustvaktException {
+    private void createSettings(UserSettings settings)
+            throws KustvaktException {
         final String sql =
                 "INSERT INTO user_settings (user_id, fileNameForExport,leftContextItemForExport,"
                         +
@@ -186,7 +186,7 @@
                         +
                         "email=:email, address=:address, country=:country, privateUsage=:privateUsage "
                         +
-                        "WHERE userID=:userID;";
+                        "WHERE user_id=:userID;";
         try {
             return this.jdbcTemplate
                     .update(up, new BeanPropertySqlParameterSource(details));
@@ -199,8 +199,8 @@
         }
     }
 
-    private void createUserDetails(UserDetails details) throws
-            KustvaktException {
+    private void createUserDetails(UserDetails details)
+            throws KustvaktException {
         final String up =
                 "INSERT INTO user_details (user_id, firstName, lastName, gender, phone, institution, "
                         +
@@ -223,8 +223,7 @@
 
     // usersettings are fetched plus basic account info, no details, since i rarely use them anyway!
     @Override
-    public User getAccount(String username)
-            throws KustvaktException {
+    public User getAccount(String username) throws KustvaktException {
         Map<String, String> namedParameters = Collections
                 .singletonMap("username", username);
         final String sql = "select a.* from korap_users as a where a.username=:username;";
@@ -259,6 +258,9 @@
             if (param != null) {
                 np.addValue("frag", param.getUriFragment());
                 np.addValue("exp", new Date(param.getUriExpiration()));
+            }else {
+                np.addValue("frag", null);
+                np.addValue("exp", null);
             }
             np.addValue("id", k.getId());
 
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 c5cc374..9ace5a5 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/RowMapperFactory.java
@@ -13,6 +13,7 @@
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.sql.Timestamp;
 import java.util.Map;
 
 /**
@@ -63,8 +64,9 @@
                     rs.getTimestamp(Attributes.ACCOUNT_CREATION).getTime());
             user.setAccountLink(rs.getString(Attributes.ACCOUNTLINK));
 
+            Timestamp exp = rs.getTimestamp(Attributes.URI_EXPIRATION);
             URIParam param = new URIParam(rs.getString(Attributes.URI_FRAGMENT),
-                    rs.getDate(Attributes.URI_EXPIRATION).getTime());
+                    exp == null ? -1 : exp.getTime());
             user.addField(param);
             return user;
         }
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 b55f18f..c243f73 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
@@ -2,6 +2,8 @@
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 import java.util.Iterator;
@@ -10,6 +12,7 @@
  * @author hanl
  * @date 28/07/2015
  */
+//todo: 21.10.15
 public class CollectionCleanupFilter extends RewriteTask.RewriteQuery {
 
     // track path to operand
@@ -17,12 +20,13 @@
     private StringBuilder builder;
 
     public CollectionCleanupFilter() {
-        this.builder = new StringBuilder();
+        super();
     }
 
     @Override
-    public JsonNode rewrite(KoralNode node) {
-        if (node.rawNode().has("collection")) {
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
+        if (node.has("collection")) {
             JsonNode coll = node.rawNode().path("collection");
             process(coll);
         }
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 1ceb1e3..4b753cb 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,10 +1,12 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.resources.Corpus;
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.security.ac.SecurityManager;
+import de.ids_mannheim.korap.user.User;
 
 /**
  * @author hanl
@@ -13,16 +15,13 @@
 // todo: test
 public class CollectionConstraint extends RewriteTask.RewriteNode {
 
-    public CollectionConstraint() {
-        super();
-    }
-
     @Override
-    public JsonNode rewrite(KoralNode koralnode) {
+    public JsonNode rewrite(KoralNode koralnode, KustvaktConfiguration config,
+            User user) {
         JsonNode node = koralnode.rawNode();
         if (node.at("/@type").asText().equals("koral:doc")) {
-            if (node.at("/key").asText().equals("corpusID") && !check(
-                    koralnode)) {
+            if (node.at("/key").asText().equals("corpusID") && !check(koralnode,
+                    user)) {
                 koralnode.removeNode();
                 // todo: add message that node was removed!
             }
@@ -30,15 +29,15 @@
         return node;
     }
 
-    private boolean check(KoralNode node) {
-        if (!node.hasUser())
+    private boolean check(KoralNode node, User user) {
+        if (user == null)
             return true;
 
         String id = node.rawNode().at("/value").asText();
         KustvaktResource corpus;
         try {
             SecurityManager m = SecurityManager
-                    .findbyId(id, node.getUser(), Corpus.class);
+                    .findbyId(id, user, Corpus.class);
             corpus = m.getResource();
         }catch (KustvaktException e) {
             return false;
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
index b166181..d44606e 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/FoundryInject.java
@@ -3,7 +3,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.resource.LayerMapper;
-
+import de.ids_mannheim.korap.user.User;
 
 /**
  * @author hanl
@@ -11,18 +11,16 @@
  */
 public class FoundryInject extends RewriteTask.RewriteNode {
 
-    private KustvaktConfiguration config;
-
-    public FoundryInject(KustvaktConfiguration config) {
+    public FoundryInject() {
         super();
-        this.config = config;
     }
 
     @Override
-    public JsonNode rewrite(KoralNode node) {
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
         LayerMapper mapper;
-        if (node.hasUser())
-            mapper = new LayerMapper(config, node.getUser().getSettings());
+        if (user != null)
+            mapper = new LayerMapper(config, user.getSettings());
         else
             mapper = new LayerMapper(config);
 
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 86999a5..5e4bece 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
@@ -1,8 +1,49 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.User;
+
 /**
  * @author hanl
  * @date 25/09/2015
  */
-public class IdWriter  {
+// todo: 20.10.15
+public class IdWriter extends RewriteTask.RewriteNode {
+
+    private int counter;
+
+    public IdWriter() {
+        super();
+        this.counter = 0;
+
+    }
+
+    @Override
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
+        JsonNode result = node.rawNode();
+        if (result.path("@type").asText().equals("koral:token"))
+            addId(result);
+        return result;
+    }
+
+    private JsonNode addId(JsonNode node) {
+        if (node.isObject()) {
+            ObjectNode o = (ObjectNode) node;
+            String s = extractToken(node);
+            if (s != null && !s.isEmpty())
+                o.put("idn", s + "_" + counter++);
+        }
+        return node;
+    }
+
+    // fixme: koral token --> how does grouping behave?!
+    private String extractToken(JsonNode token) {
+        JsonNode wrap = token.path("wrap");
+        if (!wrap.isMissingNode())
+            return wrap.path("key").asText();
+        return null;
+    }
 }
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 64365e1..f4580ad 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
@@ -3,7 +3,6 @@
 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.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 import java.util.LinkedHashMap;
@@ -19,40 +18,21 @@
     private JsonNode node;
     private KoralRewriteBuilder builder;
     private boolean toRemove;
-    private final User user;
 
     private KoralNode(JsonNode node) {
-        this(node, null);
-    }
-
-    public KoralNode(JsonNode node, User user) {
         this.node = node;
         this.builder = new KoralRewriteBuilder();
         this.toRemove = false;
-        this.user = user;
     }
 
-    public boolean hasUser() {
-        return this.user != null;
-    }
-
-    public User getUser() {
-        return this.user;
-    }
-
-    public static KoralNode getNode(JsonNode node) {
+    public static KoralNode wrapNode(JsonNode node) {
         return new KoralNode(node) {
         };
     }
 
-    public static KoralNode getNode(JsonNode node, User user) {
-        return new KoralNode(node, user) {
-        };
-    }
-
     public void set(String name, Object value) {
 
-        if (this.node.isObject()) {
+        if (this.node.isObject() && this.node.path(name).isMissingNode()) {
             ObjectNode node = (ObjectNode) this.node;
             if (value instanceof String)
                 node.put(name, (String) value);
@@ -91,6 +71,16 @@
         }
     }
 
+    public boolean has(Object ident) {
+        if (ident instanceof String)
+            return this.node.has((String) ident);
+        if (ident instanceof Integer)
+            return this.node.has((int) ident);
+        return false;
+    }
+
+
+
     public JsonNode rawNode() {
         return this.node;
     }
@@ -103,6 +93,7 @@
         return this.toRemove;
     }
 
+    //todo: 21.10.15 -- redo with better return policies!
     private static class KoralRewriteBuilder {
 
         private Map<String, String> map;
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
index af7d998..bf6f2e1 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/MetaConstraint.java
@@ -1,6 +1,8 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.User;
 
 /**
  * @author hanl
@@ -13,7 +15,8 @@
     }
 
     @Override
-    public JsonNode rewrite(KoralNode node) {
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
         if (node.rawNode().has("meta")) {
             JsonNode meta = node.rawNode().path("meta");
             //todo: check meta parameter
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 88ce41e..d8a35dc 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,9 +1,11 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.resources.Corpus;
 import de.ids_mannheim.korap.security.ac.ResourceFinder;
+import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.CollectionQueryBuilder3;
 
 import java.util.Set;
@@ -14,27 +16,34 @@
  */
 public class PublicCollection extends RewriteTask.RewriteQuery {
 
+    public PublicCollection() {
+        super();
+    }
+
     // todo: where to inject the array node into? --> super group with and relation plus subgroup with ids and or operation
     @Override
-    public JsonNode rewrite(KoralNode node) {
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
         JsonNode subnode = node.rawNode();
         if (!subnode.at("/collection").findValuesAsText("key")
                 .contains("corpusID")) {
             //todo: inject public collection node
-            if (node.hasUser()) {
+            if (user != null) {
                 try {
                     ResourceFinder finder = ResourceFinder
-                            .init(node.getUser(), Corpus.class);
+                            .init(user, Corpus.class);
                     Set<String> ids = finder.getIds();
                     createNode(ids);
                 }catch (KustvaktException e) {
                     e.printStackTrace();
+                    //todo: 20.10.15 - 21.10.15
                 }
             }
         }
         return subnode;
     }
 
+    //todo: 20.10.15
     private JsonNode createNode(Set<String> ids) {
         JsonNode node = CollectionQueryBuilder3.Utils.buildDocGroup();
         return node;
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 d9eb391..8af6eae 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
@@ -2,11 +2,14 @@
 
 import com.fasterxml.jackson.databind.JsonNode;
 import de.ids_mannheim.korap.config.KustvaktClassLoader;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 import de.ids_mannheim.korap.utils.KustvaktLogger;
 import org.slf4j.Logger;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -21,19 +24,50 @@
     private static Logger jlog = KustvaktLogger.initiate(RewriteHandler.class);
     private Collection<RewriteTask.RewriteNode> node_processors;
     private Collection<RewriteTask.RewriteQuery> query_processors;
+    private KustvaktConfiguration config;
 
-    public RewriteHandler() {
+    // fixme: make default constructor with configuration!
+    public RewriteHandler(KustvaktConfiguration config) {
+        this.config = config;
         this.node_processors = new HashSet<>();
         this.query_processors = new HashSet<>();
         KustvaktClassLoader.loadSubTypes(RewriteTask.RewriteNode.class);
     }
 
-    public void add(RewriteTask.RewriteNode node) {
-        this.node_processors.add(node);
+    public void add(RewriteTask.RewriteNode rewriter) {
+        this.node_processors.add(rewriter);
     }
 
-    public void add(RewriteTask.RewriteQuery node) {
-        this.query_processors.add(node);
+    public void add(RewriteTask.RewriteQuery rewriter) {
+        this.query_processors.add(rewriter);
+    }
+
+    /**
+     * expects extended RewriteNode/Query class with default config constructor
+     *
+     * @param rewriter
+     */
+    //todo: 21.10.15
+    public boolean add(Class<? extends RewriteTask> rewriter) {
+        RewriteTask task;
+        try {
+            Constructor c = rewriter.getConstructor();
+            task = (RewriteTask) c.newInstance();
+        }catch (NoSuchMethodException | InvocationTargetException
+                | IllegalAccessException | InstantiationException e) {
+            return false;
+        }
+
+        if (task instanceof RewriteTask.RewriteNode) {
+            this.node_processors.add((RewriteTask.RewriteNode) task);
+            return true;
+        }
+
+        if (task instanceof RewriteTask.RewriteQuery) {
+            this.query_processors.add((RewriteTask.RewriteQuery) task);
+            return true;
+        }
+        return false;
     }
 
     public void clear() {
@@ -72,15 +106,16 @@
         return JsonUtils.toJSON(apply(JsonUtils.readTree(json), user));
     }
 
-    private static boolean processNode(JsonNode node, User user,
+    // todo: integrate notifications into system!
+    private boolean processNode(JsonNode node, User user,
             Collection<? extends RewriteTask> tasks) {
-        KoralNode knode = KoralNode.getNode(node, user);
+        KoralNode knode = KoralNode.wrapNode(node);
         for (RewriteTask task : tasks) {
             if (jlog.isDebugEnabled()) {
                 jlog.debug("running node in processor " + node);
                 jlog.debug("on processor " + task.getClass().toString());
             }
-            task.rewrite(knode);
+            task.rewrite(knode, this.config, user);
             if (knode.toRemove())
                 break;
         }
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 4b44c42..07bebc4 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
@@ -1,6 +1,8 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.User;
 import lombok.Getter;
 
 /**
@@ -13,8 +15,14 @@
     private RewriteTask() {
     }
 
-    public abstract JsonNode rewrite(KoralNode node);
-
+    /**
+     * @param node   Json node in KoralNode wrapper
+     * @param config {@link KustvaktConfiguration} singleton instance to use default configuration parameters
+     * @param user   injected by rewrite handler if available. Might cause {@link NullPointerException} if not checked properly
+     * @return
+     */
+    public abstract JsonNode rewrite(KoralNode node,
+            KustvaktConfiguration config, User user);
 
     /**
      * query rewrites get injected the entire query from root containing all child nodes
@@ -31,12 +39,10 @@
         }
     }
 
-
-
     /**
      * node rewrites get injected typically object nodes that are subject to altering.
      * Be aware that node rewrites are processed before query rewrites. Thus query rewrite may override previous node rewrites
-     *
+     * <p/>
      * {@link de.ids_mannheim.korap.resource.rewrite.RewriteTask.RewriteNode} rewrite support the deletion of the respective node by simply setting the node invalid in KoralNode
      *
      * @author hanl
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
index 0bde30f..245e787 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/TreeConstraint.java
@@ -1,6 +1,8 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
+import de.ids_mannheim.korap.user.User;
 
 /**
  * #ELEM(W ANA=N)
@@ -44,12 +46,13 @@
 
     private String pointer;
 
-    public TreeConstraint(String constraint_pointer) {
-        this.pointer = constraint_pointer;
+    public TreeConstraint() {
+        super();
     }
 
     @Override
-    public JsonNode rewrite(KoralNode node) {
+    public JsonNode rewrite(KoralNode node, KustvaktConfiguration config,
+            User user) {
         System.out.println("FIND PATH " + node.rawNode().findParent(pointer));
 
         return node.rawNode();
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 b7463d9..621e87d 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
@@ -47,9 +47,9 @@
         this.searchKrill = new SearchKrill(config.getIndexDir());
         UriBuilder builder = UriBuilder.fromUri("http://10.0.10.13").port(9997);
         this.graphDBhandler = new ClientsHandler(builder.build());
-        this.processor = new RewriteHandler();
-        this.processor.add(new FoundryInject(this.config));
-        this.processor.add(new PublicCollection());
+        this.processor = new RewriteHandler(config);
+        this.processor.add(FoundryInject.class);
+        this.processor.add(PublicCollection.class);
     }
 
     /**
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index ff5d34c..602c496 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,7 +1,7 @@
 
 # Root logger option
 #log4j.threshold=ALL
-log4j.rootLogger=DEBUG, stdout, debugLog
+log4j.rootLogger=INFO, stdout, debugLog
 log4j.logger.log=ERROR, errorLog
 
 # Direct log messages to stdout
diff --git a/src/test/java/CollectionRewriteTest.java b/src/test/java/CollectionRewriteTest.java
index 19cea60..c1c88b1 100644
--- a/src/test/java/CollectionRewriteTest.java
+++ b/src/test/java/CollectionRewriteTest.java
@@ -12,6 +12,7 @@
  * @author hanl
  * @date 03/09/2015
  */
+// todo: 20.10.15
 public class CollectionRewriteTest {
 
     private static String simple_add_query = "[pos=ADJA]";
@@ -24,10 +25,10 @@
         config = BeanConfiguration.getBeans().getConfiguration();
     }
 
-//    @Test
+    //    @Test
     public void testCollectionNodeRemoveCorpusIdNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection("textClass=politik & corpusID=WPD");
@@ -39,8 +40,8 @@
 
     //@Test
     public void testCollectionNodeRemoveAllCorpusIdNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection("corpusID=BRZ13 & corpusID=WPD");
@@ -53,8 +54,8 @@
 
     //@Test
     public void testCollectionNodeRemoveGroupedCorpusIdNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection(
@@ -72,9 +73,9 @@
     //fixme: will probably fail when one doc groups are being refactored
     //@Test
     public void testCollectionCleanEmptyDocGroupNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
-        handler.add(new CollectionCleanupFilter());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
+        handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection(
@@ -92,9 +93,9 @@
 
     //@Test
     public void testCollectionCleanMoveOneDocFromGroupUpNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
-        handler.add(new CollectionCleanupFilter());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
+        handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection("(corpusID=BRZ13 & textClass=Wissenschaft)");
@@ -106,9 +107,9 @@
 
     //@Test
     public void testCollectionCleanEmptyGroupAndMoveOneFromGroupUpNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
-        handler.add(new CollectionCleanupFilter());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
+        handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection(
@@ -122,9 +123,9 @@
 
     //@Test
     public void testCollectionRemoveAndMoveOneFromGroupUpNoErrors() {
-        RewriteHandler handler = new RewriteHandler();
-        handler.add(new CollectionConstraint());
-        handler.add(new CollectionCleanupFilter());
+        RewriteHandler handler = new RewriteHandler(config);
+        handler.add(CollectionConstraint.class);
+        handler.add(CollectionCleanupFilter.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         s.setCollection(
diff --git a/src/test/java/FoundryRewriteTest.java b/src/test/java/FoundryRewriteTest.java
index 5a91a09..ff19ec2 100644
--- a/src/test/java/FoundryRewriteTest.java
+++ b/src/test/java/FoundryRewriteTest.java
@@ -32,8 +32,8 @@
 
     @Test
     public void testSimpleFoundryAddThrowsNoError() {
-        RewriteHandler processor = new RewriteHandler();
-        processor.add(new FoundryInject(config));
+        RewriteHandler processor = new RewriteHandler(config);
+        processor.add(FoundryInject.class);
         QuerySerializer s = new QuerySerializer();
         s.setQuery(simple_add_query, "poliqarp");
         String result = processor.apply(s.toJSON(), null);
@@ -57,9 +57,9 @@
     @Test
     public void testFoundryInjectPosNoErrors() {
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
+        RewriteHandler handler = new RewriteHandler(config);
         s.setQuery("[pos=ADJA]", "poliqarp");
-        handler.add(new FoundryInject(config));
+        assert handler.add(FoundryInject.class);
         String result = handler.apply(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
@@ -73,9 +73,9 @@
     @Test
     public void testFoundryInjectJoinedQueryNoErrors() {
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
+        RewriteHandler handler = new RewriteHandler(config);
         s.setQuery("[orth=laufe/i & base!=Lauf]", "poliqarp");
-        handler.add(new FoundryInject(config));
+        assert handler.add(FoundryInject.class);
         String result = handler.apply(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
@@ -90,9 +90,9 @@
     @Test
     public void testFoundryInjectGroupedQueryNoErrors() {
         QuerySerializer s = new QuerySerializer();
-        RewriteHandler handler = new RewriteHandler();
+        RewriteHandler handler = new RewriteHandler(config);
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
-        handler.add(new FoundryInject(config));
+        assert handler.add(FoundryInject.class);
         String result = handler.apply(s.toJSON(), null);
         JsonNode node = JsonUtils.readTree(result);
 
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 3040814..fb7eaa7 100644
--- a/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -19,8 +19,9 @@
     private static final String[] credentials = new String[] { "test1",
             "testPass#2015" };
 
-    public static void setup() {
-        if (BeanConfiguration.hasContext()) {
+    public static boolean setup() {
+        boolean r = BeanConfiguration.hasContext();
+        if (r) {
             EntityHandlerIface dao = BeanConfiguration.getBeans()
                     .getUserDBHandler();
 
@@ -32,8 +33,10 @@
                 dao.createAccount(user);
             }catch (KustvaktException e) {
                 e.printStackTrace();
+                return false;
             }
         }
+        return r;
     }
 
     public static final String[] getCredentials() {
