diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java
new file mode 100644
index 0000000..91cf76f
--- /dev/null
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroup.java
@@ -0,0 +1,32 @@
+package de.ids_mannheim.korap.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Entity
+@Table(name = "user_group")
+public class UserGroup {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private int id;
+    @Column(name = "name")
+    private String name;
+    @Column(name = "owner_id")
+    private int ownerId;
+    
+    @Override
+    public String toString () {
+        return "id=" + id + ", name= " + name + ", ownerId= "
+                + ownerId;
+    }
+}
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java
new file mode 100644
index 0000000..9f1389f
--- /dev/null
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/UserGroupMember.java
@@ -0,0 +1,33 @@
+package de.ids_mannheim.korap.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Entity
+@Table(name = "user_group_member")
+public class UserGroupMember {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private int id;
+    @Column(name = "group_id")
+    private int groupId;
+    @Column(name = "user_id")
+    private int userId;
+    private String status;
+    
+    @Override
+    public String toString () {
+        return "id=" + id + ", groupId= " + groupId + ", userId= "
+                + userId;
+    }
+}
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
new file mode 100644
index 0000000..dd050fc
--- /dev/null
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpus.java
@@ -0,0 +1,42 @@
+package de.ids_mannheim.korap.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Entity
+@Table(name = "virtual_corpus")
+public class VirtualCorpus {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private int id;
+    private String name;
+    private String type;
+    private String status;
+    private String description;
+    @Column(name = "required_access")
+    private String requiredAccess;
+    @Column(name = "collection_query")
+    private String collectionQuery;
+    private String definition;
+    @Column(name = "owner_id")
+    private String ownerId;
+
+
+    @Override
+    public String toString () {
+        return "id=" + id + ", name= " + name + ", type= " + type + ", status= "
+                + status + ", description=" + description + ", requiredAccess="
+                + requiredAccess + ", collectionQuery= " + collectionQuery
+                + ", definition= " + definition + ", ownerId= " + ownerId;
+    }
+}
diff --git a/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccessGroup.java b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccessGroup.java
new file mode 100644
index 0000000..9b4ba9a
--- /dev/null
+++ b/full/src/main/java/de/ids_mannheim/korap/entity/VirtualCorpusAccessGroup.java
@@ -0,0 +1,33 @@
+package de.ids_mannheim.korap.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+@Entity
+@Table(name = "vc_access_group")
+public class VirtualCorpusAccessGroup {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private int id;
+    @Column(name = "vc_id")
+    private int virtualCorpusId;
+    @Column(name = "group_id")
+    private int groupId;
+
+
+    @Override
+    public String toString () {
+        return "id=" + id + ", virtualCorpusId= " + virtualCorpusId + ", groupId= "
+                + groupId;
+    }
+}
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/service/full/SearchService.java b/full/src/main/java/de/ids_mannheim/korap/web/service/full/SearchService.java
index 8dde18a..b6e23e3 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/service/full/SearchService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/service/full/SearchService.java
@@ -112,6 +112,7 @@
      * @param type
      * @return valid resources in json format
      */
+    @Deprecated
     @GET
     @Path("{type}")
     public Response getResources (@Context Locale locale,
@@ -502,7 +503,6 @@
     }
 
 
-    @SuppressWarnings("unchecked")
     @GET
     @Path("search")
     public Response search (
@@ -664,65 +664,6 @@
         }
     }
 
-    
-
-    // EM: what is child?
-    @GET
-    @Path("{type}/{id}/{child}/statistics")
-    @Deprecated
-    public Response getStatisticsbyIdChild (@Context SecurityContext context,
-            @Context Locale locale, @PathParam("type") String type,
-            @PathParam("id") String id, @PathParam("child") String child) {
-        return getStatisticsbyId(context, locale, type,
-                StringUtils.joinResources(id, child));
-    }
-
-
-    @GET
-    @Path("{type}/{id}/stats")
-    @Deprecated
-    public Response getStatisticsbyId (@Context SecurityContext context,
-            @Context Locale locale, @PathParam("type") String type,
-            @PathParam("id") String id) {
-        TokenContext ctx = (TokenContext) context.getUserPrincipal();
-        type = StringUtils.normalize(type);
-        id = StringUtils.decodeHTML(id);
-
-        try {
-            Class sl = ResourceFactory.getResourceClass(type);
-            if (!VirtualCollection.class.equals(sl) & !Corpus.class.equals(sl))
-                throw KustvaktResponseHandler.throwit(
-                        StatusCodes.ILLEGAL_ARGUMENT,
-                        "Requested Resource type not supported", type);
-
-            User user = controller.getUser(ctx.getUsername());
-            KustvaktResource resource;
-            if (StringUtils.isInteger(id))
-                resource = this.resourceHandler.findbyIntId(Integer.valueOf(id),
-                        user);
-            else
-                resource = this.resourceHandler.findbyStrId(id, user,
-                        ResourceFactory.getResourceClass(type));
-
-            // todo ?!
-            KoralCollectionQueryBuilder query = new KoralCollectionQueryBuilder();
-            if (resource instanceof VirtualCollection) {
-                query.setBaseQuery(resource.getData());
-            }
-            else if (resource instanceof Corpus) {
-                query.with(Attributes.CORPUS_SIGLE + "=" + resource.getName());
-            }
-            String res = query.toJSON();
-            String qstr = processor.processQuery(res, user);
-            return Response.ok(searchKrill.getStatistics(qstr)).build();
-        }
-        catch (KustvaktException e) {
-            jlog.error("Exception encountered: {}", e.string());
-            throw KustvaktResponseHandler.throwit(e);
-        }
-    }
-
-
     /**
      * @param context
      * @param locale
@@ -771,6 +712,7 @@
 
     // EM: this handles layer id containing a slash. 
     // Probably better to restrict the id not to contain any slash instead.
+    @Deprecated
     @POST
     @Path("{type}/{id}/{child}")
     public Response updateResource (@Context SecurityContext context,
@@ -783,6 +725,7 @@
     }
 
 
+    @Deprecated
     @POST
     @Path("{type}/{id}")
     public Response updateResource (@Context SecurityContext context,
@@ -832,7 +775,7 @@
         return Response.ok().build();
     }
 
-
+    @Deprecated
     // todo: change or deprecate
     @POST
     @Path("nv/{type}")
@@ -927,6 +870,7 @@
      * @return
      * @throws KustvaktException
      */
+    @Deprecated
     @POST
     @Path("{type}")
     public Response storeResource (@Context SecurityContext context,
@@ -1022,7 +966,7 @@
                 StringUtils.joinResources(id, child));
     }
 
-
+    @Deprecated
     @DELETE
     @Path("{type}/{id}")
     public Response deleteResource (@Context SecurityContext context,
@@ -1046,32 +990,6 @@
         return Response.ok().build();
     }
 
-    // EM: legacy support
-    // should be deprecated after a while
-    /*
-    @GET
-    @Path("/corpus/{corpusId}/{docId}/{matchId}/matchInfo")
-    public Response getMatchInfo (@Context SecurityContext ctx,
-            @Context Locale locale, @PathParam("corpusId") String corpusId,
-            @PathParam("docId") String docId,
-            @PathParam("matchId") String matchId,
-            @QueryParam("foundry") Set<String> foundries,
-            @QueryParam("layer") Set<String> layers,
-            @QueryParam("spans") Boolean spans) throws KustvaktException {
-    	
-    	String[] ids = docId.split("\\.");
-    	if (ids.length !=2){
-    		throw KustvaktResponseHandler.throwit(
-    				new KustvaktException(StatusCodes.PARAMETER_VALIDATION_ERROR, 
-    				docId + " format is wrong. Expected a fullstop between doc id "
-					+ "and text id"));
-    	}		
-    	return getMatchInfo(ctx, locale, corpusId, ids[0], ids[1], matchId, foundries, layers, spans);
-    	
-    }
-    */
-    
-    // fixme: only allowed for corpus?!
     @GET
     @Path("/corpus/{corpusId}/{docId}/{textId}/{matchId}/matchInfo")
     public Response getMatchInfo (
diff --git a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java b/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
index e86279d..546e1b4 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
@@ -32,7 +32,6 @@
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 import de.ids_mannheim.korap.resource.rewrite.RewriteHandler;
 import de.ids_mannheim.korap.utils.KoralCollectionQueryBuilder;
-import de.ids_mannheim.korap.utils.KustvaktLogger;
 import de.ids_mannheim.korap.web.ClientsHandler;
 import de.ids_mannheim.korap.web.SearchKrill;
 import de.ids_mannheim.korap.web.utils.KustvaktResponseHandler;
@@ -68,12 +67,14 @@
 
 
     public LightService () {
+        // Karang URI
         UriBuilder builder = UriBuilder.fromUri("http://10.0.10.13").port(9997);
         this.graphDBhandler = new ClientsHandler(builder.build());
     }
 
 
-    /**
+    /** Requires Karang (Neo4j search engine)
+     *  
      * @param query
      * @return response
      */
@@ -206,7 +207,7 @@
         }
         else
             result = searchKrill.search(query);
-        KustvaktLogger.QUERY_LOGGER.trace("The result set: {}", result);
+        jlog.debug("The result set: {}", result);
         return Response.ok(result).build();
     }
 
@@ -287,7 +288,7 @@
             throw KustvaktResponseHandler.throwit(500, e.getMessage(), null);
         }
 
-        KustvaktLogger.QUERY_LOGGER.trace("The result set: {}", result);
+        jlog.debug("The result set: {}", result);
         return Response.ok(result).build();
     }
 
