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 4fe6a27..33b2398 100644
--- a/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -180,7 +180,7 @@
             if (f.exists()) {
                 log4j.load(new FileInputStream(f));
                 PropertyConfigurator.configure(log4j);
-                jlog.warn(
+                jlog.info(
                         "using local logging properties file ({}) to configure logging system",
                         "./log4j.properties");
                 return;
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 af6470d..03b77ec 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
@@ -58,6 +58,6 @@
 
     @Override
     public String at() {
-        return "collection";
+        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 dc74cab..5b31fa4 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
@@ -121,8 +121,8 @@
                 }
             }else if (root.path("@type").asText().equals("koral:token")) {
                 // todo: koral:token nodes cannot be flagged for deletion --> creates the possibility for empty koral:token nodes
-                //                processIterableNode(KoralNode.wrapNode(root), user,
-                //                        this.token_node_processors, post);
+                processNode(name,KoralNode.wrapNode(root), user,
+                        this.token_node_processors, post);
                 return process(name, root.path("wrap"), user, post);
             }else {
                 return processNode(name, KoralNode.wrapNode(root), user,
@@ -139,8 +139,7 @@
         return false;
     }
 
-    public JsonNode preProcess(JsonNode root, User user) {
-        boolean post = false;
+    private JsonNode process(JsonNode root, User user, boolean post) {
         Iterator<Map.Entry<String, JsonNode>> it = root.fields();
         while (it.hasNext()) {
             Map.Entry<String, JsonNode> next = it.next();
@@ -150,19 +149,16 @@
         return root;
     }
 
+    public JsonNode preProcess(JsonNode root, User user) {
+        return process(root, user, false);
+    }
+
     public String preProcess(String json, User user) {
         return JsonUtils.toJSON(preProcess(JsonUtils.readTree(json), user));
     }
 
     public JsonNode postProcess(JsonNode root, User user) {
-        boolean post = true;
-        Iterator<Map.Entry<String, JsonNode>> it = root.fields();
-        while (it.hasNext()) {
-            Map.Entry<String, JsonNode> next = it.next();
-            process(next.getKey(), next.getValue(), user, post);
-        }
-        processFixedNode(root, user, this.query_processors, post);
-        return root;
+        return process(root, user, true);
     }
 
     public String postProcess(String json, User user) {
@@ -177,8 +173,7 @@
      */
     // todo: integrate notifications into system!
     private boolean processNode(String rootNode, KoralNode node, User user,
-            Collection<? extends RewriteTask.IterableRewriteAt> tasks,
-            boolean post) {
+            Collection<? extends RewriteTask> tasks, boolean post) {
         for (RewriteTask task : tasks) {
             jlog.debug("running processor on node: " + node);
             jlog.debug("on processor: " + task.getClass().toString());
@@ -206,13 +201,14 @@
     private void processFixedNode(JsonNode node, User user,
             Collection<RewriteTask.RewriteNodeAt> tasks, boolean post) {
         for (RewriteTask.RewriteNodeAt task : tasks) {
-            if (!node.at(task.at()).isMissingNode()) {
-                if (!post)
-                    task.preProcess(KoralNode.wrapNode(node.at(task.at())),
-                            this.config, user);
-                else
-                    task.postProcess(KoralNode.wrapNode(node.at(task.at())));
-            }
+            JsonNode next = node;
+            if ((task.at() != null && !node.at(task.at()).isMissingNode()))
+                next = node.at(task.at());
+
+            if (!post)
+                task.preProcess(KoralNode.wrapNode(next), this.config, user);
+            else
+                task.postProcess(KoralNode.wrapNode(next));
         }
     }
 
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 7a7189c..11e29b8 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
@@ -21,14 +21,26 @@
                 User user);
     }
 
+    /**
+     *
+     */
     interface RewriteAfter extends RewriteTask {
         JsonNode postProcess(KoralNode node);
     }
 
+    /**
+     * nodes subject to rewrites at fixed json pointer location.
+     * Json-pointer based rewrites are processed after iterable rewrites
+     * Deletion via KoralNode not allowed.
+     */
     interface RewriteNodeAt extends RewriteBefore, RewriteAfter {
         String at();
     }
 
+    /**
+     * terminal object nodes that are subject to rewrites through node iteration
+     * (both object and array node iteration supported)
+     */
     interface IterableRewriteAt extends RewriteBefore, RewriteAfter {
         String path();
     }
