diff --git a/full/src/test/java/de/ids_mannheim/korap/config/TestHelper.java b/full/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
index 4a66f9c..efe2fd8 100644
--- a/full/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
+++ b/full/src/test/java/de/ids_mannheim/korap/config/TestHelper.java
@@ -50,9 +50,9 @@
         data.put(Attributes.LASTNAME, "user");
         data.put(Attributes.EMAIL, "test@ids-mannheim.de");
         data.put(Attributes.ADDRESS, "Mannheim");
-        data.put(Attributes.DEFAULT_LEMMA_FOUNDRY, "test_l");
-        data.put(Attributes.DEFAULT_POS_FOUNDRY, "test_p");
-        data.put(Attributes.DEFAULT_CONST_FOUNDRY, "test_const");
+        data.put(Attributes.DEFAULT_FOUNDRY_LEMMA, "test_l");
+        data.put(Attributes.DEFAULT_FOUNDRY_POS, "test_p");
+        data.put(Attributes.DEFAULT_FOUNDRY_CONSTITUENT, "test_const");
     }
 
     private ContextHolder beansHolder;
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java
index 630d290..e820f28 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/CollectionRewriteTest.java
@@ -13,10 +13,6 @@
 import de.ids_mannheim.korap.config.TestVariables;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.rewrite.CollectionCleanRewrite;
-import de.ids_mannheim.korap.rewrite.CollectionConstraint;
-import de.ids_mannheim.korap.rewrite.CollectionRewrite;
-import de.ids_mannheim.korap.rewrite.RewriteHandler;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
@@ -108,7 +104,6 @@
         JsonNode node = JsonUtils.readTree(handler.processQuery(result,
                 User.UserFactory.getUser("test_user")));
 
-
         assertNotNull(node);
         assertEquals("koral:docGroup", node.at("/collection/@type").asText());
         assertEquals(2, node.at("/collection/operands").size());
@@ -233,7 +228,6 @@
                 node.at("/collection/operands/1/operands/0/key").asText());
         assertEquals("textClass",
                 node.at("/collection/operands/1/operands/1/key").asText());
-        System.out.println(node);
         assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
                 .asText());
         assertEquals("availability(FREE)", node.at("/collection/rewrites/0/scope")
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
index dc80bbb..ee86fc2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/FoundryRewriteTest.java
@@ -5,42 +5,113 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
+import javax.ws.rs.core.MediaType;
+
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.ClientResponse.Status;
 
+import de.ids_mannheim.korap.authentication.http.HttpAuthorizationHandler;
+import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.rewrite.LayerMapper;
-import de.ids_mannheim.korap.rewrite.RewriteHandler;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
- * @author hanl
+ * @author hanl, margaretha
  * @date 18/06/2015
  */
-//todo: check position and information of rewrites!
+//MH todo: check position and information of rewrites!
 public class FoundryRewriteTest extends SpringJerseyTest {
 
-    private static String simple_add_query = "[pos=ADJA]";
-    private static String simple_rewrite_query = "[base=Haus]";
-    private static String complex_rewrite_query = "<c=INFC>";
-    private static String complex_rewrite_query2 = "[orth=laufe/i & base!=Lauf]";
-    private static String complex_rewrite_query3 = "[(base=laufen | base=gehen) & tt/pos=VVFIN]";
+//    private static String simple_add_query = "[pos=ADJA]";
+//    private static String simple_rewrite_query = "[base=Haus]";
+//    private static String complex_rewrite_query = "<c=INFC>";
+//    private static String complex_rewrite_query2 = "[orth=laufe/i & base!=Lauf]";
+//    private static String complex_rewrite_query3 = "[(base=laufen | base=gehen) & tt/pos=VVFIN]";
 
     @Autowired
     public KustvaktConfiguration config;
     @Autowired
     public RewriteHandler handler; 
+    @Autowired
+    private LayerMapper m;
+    
+    @Test
+    public void testSearchRewriteFoundryWithUserSetting () throws KustvaktException {
+        // create user setting
+        String json = "{\"pos-foundry\":\"opennlp\"}";
+        String username = "foundryRewriteTest";
+        String pathUsername = "~" + username;
+        ClientResponse response = resource().path(API_VERSION)
+                .path(pathUsername).path("setting")
+                .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
+                        .createBasicAuthorizationHeaderValue(username, "pass"))
+                .type(MediaType.APPLICATION_JSON).entity(json)
+                .put(ClientResponse.class);
+
+        assertEquals(Status.CREATED.getStatusCode(), response.getStatus());
+
+        // search
+        response = resource().path(API_VERSION).path("search")
+                .queryParam("q", "[pos=ADJA]").queryParam("ql", "poliqarp")
+                .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
+                        .createBasicAuthorizationHeaderValue(username, "pass"))
+                .accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
+        
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String ent = response.getEntity(String.class);
+        JsonNode node = JsonUtils.readTree(ent);
+        assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
+        assertEquals("foundry",
+                node.at("/query/wrap/rewrites/0/scope").asText());
+
+    }
+
+    @Test
+    public void testRewritePosFoundryWithUserSetting ()
+            throws KustvaktException {
+        // EM: see
+        // full/src/main/resources/db/insert/V3.6__insert_default_settings.sql
+
+        String username = "bubbles";
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[pos=ADJA]", "poliqarp");
+        String result =
+                handler.processQuery(s.toJSON(), new KorAPUser(username));
+        JsonNode node = JsonUtils.readTree(result);
+        assertEquals("corenlp", node.at("/query/wrap/foundry").asText());
+        assertEquals("foundry",
+                node.at("/query/wrap/rewrites/0/scope").asText());
+
+    }
+
+    @Test
+    public void testRewriteLemmaFoundryWithUserSetting ()
+            throws KustvaktException {
+        String username = "bubbles";
+        QuerySerializer s = new QuerySerializer();
+        s.setQuery("[base=Haus]", "poliqarp");
+        String result =
+                handler.processQuery(s.toJSON(), new KorAPUser(username));
+        JsonNode node = JsonUtils.readTree(result);
+        // EM: only for testing, in fact, opennlp lemma does not
+        // exist!
+        assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
+        assertEquals("foundry",
+                node.at("/query/wrap/rewrites/0/scope").asText());
+    }
+    
     
     @Test
     public void testDefaultLayerMapperThrowsNoException () {
-        LayerMapper m = new LayerMapper(config);
-
         assertEquals(config.getDefault_lemma(), m.findFoundry("lemma"));
         assertEquals(config.getDefault_pos(), m.findFoundry("pos"));
         assertEquals(config.getDefault_token(), m.findFoundry("surface"));
@@ -48,14 +119,13 @@
         assertEquals(config.getDefault_const(), m.findFoundry("c"));
     }
 
-
     @Test
     public void testDefaultFoundryInjectLemmaThrowsNoError ()
             throws KustvaktException {
 
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[base=Haus]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), new KorAPUser());
+        String result = handler.processQuery(s.toJSON(), new KorAPUser("test"));
         JsonNode node = JsonUtils.readTree(result);
         assertNotNull(node);
         assertFalse(node.at("/query/wrap/foundry").isMissingNode());
@@ -73,7 +143,7 @@
 
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[pos=ADJA]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), new KorAPUser());
+        String result = handler.processQuery(s.toJSON(), new KorAPUser("test"));
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
@@ -86,79 +156,14 @@
                 .asText());
 
     }
-
-    // EM: Fix me usersetting
-//    @Test
-//    @Ignore
-//    public void testRewriteFoundryInjectPOSThrowsNoError ()
-//            throws KustvaktException {
-//        User user = helper().getUser();
-//
-//        RewriteHandler handler = new RewriteHandler();
-//        handler.insertBeans(helper().getContext());
-//        handler.add(FoundryInject.class);
-//        QuerySerializer s = new QuerySerializer();
-//        s.setQuery("[pos=ADJA]", "poliqarp");
-//        String result = handler.processQuery(s.toJSON(), user);
-//        JsonNode node = JsonUtils.readTree(result);
-//
-//        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);
-//
-//        assertNotNull(node);
-//        assertEquals("pos", node.at("/query/wrap/layer").asText());
-//        assertEquals(pos, node.at("/query/wrap/foundry").asText());
-//        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
-//        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
-//                .asText());
-//    }
-
-    // EM: Fix me usersetting
-//    @Test
-//    @Ignore
-//    public void testRewriteFoundryInjectLemmaThrowsNoError ()
-//            throws KustvaktException {
-//        KustvaktConfiguration c = helper().getBean(
-//                ContextHolder.KUSTVAKT_CONFIG);
-//        User user = helper().getUser();
-//
-//        RewriteHandler handler = new RewriteHandler();
-//        handler.insertBeans(helper().getContext());
-//        handler.add(FoundryInject.class);
-//        QuerySerializer s = new QuerySerializer();
-//        s.setQuery("[base=Haus]", "poliqarp");
-//        String result = handler.processQuery(s.toJSON(), user);
-//        JsonNode node = JsonUtils.readTree(result);
-//
-//        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);
-//
-//        assertNotNull(node);
-//        assertEquals("lemma", node.at("/query/wrap/layer").asText());
-//        assertEquals(lemma, node.at("/query/wrap/foundry").asText());
-//        assertFalse(node.at("/query/wrap/rewrites").isMissingNode());
-//        assertEquals("koral:rewrite", node.at("/query/wrap/rewrites/0/@type")
-//                .asText());
-//    }
-
-
+    
     @Test
     public void testFoundryInjectJoinedQueryNoErrors ()
             throws KustvaktException {
 
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=laufe/i & base!=Lauf]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), new KorAPUser());
+        String result = handler.processQuery(s.toJSON(), new KorAPUser("test"));
         JsonNode node = JsonUtils.readTree(result);
 
         assertNotNull(node);
@@ -175,9 +180,9 @@
             throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[(base=laufen | tt/pos=VVFIN)]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), new KorAPUser());
+        String result = handler.processQuery(s.toJSON(), new KorAPUser("test"));
         JsonNode node = JsonUtils.readTree(result);
-//        System.out.println("NODDE "+ node);
+
         assertNotNull(node);
         assertEquals("koral:termGroup", node.at("/query/wrap/@type").asText());
         assertFalse(node.at("/query/wrap/operands/0/foundry")
@@ -192,10 +197,9 @@
     public void testFoundryBaseRewrite() throws KustvaktException {
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=laufen]", "poliqarp");
-        String result = handler.processQuery(s.toJSON(), new KorAPUser());
+        String result = handler.processQuery(s.toJSON(), new KorAPUser("test"));
         JsonNode node = JsonUtils.readTree(result);
-        System.out.println("NODE "+ node);
-//        assertNotNull(node);
+
         assertEquals("koral:term", node.at("/query/wrap/@type").asText());
         assertFalse(node.at("/query/wrap/foundry")
                 .isMissingNode());
diff --git a/full/src/test/java/de/ids_mannheim/korap/rewrite/RewriteHandlerTest.java b/full/src/test/java/de/ids_mannheim/korap/rewrite/RewriteHandlerTest.java
index 9c33f31..135e209 100644
--- a/full/src/test/java/de/ids_mannheim/korap/rewrite/RewriteHandlerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/rewrite/RewriteHandlerTest.java
@@ -1,23 +1,14 @@
 package de.ids_mannheim.korap.rewrite;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import com.fasterxml.jackson.databind.JsonNode;
-
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.config.SpringJerseyTest;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
-import de.ids_mannheim.korap.rewrite.CollectionCleanRewrite;
-import de.ids_mannheim.korap.rewrite.FoundryInject;
-import de.ids_mannheim.korap.rewrite.IdWriter;
-import de.ids_mannheim.korap.rewrite.RewriteHandler;
-import de.ids_mannheim.korap.utils.JsonUtils;
 
 /** EM: to do: Fix tests
  *  New DB does not save users.
@@ -49,31 +40,32 @@
         handler.processQuery(s.toJSON(), null);
     }
 
-
-    @Test
-    public void testRewriteNoBeanInject () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler(config);
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String res = handler.processQuery(s.toJSON(), null);
-        assertNotNull(res);
-    }
-    
-    @Test
-    public void testRewriteBeanInject () throws KustvaktException {
-        RewriteHandler handler = new RewriteHandler(config);
-        QuerySerializer s = new QuerySerializer();
-        s.setQuery("[base=laufen | tt/pos=VVFIN]", "poliqarp");
-        assertTrue(handler.add(FoundryInject.class));
-        String res = handler.processQuery(s.toJSON(), null);
-        JsonNode node = JsonUtils.readTree(res);
-        assertNotNull(node);
-        assertEquals("tt", node.at("/query/wrap/operands/0/foundry")
-                .asText());
-        assertEquals("tt", node.at("/query/wrap/operands/1/foundry")
-                .asText());
-    }
+//    @Deprecated
+//    @Test
+//    public void testRewriteNoBeanInject () throws KustvaktException {
+//        RewriteHandler handler = new RewriteHandler(config);
+//        QuerySerializer s = new QuerySerializer();
+//        s.setQuery("[(base=laufen | base=gehen) & tt/pos=VVFIN]", "poliqarp");
+//        assertTrue(handler.add(FoundryInject.class));
+//        String res = handler.processQuery(s.toJSON(), null);
+//        assertNotNull(res);
+//    }
+//    
+//    @Deprecated
+//    @Test
+//    public void testRewriteBeanInject () throws KustvaktException {
+//        RewriteHandler handler = new RewriteHandler(config);
+//        QuerySerializer s = new QuerySerializer();
+//        s.setQuery("[base=laufen | tt/pos=VVFIN]", "poliqarp");
+//        assertTrue(handler.add(FoundryInject.class));
+//        String res = handler.processQuery(s.toJSON(), null);
+//        JsonNode node = JsonUtils.readTree(res);
+//        assertNotNull(node);
+//        assertEquals("tt", node.at("/query/wrap/operands/0/foundry")
+//                .asText());
+//        assertEquals("tt", node.at("/query/wrap/operands/1/foundry")
+//                .asText());
+//    }
 
     // EM: Fix me usersetting
 //    @Test
diff --git a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
index 970a698..c828b05 100644
--- a/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/user/UserdataTest.java
@@ -109,10 +109,10 @@
     public void testUserdataDefaultFields () throws KustvaktException {
         UserSettingProcessor settings = new UserSettingProcessor();
         Map<String, Object> m = new HashMap<>();
-        m.put(Attributes.DEFAULT_REL_FOUNDRY, "rel_1");
-        m.put(Attributes.DEFAULT_CONST_FOUNDRY, "const_1");
-        m.put(Attributes.DEFAULT_POS_FOUNDRY, "pos_1");
-        m.put(Attributes.DEFAULT_LEMMA_FOUNDRY, "lemma_1");
+        m.put(Attributes.DEFAULT_FOUNDRY_RELATION, "rel_1");
+        m.put(Attributes.DEFAULT_FOUNDRY_CONSTITUENT, "const_1");
+        m.put(Attributes.DEFAULT_FOUNDRY_POS, "pos_1");
+        m.put(Attributes.DEFAULT_FOUNDRY_LEMMA, "lemma_1");
         m.put(Attributes.PAGE_LENGTH, 10);
         m.put(Attributes.QUERY_LANGUAGE, "poliqarp");
         m.put(Attributes.METADATA_QUERY_EXPERT_MODUS, false);
@@ -121,10 +121,10 @@
 
         assertNotEquals(m.size(), settings.size());
         assertEquals(settings.defaultFields().length, settings.size());
-        assertEquals("rel_1", settings.get(Attributes.DEFAULT_REL_FOUNDRY));
-        assertEquals("pos_1", settings.get(Attributes.DEFAULT_POS_FOUNDRY));
-        assertEquals("lemma_1", settings.get(Attributes.DEFAULT_LEMMA_FOUNDRY));
-        assertEquals("const_1", settings.get(Attributes.DEFAULT_CONST_FOUNDRY));
+        assertEquals("rel_1", settings.get(Attributes.DEFAULT_FOUNDRY_RELATION));
+        assertEquals("pos_1", settings.get(Attributes.DEFAULT_FOUNDRY_POS));
+        assertEquals("lemma_1", settings.get(Attributes.DEFAULT_FOUNDRY_LEMMA));
+        assertEquals("const_1", settings.get(Attributes.DEFAULT_FOUNDRY_CONSTITUENT));
         assertEquals(10, settings.get(Attributes.PAGE_LENGTH));
 
     }
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
index c3fd0b4..880cc14 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserSettingControllerTest.java
@@ -28,12 +28,12 @@
  */
 public class UserSettingControllerTest extends SpringJerseyTest {
 
-    private String username = "~UserSettingTest";
-    private String username2 = "~UserSettingTest2";
+    private String username = "UserSettingTest";
+    private String username2 = "UserSettingTest2";
 
-    private ClientResponse sendPutRequest (String username,
+    public ClientResponse sendPutRequest (String username,
             Map<String, Object> map) throws KustvaktException {
-        ClientResponse response = resource().path(API_VERSION).path(username)
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
                 .path("setting")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username, "pass"))
@@ -45,10 +45,10 @@
 
     @Test
     public void testCreateSettingWithJson () throws KustvaktException {
-        String json = "{\"foundry\":\"opennlp\",\"metadata\":\"author title "
+        String json = "{\"pos-foundry\":\"opennlp\",\"metadata\":\"author title "
                 + "textSigle availability\",\"resultPerPage\":25}";
 
-        ClientResponse response = resource().path(API_VERSION).path(username)
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
                 .path("setting")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username, "pass"))
@@ -69,7 +69,7 @@
     public void testCreateSettingWithMap () throws KustvaktException {
 
         Map<String, Object> map = new HashMap<>();
-        map.put("foundry", "opennlp");
+        map.put("pos-foundry", "opennlp");
         map.put("resultPerPage", 25);
         map.put("metadata", "author title textSigle availability");
 
@@ -82,7 +82,7 @@
         testUpdateSetting(username2);
         testputRequestInvalidKey();
     }
-    
+
     @Test
     public void testputRequestInvalidKey () throws KustvaktException {
         Map<String, Object> map = new HashMap<>();
@@ -90,18 +90,19 @@
 
         ClientResponse response = sendPutRequest(username2, map);
         assertEquals(Status.BAD_REQUEST.getStatusCode(), response.getStatus());
-        
+
         JsonNode node = JsonUtils.readTree(response.getEntity(String.class));
-        assertEquals(StatusCodes.INVALID_ARGUMENT, node.at("/errors/0/0").asInt());
+        assertEquals(StatusCodes.INVALID_ARGUMENT,
+                node.at("/errors/0/0").asInt());
         assertEquals("key/", node.at("/errors/0/2").asText());
     }
-    
+
     @Test
     public void testPutDifferentUsername () throws KustvaktException {
-        String json = "{\"foundry\":\"opennlp\",\"metadata\":\"author title "
+        String json = "{\"pos-foundry\":\"opennlp\",\"metadata\":\"author title "
                 + "textSigle availability\",\"resultPerPage\":25}";
 
-        ClientResponse response = resource().path(API_VERSION).path(username)
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
                 .path("setting")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username2, "pass"))
@@ -117,7 +118,7 @@
 
     @Test
     public void testGetDifferentUsername () throws KustvaktException {
-        ClientResponse response = resource().path(API_VERSION).path(username)
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
                 .path("setting")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username2, "pass"))
@@ -132,8 +133,8 @@
 
     @Test
     public void testDeleteKeyDifferentUsername () throws KustvaktException {
-        ClientResponse response = resource().path(API_VERSION).path(username)
-                .path("setting").path("foundry")
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
+                .path("setting").path("pos-foundry")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username2, "pass"))
                 .delete(ClientResponse.class);
@@ -148,8 +149,8 @@
     private void testDeleteKey (String username, int numOfResult,
             String metadata) throws KustvaktException {
 
-        ClientResponse response = resource().path(API_VERSION).path(username)
-                .path("setting").path("foundry")
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
+                .path("setting").path("pos-foundry")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username, "pass"))
                 .delete(ClientResponse.class);
@@ -160,7 +161,7 @@
 
     private void testUpdateSetting (String username) throws KustvaktException {
         Map<String, Object> map = new HashMap<>();
-        map.put("foundry", "malt");
+        map.put("pos-foundry", "malt");
         map.put("resultPerPage", 15);
         map.put("metadata", "author title");
 
@@ -169,10 +170,10 @@
 
         testRetrieveSettings(username, "malt", 15, "author title");
     }
-    
-    private void testRetrieveSettings (String username, String foundry,
+
+    private void testRetrieveSettings (String username, String posFoundry,
             int numOfResult, String metadata) throws KustvaktException {
-        ClientResponse response = resource().path(API_VERSION).path(username)
+        ClientResponse response = resource().path(API_VERSION).path("~"+username)
                 .path("setting")
                 .header(Attributes.AUTHORIZATION, HttpAuthorizationHandler
                         .createBasicAuthorizationHeaderValue(username, "pass"))
@@ -181,11 +182,11 @@
 
         String entity = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(entity);
-        if (foundry == null) {
-            assertTrue(node.at("/foundry").isMissingNode());
+        if (posFoundry == null) {
+            assertTrue(node.at("/pos-foundry").isMissingNode());
         }
         else {
-            assertEquals(foundry, node.at("/foundry").asText());
+            assertEquals(posFoundry, node.at("/pos-foundry").asText());
         }
         assertEquals(numOfResult, node.at("/resultPerPage").asInt());
         assertEquals(metadata, node.at("/metadata").asText());
diff --git a/full/src/test/resources/kustvakt-test.conf b/full/src/test/resources/kustvakt-test.conf
index b1d9e21..ce12cff 100644
--- a/full/src/test/resources/kustvakt-test.conf
+++ b/full/src/test/resources/kustvakt-test.conf
@@ -29,12 +29,13 @@
 ## mail.templates
 template.group.invitation = notification.vm
 
-## default layers
-default.layer.partOfSpeech = tt
-default.layer.lemma = tt
-default.layer.orthography = opennlp
-default.layer.dependency = mate
-default.layer.constituent = corenlp
+## default foundries for specific layers
+default.foundry.partOfSpeech = tt
+default.foundry.lemma = tt
+default.foundry.orthography = opennlp
+default.foundry.dependency = malt
+default.foundry.constituent = corenlp
+default.foundry.morphology = marmot
 
 ## delete configuration (default hard)
 # delete.auto.group = hard
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index 6a19768..16f7ee3 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -196,8 +196,24 @@
 		<constructor-arg value="http,https" />
 	</bean>
 
-	<bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.FullRewriteHandler">
-		<constructor-arg ref="kustvakt_config" />
+	<!-- Rewrite -->
+	<bean id="foundryRewrite" class="de.ids_mannheim.korap.rewrite.FoundryRewrite"/>
+	<bean id="collectionRewrite" class="de.ids_mannheim.korap.rewrite.CollectionRewrite"/>
+	<bean id="collectionCleanRewrite" class="de.ids_mannheim.korap.rewrite.CollectionCleanRewrite"/>
+	<bean id="virtualCorpusRewrite" class="de.ids_mannheim.korap.rewrite.VirtualCorpusRewrite"/>
+	<bean id="collectionConstraint" class="de.ids_mannheim.korap.rewrite.CollectionConstraint"/>
+	
+	<util:list id="rewriteTasks"
+		value-type="de.ids_mannheim.korap.rewrite.RewriteTask">
+		<!-- <ref bean="collectionConstraint" />
+		<ref bean="collectionCleanRewrite" /> -->
+		<ref bean="foundryRewrite" />
+		<ref bean="collectionRewrite" />
+		<ref bean="virtualCorpusRewrite" />
+	</util:list>
+	
+	<bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.RewriteHandler">
+		<constructor-arg ref="rewriteTasks"/>
 	</bean>
 
 	<bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
diff --git a/full/src/test/resources/test-jdbc.properties b/full/src/test/resources/test-jdbc.properties
index bbf5f6b..da5fd57 100644
--- a/full/src/test/resources/test-jdbc.properties
+++ b/full/src/test/resources/test-jdbc.properties
@@ -7,5 +7,4 @@
 #jdbc.url=jdbc:sqlite:testDB.sqlite
 jdbc.username=pc
 jdbc.password=pc
-#jdbc.schemaPath=classpath:db.sqlite
-jdbc.schemaPath=classpath:db.sqlite, db.insert, db.predefined
\ No newline at end of file
+jdbc.schemaPath=classpath:db.sqlite, db.test, db.predefined
\ No newline at end of file
