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
