diff --git a/src/main/java/de/ids_mannheim/korap/handlers/CollectionDao.java b/src/main/java/de/ids_mannheim/korap/handlers/CollectionDao.java
index c961813..56f79fa 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/CollectionDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/CollectionDao.java
@@ -25,7 +25,7 @@
 public class CollectionDao
         implements ResourceOperationIface<VirtualCollection> {
 
-    private static Logger log = KustvaktLogger.initiate(CollectionDao.class);
+    private static Logger log = KustvaktLogger.getLogger(CollectionDao.class);
     private BatchBuilder batchBuilder;
     protected final NamedParameterJdbcTemplate jdbcTemplate;
 
diff --git a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
index 77d4150..cbc102d 100644
--- a/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
+++ b/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
@@ -35,7 +35,7 @@
  */
 public class EntityDao implements EntityHandlerIface {
 
-    private static Logger jlog = KustvaktLogger.initiate(EntityDao.class);
+    private static Logger jlog = KustvaktLogger.getLogger(EntityDao.class);
     private NamedParameterJdbcTemplate jdbcTemplate;
 
     public EntityDao(PersistenceClient client) {
diff --git a/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java b/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
index 3627a4d..3f1835b 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
@@ -25,7 +25,7 @@
 
     private static DecimalFormat df = new DecimalFormat("#.#############");
     private static final DateTimeZone dtz = DateTimeZone.forID("Europe/Berlin");
-    private static Logger jlog = KustvaktLogger.initiate(TimeUtils.class);
+    private static Logger jlog = KustvaktLogger.getLogger(TimeUtils.class);
 
     public static int convertTimeToSeconds(String expirationVal) {
         expirationVal = expirationVal.trim();
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 621e87d..a70ef91 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
@@ -35,7 +35,7 @@
 @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
 public class LightService {
 
-    private static Logger jlog = KustvaktLogger.initiate(LightService.class);
+    private static Logger jlog = KustvaktLogger.getLogger(LightService.class);
 
     private SearchKrill searchKrill;
     private ClientsHandler graphDBhandler;
@@ -96,14 +96,14 @@
         ss.setMeta(meta);
         if (cq != null)
             ss.setCollection(cq);
-        return Response.ok(processor.apply(ss.toJSON(), null)).build();
+        return Response.ok(processor.preProcess(ss.toJSON(), null)).build();
     }
 
     @POST
     @Path("search")
     public Response queryRaw(@QueryParam("engine") String engine,
             String jsonld) {
-        jsonld = processor.apply(jsonld, null);
+        jsonld = processor.preProcess(jsonld, null);
         // todo: should be possible to add the meta part to the query serialization
         jlog.info("Serialized search: {}", jsonld);
 
@@ -137,7 +137,7 @@
         if (cq != null)
             serializer.setCollection(cq);
 
-        String query = processor.apply(serializer.toJSON(), null);
+        String query = processor.preProcess(serializer.toJSON(), null);
         jlog.info("the serialized query {}", query);
 
         // This may not work with the the KoralQuery
@@ -204,7 +204,7 @@
             //                meta.addEntry("itemsPerResource", 1);
             QuerySerializer s = new QuerySerializer().setQuery(query, ql, v)
                     .setMeta(meta);
-            query = processor.apply(s.toJSON(), null);
+            query = processor.preProcess(s.toJSON(), null);
         }
         String result;
         try {
