diff --git a/full/Changes b/full/Changes
index 65b5d4c..49d53bd 100644
--- a/full/Changes
+++ b/full/Changes
@@ -16,6 +16,8 @@
 11/12/2018
    - Implemented revoking all tokens of a user client via a super client
    (margaretha)   
+   - Removed document controllers and KustvaktResource (margaretha)
+
    
 # version 0.61.3
 17/10/2018
diff --git a/full/src/main/java/de/ids_mannheim/korap/cache/ResourceCache.java b/full/src/main/java/de/ids_mannheim/korap/cache/ResourceCache.java
deleted file mode 100644
index 45f0ce7..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/cache/ResourceCache.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package de.ids_mannheim.korap.cache;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-import de.ids_mannheim.korap.config.KustvaktCacheable;
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-
-/**
- * @author hanl
- * @date 23/03/2014
- * 
- * @author margaretha
- * @date 01/03/2018
- * 
- * EM: removed resource related code, keep cache
- */
-
-//todo: use interface (maybe a cachable interface?) and bean instanceing
-// todo: if cachable, data integrity needs to be checked! either remove caching or check integrity!
-@SuppressWarnings("all")
-public class ResourceCache extends KustvaktCacheable {
-
-    private static Logger jlog = LogManager.getLogger(ResourceCache.class);
-
-    public ResourceCache () {
-        super("resources", "key:resources");
-    }
-
-
-    @Deprecated
-    public <T extends KustvaktResource> T getCache (Object id, Class<T> cz) {
-        Element e = CacheManager.getInstance().getCache("resources").get(id);
-        if (e != null)
-            return (T) e.getObjectValue();
-        else
-            return null;
-    }
-
-
-    @Deprecated
-    public <R extends KustvaktResource> void cache (R resource) {
-        CacheManager.getInstance().getCache("resources")
-                .put(new Element(resource.getPersistentID(), resource));
-    }
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java b/full/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java
deleted file mode 100644
index 9cdc277..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/handlers/DocumentDao.java
+++ /dev/null
@@ -1,296 +0,0 @@
-package de.ids_mannheim.korap.handlers;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
-import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
-import de.ids_mannheim.korap.resources.Document;
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.utils.BooleanUtils;
-import de.ids_mannheim.korap.utils.StringUtils;
-import edu.emory.mathcs.backport.java.util.Collections;
-import org.springframework.dao.DataAccessException;
-import org.springframework.dao.EmptyResultDataAccessException;
-import org.springframework.jdbc.core.RowMapper;
-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;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author hanl
- * @date 05/11/2014
- */
-// todo: error handling
-@Deprecated
-public class DocumentDao implements ResourceOperationIface<Document> {
-
-    private NamedParameterJdbcTemplate jdbcTemplate;
-
-
-    public DocumentDao (PersistenceClient client) {
-        this.jdbcTemplate = (NamedParameterJdbcTemplate) client.getSource();
-    }
-
-
-    @Override
-    public Document findbyId (Integer id, User user) throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("id", id);
-        String sql = "select id, persistent_id, disabled, strftime('%s', created) as created from doc_store where id=:id";
-        try {
-            return this.jdbcTemplate.queryForObject(sql, s,
-                    new RowMapper<Document>() {
-                        @Override
-                        public Document mapRow (ResultSet rs, int rowNum)
-                                throws SQLException {
-                            Document doc = null;
-                            if (!rs.isClosed()) {
-                                String s = rs.getString("persistent_id");
-                                System.out.println("VALUE IS " + s);
-                                doc = new Document(rs
-                                        .getString("persistent_id"));
-                                doc.setId(rs.getInt("id"));
-                                doc.setCreated(rs.getTimestamp("created")
-                                        .getTime());
-                                doc.setDisabled(rs.getBoolean("disabled"));
-                            }
-
-                            return doc;
-                        }
-                    });
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    // todo: search for partial matches if entire document is disabled
-    // document id, consisting of corpus sigle, substring key and text number
-    @Override
-    public Document findbyId (String id, User user) throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("id", id);
-        s.addValue("docSigle", StringUtils.getDocSigle(id));
-
-        String sql = "select id, persistent_id, disabled, created from doc_store where persistent_id=:id or persistent_id like :docSigle;";
-        try {
-            return this.jdbcTemplate.queryForObject(sql, s,
-                    new RowMapper<Document>() {
-                        @Override
-                        public Document mapRow (ResultSet rs, int rowNum)
-                                throws SQLException {
-                            Document doc = null;
-                            if (!rs.isClosed()) {
-                                doc = new Document(rs
-                                        .getString("persistent_id"));
-                                doc.setId(rs.getInt("id"));
-                                doc.setCreated(rs.getLong("created"));
-                                doc.setDisabled(rs.getBoolean("disabled"));
-                            }
-
-                            return doc;
-                        }
-                    });
-        }
-        catch (EmptyResultDataAccessException em) {
-            return null;
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    @Override
-    public List<Document> findbyPartialId (String id, User user)
-            throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("id", id + "%");
-
-        String sql = "select id, persistent_id, disabled, created from doc_store where persistent_id like :id;";
-        try {
-            return this.jdbcTemplate.query(sql, s, new RowMapper<Document>() {
-                @Override
-                public Document mapRow (ResultSet rs, int rowNum)
-                        throws SQLException {
-                    Document doc = null;
-                    if (!rs.isClosed()) {
-                        doc = new Document(rs.getString("persistent_id"));
-                        doc.setId(rs.getInt("id"));
-                        doc.setCreated(rs.getLong("created"));
-                        doc.setDisabled(rs.getBoolean("disabled"));
-                    }
-
-                    return doc;
-                }
-            });
-        }
-        catch (EmptyResultDataAccessException em) {
-            return null;
-        }
-        catch (DataAccessException e) {
-            e.printStackTrace();
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    //todo:
-    @Override
-    public List<Document> getResources (Collection<Object> ids, User user)
-            throws KustvaktException {
-        return null;
-    }
-
-
-    @Override
-    public int updateResource (Document document, User user)
-            throws KustvaktException {
-        MapSqlParameterSource source = new MapSqlParameterSource();
-        source.addValue("pid", document.getPersistentID());
-        source.addValue("dis", BooleanUtils.getBoolean(document.isDisabled()));
-        final String sql = "UPDATE doc_store set disabled=:dis where persistent_id=:pid;";
-        try {
-            return this.jdbcTemplate.update(sql, source);
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    @Override
-    public int[] updateResources (List<Document> resources, User user)
-            throws KustvaktException {
-        return new int[0];
-    }
-
-
-    //todo: remove and introduce partial match search of persistent id!
-    @Deprecated
-    public List<Document> findbyCorpus (String corpus, int offset, int index)
-            throws KustvaktException {
-        MapSqlParameterSource source = new MapSqlParameterSource();
-        source.addValue("corpus", corpus + "%");
-        source.addValue("offset", (offset * index));
-        source.addValue("limit", offset);
-        final String sql = "select id, persistent_id, disabled, created from doc_store where (persistent_id like :corpus) limit :offset, :limit";
-        try {
-            return this.jdbcTemplate.query(sql, source,
-                    new RowMapper<Document>() {
-                        @Override
-                        public Document mapRow (ResultSet rs, int rowNum)
-                                throws SQLException {
-                            // todo: test on empty/closed resultset!
-                            if (!rs.isClosed()) {
-                                Document doc = new Document(rs
-                                        .getString("persistent_id"));
-                                doc.setId(rs.getInt("id"));
-                                doc.setCreated(rs.getTimestamp("created")
-                                        .getTime());
-                                doc.setDisabled(rs.getBoolean("disabled"));
-                                return doc;
-                            }
-                            return null;
-                        }
-                    });
-        }
-        catch (EmptyResultDataAccessException em) {
-            em.printStackTrace();
-            return Collections.emptyList();
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    @Deprecated
-    public List<String> findbyCorpus (String corpus, boolean disabled)
-            throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("corpus", corpus + "%");
-        s.addValue("dis", BooleanUtils.getBoolean(disabled));
-        String sql = "SELECT persistent_id FROM doc_store WHERE (persistent_id like :corpus) AND disabled=:dis;";
-        try {
-            return this.jdbcTemplate.queryForList(sql, s, String.class);
-        }
-        catch (EmptyResultDataAccessException em) {
-            em.printStackTrace();
-            return Collections.emptyList();
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-    }
-
-
-    // parent is disabled here
-    @Override
-    public int storeResource (Document resource, User user)
-            throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("id", resource.getPersistentID());
-        s.addValue("corpus", resource.getCorpus());
-        s.addValue("dis", BooleanUtils.getBoolean(resource.isDisabled()));
-
-        String sql = "INSERT INTO doc_store (persistent_id, disabled) VALUES (:id, :dis)";
-        try {
-            return this.jdbcTemplate.update(sql, s);
-        }
-        catch (DataAccessException e) {
-            e.printStackTrace();
-            throw new KustvaktException(StatusCodes.ILLEGAL_ARGUMENT,
-                    "illegal argument given", resource.getPersistentID());
-        }
-    }
-
-
-    @Override
-    public int deleteResource (String id, User user) throws KustvaktException {
-        MapSqlParameterSource s = new MapSqlParameterSource();
-        s.addValue("id", id);
-        String sql = "delete from doc_store where persistent_id=:id;";
-        try {
-            return this.jdbcTemplate.update(sql, s);
-        }
-        catch (DataAccessException e) {
-            throw new KustvaktException(StatusCodes.CONNECTION_ERROR);
-        }
-
-    }
-
-
-    @Override
-    public int size () {
-        return -1;
-    }
-
-
-    @Override
-    public int truncate () {
-        String sql = "delete from doc_store;";
-        try {
-            return this.jdbcTemplate.update(sql, new HashMap<String, Object>());
-        }
-        catch (DataAccessException e) {
-            return -1;
-        }
-    }
-
-
-    @Override
-    public Class<Document> type () {
-        return Document.class;
-    }
-
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/rewrite/FullRewriteHandler.java b/full/src/main/java/de/ids_mannheim/korap/rewrite/FullRewriteHandler.java
index b18ce0c..f4c2f49 100644
--- a/full/src/main/java/de/ids_mannheim/korap/rewrite/FullRewriteHandler.java
+++ b/full/src/main/java/de/ids_mannheim/korap/rewrite/FullRewriteHandler.java
@@ -4,7 +4,6 @@
 
 import de.ids_mannheim.korap.config.FullConfiguration;
 import de.ids_mannheim.korap.resource.rewrite.CollectionCleanRewrite;
-import de.ids_mannheim.korap.resource.rewrite.DocMatchRewrite;
 // import de.ids_mannheim.korap.resource.rewrite.IdWriter;
 import de.ids_mannheim.korap.resource.rewrite.RewriteHandler;
 
@@ -28,7 +27,6 @@
         this.addProcessor(vcRewrite);
         this.add(CollectionRewrite.class);
         // this.add(IdWriter.class);
-        this.add(DocMatchRewrite.class);
         this.add(CollectionCleanRewrite.class);
     }
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/DocumentController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/DocumentController.java
deleted file mode 100644
index ccd2b6d..0000000
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/DocumentController.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import java.util.List;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-
-import com.sun.jersey.spi.container.ResourceFilters;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.handlers.DocumentDao;
-import de.ids_mannheim.korap.resources.Document;
-import de.ids_mannheim.korap.server.KustvaktServer;
-import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.web.KustvaktResponseHandler;
-import de.ids_mannheim.korap.web.APIVersionFilter;
-import de.ids_mannheim.korap.web.filter.AdminFilter;
-
-/**
- * EM: To Do: restructure codes regarding service and controller layers
- * 
- * @author hanl
- * @date 19/11/2014
- */
-@Deprecated
-@Controller
-@Path("/v0.1/doc")
-@ResourceFilters({APIVersionFilter.class, AdminFilter.class })
-@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
-public class DocumentController {
-
-    @Autowired
-    private KustvaktResponseHandler kustvaktResponseHandler;
-
-    private static Logger jlog =
-            LogManager.getLogger(DocumentController.class);
-    private DocumentDao documentDao;
-
-
-    @POST
-    @Path("{doc}")
-    public Response store (@PathParam("doc") String docid,
-            @QueryParam("disabled") Boolean disabled) {
-        Document doc = new Document(docid);
-        doc.setDisabled(disabled);
-        try {
-            this.documentDao.storeResource(doc, null);
-        }
-        catch (KustvaktException e) {
-            throw kustvaktResponseHandler.throwit(e);
-        }
-        return Response.ok().build();
-    }
-
-
-    //todo: pipe add document to index endpoint
-
-    @GET
-    @Path("{corpus}")
-    public Response get (@PathParam("corpus") String corpus,
-            @QueryParam("index") Integer index,
-            @QueryParam("offset") Integer length) {
-        if (index == null) index = 1;
-        if (length == null) length = 25;
-        try {
-            List docs = this.documentDao.findbyCorpus(corpus, length, index);
-            //todo: serialize to document json
-            return Response.ok(JsonUtils.toJSON(docs)).build();
-        }
-        catch (KustvaktException e) {
-            throw kustvaktResponseHandler.throwit(e);
-        }
-    }
-
-}
diff --git a/full/src/main/resources/default-config.xml b/full/src/main/resources/default-config.xml
index d0c3576..948b2f7 100644
--- a/full/src/main/resources/default-config.xml
+++ b/full/src/main/resources/default-config.xml
@@ -241,10 +241,6 @@
 		<constructor-arg ref="kustvakt_db" />
 	</bean>
 
-	<bean id="document_provider" class="de.ids_mannheim.korap.handlers.DocumentDao">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean name="kustvakt_encryption" class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
 		<constructor-arg ref="kustvakt_config" />
 	</bean>
@@ -305,7 +301,6 @@
 
 	<util:list id="kustvakt_resources"
 		value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
-		<ref bean="document_provider" />
 	</util:list>
 
 	<!-- specify type for constructor argument -->
diff --git a/full/src/main/resources/lite-config.xml b/full/src/main/resources/lite-config.xml
deleted file mode 100644
index b342c59..0000000
--- a/full/src/main/resources/lite-config.xml
+++ /dev/null
@@ -1,182 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
-	xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans.xsd
-           http://www.springframework.org/schema/tx
-           http://www.springframework.org/schema/tx/spring-tx.xsd
-           http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context.xsd
-           http://www.springframework.org/schema/util
-           http://www.springframework.org/schema/util/spring-util.xsd">
-
-
-	<context:component-scan
-		base-package="de.ids_mannheim.korap.web.filter, de.ids_mannheim.korap.web.utils,
-		de.ids_mannheim.korap.authentication.http" />
-	<context:annotation-config />
-
-	<bean id="placeholders"
-		class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
-		<property name="ignoreResourceNotFound" value="true" />
-		<property name="locations">
-			<array>
-				<value>classpath:properties/lite-jdbc.properties</value>
-				<value>file:./lite-jdbc.properties</value>
-				<value>classpath:properties/hibernate.properties</value>
-				<value>classpath:kustvakt-lite.conf</value>
-				<value>file:./kustvakt-lite.conf</value>
-			</array>
-		</property>
-	</bean>
-
-	<bean id="properties"
-		class="org.springframework.beans.factory.config.PropertiesFactoryBean">
-		<property name="ignoreResourceNotFound" value="true" />
-		<property name="locations">
-			<array>
-				<value>classpath:kustvakt-lite.conf</value>
-				<value>file:./kustvakt-lite.conf</value>
-			</array>
-		</property>
-	</bean>
-
-	<bean id="config" class="de.ids_mannheim.korap.config.KustvaktConfiguration">
-		<constructor-arg index="0" name="properties" ref="properties" />
-	</bean>
-
-	<!-- Database -->
-
-	<bean id="sqliteDataSource"
-		class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
-		lazy-init="true">
-		<property name="driverClassName" value="${jdbc.driverClassName}" />
-		<property name="url" value="${jdbc.url}" />
-		<property name="username" value="${jdbc.username}" />
-		<property name="password" value="${jdbc.password}" />
-		<property name="connectionProperties">
-			<props>
-				<prop key="date_string_format">yyyy-MM-dd HH:mm:ss</prop>
-			</props>
-		</property>
-
-		<!-- relevant for single connection datasource and sqlite -->
-		<property name="suppressClose">
-			<value>true</value>
-		</property>
-		<!--<property name="initialSize" value="2"/> -->
-		<!--<property name="poolPreparedStatements" value="true"/> -->
-	</bean>
-
-	<bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
-		<property name="baselineOnMigrate" value="true" />
-		<!-- <property name="validateOnMigrate" value="false" /> -->
-		<!-- <property name="cleanOnValidationError" value="true" /> -->
-		<property name="locations" value="${jdbc.schemaPath}" />
-		<property name="dataSource" ref="sqliteDataSource" />
-	</bean>
-
-	<bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
-		<property name="dataSource" ref="sqliteDataSource" />
-
-		<property name="packagesToScan">
-			<array>
-				<value>de.ids_mannheim.korap.entity</value>
-				<value>de.ids_mannheim.korap.oauth2.entity</value>
-			</array>
-		</property>
-		<property name="jpaVendorAdapter">
-			<bean id="jpaVendorAdapter"
-				class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-				<property name="databasePlatform" value="${hibernate.dialect}" />
-			</bean>
-		</property>
-		<property name="jpaProperties">
-			<props>
-				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
-				<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
-				<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
-				<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
-				<prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache}
-				</prop>
-				<prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
-				<prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory}</prop>
-				<prop key="hibernate.jdbc.time_zone">${hibernate.jdbc.time_zone}</prop>
-			</props>
-		</property>
-	</bean>
-	<tx:annotation-driven proxy-target-class="true"
-		transaction-manager="transactionManager" />
-
-	<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
-		<property name="entityManagerFactory" ref="entityManagerFactory" />
-	</bean>
-
-	<bean id="transactionTemplate"
-		class="org.springframework.transaction.support.TransactionTemplate">
-		<constructor-arg ref="transactionManager" />
-	</bean>
-	<bean id="txManager"
-		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
-		<property name="dataSource" ref="sqliteDataSource" />
-	</bean>
-
-	<!-- Initialization -->
-	<bean id="initializator" class="de.ids_mannheim.de.init.LiteInitializatorImpl"
-		init-method="init">
-	</bean>
-	<bean id="annotationParser" class="de.ids_mannheim.korap.annotation.AnnotationParser"
-		scope="singleton" />
-
-	<!-- Krill -->
-	<bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill">
-		<constructor-arg value="${krill.indexDir}" />
-	</bean>
-
-	<!-- Filters -->
-	<bean id="APIVersionFilter" class="de.ids_mannheim.korap.web.APIVersionFilter"
-		scope="singleton" />
-
-	<!-- Authentication -->
-	<bean id="authenticationManager"
-		class="de.ids_mannheim.korap.authentication.DummyAuthenticationManager" />
-
-	<!-- Response handler -->
-	<bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
-		<constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
-	</bean>
-
-	<!-- Controllers -->
-	<bean id="annotationController"
-		class="de.ids_mannheim.korap.web.controller.AnnotationController" />
-	<bean id="searchController" class="de.ids_mannheim.korap.web.controller.SearchController" />
-	<bean id="statisticController"
-		class="de.ids_mannheim.korap.web.controller.StatisticController" />
-
-	<!-- Services -->
-	<bean id="annotationService" class="de.ids_mannheim.korap.service.AnnotationService"></bean>
-	<bean id="scopeService"
-		class="de.ids_mannheim.korap.oauth2.service.DummyOAuth2ScopeServiceImpl" />
-	<bean id="searchService" class="de.ids_mannheim.korap.service.SearchService"></bean>
-
-	<!-- DAO -->
-	<bean id="adminDao" class="de.ids_mannheim.korap.dao.DummyAdminDaoImpl" />
-	<bean id="annotationDao" class="de.ids_mannheim.korap.dao.AnnotationDao" />
-
-	<!-- DTO Converter -->
-	<bean id="annotationConverter" class="de.ids_mannheim.korap.dto.converter.AnnotationConverter" />
-
-	<!-- Rewrite -->
-	<bean id="rewriteHandler" class="de.ids_mannheim.korap.resource.rewrite.RewriteHandler">
-		<constructor-arg ref="config" />
-	</bean>
-
-
-
-	<bean id="kustvakt_auditing"
-		class="de.ids_mannheim.korap.interfaces.defaults.DefaultAuditing">
-	</bean>
-
-</beans>
\ No newline at end of file
diff --git a/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java b/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java
index bb1923d..7994ef5 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java
+++ b/full/src/test/java/de/ids_mannheim/korap/config/TestBeans.java
@@ -6,7 +6,6 @@
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 
 /**
@@ -21,8 +20,6 @@
 	
 	public  AuditingIface getAuditingDao();
 
-	public  List<ResourceOperationIface> getResourceDaos();
-
 	public  List<UserDataDbIface> getUserdataDaos();
 
 	public  EncryptionIface getCrypto();
diff --git a/full/src/test/java/de/ids_mannheim/korap/handlers/DocumentDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/handlers/DocumentDaoTest.java
deleted file mode 100644
index c19e0dc..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/handlers/DocumentDaoTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package de.ids_mannheim.korap.handlers;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.resources.Document;
-
-/**
- * @author hanl
- * @date 12/11/2015
- */
-@Ignore
-@Deprecated
-public class DocumentDaoTest extends BeanConfigTest {
-
-    @Autowired
-    private DocumentDao dao;
-
-
-    @After
-    public void clear () {
-        dao.truncate();
-    }
-
-
-    @Test
-    public void testSet () throws KustvaktException {
-        Document doc = new Document("BRZ13_APR.00001");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-    }
-
-
-    @Test
-    public void testGet () throws KustvaktException {
-        Document doc = new Document("BRZ13_APR.00002");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-        Document doc1 = dao.findbyId(doc.getPersistentID(), null);
-        assertNotNull(doc1);
-        assertTrue(doc.isDisabled());
-    }
-
-
-    @Test
-    public void testRemove () throws KustvaktException {
-        Document doc = new Document("BRZ13_APR.00003");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-        Document doc1 = dao.findbyId(doc.getPersistentID(), null);
-        assertEquals(1, dao.deleteResource(doc.getPersistentID(), null));
-        doc1 = dao.findbyId(doc.getPersistentID(), null);
-        Assert.assertNull(doc1);
-    }
-
-
-    @Test
-    public void testEmptyFind () throws KustvaktException {
-        List<String> dc = dao.findbyCorpus("WPD", true);
-        assertNotNull(dc);
-        assertEquals("should be empty", 0, dc.size());
-    }
-
-
-    @Test
-    public void testFindText () throws KustvaktException {
-        int length = 10;
-        for (int i = 0; i < length; i++) {
-            Document doc = new Document("WPD_APR.0000" + i);
-            doc.setDisabled(true);
-            dao.storeResource(doc, null);
-        }
-        List<String> dc = dao.findbyCorpus("WPD", true);
-
-        assertNotNull(dc);
-        assertNotSame("should not be empty", 0, dc.size());
-        assertEquals("not all found", length, dc.size());
-    }
-
-
-    @Test
-    public void testFindDocByText () throws KustvaktException {
-        Document doc = new Document("WPD_AAA", "WPD_AAA.02439");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-
-        Document dfind = dao.findbyId(doc.getPersistentID(), null);
-        assertNotNull(dfind);
-        assertEquals(doc.getPersistentID(), dfind.getPersistentID());
-    }
-
-
-    @Test
-    public void testFindDocByPartial () throws KustvaktException {
-        Document doc = new Document("WPD_AAA.02439");
-        doc.setDisabled(true);
-        Document doc1 = new Document("WPD_AAA.02343");
-        dao.storeResource(doc, null);
-        dao.storeResource(doc1, null);
-
-        List<Document> dfind = dao.findbyPartialId(doc.getDocSigle(), null);
-        assertNotNull(dfind);
-        assertNotEquals(0, dfind.size());
-        assertEquals(2, dfind.size());
-        assertEquals(doc.getDocSigle(), dfind.get(0).getDocSigle());
-
-        dfind = dao.findbyPartialId(doc.getCorpus(), null);
-        assertNotNull(dfind);
-        assertNotEquals(0, dfind.size());
-        assertEquals(2, dfind.size());
-        assertEquals(doc.getDocSigle(), dfind.get(0).getDocSigle());
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-        dao = new DocumentDao(helper().getContext().getPersistenceClient());
-    }
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/BeanInjectTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/BeanInjectTest.java
index 155e8be..c5814e4 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/BeanInjectTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/BeanInjectTest.java
@@ -9,10 +9,8 @@
 import org.springframework.aop.support.AopUtils;
 
 import de.ids_mannheim.korap.config.BeansFactory;
-import de.ids_mannheim.korap.handlers.DocumentDao;
 import de.ids_mannheim.korap.handlers.UserDetailsDao;
 import de.ids_mannheim.korap.handlers.UserSettingsDao;
-import de.ids_mannheim.korap.resources.Document;
 import de.ids_mannheim.korap.user.UserDetails;
 import de.ids_mannheim.korap.user.UserSettings;
 
@@ -37,17 +35,4 @@
         BeansFactory.closeApplication();
     }
 
-
-    @Test
-    public void testResourceBeans () {
-        BeansFactory.loadClasspathContext("test-config.xml");
-        Collection coll = BeansFactory.getKustvaktContext()
-                .getResourceProviders();
-        assertFalse(coll.isEmpty());
-        Object o = BeansFactory.getTypeFactory().getTypeInterfaceBean(coll,
-                Document.class);
-        assertEquals(DocumentDao.class, AopUtils.getTargetClass(o));
-
-        BeansFactory.closeApplication();
-    }
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
index 53e28df..32deec8 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/ResultRewriteTest.java
@@ -1,30 +1,19 @@
 package de.ids_mannheim.korap.resource.rewrite;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 
-import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 
-import com.fasterxml.jackson.databind.JsonNode;
-
 import de.ids_mannheim.korap.config.BeanConfigTest;
 import de.ids_mannheim.korap.config.TestVariables;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.handlers.DocumentDao;
-import de.ids_mannheim.korap.resources.Document;
+import de.ids_mannheim.korap.rewrite.CollectionRewrite;
 import de.ids_mannheim.korap.utils.JsonUtils;
-import net.sf.ehcache.CacheManager;
 
 /**
- * EM: To do: not implemented in the new DB yet
  * @author hanl
  * @date 12/11/2015
  */
-@Ignore
 public class ResultRewriteTest extends BeanConfigTest {
 
     @Override
@@ -32,63 +21,16 @@
 
     }
 
-
-    // otherwise cache will maintain values not relevant for other tests
-    @Before
-    public void before () {
-        CacheManager.getInstance().getCache("documents").removeAll();
-        DocumentDao dao = new DocumentDao(helper().getContext()
-                .getPersistenceClient());
-        dao.truncate();
-    }
-
-
     @Test
     public void testPostRewriteNothingToDo () throws KustvaktException {
         RewriteHandler ha = new RewriteHandler();
         ha.insertBeans(helper().getContext());
         assertEquals("Handler could not be added to rewrite handler instance!",
-                true, ha.add(DocMatchRewrite.class));
+                true, ha.add(CollectionRewrite.class));
 
-        DocumentDao dao = new DocumentDao(helper().getContext()
-                .getPersistenceClient());
-        Document d = dao.findbyId("BRZ13_APR.00014", null);
-        assertNull(d);
         String v = ha.processResult(TestVariables.RESULT, null);
         assertEquals("results do not match",
                 JsonUtils.readTree(TestVariables.RESULT), JsonUtils.readTree(v));
     }
 
-
-    @Test
-    public void testResultRewriteRemoveDoc () throws KustvaktException {
-        DocumentDao dao = new DocumentDao(helper().getContext()
-                .getPersistenceClient());
-
-        Document doc = new Document("WPD_AAA.02439");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-
-        RewriteHandler ha = new RewriteHandler();
-        ha.insertBeans(helper().getContext());
-        assertEquals("Handler could not be added to rewrite handler instance!",
-                true, ha.add(DocMatchRewrite.class));
-
-        JsonNode check = JsonUtils.readTree(TestVariables.RESULT);
-        assertNotNull(check);
-        int check_size = check.at("/matches").size();
-
-        String v = ha.processResult(TestVariables.RESULT, null);
-        JsonNode node = JsonUtils.readTree(v);
-
-        assertNotNull(node);
-        int size = node.at("/matches").size();
-        assertNotEquals("documents were not removed", check_size, size);
-        assertEquals("result does not contain required matches", 22, size);
-
-        dao.deleteResource(doc.getPersistentID(), null);
-        Document d = dao.findbyId(doc.getPersistentID(), null);
-        assertNull("document should not exist anymore!", d);
-    }
-
 }
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteBenchmarkTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteBenchmarkTest.java
deleted file mode 100644
index 405bd6b..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteBenchmarkTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package de.ids_mannheim.korap.resource.rewrite;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.joda.time.DateTime;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.test.annotation.DirtiesContext;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.config.TestVariables;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.handlers.DocumentDao;
-import de.ids_mannheim.korap.resources.Document;
-import de.ids_mannheim.korap.utils.JsonUtils;
-import de.ids_mannheim.korap.utils.TimeUtils;
-
-/** EM: DocumentDao is not available anymore.
- * Created by hanl on 30.05.16.
- */
-@Deprecated
-@Ignore
-public class RewriteBenchmarkTest extends BeanConfigTest {
-
-
-    private static int THRESHOLD = 1000;
-
-
-    @Test
-    public void testDocMatchRewriteByTextSigle () throws KustvaktException {
-        DocumentDao dao = new DocumentDao(helper().getContext()
-                .getPersistenceClient());
-
-        int i = 999;
-        for (int j = 100; j < i; j++) {
-            Document doc = new Document("WPD_AAA.02" + j);
-            doc.setDisabled(true);
-            dao.storeResource(doc, null);
-        }
-        RewriteHandler ha = new RewriteHandler();
-        ha.insertBeans(helper().getContext());
-        assertEquals("Handler could not be added to rewrite handler instance!",
-                true, ha.add(DocMatchRewrite.class));
-
-        DateTime now = TimeUtils.getNow();
-        String v = ha.processResult(TestVariables.RESULT, null);
-        long diff = TimeUtils.calcDiff(now, new DateTime());
-        assertTrue(diff < THRESHOLD);
-        JsonNode node = JsonUtils.readTree(v);
-
-        JsonNode check = JsonUtils.readTree(TestVariables.RESULT);
-        assertNotNull(check);
-        int check_size = check.at("/matches").size();
-
-        assertNotNull(node);
-        int size = node.at("/matches").size();
-        assertNotEquals("documents were not removed", check_size, size);
-
-        dao.truncate();
-    }
-
-
-    @Test
-    public void testDocMatchRewriteByDocSigle () throws KustvaktException {
-        DocumentDao dao = new DocumentDao(helper().getContext()
-                .getPersistenceClient());
-
-        Document doc = new Document("WPD_AAA");
-        doc.setDisabled(true);
-        dao.storeResource(doc, null);
-
-        RewriteHandler ha = new RewriteHandler();
-        ha.insertBeans(helper().getContext());
-        assertEquals("Handler could not be added to rewrite handler instance!",
-                true, ha.add(DocMatchRewrite.class));
-
-        DateTime now = TimeUtils.getNow();
-        String v = ha.processResult(TestVariables.RESULT, null);
-        long diff = TimeUtils.calcDiff(now, new DateTime());
-        assertTrue(diff < THRESHOLD);
-        JsonNode node = JsonUtils.readTree(v);
-
-        JsonNode check = JsonUtils.readTree(TestVariables.RESULT);
-        assertNotNull(check);
-        int check_size = check.at("/matches").size();
-
-        assertNotNull(node);
-        int size = node.at("/matches").size();
-        assertNotEquals("documents were not removed", check_size, size);
-        assertEquals(0, size);
-        dao.truncate();
-    }
-
-
-    @Test
-    public void testCollectionRewriteInject () {
-
-    }
-
-
-    @Test
-    public void testCollectionRewriteRemoval () {
-
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {}
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
index 81430c6..67f74bd 100644
--- a/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandlerTest.java
@@ -25,7 +25,6 @@
  * @author hanl
  * @date 21/10/2015
  */
-@Ignore
 public class RewriteHandlerTest extends BeanConfigTest {
 
     @Test
@@ -33,7 +32,6 @@
         RewriteHandler handler = new RewriteHandler();
         handler.insertBeans(helper().getContext());
         assertTrue(handler.add(FoundryInject.class));
-        assertTrue(handler.add(DocMatchRewrite.class));
         assertTrue(handler.add(CollectionCleanRewrite.class));
         assertTrue(handler.add(IdWriter.class));
     }
@@ -95,18 +93,18 @@
                 node.at("/query/wrap/operands/1/foundry").asText());
     }
 
-
+ // EM: Fix me usersetting
     @Override
     public void initMethod () throws KustvaktException {
-        helper().setupAccount();
-        UserDataDbIface settingsdao = BeansFactory.getTypeFactory()
-                .getTypeInterfaceBean(
-                        helper().getContext().getUserDataProviders(),
-                        UserSettings.class);
-        assertNotNull(settingsdao);
-        UserSettings s = (UserSettings) settingsdao.get(helper().getUser());
-        s.setField(Attributes.DEFAULT_LEMMA_FOUNDRY, "tt_test");
-        settingsdao.update(s);
+//        helper().setupAccount();
+//        UserDataDbIface settingsdao = BeansFactory.getTypeFactory()
+//                .getTypeInterfaceBean(
+//                        helper().getContext().getUserDataProviders(),
+//                        UserSettings.class);
+//        assertNotNull(settingsdao);
+//        UserSettings s = (UserSettings) settingsdao.get(helper().getUser());
+//        s.setField(Attributes.DEFAULT_LEMMA_FOUNDRY, "tt_test");
+//        settingsdao.update(s);
     }
 
 
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index a0bc2ce..00361de 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -220,10 +220,6 @@
 		<constructor-arg ref="kustvakt_db" />
 	</bean>
 
-	<bean id="document_provider" class="de.ids_mannheim.korap.handlers.DocumentDao">
-		<constructor-arg ref="kustvakt_db" />
-	</bean>
-
 	<bean name="kustvakt_encryption" class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
 		<constructor-arg ref="kustvakt_config" />
 	</bean>
@@ -288,7 +284,6 @@
 
 	<util:list id="kustvakt_resources"
 		value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
-		<ref bean="document_provider" />
 	</util:list>
 
 	<!-- specify type for constructor argument -->
