diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
index e87f1cf..379a53f 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.59.4</version>
+  <version>0.59.5</version>
   <description>Kustvakt core, basic rest api for testing purposes and default
         interfaces</description>
   <build>
diff --git a/pom.xml b/pom.xml
index 093c5a1..7b2bb4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>de.ids_mannheim.korap</groupId>
     <artifactId>Kustvakt-core</artifactId>
-    <version>0.59.4</version>
+    <version>0.59.5</version>
     <packaging>jar</packaging>
     <name>Kustvakt core</name>
     <description>Kustvakt core, basic rest api for testing purposes and default
diff --git a/src/main/java/de/ids_mannheim/korap/config/AdminSetup.java b/src/main/java/de/ids_mannheim/korap/config/AdminSetup.java
index 5c0a276..378e015 100644
--- a/src/main/java/de/ids_mannheim/korap/config/AdminSetup.java
+++ b/src/main/java/de/ids_mannheim/korap/config/AdminSetup.java
@@ -49,12 +49,14 @@
             store.setReadable(true, true);
             store.setWritable(true, true);
             store.setExecutable(false);
+            System.out.println();
             System.out
                     .println("_______________________________________________");
             System.out.println("Token created. Please make note of it!");
             System.out.println("Token: " + token);
             System.out
                     .println("_______________________________________________");
+            System.out.println();
             return setup;
         }
         catch (Exception e) {
diff --git a/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java b/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
index b09140e..8081e5d 100644
--- a/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
+++ b/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
@@ -51,27 +51,6 @@
     }
 
 
-    @Deprecated
-    public static void loadAuthenticationProviders () {
-        Set<Class<? extends AuthenticationIface>> set = KustvaktClassLoader
-                .loadSubTypes(AuthenticationIface.class);
-        Set<AuthenticationIface> set2 = new HashSet<>();
-        for (Class<? extends AuthenticationIface> i : set) {
-            try {
-                set2.add(i.newInstance());
-            }
-            catch (InstantiationException | IllegalAccessException e) {
-                e.printStackTrace();
-            }
-        }
-        try {
-            getBeans().getAuthenticationManager().setProviders(set2);
-        }
-        catch (RuntimeException e) {
-            // do nothing
-        }
-    }
-
 
     public static boolean hasContext () {
         return beans != null && beans.context != null;
diff --git a/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java b/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
index 6e79890..84fcde1 100644
--- a/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/config/BeansFactory.java
@@ -1,8 +1,6 @@
 package de.ids_mannheim.korap.config;
 
-import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
-import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.user.Userdata;
 import de.ids_mannheim.korap.web.utils.KustvaktResponseHandler;
 import org.springframework.context.ApplicationContext;
@@ -11,6 +9,7 @@
 
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
+import java.util.Arrays;
 import java.util.Collection;
 
 /**
@@ -43,7 +42,7 @@
 
 
     public static synchronized TypeBeanFactory getTypeFactory () {
-        return new TypeBeanFactory(beanHolder);
+        return new TypeBeanFactory();
     }
 
 
@@ -107,21 +106,11 @@
 
     public static class TypeBeanFactory {
 
-        private ContextHolder holder;
-
-
-        private TypeBeanFactory (ContextHolder holder) {
-            this.holder = holder;
-        }
-
-
-        public <T> T getTypedBean (Collection objs, Class type) {
+        public <T> T getTypeInterfaceBean (Collection objs, Class type) {
             for (Object o : objs) {
-                Type gtype = o.getClass().getGenericInterfaces()[0];
-                if (gtype instanceof ParameterizedType) {
-                    ParameterizedType ptype = (ParameterizedType) gtype;
-                    Object ctype = ptype.getActualTypeArguments()[0];
-                    if (ctype.equals(type))
+                if (o instanceof KustvaktTypeInterface) {
+                    Class t = ((KustvaktTypeInterface) o).type();
+                    if (type.equals(t))
                         return (T) o;
                 }
             }
@@ -132,9 +121,19 @@
 
 
         @Deprecated
-        public UserDataDbIface getUserDaoInstance (
-                Class<? extends Userdata> type) {
-            return getTypedBean(this.holder.getUserDataDaos(), type);
+        public <T> T getTypedBean (Collection objs, Class type) {
+            for (Object o : objs) {
+                Type gtype = o.getClass().getGenericSuperclass();
+                if (gtype instanceof ParameterizedType) {
+                    ParameterizedType ptype = (ParameterizedType) gtype;
+                    Object ctype = ptype.getActualTypeArguments()[0];
+                    if (ctype.equals(type))
+                        return (T) o;
+                }
+            }
+            throw new RuntimeException(
+                    "Could not find typed bean in context for class '" + type
+                            + "'");
         }
     }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java b/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
index b652a19..f3f256c 100644
--- a/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
+++ b/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
@@ -84,7 +84,7 @@
     }
 
 
-    public Collection<UserDataDbIface> getUserDataDaos () {
+    public Collection<UserDataDbIface> getUserDataProviders () {
         return getBean(KUSTVAKT_USERDATA);
     }
 
@@ -115,9 +115,7 @@
     }
 
 
-    // todo: !!!!!!!!!!!!!!!!!!!!!!!!!!
-    // todo: more specific --> collection provider, document provider, etc.
-    public Collection<ResourceOperationIface> getResourceProvider () {
+    public Collection<ResourceOperationIface> getResourceProviders () {
         return getBean(KUSTVAKT_RESOURCES);
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java b/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
index 49b204e..abc4d22 100644
--- a/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
+++ b/src/main/java/de/ids_mannheim/korap/exceptions/StatusCodes.java
@@ -47,10 +47,8 @@
     public static final int CLIENT_REMOVAL_FAILURE = 215;
     public static final int CLIENT_AUTHORIZATION_FAILURE = 216;
 
-    /**
-     * 500 status codes for access control related components (also
-     * policy rewrite)
-     */
+
+
     public static final int PERMISSION_DENIED = 401;
     public static final int UNSUPPORTED_RESOURCE = 402;
     public static final int UNSUPPORTED_FOUNDRY = 403;
@@ -67,7 +65,13 @@
     public static final int MISSING_POLICY_CONDITIONS = 413;
     public static final int MISSING_POLICY_PERMISSION = 414;
     public static final int RESOURCE_NOT_FOUND = 415;
+    public static final int ACCESS_DENIED_NO_RESOURCES = 416;
 
+
+    /**
+     * 500 status codes for access control related components (also
+     * policy rewrite)
+     */
     // todo: extend according to policy rewrite possible!
     // policy errors
     public static final int POLICY_ERROR_DEFAULT = 500;
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java b/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java
index 3de9412..5520ffc 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java
@@ -16,6 +16,7 @@
 import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
 import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
 
+import javax.print.Doc;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collection;
@@ -290,4 +291,5 @@
     public Class<Document> type () {
         return Document.class;
     }
+
 }
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 41b1c72..cf5701b 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/ResourceDao.java
@@ -245,4 +245,5 @@
             return -1;
         }
     }
+
 }
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java b/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
index 4714ca8..74a6f4a 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserDetailsDao.java
@@ -157,4 +157,10 @@
             return -1;
         }
     }
+
+
+    @Override
+    public Class<UserDetails> type () {
+        return UserDetails.class;
+    }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java b/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
index 2dfebdf..7d02a60 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/UserSettingsDao.java
@@ -164,4 +164,10 @@
             return -1;
         }
     }
+
+
+    @Override
+    public Class<UserSettings> type () {
+        return UserSettings.class;
+    }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java b/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
index 43124a0..565ceec 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/db/ResourceOperationIface.java
@@ -8,7 +8,6 @@
 
 import java.util.Collection;
 import java.util.List;
-import java.util.Set;
 
 // todo: for transaction to work this should go into core module!?!
 // todo: user instance only required for auditing pointcut operations
diff --git a/src/main/java/de/ids_mannheim/korap/interfaces/db/UserDataDbIface.java b/src/main/java/de/ids_mannheim/korap/interfaces/db/UserDataDbIface.java
index 5b0cf0e..a475dae 100644
--- a/src/main/java/de/ids_mannheim/korap/interfaces/db/UserDataDbIface.java
+++ b/src/main/java/de/ids_mannheim/korap/interfaces/db/UserDataDbIface.java
@@ -1,5 +1,6 @@
 package de.ids_mannheim.korap.interfaces.db;
 
+import de.ids_mannheim.korap.config.KustvaktTypeInterface;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.Userdata;
@@ -8,7 +9,8 @@
  * @author hanl
  * @date 27/01/2016
  */
-public interface UserDataDbIface<T extends Userdata> {
+public interface UserDataDbIface<T extends Userdata> extends
+        KustvaktTypeInterface<T> {
 
     public int store (T data) throws KustvaktException;
 
diff --git a/src/main/java/de/ids_mannheim/korap/resource/rewrite/DocMatchRewrite.java b/src/main/java/de/ids_mannheim/korap/resource/rewrite/DocMatchRewrite.java
index 649f58d..5c8e568 100644
--- a/src/main/java/de/ids_mannheim/korap/resource/rewrite/DocMatchRewrite.java
+++ b/src/main/java/de/ids_mannheim/korap/resource/rewrite/DocMatchRewrite.java
@@ -4,12 +4,12 @@
 import de.ids_mannheim.korap.config.*;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.handlers.DocumentDao;
+import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.resources.Document;
 import de.ids_mannheim.korap.user.User;
 import net.sf.ehcache.Cache;
 import net.sf.ehcache.CacheManager;
 import net.sf.ehcache.Element;
-import org.w3c.dom.Attr;
 
 /**
  * @author hanl
@@ -19,7 +19,7 @@
 public class DocMatchRewrite implements RewriteTask.IterableRewritePath,
         BeanInjectable {
 
-    private DocumentDao docDao;
+    private ResourceOperationIface<Document> docDao;
     private Cache cache;
 
 
@@ -30,8 +30,8 @@
 
     @Override
     public void insertBeans (ContextHolder beans) {
-        this.docDao = BeansFactory.getTypeFactory().getTypedBean(
-                beans.getResourceProvider(), Document.class);
+        this.docDao = BeansFactory.getTypeFactory().getTypeInterfaceBean(
+                beans.getResourceProviders(), Document.class);
     }
 
 
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 9c3762b..923e7a2 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
@@ -35,8 +35,8 @@
         LayerMapper mapper;
 
         if (user != null && !userdaos.isEmpty()) {
-            UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                    userdaos, UserSettings.class);
+            UserDataDbIface dao = BeansFactory.getTypeFactory()
+                    .getTypeInterfaceBean(userdaos, UserSettings.class);
             mapper = new LayerMapper(config, dao.get(user));
         }
         else
@@ -69,6 +69,6 @@
 
     @Override
     public <T extends ContextHolder> void insertBeans (T beans) {
-        this.userdaos = beans.getUserDataDaos();
+        this.userdaos = beans.getUserDataProviders();
     }
 }
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 6bd59a5..d7e32ee 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
@@ -29,7 +29,7 @@
 
     @Override
     public JsonNode rewriteQuery (KoralNode node, KustvaktConfiguration config,
-            User user) {
+            User user) throws KustvaktException {
         JsonNode subnode = node.rawNode();
 
         if (!subnode.at("/collection").findValuesAsText("key")
@@ -38,32 +38,28 @@
             if (subnode.has("collection"))
                 b.setBaseQuery(JsonUtils.toJSON(subnode));
 
-            try {
-                Set resources = ResourceFinder.search(user, Corpus.class);
-                ArrayList<KustvaktResource> list = new ArrayList(resources);
+            Set resources = ResourceFinder.search(user, Corpus.class);
+            ArrayList<KustvaktResource> list = new ArrayList(resources);
 
-                if (list.isEmpty())
-                    throw new KustvaktException(StatusCodes.PERMISSION_DENIED,
-                            "No resources found for user", user.getUsername());
+            if (list.isEmpty())
+                throw new KustvaktException(
+                        StatusCodes.ACCESS_DENIED_NO_RESOURCES,
+                        "Resources could not be loaded for user ",
+                        user.getUsername());
 
-                Set ids = new HashSet(resources.size());
-                for (int i = 0; i < list.size(); i++) {
-                    if (i > 0)
-                        b.or();
-                    b.with(Attributes.CORPUS_SIGLE + "="
-                            + list.get(i).getPersistentID());
-                    ids.add(list.get(i).getPersistentID());
-                }
-                JsonNode rewritten = JsonUtils.readTree(b.toJSON());
-                node.set("collection", rewritten.at("/collection"),
-                        new KoralNode.RewriteIdentifier(
-                                Attributes.CORPUS_SIGLE, ids));
-                node.at("/collection");
+            Set ids = new HashSet(resources.size());
+            for (int i = 0; i < list.size(); i++) {
+                if (i > 0)
+                    b.or();
+                b.with(Attributes.CORPUS_SIGLE + "="
+                        + list.get(i).getPersistentID());
+                ids.add(list.get(i).getPersistentID());
             }
-            catch (KustvaktException e) {
-                e.printStackTrace();
-                // todo:
-            }
+            JsonNode rewritten = JsonUtils.readTree(b.toJSON());
+            node.set("collection", rewritten.at("/collection"),
+                    new KoralNode.RewriteIdentifier(Attributes.CORPUS_SIGLE,
+                            ids));
+            node.at("/collection");
         }
 
         return node.rawNode();
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 468fa9e..94875f4 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
@@ -115,24 +115,28 @@
 
 
 
-    public String processQuery (JsonNode root, User user) {
+    public String processQuery (JsonNode root, User user)
+            throws KustvaktException {
         RewriteProcess process = new RewriteProcess(root, user);
         JsonNode pre = process.start(false);
         return JsonUtils.toJSON(pre);
     }
 
 
-    public String processQuery (String json, User user) {
+    public String processQuery (String json, User user)
+            throws KustvaktException {
         return processQuery(JsonUtils.readTree(json), user);
     }
 
 
-    public String processResult (String json, User user) {
+    public String processResult (String json, User user)
+            throws KustvaktException {
         return processResult(JsonUtils.readTree(json), user);
     }
 
 
-    public String processResult (JsonNode node, User user) {
+    public String processResult (JsonNode node, User user)
+            throws KustvaktException {
         RewriteProcess process = new RewriteProcess(node, user);
         JsonNode pre = process.start(true);
         return JsonUtils.toJSON(pre);
@@ -167,7 +171,7 @@
 
 
         private KoralNode processNode (String key, JsonNode value,
-                boolean result) {
+                boolean result) throws KustvaktException {
             KoralNode kroot = KoralNode.wrapNode(value);
             if (value.isObject()) {
                 if (value.has("operands")) {
@@ -204,7 +208,7 @@
         }
 
 
-        private JsonNode start (boolean result) {
+        private JsonNode start (boolean result) throws KustvaktException {
             jlog.debug("Running rewrite process on query {}", root);
             if (root != null) {
                 Iterator<Map.Entry<String, JsonNode>> it = root.fields();
@@ -227,7 +231,8 @@
          *         applies if parent is an array node
          */
         private KoralNode rewrite (String rootNode, KoralNode node,
-                Collection<? extends RewriteTask> tasks, boolean result) {
+                Collection<? extends RewriteTask> tasks, boolean result)
+                throws KustvaktException {
             if (RewriteHandler.this.config == null)
                 throw new RuntimeException("KustvaktConfiguration must be set!");
 
@@ -247,21 +252,14 @@
                         continue;
                     }
                 }
-                try {
-                    if (!result && task instanceof RewriteTask.RewriteQuery) {
-                        ((RewriteTask.RewriteQuery) task).rewriteQuery(node,
-                                RewriteHandler.this.config, this.user);
-                    }
-                    else if (task instanceof RewriteTask.RewriteResult) {
-                        ((RewriteTask.RewriteResult) task).rewriteResult(node);
-                    }
+                if (!result && task instanceof RewriteTask.RewriteQuery) {
+                    ((RewriteTask.RewriteQuery) task).rewriteQuery(node,
+                            RewriteHandler.this.config, this.user);
                 }
-                catch (KustvaktException e) {
-                    jlog.error("Error in rewrite processor {} for node {}",
-                            task.getClass().getSimpleName(), node.rawNode()
-                                    .toString());
-                    e.printStackTrace();
+                else if (task instanceof RewriteTask.RewriteResult) {
+                    ((RewriteTask.RewriteResult) task).rewriteResult(node);
                 }
+
                 if (node.isRemove()) {
                     node.buildRewrites(this.root.at("/" + rootNode));
                     break;
@@ -275,7 +273,8 @@
 
         // fixme: merge with processNode!
         private void processFixedNode (JsonNode node,
-                Collection<RewriteTask> tasks, boolean post) {
+                Collection<RewriteTask> tasks, boolean post)
+                throws KustvaktException {
             for (RewriteTask task : tasks) {
                 KoralNode next = KoralNode.wrapNode(node);
                 if (task instanceof RewriteTask.RewriteNodeAt) {
@@ -284,19 +283,13 @@
                         next = next.at(rwa.at());
                 }
 
-                try {
-                    if (!post & task instanceof RewriteTask.RewriteQuery)
-                        ((RewriteTask.RewriteQuery) task).rewriteQuery(next,
-                                RewriteHandler.this.config, user);
-                    else if (task instanceof RewriteTask.RewriteResult)
-                        ((RewriteTask.RewriteResult) task).rewriteResult(next);
-                    next.buildRewrites();
-                }
-                catch (KustvaktException e) {
-                    jlog.error("Error in rewrite processor {} for node {}",
-                            task.getClass().getSimpleName(), next.toString());
-                    e.printStackTrace();
-                }
+                if (!post & task instanceof RewriteTask.RewriteQuery)
+                    ((RewriteTask.RewriteQuery) task).rewriteQuery(next,
+                            RewriteHandler.this.config, user);
+                else if (task instanceof RewriteTask.RewriteResult)
+                    ((RewriteTask.RewriteResult) task).rewriteResult(next);
+                next.buildRewrites();
+
             }
         }
 
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 d31a2f7..33cde6d 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
@@ -51,7 +51,7 @@
             beans = BeansFactory.getKustvaktContext();
         if (policydao == null | resourcedaos == null) {
             ResourceFinder.policydao = beans.getPolicyDbProvider();
-            for (ResourceOperationIface iface : beans.getResourceProvider())
+            for (ResourceOperationIface iface : beans.getResourceProviders())
                 resourcedaos.put(iface.type(), iface);
         }
         if (policydao == null | resourcedaos.isEmpty())
diff --git a/src/main/java/de/ids_mannheim/korap/security/ac/SecurityManager.java b/src/main/java/de/ids_mannheim/korap/security/ac/SecurityManager.java
index 0bf367c..059d33b 100644
--- a/src/main/java/de/ids_mannheim/korap/security/ac/SecurityManager.java
+++ b/src/main/java/de/ids_mannheim/korap/security/ac/SecurityManager.java
@@ -70,7 +70,7 @@
             SecurityManager.crypto = beans.getEncryption();
             SecurityManager.handlers = new HashMap<>();
             Collection<ResourceOperationIface> providers = beans
-                    .getResourceProvider();
+                    .getResourceProviders();
             for (ResourceOperationIface op : providers)
                 SecurityManager.handlers.put(op.type(), op);
         }
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 f7387c4..918650a 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
@@ -13,7 +13,6 @@
 import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
 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;
@@ -546,12 +545,12 @@
             settings.readDefaults(safeMap);
             settings.checkRequired();
 
-            UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                    userdatadaos, UserDetails.class);
+            UserDataDbIface dao = BeansFactory.getTypeFactory()
+                    .getTypeInterfaceBean(userdatadaos, UserDetails.class);
             assert dao != null;
             dao.store(details);
-            dao = BeansFactory.getTypeFactory().getTypedBean(userdatadaos,
-                    UserSettings.class);
+            dao = BeansFactory.getTypeFactory().getTypeInterfaceBean(
+                    userdatadaos, UserSettings.class);
             assert dao != null;
             dao.store(settings);
         }
@@ -586,8 +585,8 @@
         d.readDefaults(attributes);
         d.checkRequired();
 
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                userdatadaos, UserDetails.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(userdatadaos, UserDetails.class);
         assert dao != null;
         dao.store(d);
 
@@ -595,7 +594,7 @@
         s.readDefaults(attributes);
         s.checkRequired();
 
-        dao = BeansFactory.getTypeFactory().getTypedBean(userdatadaos,
+        dao = BeansFactory.getTypeFactory().getTypeInterfaceBean(userdatadaos,
                 UserSettings.class);
         assert dao != null;
         dao.store(d);
@@ -747,11 +746,10 @@
             throws WrappedException {
 
         try {
-            UserDataDbIface<T> dao = BeansFactory
-                    .getTypeFactory()
-                    .getTypedBean(
-                            BeansFactory.getKustvaktContext().getUserDataDaos(),
-                            clazz);
+            UserDataDbIface<T> dao = BeansFactory.getTypeFactory()
+                    .getTypeInterfaceBean(
+                            BeansFactory.getKustvaktContext()
+                                    .getUserDataProviders(), clazz);
             T data = null;
             if (dao != null)
                 data = dao.get(user);
@@ -775,9 +773,10 @@
         try {
 
             data.validate(this.crypto);
-            UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                    BeansFactory.getKustvaktContext().getUserDataDaos(),
-                    data.getClass());
+            UserDataDbIface dao = BeansFactory.getTypeFactory()
+                    .getTypeInterfaceBean(
+                            BeansFactory.getKustvaktContext()
+                                    .getUserDataProviders(), data.getClass());
             if (dao != null)
                 dao.update(data);
         }
diff --git a/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
index cae83af..c2768b4 100644
--- a/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
+++ b/src/main/java/de/ids_mannheim/korap/user/UserdataFactory.java
@@ -32,7 +32,7 @@
     public static UserDataDbIface getDaoInstanceFromBean (
             Class<? extends Userdata> type) {
         Collection<UserDataDbIface> daos = BeansFactory.getKustvaktContext()
-                .getUserDataDaos();
+                .getUserDataProviders();
         for (UserDataDbIface o : daos) {
             Type gtype = o.getClass().getGenericInterfaces()[0];
             if (gtype instanceof ParameterizedType) {
diff --git a/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java b/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
index 70207fe..8c94ee9 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
@@ -115,13 +115,14 @@
             set.readDefaults(vals);
             set.validate(crypto);
 
-            UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                    BeansFactory.getKustvaktContext().getUserDataDaos(),
-                    UserDetails.class);
+            UserDataDbIface dao = BeansFactory.getTypeFactory()
+                    .getTypeInterfaceBean(
+                            BeansFactory.getKustvaktContext()
+                                    .getUserDataProviders(), UserDetails.class);
             dao.store(det);
 
-            dao = BeansFactory.getTypeFactory().getTypedBean(
-                    BeansFactory.getKustvaktContext().getUserDataDaos(),
+            dao = BeansFactory.getTypeFactory().getTypeInterfaceBean(
+                    BeansFactory.getKustvaktContext().getUserDataProviders(),
                     UserSettings.class);
             dao.store(set);
         }
diff --git a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
index 7b3ec6a..03f051a 100644
--- a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
+++ b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
@@ -17,6 +17,7 @@
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -48,9 +49,6 @@
         KustvaktArgs kargs = new KustvaktArgs();
         for (int i = 0; i < args.length; i++) {
             switch ((args[i])) {
-                case "--debug":
-                    kargs.setDebug(true);
-                    break;
                 case "--config":
                     kargs.setConfig(args[i + 1]);
                     break;
@@ -93,32 +91,36 @@
             }
         }
         System.out.println("Found boot loading interfaces: " + list);
+
         while (!list.isEmpty()) {
-            for (BootableBeanInterface iface : new ArrayList<>(list)) {
+            loop: for (BootableBeanInterface iface : new ArrayList<>(list)) {
                 try {
+                    for (Class dep : iface.getDependencies()) {
+                        if (set.contains(dep))
+                            continue loop;
+                    }
                     iface.load(BeansFactory.getKustvaktContext());
+                    list.remove(iface);
+                    set.remove(iface.getClass());
+                    System.out.println("Done with interface "
+                            + iface.getClass().getSimpleName());
                 }
                 catch (KustvaktException e) {
                     // don't do anything!
                     System.out.println("An error occurred in class "
-                            + iface.getClass().getSimpleName() + "!\n" + e);
-                    continue;
+                            + iface.getClass().getSimpleName() + "!\n");
+                    System.exit(-1);
                 }
-                list.remove(iface);
-            }
-            if (!list.isEmpty()) {
-                System.out.println("Following bootup classes raised errors: "
-                        + list);
-                break;
             }
         }
-        AdminSetup.getInstance();
     }
 
 
     protected void startServer (KustvaktArgs kargs) {
-        if (kargs.init)
+        if (kargs.init) {
             runPreStart();
+            AdminSetup.getInstance();
+        }
 
         if (kargs.port == -1)
             kargs.setPort(BeansFactory.getKustvaktContext().getConfiguration()
@@ -162,6 +164,7 @@
         }
         catch (Exception e) {
             e.printStackTrace();
+            System.exit(-1);
         }
 
     }
@@ -169,7 +172,6 @@
     @Setter
     public static class KustvaktArgs {
 
-        private boolean debug;
         @Getter
         private String config;
         private int port;
@@ -181,7 +183,6 @@
         public KustvaktArgs () {
             this.port = -1;
             this.sslContext = null;
-            this.debug = false;
             this.config = null;
             this.init = false;
         }
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 dd29b09..e1a5278 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
@@ -462,8 +462,13 @@
         // fixme: should only apply to CQL queries per default!
         //        meta.addEntry("itemsPerResource", 1);
         serializer.setMeta(meta.raw());
-
-        String query = this.processor.processQuery(serializer.toJSON(), user);
+        String query;
+        try {
+            query = this.processor.processQuery(serializer.toJSON(), user);
+        }
+        catch (KustvaktException e) {
+            throw KustvaktResponseHandler.throwit(e);
+        }
 
         jlog.info("the serialized query {}", query);
 
@@ -696,7 +701,13 @@
         VirtualCollection tmp = resourceHandler.getCache(cache.getId(),
                 VirtualCollection.class);
         if (tmp == null) {
-            String query = this.processor.processQuery(cache.getData(), user);
+            String query;
+            try {
+                query = this.processor.processQuery(cache.getData(), user);
+            }
+            catch (KustvaktException e) {
+                throw KustvaktResponseHandler.throwit(e);
+            }
             String stats = searchKrill.getStatistics(query);
             cache.setStats(JsonUtils.readSimple(stats, Map.class));
             resourceHandler.cache(cache);
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 7c3b346..8bd7c88 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
@@ -101,14 +101,27 @@
         ss.setMeta(meta.raw());
         if (cq != null)
             ss.setCollection(cq);
-        return Response.ok(processor.processQuery(ss.toJSON(), null)).build();
+
+        String query;
+        try {
+            query = this.processor.processQuery(ss.toJSON(), null);
+        }
+        catch (KustvaktException e) {
+            throw KustvaktResponseHandler.throwit(e);
+        }
+        return Response.ok(query).build();
     }
 
 
     @POST
     @Path("search")
     public Response queryRaw (@QueryParam("engine") String engine, String jsonld) {
-        jsonld = processor.processQuery(jsonld, null);
+        try {
+            jsonld = processor.processQuery(jsonld, null);
+        }
+        catch (KustvaktException e) {
+            throw KustvaktResponseHandler.throwit(e);
+        }
         // todo: should be possible to add the meta part to the query serialization
         jlog.info("Serialized search: {}", jsonld);
 
@@ -142,7 +155,13 @@
         if (cq != null)
             serializer.setCollection(cq);
 
-        String query = processor.processQuery(serializer.toJSON(), null);
+        String query;
+        try {
+            query = this.processor.processQuery(serializer.toJSON(), null);
+        }
+        catch (KustvaktException e) {
+            throw KustvaktResponseHandler.throwit(e);
+        }
         jlog.info("the serialized query {}", query);
 
         // This may not work with the the KoralQuery
@@ -213,7 +232,12 @@
             //                meta.addEntry("itemsPerResource", 1);
             QuerySerializer s = new QuerySerializer().setQuery(query, ql, v)
                     .setMeta(meta.raw());
-            query = processor.processQuery(s.toJSON(), null);
+            try {
+                query = this.processor.processQuery(s.toJSON(), null);
+            }
+            catch (KustvaktException e) {
+                throw KustvaktResponseHandler.throwit(e);
+            }
         }
         String result;
         try {
diff --git a/src/main/resources/default-config.xml b/src/main/resources/default-config.xml
index 1b0c72c..62d5997 100644
--- a/src/main/resources/default-config.xml
+++ b/src/main/resources/default-config.xml
@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:p="http://www.springframework.org/schema/p"
        xmlns:util="http://www.springframework.org/schema/util"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns="http://www.springframework.org/schema/beans"
+       xmlns:cache="http://www.springframework.org/schema/cache"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                             http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                             http://www.springframework.org/schema/tx
@@ -15,8 +17,6 @@
                             http://www.springframework.org/schema/util
                             http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
-    <!--<cache:annotation-driven/>-->
-
     <bean id="props"
           class="org.springframework.beans.factory.config.PropertiesFactoryBean">
         <property name="ignoreResourceNotFound" value="true"/>
@@ -39,14 +39,14 @@
         </property>
     </bean>
 
-    <!--<bean id='cacheManager'-->
-    <!--class='org.springframework.cache.ehcache.EhCacheCacheManager'-->
-    <!--p:cacheManager-ref='ehcache'/>-->
+    <bean id='cacheManager'
+          class='org.springframework.cache.ehcache.EhCacheCacheManager'
+          p:cacheManager-ref='ehcache'/>
 
-    <!--<bean id='ehcache'-->
-    <!--class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'-->
-    <!--p:configLocation='classpath:ehcache.xml'-->
-    <!--p:shared='true'/>-->
+    <bean id='ehcache'
+          class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
+          p:configLocation='classpath:ehcache.xml'
+          p:shared='true'/>
 
     <!-- props are injected from default-config.xml -->
     <bean id="kustvakt_config"
@@ -87,16 +87,6 @@
         <property name="database" value="${jdbc.database}"/>
     </bean>
 
-    <bean id="kustvakt_userdetails"
-          class="de.ids_mannheim.korap.handlers.UserDetailsDao">
-        <constructor-arg ref="kustvakt_db"/>
-    </bean>
-
-    <bean id="kustvakt_usersettings"
-          class="de.ids_mannheim.korap.handlers.UserSettingsDao">
-        <constructor-arg ref="kustvakt_db"/>
-    </bean>
-
     <bean id="kustvakt_auditing"
           class="de.ids_mannheim.korap.handlers.JDBCAuditing">
         <constructor-arg ref="kustvakt_db"/>
@@ -107,18 +97,16 @@
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
-    <!--fixme: change name according to convention -->
-    <!--<bean id="collectionProvider"-->
-    <!--class="de.ids_mannheim.korap.handlers.CollectionDao">-->
-    <!--<constructor-arg ref="kustvakt_db"/>-->
-    <!--</bean>-->
-
-    <!--fixme: change name according to convention -->
-    <bean id="resourceProvider"
+    <bean id="resource_provider"
           class="de.ids_mannheim.korap.handlers.ResourceDao">
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
+    <bean id="document_provider"
+          class="de.ids_mannheim.korap.handlers.DocumentDao">
+        <constructor-arg ref="kustvakt_db"/>
+    </bean>
+
     <bean id="kustvakt_policies"
           class="de.ids_mannheim.korap.security.ac.PolicyDao">
         <constructor-arg ref="kustvakt_db"/>
@@ -173,13 +161,12 @@
     <bean id="userdata_details"
           class="de.ids_mannheim.korap.handlers.UserDetailsDao">
         <constructor-arg
-                type="de.ids_mannheim.korap.interfaces.db.PersistenceClient"
                 ref="kustvakt_db"/>
     </bean>
+
     <bean id="userdata_settings"
-          class="de.ids_mannheim.korap.handlers.UserDetailsDao">
+          class="de.ids_mannheim.korap.handlers.UserSettingsDao">
         <constructor-arg
-                type="de.ids_mannheim.korap.interfaces.db.PersistenceClient"
                 ref="kustvakt_db"/>
     </bean>
 
@@ -189,6 +176,13 @@
         <ref bean="userdata_settings"/>
     </util:list>
 
+
+    <util:list id="kustvakt_resources"
+               value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
+        <ref bean="document_provider"/>
+        <ref bean="resource_provider"/>
+    </util:list>
+
     <!-- specify type for constructor argument -->
     <bean id="kustvakt_authenticationmanager"
           class="de.ids_mannheim.korap.security.auth.KustvaktAuthenticationManager">
diff --git a/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java b/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java
index 266b784..5ddb6dd 100644
--- a/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java
+++ b/src/test/java/de/ids_mannheim/korap/config/BeanConfigTest.java
@@ -2,6 +2,7 @@
 
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import net.jcip.annotations.NotThreadSafe;
+import org.apache.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -28,13 +29,16 @@
 @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
 public abstract class BeanConfigTest {
 
+
+    private static Logger jlog = Logger.getLogger(BeanConfigTest.class);
+
     @Autowired
     private ApplicationContext context;
 
 
     public void init () throws Exception {
         assertNotNull("Application context must not be null!", this.context);
-        System.out.println("running one-time before init for class "
+        jlog.debug("running one-time before init for class "
                 + this.getClass().getSimpleName() + " ...");
         initMethod();
         BeansFactory.setKustvaktContext(helper().getContext());
diff --git a/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java b/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java
index ce4de02..192c561 100644
--- a/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java
+++ b/src/test/java/de/ids_mannheim/korap/config/LoaderTest.java
@@ -61,12 +61,12 @@
         while (!set.isEmpty()) {
             out_loop: for (BootableBeanInterface iface : new ArrayList<>(list)) {
                 try {
-                    System.out.println("Running boot instructions from class "
-                            + iface.getClass().getSimpleName());
                     for (Class cl : iface.getDependencies()) {
                         if (set.contains(cl))
                             continue out_loop;
                     }
+                    System.out.println("Running boot instructions from class "
+                            + iface.getClass().getSimpleName());
                     set.remove(iface.getClass());
                     list.remove(iface);
                     iface.load(helper().getContext());
diff --git a/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java b/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java
index d3bdc84..32e53d1 100644
--- a/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java
+++ b/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java
@@ -10,6 +10,7 @@
 import de.ids_mannheim.korap.user.UserDetails;
 import de.ids_mannheim.korap.user.UserSettings;
 import de.ids_mannheim.korap.user.Userdata;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -46,26 +47,32 @@
     }
 
 
-    //    @Test
+    @Test
+    @Ignore
     public void testUserdetailsGetNonExistent () throws KustvaktException {
         helper().setupSimpleAccount("userdbtest", "userdbTest");
         User user = helper().getContext().getUserDBHandler()
                 .getAccount("userdbtest");
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserDetails.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
+                        UserDetails.class);
         Userdata data = dao.get(user);
         assertNull(data);
         helper().dropUser("userdbtest");
     }
 
 
-    //    @Test
+    @Test
+    @Ignore
     public void testUserSettingsGetNonExistent () throws KustvaktException {
         helper().setupSimpleAccount("userdbtest", "userdbTest");
         User user = helper().getContext().getUserDBHandler()
                 .getAccount("userdbtest");
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserSettings.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
+                        UserSettings.class);
         Userdata data = dao.get(user);
         assertNull(data);
         helper().dropUser("userdbtest");
@@ -74,7 +81,8 @@
 
 
     // username cannot currently be changed
-    //    @Test
+    @Test
+    @Ignore
     public void updateUsername () throws KustvaktException {
         User user1 = helper().getContext().getUserDBHandler()
                 .getAccount(TestHelper.getUserCredentials()[0]);
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 227be22..90e37eb 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
@@ -46,7 +46,8 @@
 
 
     @Test
-    public void testCollectionNodeRemoveCorpusIdNoErrors () {
+    public void testCollectionNodeRemoveCorpusIdNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -68,7 +69,8 @@
 
 
     @Test
-    public void testCollectionNodeRemoveAllCorpusIdNoErrors () {
+    public void testCollectionNodeRemoveAllCorpusIdNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -88,7 +90,8 @@
 
 
     @Test
-    public void testCollectionNodeRemoveGroupedCorpusIdNoErrors () {
+    public void testCollectionNodeRemoveGroupedCorpusIdNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -111,7 +114,8 @@
 
     //fixme: will probably fail when one doc groups are being refactored
     @Test
-    public void testCollectionCleanEmptyDocGroupNoErrors () {
+    public void testCollectionCleanEmptyDocGroupNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -139,7 +143,8 @@
 
 
     @Test
-    public void testCollectionCleanMoveOneDocFromGroupUpNoErrors () {
+    public void testCollectionCleanMoveOneDocFromGroupUpNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -160,7 +165,8 @@
 
 
     @Test
-    public void testCollectionCleanEmptyGroupAndMoveOneFromGroupUpNoErrors () {
+    public void testCollectionCleanEmptyGroupAndMoveOneFromGroupUpNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -181,7 +187,8 @@
 
 
     @Test
-    public void testCollectionRemoveAndMoveOneFromGroupUpNoErrors () {
+    public void testCollectionRemoveAndMoveOneFromGroupUpNoErrors ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -251,7 +258,7 @@
 
 
     @Test
-    public void testRemoveCorpusFromDifferentGroups () {
+    public void testRemoveCorpusFromDifferentGroups () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
@@ -276,7 +283,8 @@
 
 
     @Test
-    public void testRemoveOneCorpusAndMoveDocFromTwoGroups () {
+    public void testRemoveOneCorpusAndMoveDocFromTwoGroups ()
+            throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         handler.add(CollectionConstraint.class);
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 8c0f1f0..b667796 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
@@ -53,7 +53,8 @@
 
 
     @Test
-    public void testDefaultFoundryInjectLemmaThrowsNoError () {
+    public void testDefaultFoundryInjectLemmaThrowsNoError ()
+            throws KustvaktException {
 
         KustvaktConfiguration c = helper().getBean(
                 ContextHolder.KUSTVAKT_CONFIG);
@@ -77,7 +78,7 @@
 
 
     @Test
-    public void testDefaultFoundryInjectPOSNoErrors () {
+    public void testDefaultFoundryInjectPOSNoErrors () throws KustvaktException {
 
         KustvaktConfiguration c = helper().getBean(
                 ContextHolder.KUSTVAKT_CONFIG);
@@ -115,8 +116,10 @@
         String result = handler.processQuery(s.toJSON(), user);
         JsonNode node = JsonUtils.readTree(result);
 
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserSettings.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
+                        UserSettings.class);
         UserSettings settings = (UserSettings) dao.get(user);
         assertTrue(settings.isValid());
         String pos = (String) settings.get(Attributes.DEFAULT_POS_FOUNDRY);
@@ -145,8 +148,10 @@
         String result = handler.processQuery(s.toJSON(), user);
         JsonNode node = JsonUtils.readTree(result);
 
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserSettings.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
+                        UserSettings.class);
         UserSettings settings = (UserSettings) dao.get(user);
         assertTrue(settings.isValid());
         String lemma = (String) settings.get(Attributes.DEFAULT_LEMMA_FOUNDRY);
@@ -161,7 +166,8 @@
 
 
     @Test
-    public void testFoundryInjectJoinedQueryNoErrors () {
+    public void testFoundryInjectJoinedQueryNoErrors ()
+            throws KustvaktException {
         KustvaktConfiguration c = helper().getBean(
                 ContextHolder.KUSTVAKT_CONFIG);
 
@@ -183,7 +189,8 @@
 
 
     @Test
-    public void testFoundryInjectGroupedQueryNoErrors () {
+    public void testFoundryInjectGroupedQueryNoErrors ()
+            throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
index 69e8ea7..b112b61 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/IdRewriteTest.java
@@ -16,7 +16,7 @@
 public class IdRewriteTest extends BeanConfigTest {
 
     @Test
-    public void insertTokenId () {
+    public void insertTokenId () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         assertTrue(handler.add(IdWriter.class));
@@ -34,7 +34,7 @@
 
 
     @Test
-    public void testIdWriterTest () {
+    public void testIdWriterTest () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         assertTrue(handler.add(IdWriter.class));
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 3cb528d..9458b0c 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
@@ -33,7 +33,7 @@
 
     // throws exception cause of missing configuration
     @Test(expected = RuntimeException.class)
-    public void testRewriteConfigThrowsException () {
+    public void testRewriteConfigThrowsException () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
@@ -43,7 +43,7 @@
 
 
     @Test
-    public void testRewriteNoBeanInject () {
+    public void testRewriteNoBeanInject () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler(helper().getContext()
                 .getConfiguration());
         QuerySerializer s = new QuerySerializer();
@@ -55,7 +55,7 @@
 
 
     @Test
-    public void testRewriteBeanInject () {
+    public void testRewriteBeanInject () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         QuerySerializer s = new QuerySerializer();
@@ -74,7 +74,7 @@
 
 
     @Test
-    public void testRewriteUserSpecific () {
+    public void testRewriteUserSpecific () throws KustvaktException {
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         QuerySerializer s = new QuerySerializer();
@@ -96,7 +96,8 @@
     public void initMethod () throws KustvaktException {
         helper().setupAccount();
         UserDataDbIface settingsdao = BeansFactory.getTypeFactory()
-                .getTypedBean(helper().getContext().getUserDataDaos(),
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
                         UserSettings.class);
         assertNotNull(settingsdao);
         UserSettings s = (UserSettings) settingsdao.get(helper().getUser());
diff --git a/src/test/java/de/ids_mannheim/korap/suites/DaoTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/DaoTestSuite.java
deleted file mode 100644
index fdd328d..0000000
--- a/src/test/java/de/ids_mannheim/korap/suites/DaoTestSuite.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package de.ids_mannheim.korap.suites;
-
-import de.ids_mannheim.korap.handlers.ResourceDaoTest;
-import de.ids_mannheim.korap.handlers.UserDaoTest;
-import de.ids_mannheim.korap.security.PolicyDaoTest;
-import de.ids_mannheim.korap.user.UserdataTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * @author hanl
- * @date 26/02/2016
- */
-
-@Deprecated
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ PolicyDaoTest.class, UserdataTest.class,
-        UserDaoTest.class, ResourceDaoTest.class })
-public class DaoTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java
deleted file mode 100644
index 9f3a05e..0000000
--- a/src/test/java/de/ids_mannheim/korap/suites/LoaderTestSuite.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package de.ids_mannheim.korap.suites;
-
-/**
- * @author hanl
- * @date 09/03/2016
- */
-
-import de.ids_mannheim.korap.config.CollectionLoaderTest;
-import de.ids_mannheim.korap.config.PolicyLoaderTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ PolicyLoaderTest.class, CollectionLoaderTest.class })
-public class LoaderTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java
deleted file mode 100644
index c3cceda..0000000
--- a/src/test/java/de/ids_mannheim/korap/suites/SecurityEntityTestSuite.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package de.ids_mannheim.korap.suites;
-
-import de.ids_mannheim.korap.security.PermissionBufferTest;
-import de.ids_mannheim.korap.security.PolicyBuilderTest;
-import de.ids_mannheim.korap.security.SecurityPolicyTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * @author hanl
- * @date 09/03/2016
- */
-// test object serialization and I/O buffers
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ PermissionBufferTest.class, PolicyBuilderTest.class,
-        SecurityPolicyTest.class })
-public class SecurityEntityTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java
deleted file mode 100644
index 45116b5..0000000
--- a/src/test/java/de/ids_mannheim/korap/suites/SecurityTestSuite.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package de.ids_mannheim.korap.suites;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * @author hanl
- * @date 09/03/2016
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({})
-public class SecurityTestSuite {}
diff --git a/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java b/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java
deleted file mode 100644
index e83e232..0000000
--- a/src/test/java/de/ids_mannheim/korap/suites/ServiceTestSuite.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package de.ids_mannheim.korap.suites;
-
-/**
- * @author hanl
- * @date 09/03/2016
- */
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({})
-public class ServiceTestSuite {
-
-}
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 9295cf3..d7a3bf4 100644
--- a/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
+++ b/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
@@ -92,13 +92,16 @@
 
     @Test
     public void testUserdatafactory () throws KustvaktException {
-        UserDataDbIface dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserDetails.class);
+        UserDataDbIface dao = BeansFactory.getTypeFactory()
+                .getTypeInterfaceBean(
+                        helper().getContext().getUserDataProviders(),
+                        UserDetails.class);
         assertNotNull(dao);
         assertEquals(UserDetailsDao.class, dao.getClass());
 
-        dao = BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), UserSettings.class);
+        dao = BeansFactory.getTypeFactory().getTypeInterfaceBean(
+                helper().getContext().getUserDataProviders(),
+                UserSettings.class);
         assertNotNull(dao);
         assertEquals(UserSettingsDao.class, dao.getClass());
 
@@ -107,8 +110,8 @@
 
     @Test(expected = RuntimeException.class)
     public void testUserdatafactoryError () throws KustvaktException {
-        BeansFactory.getTypeFactory().getTypedBean(
-                helper().getContext().getUserDataDaos(), new Userdata(1) {
+        BeansFactory.getTypeFactory().getTypeInterfaceBean(
+                helper().getContext().getUserDataProviders(), new Userdata(1) {
                     @Override
                     public String[] requiredFields () {
                         return new String[0];
diff --git a/src/test/resources/default-config.xml b/src/test/resources/default-config.xml
index f669953..3ad0aeb 100644
--- a/src/test/resources/default-config.xml
+++ b/src/test/resources/default-config.xml
@@ -21,8 +21,6 @@
                             http://www.springframework.org/schema/util
                             http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
-    <cache:annotation-driven/>
-
     <bean id="props"
           class="org.springframework.beans.factory.config.PropertiesFactoryBean">
         <property name="ignoreResourceNotFound" value="true"/>
@@ -67,7 +65,7 @@
           class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
           lazy-init="false">
         <property name="driverClassName" value="org.sqlite.JDBC"/>
-        <property name="url" value="jdbc:sqlite:tmp_new.sqlite"/>
+        <property name="url" value="jdbc:sqlite::memory:"/>
         <!--<property name="initialSize" value="1" />-->
         <!--<property name="maxTotal" value="1" />-->
         <!--<property name="maxIdle" value="1" />-->
@@ -116,17 +114,16 @@
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
-    <!--<bean id="collectionProvider"-->
-    <!--class="de.ids_mannheim.korap.handlers.CollectionDao">-->
-    <!--<constructor-arg ref="kustvakt_db"/>-->
-    <!--</bean>-->
-
-    <!--fixme: change name according to convention -->
-    <bean id="resourceProvider"
+    <bean id="resource_provider"
           class="de.ids_mannheim.korap.handlers.ResourceDao">
         <constructor-arg ref="kustvakt_db"/>
     </bean>
 
+    <bean id="document_provider"
+          class="de.ids_mannheim.korap.handlers.DocumentDao">
+        <constructor-arg ref="kustvakt_db"/>
+    </bean>
+
     <bean id="kustvakt_policies"
           class="de.ids_mannheim.korap.security.ac.PolicyDao">
         <constructor-arg ref="kustvakt_db"/>
@@ -184,7 +181,7 @@
                 ref="kustvakt_db"/>
     </bean>
     <bean id="userdata_settings"
-          class="de.ids_mannheim.korap.handlers.UserDetailsDao">
+          class="de.ids_mannheim.korap.handlers.UserSettingsDao">
         <constructor-arg
                 type="de.ids_mannheim.korap.interfaces.db.PersistenceClient"
                 ref="kustvakt_db"/>
@@ -196,6 +193,12 @@
         <ref bean="userdata_settings"/>
     </util:list>
 
+    <util:list id="kustvakt_resources"
+               value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
+        <ref bean="document_provider"/>
+        <ref bean="resource_provider"/>
+    </util:list>
+
 
     <!-- specify type for constructor argument -->
     <bean id="kustvakt_authenticationmanager"
