diff --git a/core/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java b/core/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
index 1dfe134..5e8aa36 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/BeanConfiguration.java
@@ -10,9 +10,7 @@
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
 import de.ids_mannheim.korap.interfaces.ValidatorIface;
 import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
-import de.ids_mannheim.korap.interfaces.db.PolicyHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.interfaces.defaults.ApacheValidator;
@@ -37,7 +35,6 @@
 
     public static final String KUSTVAKT_AUTHENTICATION_MANAGER = "kustvakt_authenticationmanager";
     public static final String KUSTVAKT_USERDB = "kustvakt_userdb";
-    public static final String KUSTVAKT_POLICIES = "kustvakt_policies";
 
     private static BeanHolderHelper beans;
 
@@ -174,15 +171,9 @@
 //        }
 
 
-        public EntityHandlerIface getUserDBHandler () {
-            return getBean(KUSTVAKT_USERDB);
-        }
-
-
-        public PolicyHandlerIface getPolicyDbProvider () {
-            return getBean(KUSTVAKT_POLICIES);
-        }
-
+//        public EntityHandlerIface getUserDBHandler () {
+//            return getBean(KUSTVAKT_USERDB);
+//        }
 
         public ValidatorIface getValidator()  {
             try {
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java b/core/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
index b32bb3b..0703cb5 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/ContextHolder.java
@@ -1,16 +1,19 @@
 package de.ids_mannheim.korap.config;
 
-import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.interfaces.ValidatorIface;
-import de.ids_mannheim.korap.interfaces.db.*;
-import de.ids_mannheim.korap.interfaces.defaults.ApacheValidator;
-import de.ids_mannheim.korap.web.CoreResponseHandler;
+import java.io.IOException;
+import java.util.Collection;
 
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.context.ApplicationContext;
 
-import java.io.IOException;
-import java.util.Collection;
+import de.ids_mannheim.korap.interfaces.EncryptionIface;
+import de.ids_mannheim.korap.interfaces.ValidatorIface;
+import de.ids_mannheim.korap.interfaces.db.AuditingIface;
+import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
+import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
+import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
+import de.ids_mannheim.korap.interfaces.defaults.ApacheValidator;
+import de.ids_mannheim.korap.web.CoreResponseHandler;
 
 /**
  * @author hanl
@@ -102,16 +105,10 @@
 //    }
 
 
-    public EntityHandlerIface getUserDBHandler () {
-        return getBean(KUSTVAKT_USERDB);
-    }
+//    public EntityHandlerIface getUserDBHandler () {
+//        return getBean(KUSTVAKT_USERDB);
+//    }
     
-    public PolicyHandlerIface getPolicyDbProvider () {
-        Object b = getBean(KUSTVAKT_POLICIES);
-        return (PolicyHandlerIface) b;
-    }
-
-
 //    public Collection<AuthenticationIface> getAuthProviders () {
 //        return getBean(KUSTVAKT_AUTHPROVIDERS);
 //    }
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
index 563e493..7198bdc 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -76,8 +76,6 @@
     private String default_token;
     private String default_dep;
     private String default_const;
-    @Deprecated    
-    private String policyConfig;
     private ArrayList<String> foundries;
     private ArrayList<String> layers;
     
diff --git a/core/src/main/java/de/ids_mannheim/korap/interfaces/db/PolicyHandlerIface.java b/core/src/main/java/de/ids_mannheim/korap/interfaces/db/PolicyHandlerIface.java
deleted file mode 100644
index fe20a25..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/interfaces/db/PolicyHandlerIface.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package de.ids_mannheim.korap.interfaces.db;
-
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.resources.Foundry;
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.security.Parameter;
-import de.ids_mannheim.korap.security.PolicyCondition;
-import de.ids_mannheim.korap.security.SecurityPolicy;
-import de.ids_mannheim.korap.user.User;
-
-import java.util.List;
-
-/**
- * User: hanl
- * Date: 10/31/13
- * Time: 3:01 PM
- */
-public interface PolicyHandlerIface {
-
-    /**
-     * @param policy
-     * @param user
-     * @throws KustvaktException
-     */
-    int createPolicy (SecurityPolicy policy, User user)
-            throws KustvaktException;
-
-
-    /**
-     * @param target
-     * @param user
-     * @param perm
-     * @return
-     */
-    List<SecurityPolicy>[] getPolicies (Integer target, User user, Byte perm);
-
-
-    List<SecurityPolicy> getPolicies (PolicyCondition condition,
-            Class<? extends KustvaktResource> clazz, Byte perm);
-    
-    List<SecurityPolicy> getPoliciesByPersistentId (PolicyCondition policyCondition,
-            Class<? extends KustvaktResource> clazz, byte perm, String id);
-
-    /**
-     * @param policy
-     * @return
-     * @throws KustvaktException
-     */
-    void mapConstraints (SecurityPolicy policy) throws KustvaktException;
-
-
-    /**
-     * @param target
-     * @param user
-     * @param perm
-     * @return
-     */
-    List<SecurityPolicy>[] getPolicies (String target, User user, Byte perm);
-
-
-    /**
-     * @param path
-     * @param user
-     * @param perm
-     * @return
-     */
-    // todo: refactor
-    List<SecurityPolicy>[] findPolicies (String path, User user, Byte perm);
-
-
-    /**
-     * @param path
-     * @param user
-     * @param b
-     * @param clazz
-     * @return
-     * @throws KustvaktException
-     */
-    List<KustvaktResource.Container> getDescending (String path, User user,
-            Byte b, Class<? extends KustvaktResource> clazz)
-            throws KustvaktException;
-
-
-    /**
-     * @param path
-     * @param user
-     * @param b
-     * @param clazz
-     * @return
-     * @throws KustvaktException
-     */
-    List<KustvaktResource.Container> getAscending (String path, User user,
-            Byte b, Class<? extends KustvaktResource> clazz)
-            throws KustvaktException;
-
-
-    /**
-     * @param id
-     * @param user
-     */
-    int deleteResourcePolicies (String id, User user) throws KustvaktException;
-
-
-    /**
-     * @param policy
-     * @param user
-     * @return
-     * @throws KustvaktException
-     */
-    int deletePolicy (SecurityPolicy policy, User user)
-            throws KustvaktException;
-
-
-    /**
-     * @param policy
-     * @param user
-     * @return
-     * @throws KustvaktException
-     */
-    int updatePolicy (SecurityPolicy policy, User user)
-            throws KustvaktException;
-
-
-    /**
-     * checks if a similar policy already exists
-     * 
-     * @param policy
-     * @return
-     * @throws KustvaktException
-     */
-    int checkPolicy (SecurityPolicy policy, User user) throws KustvaktException;
-
-
-    /**
-     * @param user
-     * @param name
-     * @param owner
-     * @return
-     * @throws KustvaktException
-     */
-    int matchCondition (User user, String name, boolean owner)
-            throws KustvaktException;
-
-
-    /**
-     * @param username
-     * @param condition
-     * @param admin
-     * @return
-     * @throws KustvaktException
-     */
-    int addToCondition (String username, PolicyCondition condition,
-            boolean admin) throws KustvaktException;
-
-
-    /**
-     * @param usernames
-     * @param condition
-     * @param status
-     * @throws KustvaktException
-     */
-
-    //todo: add a handler user id, to skip the matching step in the corpusmanagement segment!
-    int[] addToCondition (List<String> usernames, PolicyCondition condition,
-            boolean status) throws KustvaktException;
-
-
-    /**
-     * @param usernames
-     * @param condition
-     * @throws KustvaktException
-     */
-    void removeFromCondition (List<String> usernames, PolicyCondition condition)
-            throws KustvaktException;
-
-
-    /**
-     * @param param
-     * @throws KustvaktException
-     */
-    int createParamBinding (Parameter param) throws KustvaktException;
-
-
-    /**
-     * @param condition
-     * @return
-     * @throws KustvaktException
-     */
-    List<String> getUsersFromCondition (PolicyCondition condition)
-            throws KustvaktException;
-
-
-    /**
-     * @param policy
-     * @throws KustvaktException
-     */
-    int removeParamBinding (SecurityPolicy policy) throws KustvaktException;
-
-
-    int size ();
-
-
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/Parameter.java b/core/src/main/java/de/ids_mannheim/korap/security/Parameter.java
deleted file mode 100644
index c27f0cf..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/security/Parameter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.user.User;
-import lombok.Getter;
-
-/**
- * @author hanl@ids-mannheim.de
- * @date 09/11/14
- */
-@Getter
-public class Parameter extends KustvaktResource {
-
-    private String value;
-    private SecurityPolicy policy;
-    // todo: what is this supposed to do?
-    private boolean equal;
-
-
-    public Parameter (String identifier, String value, boolean equal, User user) {
-        super();
-        super.setName(identifier.toLowerCase());
-        this.value = value;
-        this.equal = equal;
-    }
-
-
-    @Override
-    public void merge (KustvaktResource resource) {}
-
-
-    @Override
-    public void checkNull () {}
-
-
-    public String getValue () {
-        if (policy == null)
-            return null;
-        return value;
-    }
-
-
-    public void setPolicy (SecurityPolicy policy) {
-        this.policy = policy;
-    }
-
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/PermissionsBuffer.java b/core/src/main/java/de/ids_mannheim/korap/security/PermissionsBuffer.java
deleted file mode 100644
index dc98264..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/security/PermissionsBuffer.java
+++ /dev/null
@@ -1,176 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.resources.Permissions;
-
-import java.nio.ByteBuffer;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * User: hanl
- * Date: 11/5/13
- * Time: 1:05 PM
- */
-public class PermissionsBuffer {
-
-    private byte[] bytes;
-
-
-    public PermissionsBuffer () {
-        this((short) 0);
-    }
-
-
-    public PermissionsBuffer (short perm) {
-        setByte(perm);
-    }
-
-
-    private void setByte (short perm) {
-        ByteBuffer b = ByteBuffer.allocate(2);
-        b.putShort(perm);
-        bytes = b.array();
-    }
-
-
-    public PermissionsBuffer (byte ... bytes) {
-        this.bytes = bytes;
-    }
-
-
-    public boolean containsPermission (Permissions.Permission p) {
-        return containsPByte(p.toByte());
-    }
-
-
-    public boolean containsPByte (byte perm) {
-        return (bytes[1] & perm) == perm;
-    }
-
-
-    public int addPermission (int b) {
-        short r = (short) (bytes[1] & b);
-        if ((bytes[1] & b) != b)
-            bytes[1] += b;
-        else
-            return -1;
-        return 0;
-    }
-
-
-    public void retain (int compare) {
-        short f = (short) (bytes[1] & compare);
-        ByteBuffer b = ByteBuffer.allocate(2);
-        b.putShort(f);
-        bytes = b.array();
-    }
-
-
-    public void addPermissions (Permissions.Permission ... perm) {
-        if (perm.length > 0) {
-            for (Permissions.Permission p : perm)
-                addPermission(p.toByte());
-        }
-    }
-
-
-    public void removePermission (Permissions.Permission perm) {
-        this.removePermission(perm.toByte());
-    }
-
-
-    public int removePermission (int b) {
-        if ((bytes[1] & b) != 0)
-            bytes[1] -= b;
-        else
-            return -1;
-        return 0;
-    }
-
-
-    @Deprecated
-    public int addOverride (int b) {
-        if ((bytes[0] & b) == 0)
-            bytes[0] += b;
-        else
-            return -1;
-        return 0;
-    }
-
-
-    public int removeOverride (int b) {
-        if ((bytes[0] & b) != 0)
-            bytes[0] -= b;
-        else
-            return -1;
-        return 0;
-    }
-
-
-    @Deprecated
-    public boolean isOverridable (int b) {
-        return (bytes[0] & b) != 0;
-    }
-
-
-    public boolean leftShift (byte perm) {
-        //        return pbyte & (perm << 1);
-        System.out.println("pbyte is: " + bytes[1]);
-        System.out.println("bitswise operation, left shift " + (perm << 1));
-        return false;
-    }
-
-
-    @Override
-    public boolean equals (Object perm) {
-        if (perm instanceof Byte)
-            return (bytes[1] & (byte) perm) == bytes[1];
-        else if (perm instanceof PermissionsBuffer) {
-            PermissionsBuffer b = (PermissionsBuffer) perm;
-            return (bytes[1] & b.bytes[1]) == bytes[1];
-        }
-        return false;
-    }
-
-
-    public short getBytes () {
-        ByteBuffer b = ByteBuffer.wrap(bytes);
-        return b.getShort();
-    }
-
-
-    public byte[] getByteArray () {
-        return bytes;
-    }
-
-
-    public Byte getPbyte () {
-        return this.bytes[1];
-    }
-
-
-    public Set<Permissions.Permission> getPermissions () {
-        Set<Permissions.Permission> pe = new HashSet<>();
-        for (Permissions.Permission p : Permissions.Permission.values()) {
-            if (containsPByte(p.toByte()))
-                pe.add(p);
-        }
-        return pe;
-    }
-
-
-    public byte getOverride () {
-        return this.bytes[0];
-    }
-
-
-    public String toBinary () {
-        StringBuilder sb = new StringBuilder(bytes.length * Byte.SIZE);
-        for (int i = 0; i < Byte.SIZE * bytes.length; i++) {
-            sb.append((bytes[i / Byte.SIZE] << i % Byte.SIZE & 0x80) == 0 ? '0'
-                    : '1');
-        }
-        return sb.toString();
-    }
-
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java b/core/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java
deleted file mode 100644
index a7adbf8..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/security/PolicyCondition.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.config.Attributes;
-import lombok.Getter;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * User: hanl
- * Date: 10/29/13
- * Time: 4:30 PM
- */
-@Getter
-public class PolicyCondition implements Comparable<PolicyCondition> {
-
-    private static Map<String, Object> stats = new HashMap<>();
-
-    static {
-        stats.put(Attributes.SYM_USE, -1);
-        stats.put(Attributes.COMMERCIAL, false);
-        //fixme: doesnt query only and export infer the same thing?
-        stats.put(Attributes.QUERY_ONLY, false);
-        stats.put(Attributes.EXPORT, false);
-        stats.put(Attributes.LICENCE, null);
-        stats.put(Attributes.RANGE, null);
-        //fixme: range is valuable in this context, but time span should remain in the policy context!
-        stats.put(Attributes.TIME_SPANS, null);
-    }
-
-    //todo: loadSubTypes these from database or configuration --> use id reference, rather than variable declaration
-
-    //todo: old regex for format gr(2323):  "(^[^\\(]+)\\((.*)\\)"
-    //    private static final Pattern p = Pattern.compile("\\((.*)\\)");
-    private final String specifier;
-    private String description;
-    private static final String EX_PRE = "ex:";
-    private Map<String, Object> flags;
-
-
-    public PolicyCondition (String target) {
-        // pattern to map extensionally created groups
-        this.specifier = target;
-        this.flags = new HashMap<>(stats);
-    }
-
-
-    public PolicyCondition () {
-        this(EX_PRE + createGroupName());
-    }
-
-
-    @Deprecated
-    //todo: do this in crypto bean!
-    private static String createGroupName () {
-        //        return Base64.encodeBase64String(SecureRGenerator
-        //                .getNextSecureRandom(64));
-        return "<new group name>";
-    }
-
-
-    public void setDescription (String description) {
-        this.description = description;
-    }
-
-
-    public void setFlag (String key, Object value) {
-        Object f = this.flags.get(key);
-        if (f != null && f.getClass().equals(value.getClass()))
-            this.flags.put(key, value);
-    }
-
-
-    public String getSpecifier () {
-        return this.specifier;
-    }
-
-
-    public boolean isExtensional () {
-        return getSpecifier().startsWith(EX_PRE);
-    }
-
-
-    @Override
-    public String toString () {
-        return "(" + this.specifier + ")";
-    }
-
-
-    @Override
-    public int compareTo (PolicyCondition o) {
-        return this.getSpecifier().compareTo(o.getSpecifier());
-    }
-
-
-    @Override
-    public boolean equals (Object o) {
-        if (this == o)
-            return true;
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        PolicyCondition that = (PolicyCondition) o;
-        return specifier.equals(that.specifier);
-    }
-
-
-    @Override
-    public int hashCode () {
-        return specifier.hashCode();
-    }
-
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/PolicyContext.java b/core/src/main/java/de/ids_mannheim/korap/security/PolicyContext.java
deleted file mode 100644
index 00e3067..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/security/PolicyContext.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.utils.IPNetMask;
-import de.ids_mannheim.korap.utils.TimeUtils;
-import lombok.Getter;
-
-import java.net.UnknownHostException;
-
-/**
- * @author hanl
- * @date 09/01/2014
- */
-@Getter
-public class PolicyContext {
-
-    // refers to a specific ip location
-    private String ipmask = "";
-    // this context is not like an environmental property (e.g. morning hours/ evening hours), but specifies absolute time
-    // parameters (e.g. from 10.04.2014 9:00 till 14..04.2014 active for testing).
-    // if the containing parameter do not meet, the policy will be deactivated. if no parameter where specified, the policy
-    // remains active
-    // specifies a start time for the policy to be activated
-    private long start = 0L;
-    // specifies a time up to which the policy stays active
-    private long end = 0L;
-
-
-    public PolicyContext () {
-        start = TimeUtils.getNow().getMillis();
-    }
-
-
-    public PolicyContext setIPMask (String ip) {
-        this.ipmask = ip;
-        return this;
-    }
-
-
-    public PolicyContext setExpirationTime (long limit) {
-        this.end = limit;
-        return this;
-    }
-
-
-    public PolicyContext setEnableTime (long start) {
-        this.start = start;
-        return this;
-    }
-
-
-    protected boolean isActive (String ipaddress) {
-        if (ipaddress == null)
-            return false;
-        if (noMask())
-            return true;
-        IPNetMask mask;
-        try {
-            mask = IPNetMask.getIPMask(this.ipmask);
-            boolean f = mask.matches(ipaddress);
-            return f;
-        }
-        catch (UnknownHostException e) {
-            e.printStackTrace();
-            return false;
-        }
-    }
-
-
-    protected boolean noMask () {
-        return ipmask == null || ipmask.isEmpty();
-    }
-
-
-    @Override
-    public String toString () {
-        return "PolicyContext{" + ", ipmask='" + ipmask + '\'' + ", start="
-                + start + ", end=" + end + '}';
-    }
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/security/SecurityPolicy.java b/core/src/main/java/de/ids_mannheim/korap/security/SecurityPolicy.java
deleted file mode 100644
index 51d73d8..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/security/SecurityPolicy.java
+++ /dev/null
@@ -1,316 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.resources.Permissions;
-import de.ids_mannheim.korap.user.User;
-import lombok.Getter;
-
-import java.util.*;
-
-/**
- * User: hanl
- * Date: 10/8/13
- * Time: 5:26 PM
- */
-
-// default is deny, but deny policies are allowed, when specifying a subset that would otherwise be allowed!
-// must be implemented as a resolution mechanism, that automatically creates this kind of policy strategy (allow > deny)
-
-public class SecurityPolicy {
-
-    private int id = 0;
-    // a settingattribute id for instance,
-    // which specifies the attribute to be protected by this policy
-    private String target;
-    // todo: change to set!
-    private List<PolicyCondition> conditions;
-    private Set<Integer> removedidx;
-    private Set<Integer> addedidx;
-    private PermissionsBuffer permissions;
-    private PolicyContext ctx;
-    private Integer creator;
-
-
-    public SecurityPolicy () {
-        this.setID(-1);
-        this.ctx = new PolicyContext();
-        this.conditions = new ArrayList<>();
-        this.removedidx = new HashSet<>();
-        this.addedidx = new HashSet<>();
-        this.permissions = new PermissionsBuffer();
-    }
-
-
-    public SecurityPolicy (Integer id) {
-        this();
-        this.setID(id);
-    }
-
-
-    public SecurityPolicy setID (Integer id) {
-        this.id = id;
-        return this;
-    }
-
-
-    public Integer getID () {
-        return this.id;
-    }
-
-
-    public Integer getCreator () {
-        return this.creator;
-    }
-
-
-    public PolicyContext getContext () {
-        return this.ctx;
-    }
-
-
-    public SecurityPolicy setTarget (KustvaktResource resource) {
-        this.target = resource.getPersistentID();
-        return this;
-    }
-
-
-    public SecurityPolicy setTarget (String target) {
-        this.target = target;
-        return this;
-    }
-
-
-    public String getTarget () {
-        return this.target;
-    }
-
-
-    public SecurityPolicy setPOSIX (String posix) {
-        this.permissions = new PermissionsBuffer(Short.valueOf(posix));
-        return this;
-    }
-
-
-    public SecurityPolicy setCreator (Integer creator) {
-        this.creator = creator;
-        return this;
-    }
-
-
-    // todo ???????
-    @Deprecated
-    private SecurityPolicy setOverride (Permissions.Permission ... perms) {
-        for (Permissions.Permission p : perms)
-            this.permissions.addOverride(p.toByte());
-        return this;
-    }
-
-
-    public SecurityPolicy setContext (PolicyContext ctx) {
-        this.ctx = ctx;
-        return this;
-    }
-
-
-    private boolean hasContext () {
-        return !ctx.noMask();
-    }
-
-
-    //todo:
-    public boolean isActive (User user) {
-        System.out.println("THE POLICY " + this.toString());
-        System.out.println("DOES THIS HAVE CONTEXT? " + this.hasContext());
-        //        String host = (String) user.getField(Attributes.HOST);
-        //        System.out.println("HOST IS " + host);
-        //        System.out.println("is active? " + ctx.isActive(host));
-        //        if (this.hasContext())
-        //            return ctx.isActive(host);
-        return !this.hasContext();
-    }
-
-
-    public List<String> getConditionList () {
-        List<String> c = new LinkedList<>();
-        Collections.sort(conditions);
-        for (PolicyCondition p : conditions)
-            c.add(p.getSpecifier());
-        return c;
-    }
-
-
-    public String getConditionString () {
-        if (conditions.isEmpty())
-            return "";
-
-        Collections.sort(conditions);
-        StringBuffer b = new StringBuffer();
-        for (PolicyCondition c : conditions) {
-            b.append(c);
-            b.append(";");
-        }
-        b.deleteCharAt(b.lastIndexOf(";"));
-        return b.toString();
-    }
-
-
-    public List<PolicyCondition> getConditions () {
-        return this.conditions;
-    }
-
-
-    public SecurityPolicy setConditions (PolicyCondition ... constraints) {
-        this.conditions.clear();
-        this.removedidx.clear();
-        this.addedidx.clear();
-        for (int idx = 0; idx < constraints.length; idx++) {
-            this.conditions.add(idx, constraints[idx]);
-            this.addedidx.add(idx);
-        }
-        return this;
-    }
-
-
-    public SecurityPolicy removeCondition (PolicyCondition constraint) {
-        int idx = this.conditions.indexOf(constraint);
-        if (this.addedidx.contains(idx))
-            this.addedidx.remove(idx);
-        else
-            this.removedidx.add(idx);
-        return this;
-    }
-
-
-    public SecurityPolicy addCondition (PolicyCondition constraint) {
-        this.conditions.add(constraint);
-        return this;
-    }
-
-
-    public SecurityPolicy addNewCondition (PolicyCondition constraint) {
-        if (this.conditions.add(constraint))
-            this.addedidx.add(this.conditions.indexOf(constraint));
-        return this;
-    }
-
-
-    public boolean contains (PolicyCondition constraint) {
-        return conditions.contains(constraint);
-    }
-
-
-    public Collection<Integer> getRemoved () {
-        return this.removedidx;
-    }
-
-
-    public Collection<Integer> getAdded () {
-        return this.addedidx;
-    }
-
-
-    public void clear () {
-        // clear remove, add, conditions list!
-        for (Integer remove : this.removedidx)
-            this.conditions.remove(remove);
-        this.removedidx.clear();
-        this.addedidx.clear();
-    }
-
-
-    public boolean hasPermission (Permissions.Permission perm) {
-        return permissions != null && permissions.containsPermission(perm);
-    }
-
-
-    /**
-     * function to add a permission byte to the collection.
-     * 
-     * @param perms
-     * @return
-     */
-    public SecurityPolicy addPermission (Permissions.Permission ... perms) {
-        permissions.addPermissions(perms);
-        return this;
-    }
-
-
-    public boolean equalsPermission (Permissions.Permission ... perms) {
-        PermissionsBuffer b = new PermissionsBuffer();
-        b.addPermissions(perms);
-        return permissions != null
-                && permissions.getPbyte().equals(b.getPbyte());
-    }
-
-
-    public void removePermission (Permissions.Permission perm) {
-        if (permissions != null)
-            permissions.removePermission(perm);
-    }
-
-
-    public Byte getPermissionByte () {
-        return permissions.getPbyte();
-    }
-
-
-    @Override
-    public String toString () {
-        final StringBuffer sb = new StringBuffer("SecurityPolicy{");
-        sb.append("id=").append(id);
-        sb.append(", target='").append(target).append('\'');
-        sb.append(", conditions=").append(conditions);
-        sb.append(", permissions=").append(getPermissions());
-        sb.append('}');
-        return sb.toString();
-    }
-
-
-    public Set<Permissions.Permission> getPermissions () {
-        return permissions.getPermissions();
-    }
-
-
-    @Override
-    public boolean equals (Object o) {
-        if (this == o)
-            return true;
-        if (o == null || getClass() != o.getClass())
-            return false;
-
-        SecurityPolicy policy = (SecurityPolicy) o;
-
-        if (id != policy.id)
-            return false;
-        if (target != policy.target)
-            return false;
-
-        return true;
-    }
-
-
-    @Override
-    public int hashCode () {
-        int result = id;
-        result = 31 * result + target.hashCode();
-        return result;
-    }
-
-    @Getter
-    public static class OwnerPolicy extends SecurityPolicy {
-        private final Integer owner;
-
-
-        public OwnerPolicy (String target, Integer owner) {
-            this.owner = owner;
-            super.setTarget(target);
-        }
-
-
-        @Override
-        public String toString () {
-            return "OwnerPolicy(" + super.getTarget() + "," + owner + ")";
-        }
-
-    }
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java b/core/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
deleted file mode 100644
index d98de46..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/utils/UserPropertyReader.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package de.ids_mannheim.korap.utils;
-
-import de.ids_mannheim.korap.config.BeansFactory;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.exceptions.StatusCodes;
-import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.interfaces.ValidatorIface;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
-import de.ids_mannheim.korap.user.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * @author hanl
- * @date 30/09/2014
- * 
- * EM: where is this used?
- */
-public class UserPropertyReader extends PropertyReader {
-
-    private static Logger jlog = LoggerFactory
-            .getLogger(UserPropertyReader.class);
-
-
-    private Map<String, Properties> props;
-    private String path;
-    private EntityHandlerIface iface;
-    private EncryptionIface crypto;
-    private ValidatorIface validator;
-
-
-    public UserPropertyReader (String path) {
-        this.path = path;
-        this.iface = BeansFactory.getKustvaktContext().getUserDBHandler();
-        this.crypto = BeansFactory.getKustvaktContext().getEncryption();
-        this.validator = BeansFactory.getKustvaktContext().getValidator();
-    }
-
-
-    @Override
-    public void load () {
-        try {
-            props = super.read(this.path);
-            for (Map.Entry<String, Properties> e : props.entrySet()) {
-                try {
-                    createUser(e.getKey(), e.getValue());
-                }
-                catch (KustvaktException ex) {
-                    jlog.error("KorAP-Exception: {} for user {}",
-                            ex.getStatusCode(), e.getKey());
-                }
-            }
-            iface.createAccount(User.UserFactory.getDemoUser());
-        }
-        catch (IOException e) {
-            jlog.error("Could not read from path {}", path);
-        }
-        catch (KustvaktException e) {
-            jlog.error("KorAP-Exception: {}", e.getStatusCode());
-        }
-    }
-
-
-    private User createUser (String username, Properties p)
-            throws KustvaktException {
-        KorAPUser user;
-//        if (username.equals(User.ADMINISTRATOR_NAME)) {
-//            user = User.UserFactory.getAdmin();
-//
-//            String pass = p.getProperty(username + ".password", null);
-//            if (pass == null)
-//                throw new KustvaktException(StatusCodes.ILLEGAL_ARGUMENT);
-//
-//            try {
-//                pass = crypto.secureHash(pass);
-//            }
-//            catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
-//                throw new KustvaktException(StatusCodes.REQUEST_INVALID);
-//            }
-//            user.setPassword(pass);
-//            iface.createAccount(user);
-//        }
-//        else {
-            user = User.UserFactory.getUser(username);
-            Map<String, Object> vals = new HashMap<>();
-            for (Map.Entry e : p.entrySet()) {
-                String key = e.getKey().toString().split("\\.", 2)[1];
-                vals.put(key, e.getValue().toString());
-            }
-            String pass = p.getProperty(username + ".password", null);
-            if (pass == null)
-                throw new KustvaktException(StatusCodes.ILLEGAL_ARGUMENT);
-
-            try {
-                pass = crypto.secureHash(pass);
-            }
-            catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
-                throw new KustvaktException(StatusCodes.REQUEST_INVALID);
-            }
-
-            user.setPassword(pass);
-            user.setAccountLocked(Boolean.valueOf(p.getProperty(username
-                    + ".lock", "false")));
-            user.setAccountCreation(TimeUtils.getNow().getMillis());
-
-            //todo: make sure uri is set to 0, so sql queries work with the null value
-            //            user.setURIExpiration(0L);
-            iface.createAccount(user);
-            UserDetails det = new UserDetails();
-            det.setUserId(user.getId());
-            det.read(vals, true);
-            det.validate(this.validator);
-
-            Userdata set = new UserSettings();
-            set.setUserId(user.getId());
-            set.read(vals, true);
-            set.validate(this.validator);
-
-            UserDataDbIface dao = BeansFactory.getTypeFactory()
-                    .getTypeInterfaceBean(
-                            BeansFactory.getKustvaktContext()
-                                    .getUserDataProviders(), UserDetails.class);
-            dao.store(det);
-
-            dao = BeansFactory.getTypeFactory().getTypeInterfaceBean(
-                    BeansFactory.getKustvaktContext().getUserDataProviders(),
-                    UserSettings.class);
-            dao.store(set);
-//        }
-
-        jlog.info("successfully created account for user {}",
-                user.getUsername());
-        return user;
-    }
-}
diff --git a/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java b/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
index 0f75d84..73728a4 100644
--- a/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
+++ b/full/src/main/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManager.java
@@ -36,9 +36,9 @@
 import de.ids_mannheim.korap.interfaces.AuthenticationIface;
 import de.ids_mannheim.korap.interfaces.AuthenticationManagerIface;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
+import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.ValidatorIface;
 import de.ids_mannheim.korap.interfaces.db.AuditingIface;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 import de.ids_mannheim.korap.interfaces.defaults.ApacheValidator;
 import de.ids_mannheim.korap.user.DemoUser;
diff --git a/full/src/main/java/de/ids_mannheim/korap/authentication/http/AuthorizationData.java b/full/src/main/java/de/ids_mannheim/korap/authentication/http/AuthorizationData.java
index 32c9c7b..a1ad185 100644
--- a/full/src/main/java/de/ids_mannheim/korap/authentication/http/AuthorizationData.java
+++ b/full/src/main/java/de/ids_mannheim/korap/authentication/http/AuthorizationData.java
@@ -4,6 +4,11 @@
 import lombok.Getter;
 import lombok.Setter;
 
+/** Describes the values stored in Authorization header of HTTP requests. 
+ * 
+ * @author margaretha
+ *
+ */
 @Getter
 @Setter
 public class AuthorizationData {
diff --git a/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationMethod.java b/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationMethod.java
index afd81ed..b44d0a0 100644
--- a/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationMethod.java
+++ b/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationMethod.java
@@ -1,5 +1,14 @@
 package de.ids_mannheim.korap.config;
 
+/** Lists possible actual authentication methods. Multiple 
+ *  {@link AuthenticationScheme} may use an identical 
+ *  authentication method. 
+ * 
+ * @author margaretha
+ * 
+ * @see AuthenticationScheme 
+ *
+ */
 public enum AuthenticationMethod {
     LDAP, SHIBBOLETH, DATABASE; 
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationScheme.java b/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationScheme.java
index 6d9c58e..4459e56 100644
--- a/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationScheme.java
+++ b/full/src/main/java/de/ids_mannheim/korap/config/AuthenticationScheme.java
@@ -2,12 +2,18 @@
 
 import org.apache.commons.lang.WordUtils;
 
+/** Lists possible authentication schemes used in the Authorization header 
+ *  of HTTP requests.  
+ * 
+ * @author margaretha
+ *
+ */
 public enum AuthenticationScheme {
     // standard http
     BASIC, BEARER,
     // custom
     SESSION, API;
-    
+
     public String displayName () {
         return WordUtils.capitalizeFully(name());
     }
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/GroupMemberStatus.java b/full/src/main/java/de/ids_mannheim/korap/constant/GroupMemberStatus.java
index 59c1154..c9b5229 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/GroupMemberStatus.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/GroupMemberStatus.java
@@ -1,5 +1,16 @@
 package de.ids_mannheim.korap.constant;
 
+/** Defines the status of a user-group member
+ * 
+ * @author margaretha
+ *
+ */
 public enum GroupMemberStatus {
-    ACTIVE, PENDING, DELETED;
+    ACTIVE, 
+    // membership invitation was sent and has not been accepted 
+    // or rejected yet
+    PENDING, 
+    // either membership invitation was rejected or the member was 
+    // deleted by a user-group admin
+    DELETED;
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
index 65b0fad..d784cb0 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/PredefinedRole.java
@@ -1,5 +1,10 @@
 package de.ids_mannheim.korap.constant;
 
+/** Defines some predefined roles used in the system.
+ * 
+ * @author margaretha
+ *
+ */
 public enum PredefinedRole {
     USER_GROUP_ADMIN(1), USER_GROUP_MEMBER(2), VC_ACCESS_ADMIN(3), VC_ACCESS_MEMBER(4);
     
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/PrivilegeType.java b/full/src/main/java/de/ids_mannheim/korap/constant/PrivilegeType.java
index ad05f18..f9900b3 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/PrivilegeType.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/PrivilegeType.java
@@ -1,5 +1,15 @@
 package de.ids_mannheim.korap.constant;
 
+import de.ids_mannheim.korap.entity.Privilege;
+import de.ids_mannheim.korap.entity.Role;
+
+/** Defines the privilege or permissions of users or admins 
+ * based on their roles.
+ * 
+ * @author margaretha
+ * @see Privilege
+ * @see Role
+ */
 public enum PrivilegeType {
     READ, WRITE, DELETE;
 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/UserGroupStatus.java b/full/src/main/java/de/ids_mannheim/korap/constant/UserGroupStatus.java
index 5cb939e..a1507ed 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/UserGroupStatus.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/UserGroupStatus.java
@@ -1,5 +1,12 @@
 package de.ids_mannheim.korap.constant;
 
+import de.ids_mannheim.korap.entity.UserGroup;
+
+/** Defines possible statuses of {@link UserGroup}s
+ * 
+ * @author margaretha
+ *
+ */
 public enum UserGroupStatus {
     ACTIVE, DELETED, 
     // group members cannot see the group
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusAccessStatus.java b/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusAccessStatus.java
index 381ae4c..0b0ab0d 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusAccessStatus.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusAccessStatus.java
@@ -1,8 +1,17 @@
 package de.ids_mannheim.korap.constant;
 
+import de.ids_mannheim.korap.entity.VirtualCorpusAccess;
+
+/** Defines possible statusess of {@link VirtualCorpusAccess}
+ * 
+ * @author margaretha
+ * @see VirtualCorpusAccess
+ *
+ */
 public enum VirtualCorpusAccessStatus {
 
     ACTIVE, DELETED,
+    // has not been used yet
     PENDING,
     // access for hidden group
     // maybe not necessary?
diff --git a/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusType.java b/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusType.java
index 0072c67..5abd54c 100644
--- a/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusType.java
+++ b/full/src/main/java/de/ids_mannheim/korap/constant/VirtualCorpusType.java
@@ -1,5 +1,12 @@
 package de.ids_mannheim.korap.constant;
 
+import de.ids_mannheim.korap.entity.VirtualCorpus;
+
+/** Defines types of {@link VirtualCorpus} 
+ * 
+ * @author margaretha
+ *
+ */
 public enum VirtualCorpusType {
     // available for all
     PREDEFINED, 
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/PrivilegeDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/PrivilegeDao.java
index 874850a..8bd533d 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/PrivilegeDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/PrivilegeDao.java
@@ -18,6 +18,16 @@
 import de.ids_mannheim.korap.entity.Role;
 import de.ids_mannheim.korap.entity.Role_;
 
+/** Manages database transactions regarding {@link Privilege} entity or 
+ *  database table.
+ * 
+ * @see Privilege
+ * @see PrivilegeType
+ * @see Role
+ * 
+ * @author margaretha
+ *
+ */
 @Transactional
 @Repository
 public class PrivilegeDao {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
index 6cbfaa1..b02a283 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/RoleDao.java
@@ -20,6 +20,12 @@
 import de.ids_mannheim.korap.entity.UserGroupMember;
 import de.ids_mannheim.korap.entity.UserGroupMember_;
 
+/** Manages database transactions regarding {@link Role} entity or database table. 
+ * 
+ * @author margaretha
+ * @see Role
+ * @see PrivilegeDao
+ */
 @Transactional
 @Repository
 public class RoleDao {
@@ -28,7 +34,7 @@
     private EntityManager entityManager;
 
     @Autowired
-    PrivilegeDao privilegeDao;
+    private PrivilegeDao privilegeDao;
 
     public void createRole (String name, List<PrivilegeType> privilegeTypes) {
         Role r = new Role();
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
index 72c856a..43eee36 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupDao.java
@@ -35,6 +35,14 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.utils.ParameterChecker;
 
+/** Manages database transactions regarding {@link UserGroup} entity and 
+ *  database table.
+ * 
+ * @author margaretha
+ * 
+ * @see UserGroup
+ *
+ */
 @Transactional
 @Repository
 public class UserGroupDao {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
index d2ffe28..ae58ec6 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/UserGroupMemberDao.java
@@ -24,6 +24,13 @@
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.utils.ParameterChecker;
 
+/** Manages database transactions regarding {@link UserGroupMember} entity and 
+ * database table.
+ * 
+ * @author margaretha
+ * @see UserGroupMember
+ *
+ */
 @Transactional
 @Repository
 public class UserGroupMemberDao {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java
index 82678cf..00eb460 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/VirtualCorpusAccessDao.java
@@ -25,6 +25,14 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.ParameterChecker;
 
+/** Manages database transactions regarding {@link VirtualCorpusAccess} entity 
+ *  and its corresponding database table.
+ * 
+ * @author margaretha
+ *
+ * @see VirtualCorpusAccess
+ * @see VirtualCorpus
+ */
 @Transactional
 @Repository
 public class VirtualCorpusAccessDao {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
index 82f05eb..8d64c09 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupDto.java
@@ -8,6 +8,12 @@
 import lombok.Getter;
 import lombok.Setter;
 
+/** Defines the structure of UserGroup description, e.g.
+ *  to be sent as JSON objects in HTTP response. 
+ * 
+ * @author margaretha
+ *
+ */
 @Setter
 @Getter
 public class UserGroupDto {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupMemberDto.java b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupMemberDto.java
index 1a5eda3..bf3cfea 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupMemberDto.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/UserGroupMemberDto.java
@@ -6,6 +6,11 @@
 import lombok.Getter;
 import lombok.Setter;
 
+/** Defines UserGroupMember description, e.g. to be sent as 
+ *  JSON objects in HTTP Responses.
+ * @author margaretha
+ *
+ */
 @Setter
 @Getter
 public class UserGroupMemberDto {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusAccessDto.java b/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusAccessDto.java
index 93875ee..74d0df6 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusAccessDto.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusAccessDto.java
@@ -3,6 +3,10 @@
 import lombok.Getter;
 import lombok.Setter;
 
+/**
+ * @author margaretha
+ *
+ */
 @Getter
 @Setter
 public class VirtualCorpusAccessDto {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusDto.java b/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusDto.java
index f69f19d..d44ade7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusDto.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/VirtualCorpusDto.java
@@ -1,8 +1,15 @@
 package de.ids_mannheim.korap.dto;
 
+import de.ids_mannheim.korap.entity.VirtualCorpus;
 import lombok.Getter;
 import lombok.Setter;
 
+/** Defines the structure of {@link VirtualCorpus} description to be 
+ *  sent as JSON objects in HTTP responses. 
+ * 
+ * @author margaretha
+ *
+ */
 @Getter
 @Setter
 public class VirtualCorpusDto {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java b/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
index 0d61db3..9dd4df9 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dto/converter/UserGroupConverter.java
@@ -12,6 +12,13 @@
 import de.ids_mannheim.korap.entity.UserGroup;
 import de.ids_mannheim.korap.entity.UserGroupMember;
 
+/** Manages conversion of  {@link UserGroup} objects to their data access objects (DTO), 
+ * e.g. UserGroupDto. DTO structure defines controllers output, namely the structure of 
+ * JSON objects in HTTP responses.
+ * 
+ * @author margaretha
+ *
+ */
 @Component
 public class UserGroupConverter {
 
@@ -39,7 +46,8 @@
                 UserGroupMemberDto memberDto = new UserGroupMemberDto();
                 memberDto.setUserId(member.getUserId());
                 memberDto.setStatus(member.getStatus());
-                List<String> memberRoles = new ArrayList<>(member.getRoles().size());
+                List<String> memberRoles =
+                        new ArrayList<>(member.getRoles().size());
                 for (Role r : member.getRoles()) {
                     memberRoles.add(r.getName());
                 }
diff --git a/full/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java b/full/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
index 8577a1b..35c7cbc 100644
--- a/full/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/handlers/EntityDao.java
@@ -7,7 +7,7 @@
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.exceptions.StatusCodes;
 import de.ids_mannheim.korap.exceptions.DatabaseException;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
+import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.ShibUser;
diff --git a/core/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java b/full/src/main/java/de/ids_mannheim/korap/interfaces/EntityHandlerIface.java
similarity index 94%
rename from core/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
rename to full/src/main/java/de/ids_mannheim/korap/interfaces/EntityHandlerIface.java
index 456b385..9bcf614 100644
--- a/core/src/main/java/de/ids_mannheim/korap/interfaces/db/EntityHandlerIface.java
+++ b/full/src/main/java/de/ids_mannheim/korap/interfaces/EntityHandlerIface.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.interfaces.db;
+package de.ids_mannheim.korap.interfaces;
 
 import de.ids_mannheim.korap.exceptions.EmptyResultException;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
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 c65d89f..a353064 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
@@ -6,6 +6,11 @@
 import de.ids_mannheim.korap.resource.rewrite.IdWriter;
 import de.ids_mannheim.korap.resource.rewrite.RewriteHandler;
 
+/** Defines rewrite handling methods relevant only in full version. 
+ * 
+ * @author margaretha
+ *
+ */
 public class FullRewriteHandler extends RewriteHandler{
 
     public FullRewriteHandler (FullConfiguration config) {
diff --git a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java b/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
index 8af6516..a49c276 100644
--- a/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
+++ b/full/src/main/java/de/ids_mannheim/korap/web/controller/AnnotationController.java
@@ -39,9 +39,6 @@
 @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
 public class AnnotationController {
 
-    private static Logger jlog =
-            LoggerFactory.getLogger(AnnotationController.class);
-
     @Autowired
     CoreResponseHandler responseHandler;
     
diff --git a/full/src/main/resources/default-config.xml b/full/src/main/resources/default-config.xml
index 1ef5429..e901b2a 100644
--- a/full/src/main/resources/default-config.xml
+++ b/full/src/main/resources/default-config.xml
@@ -261,7 +261,7 @@
 	<bean id="kustvakt_authenticationmanager"
 		class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager">
 		<constructor-arg
-			type="de.ids_mannheim.korap.interfaces.db.EntityHandlerIface" ref="kustvakt_userdb" />
+			type="de.ids_mannheim.korap.interfaces.EntityHandlerIface" ref="kustvakt_userdb" />
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
diff --git a/full/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java b/full/src/test/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManagerTest.java
similarity index 75%
rename from full/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
rename to full/src/test/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManagerTest.java
index efdb76e..d29960b 100644
--- a/full/src/test/java/de/ids_mannheim/korap/security/auth/KustvaktAuthenticationManagerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/authentication/KustvaktAuthenticationManagerTest.java
@@ -1,6 +1,5 @@
-package de.ids_mannheim.korap.security.auth;
+package de.ids_mannheim.korap.authentication;
 
-import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 
 import org.junit.After;
@@ -10,11 +9,9 @@
 
 import de.ids_mannheim.korap.config.Attributes;
 import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.config.KustvaktBaseDaoInterface;
 import de.ids_mannheim.korap.config.KustvaktConfiguration;
 import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.interfaces.AuthenticationManagerIface;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
 import de.ids_mannheim.korap.user.KorAPUser;
 import de.ids_mannheim.korap.user.User;
 import de.ids_mannheim.korap.user.UserDetails;
@@ -45,20 +42,6 @@
         catch (KustvaktException e) {}
     }
 
-
-    @Test
-    @Ignore
-    public void testCreateUser () throws KustvaktException {
-        User user = authManager
-                .createUserAccount(KustvaktConfiguration.KUSTVAKT_USER, false);
-
-        EntityHandlerIface dao = helper().getContext().getUserDBHandler();
-        assertNotEquals(0, ((KustvaktBaseDaoInterface) dao).size());
-        User check = dao.getAccount(user.getUsername());
-        assertNotNull(check);
-    }
-
-
     @Test
     public void testBatchStore () {
         int i = 6;
@@ -73,8 +56,6 @@
     @Test
     @Ignore
     public void testUserdetailsGet () throws KustvaktException {
-        testCreateUser();
-
         User user = authManager
                 .getUser((String) KustvaktConfiguration.KUSTVAKT_USER
                         .get(Attributes.USERNAME));
@@ -87,8 +68,6 @@
     @Test
     @Ignore
     public void testUsersettingsGet () throws KustvaktException {
-        testCreateUser();
-
         User user = authManager
                 .getUser((String) KustvaktConfiguration.KUSTVAKT_USER
                         .get(Attributes.USERNAME));
@@ -100,8 +79,6 @@
 
     @Test(expected = KustvaktException.class)
     public void testUserDetailsGetNonExistent () throws KustvaktException {
-        testCreateUser();
-
         User user = new KorAPUser(10, "random");
         authManager.getUserData(user, UserDetails.class);
     }
@@ -109,19 +86,10 @@
 
     @Test(expected = KustvaktException.class)
     public void testUserSettingsGetNonExistent () throws KustvaktException {
-        testCreateUser();
-
         User user = new KorAPUser(10, "random");
         authManager.getUserData(user, UserSettings.class);
     }
 
-    @Test
-    @Ignore
-    public void testUserUpdate() throws KustvaktException {
-        testCreateUser();
-        // todo:
-    }
-
 
     @Override
     public void initMethod () throws KustvaktException {
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 3bbdb4f..6ef8f65 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
@@ -4,9 +4,8 @@
 
 import de.ids_mannheim.korap.interfaces.AuthenticationManagerIface;
 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.EntityHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.PolicyHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
 import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
 
@@ -16,8 +15,6 @@
  */
 public interface TestBeans {
 
-	public  PolicyHandlerIface getPolicyDao();
-
 //	public  KustvaktConfiguration getConfig();
 
 	public  EntityHandlerIface getUserDao();
@@ -32,6 +29,4 @@
 
 	public  AuthenticationManagerIface getAuthManager();
 
-	
-
 }
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 b53cc6f..a2b9d72 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
@@ -33,7 +33,7 @@
 import de.ids_mannheim.korap.handlers.JDBCClient;
 import de.ids_mannheim.korap.handlers.ResourceDao;
 import de.ids_mannheim.korap.interfaces.EncryptionIface;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
+import de.ids_mannheim.korap.interfaces.EntityHandlerIface;
 import de.ids_mannheim.korap.interfaces.db.PersistenceClient;
 import de.ids_mannheim.korap.resources.KustvaktResource;
 import de.ids_mannheim.korap.user.User;
@@ -119,48 +119,49 @@
         return this;
     }
 
-
-    public TestHelper setupSimpleAccount (String username, String password) {
-        KustvaktBaseDaoInterface dao = getBean(ContextHolder.KUSTVAKT_USERDB);
-        EntityHandlerIface edao = (EntityHandlerIface) dao;
-        try {
-            edao.getAccount(username);
-        }
-        catch (EmptyResultException e) {
-            // do nothing
-        }
-        catch (KustvaktException ex) {
-            assertNull("Test user could not be set up", true);
-        }
-
-        Map m = new HashMap<>();
-        m.put(Attributes.USERNAME, username);
-
-        try {
-            String hash = ((EncryptionIface) getBean(ContextHolder.KUSTVAKT_ENCRYPTION))
-                    .secureHash(password);
-            m.put(Attributes.PASSWORD, hash);
-        }
-        catch (NoSuchAlgorithmException | UnsupportedEncodingException
-                | KustvaktException e) {
-            // do nohting
-            assertNotNull("Exception thrown", null);
-        }
-        assertNotNull("userdatabase handler must not be null", dao);
-
-        try {
-
-            int i = edao.createAccount(User.UserFactory.toKorAPUser(m));
-            assert BeansFactory.getKustvaktContext().getUserDBHandler()
-                    .getAccount((String) data.get(Attributes.USERNAME)) != null;
-            assertEquals(1, i);
-        }
-        catch (KustvaktException e) {
-            // do nothing
-            assertNull("Test user could not be set up", true);
-        }
-        return this;
-    }
+    // EM
+    @Deprecated
+//    public TestHelper setupSimpleAccount (String username, String password) {
+//        KustvaktBaseDaoInterface dao = getBean(ContextHolder.KUSTVAKT_USERDB);
+//        EntityHandlerIface edao = (EntityHandlerIface) dao;
+//        try {
+//            edao.getAccount(username);
+//        }
+//        catch (EmptyResultException e) {
+//            // do nothing
+//        }
+//        catch (KustvaktException ex) {
+//            assertNull("Test user could not be set up", true);
+//        }
+//
+//        Map m = new HashMap<>();
+//        m.put(Attributes.USERNAME, username);
+//
+//        try {
+//            String hash = ((EncryptionIface) getBean(ContextHolder.KUSTVAKT_ENCRYPTION))
+//                    .secureHash(password);
+//            m.put(Attributes.PASSWORD, hash);
+//        }
+//        catch (NoSuchAlgorithmException | UnsupportedEncodingException
+//                | KustvaktException e) {
+//            // do nohting
+//            assertNotNull("Exception thrown", null);
+//        }
+//        assertNotNull("userdatabase handler must not be null", dao);
+//
+//        try {
+//
+//            int i = edao.createAccount(User.UserFactory.toKorAPUser(m));
+//            assert BeansFactory.getKustvaktContext().getUserDBHandler()
+//                    .getAccount((String) data.get(Attributes.USERNAME)) != null;
+//            assertEquals(1, i);
+//        }
+//        catch (KustvaktException e) {
+//            // do nothing
+//            assertNull("Test user could not be set up", true);
+//        }
+//        return this;
+//    }
 
 
     public User getUser () {
diff --git a/full/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java b/full/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java
deleted file mode 100644
index 48b6d5c..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/handlers/UserDaoTest.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package de.ids_mannheim.korap.handlers;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.config.BeansFactory;
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.config.TestHelper;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.EntityHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.UserDataDbIface;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.user.UserDetails;
-import de.ids_mannheim.korap.user.UserSettings;
-import de.ids_mannheim.korap.user.Userdata;
-
-/** EM: To do: not implemented in the new DB yet
- * 
- * @author hanl
- * @date 13/02/2015
- */
-@Ignore
-public class UserDaoTest extends BeanConfigTest {
-
-    @Test
-    public void userput () throws KustvaktException {
-        User user1 = helper().getContext().getUserDBHandler()
-                .getAccount((String) TestHelper.getUserCredentials().get(Attributes.USERNAME));
-        assertEquals("user creation failed", true, user1.getId() != -1);
-    }
-
-
-    @Test
-    public void userputBatch () {
-        //todo:
-    }
-
-
-    @Test
-    public void userget () throws KustvaktException {
-        User user1 = helper().getContext().getUserDBHandler()
-                .getAccount((String) TestHelper.getUserCredentials().get(Attributes.USERNAME));
-        assertEquals("User Retrieval does not work",
-                TestHelper.getUserCredentials().get(Attributes.USERNAME), user1.getUsername());
-    }
-
-
-    @Test
-    @Ignore
-    public void testUserdetailsGetNonExistent () throws KustvaktException {
-        helper().setupSimpleAccount("userdbtest", "userdbTest");
-        User user = helper().getContext().getUserDBHandler()
-                .getAccount("userdbtest");
-        UserDataDbIface dao = BeansFactory.getTypeFactory()
-                .getTypeInterfaceBean(
-                        helper().getContext().getUserDataProviders(),
-                        UserDetails.class);
-        Userdata data = dao.get(user);
-        assertNull(data);
-        helper().dropUser("userdbtest");
-    }
-
-
-    @Test
-    @Ignore
-    public void testUserSettingsGetNonExistent () throws KustvaktException {
-        helper().setupSimpleAccount("userdbtest", "userdbTest");
-        User user = helper().getContext().getUserDBHandler()
-                .getAccount("userdbtest");
-        UserDataDbIface dao = BeansFactory.getTypeFactory()
-                .getTypeInterfaceBean(
-                        helper().getContext().getUserDataProviders(),
-                        UserSettings.class);
-        Userdata data = dao.get(user);
-        assertNull(data);
-        helper().dropUser("userdbtest");
-
-    }
-
-
-    // username cannot currently be changed
-    @Test
-    @Ignore
-    public void updateUsername () throws KustvaktException {
-        User user1 = helper().getContext().getUserDBHandler()
-                .getAccount((String) TestHelper.getUserCredentials().get(Attributes.USERNAME));
-        user1.setUsername("new_user");
-        helper().getContext().getUserDBHandler().updateAccount(user1);
-        User u2 = helper().getContext().getUserDBHandler()
-                .getAccount("new_user");
-        assertEquals("not found", user1.getUsername(), u2.getUsername());
-    }
-
-
-    @Test
-    public void userupdate () throws KustvaktException {
-        EntityHandlerIface dao = helper().getContext().getUserDBHandler();
-        User user1 = dao.getAccount((String) TestHelper.getUserCredentials()
-                .get(Attributes.USERNAME));
-        user1.setAccountLocked(true);
-        dao.updateAccount(user1);
-        assertEquals("not valid", true, dao.getAccount(user1.getUsername())
-                .isAccountLocked());
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-        helper().setupAccount();
-//        helper().runBootInterfaces();
-    }
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java b/full/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java
deleted file mode 100644
index 68e874a..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/security/PermissionBufferTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import de.ids_mannheim.korap.resources.Permissions;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * @author hanl
- * @date 15/02/2016
- */
-public class PermissionBufferTest {
-
-    @Test
-    public void testDuplicatePermission () {
-        PermissionsBuffer buffer = new PermissionsBuffer();
-        assertEquals(0, buffer.addPermission(4));
-        assertEquals(-1, buffer.addPermission(4));
-
-        // 0 means permission was successfully added, -1 means it wasn't because it's already present
-        assertEquals(0, buffer.addPermission(1));
-        assertEquals(-1, buffer.addPermission(1));
-
-        assertEquals(0, buffer.addPermission(8));
-        assertEquals(-1, buffer.addPermission(4));
-    }
-
-
-    @Test
-    public void testPermissionsAdd () {
-        PermissionsBuffer buffer = new PermissionsBuffer();
-        buffer.addPermissions(Permissions.Permission.READ);
-        assertEquals(1, buffer.getPermissions().size());
-
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer
-                .containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
-
-        buffer = new PermissionsBuffer();
-        buffer.addPermissions(Permissions.Permission.WRITE);
-        buffer.addPermissions(Permissions.Permission.DELETE_POLICY);
-        assertEquals(2, buffer.getPermissions().size());
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer
-                .containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
-    }
-
-
-    @Test
-    public void testPermissionsAddAll2 () {
-        PermissionsBuffer buffer = new PermissionsBuffer();
-        buffer.addPermissions(Permissions.Permission.ALL);
-
-        assertEquals(Permissions.Permission.values().length, buffer
-                .getPermissions().size());
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
-    }
-
-
-    @Test
-    public void testPermissionsAddAll () {
-        PermissionsBuffer buffer = new PermissionsBuffer();
-        buffer.addPermissions(Permissions.Permission.DELETE_POLICY);
-        buffer.addPermissions(Permissions.Permission.CREATE_POLICY);
-        buffer.addPermissions(Permissions.Permission.READ);
-        buffer.addPermissions(Permissions.Permission.MODIFY_POLICY);
-        buffer.addPermissions(Permissions.Permission.DELETE);
-        buffer.addPermissions(Permissions.Permission.READ_POLICY);
-        buffer.addPermissions(Permissions.Permission.WRITE);
-
-        assertEquals(Permissions.Permission.values().length, buffer
-                .getPermissions().size());
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.ALL.toByte()));
-
-    }
-
-
-    @Test
-    public void testPermissionsInit () {
-        PermissionsBuffer buffer = new PermissionsBuffer((short) 1);
-        assertEquals(1, buffer.getPermissions().size());
-
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertFalse(buffer
-                .containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-
-    }
-
-
-    @Test
-    public void testPermissionsStringConversion () {
-        PermissionsBuffer buffer = new PermissionsBuffer(Short.valueOf("1"));
-        assertEquals(1, buffer.getPermissions().size());
-
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertFalse(buffer
-                .containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-
-        buffer = new PermissionsBuffer(Short.valueOf("5"));
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-
-        buffer = new PermissionsBuffer(Short.valueOf("69"));
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.READ_POLICY
-                .toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.CREATE_POLICY
-                .toByte()));
-    }
-
-
-    @Test
-    public void testPermissionRemovalOne () {
-        PermissionsBuffer buffer = new PermissionsBuffer();
-        buffer.addPermissions(Permissions.Permission.READ,
-                Permissions.Permission.DELETE,
-                Permissions.Permission.MODIFY_POLICY);
-
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-
-        buffer.removePermission(Permissions.Permission.MODIFY_POLICY);
-
-        assertTrue(buffer.containsPByte(Permissions.Permission.READ.toByte()));
-        assertTrue(buffer.containsPByte(Permissions.Permission.DELETE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.WRITE.toByte()));
-        assertFalse(buffer.containsPByte(Permissions.Permission.MODIFY_POLICY
-                .toByte()));
-    }
-
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java b/full/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java
deleted file mode 100644
index 6804770..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/security/PolicyBenchmarkTest.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-/**
- * @author hanl
- * @date 09/02/2016
- */
-public class PolicyBenchmarkTest {
-
-
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java b/full/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java
deleted file mode 100644
index f309543..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/security/SecurityPolicyTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package de.ids_mannheim.korap.security;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import de.ids_mannheim.korap.config.BeanConfigTest;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.PolicyHandlerIface;
-import de.ids_mannheim.korap.resources.Corpus;
-import de.ids_mannheim.korap.resources.Permissions;
-
-/** EM: Not supported in the current implementation (new DB)
- * 
- * @author hanl
- * @date 12/02/2016
- */
-@Deprecated
-@Ignore
-public class SecurityPolicyTest extends BeanConfigTest {
-
-    @Test
-    public void testConditionUpdate () {
-        SecurityPolicy policy = new SecurityPolicy();
-        policy.addNewCondition(new PolicyCondition("test_1"));
-        policy.addNewCondition(new PolicyCondition("test_2"));
-        policy.setCreator(1);
-        policy.setTarget(new Corpus("WPD"));
-        policy.addPermission(Permissions.Permission.READ);
-
-        assertEquals(2, policy.getAdded().size());
-        policy.removeCondition(new PolicyCondition("test_1"));
-        assertEquals(1, policy.getAdded().size());
-    }
-
-
-    @Test
-    public void testConditionMapping () throws KustvaktException {
-        helper().setupResource(new Corpus("WPD_2"));
-        SecurityPolicy policy = new SecurityPolicy();
-        policy.addNewCondition(new PolicyCondition("test_1"));
-        policy.addNewCondition(new PolicyCondition("test_2"));
-        policy.setCreator(1);
-        policy.setTarget(new Corpus("WPD_2"));
-        policy.addPermission(Permissions.Permission.READ);
-
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        dao.createPolicy(policy, helper().getUser());
-
-        List<SecurityPolicy>[] list = dao.getPolicies("WPD_2",
-                helper().getUser(), Permissions.Permission.READ.toByte());
-        assertNotNull(list);
-        List<SecurityPolicy> policies = list[0];
-        assertNotNull(policies);
-        assertFalse(policies.isEmpty());
-        assertEquals(2, policies.size());
-        assertTrue(policies.get(0) instanceof SecurityPolicy.OwnerPolicy);
-        policy = policies.get(1);
-        assertEquals(2, policy.getConditions().size());
-        policy.removeCondition(new PolicyCondition("test_1"));
-        assertEquals(1, policy.getRemoved().size());
-        assertTrue(policy.getAdded().isEmpty());
-    }
-
-
-    @Test
-    public void testPersistingPermissionMapping () throws KustvaktException {
-        helper().setupResource(new Corpus("WPD_3"));
-        SecurityPolicy policy = new SecurityPolicy();
-        policy.addNewCondition(new PolicyCondition("test_1"));
-        policy.addNewCondition(new PolicyCondition("test_2"));
-        policy.setCreator(1);
-        policy.setTarget(new Corpus("WPD_3"));
-        policy.addPermission(Permissions.Permission.READ);
-        policy.addPermission(Permissions.Permission.WRITE);
-
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        dao.createPolicy(policy, helper().getUser());
-
-        List<SecurityPolicy>[] list = dao.getPolicies("WPD_3",
-                helper().getUser(), Permissions.Permission.READ.toByte());
-
-        assertNotNull(list);
-        List<SecurityPolicy> policies = list[0];
-        assertNotNull(policies);
-        assertFalse(policies.isEmpty());
-        assertEquals(2, policies.size());
-        assertTrue(policies.get(0) instanceof SecurityPolicy.OwnerPolicy);
-        policy = policies.get(1);
-
-        Set<Permissions.Permission> check = new HashSet<>();
-        check.add(Permissions.Permission.READ);
-        check.add(Permissions.Permission.WRITE);
-        assertEquals(check, policy.getPermissions());
-    }
-
-
-    @Test
-    public void testConditionRemoval () throws KustvaktException {
-        helper().setupResource(new Corpus("WPD_1"));
-        SecurityPolicy policy = new SecurityPolicy();
-        policy.addNewCondition(new PolicyCondition("test_1"));
-        policy.addNewCondition(new PolicyCondition("test_2"));
-        policy.setCreator(1);
-        policy.setTarget(new Corpus("WPD_1"));
-        policy.addPermission(Permissions.Permission.READ);
-
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        dao.createPolicy(policy, helper().getUser());
-
-        Object[] list = dao.getPolicies("WPD_1", helper().getUser(),
-                Permissions.Permission.READ.toByte());
-        assertNotNull(list);
-        List<SecurityPolicy> policies = (List<SecurityPolicy>) list[0];
-        assertNotNull(policies);
-        assertFalse(policies.isEmpty());
-        policy = policies.get(1);
-
-        assertEquals(2, policy.getConditions().size());
-        policy.removeCondition(new PolicyCondition("test_1"));
-        assertEquals(1, policy.getRemoved().size());
-        assertTrue(policy.getAdded().isEmpty());
-
-        dao.updatePolicy(policy, helper().getUser());
-        policies = dao.getPolicies("WPD_1", helper().getUser(),
-                Permissions.Permission.READ.toByte())[0];
-        policy = policies.get(1);
-        assertEquals(1, policy.getConditions().size());
-    }
-
-
-    @Test
-    public void testPermissionConversion () {
-        SecurityPolicy policy = new SecurityPolicy();
-        policy.setPOSIX("3");
-        Set<Permissions.Permission> perms = new HashSet<>();
-        perms.add(Permissions.Permission.READ);
-        perms.add(Permissions.Permission.WRITE);
-        assertEquals(perms, policy.getPermissions());
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-        //        helper().runBootInterfaces();
-        helper().setupAccount();
-    }
-}
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java
deleted file mode 100644
index 708259a..0000000
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/PolicyServiceTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package de.ids_mannheim.korap.web.controller;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.UUID;
-
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-import de.ids_mannheim.korap.authentication.http.HttpAuthorizationHandler;
-import de.ids_mannheim.korap.config.Attributes;
-import de.ids_mannheim.korap.exceptions.KustvaktException;
-import de.ids_mannheim.korap.interfaces.db.PolicyHandlerIface;
-import de.ids_mannheim.korap.interfaces.db.ResourceOperationIface;
-import de.ids_mannheim.korap.resources.Corpus;
-import de.ids_mannheim.korap.resources.Foundry;
-import de.ids_mannheim.korap.resources.KustvaktResource;
-import de.ids_mannheim.korap.resources.Permissions;
-import de.ids_mannheim.korap.resources.Permissions.Permission;
-import de.ids_mannheim.korap.resources.VirtualCollection;
-import de.ids_mannheim.korap.security.PolicyCondition;
-import de.ids_mannheim.korap.security.SecurityPolicy;
-import de.ids_mannheim.korap.user.User;
-import de.ids_mannheim.korap.user.User.UserFactory;
-import de.ids_mannheim.korap.web.FastJerseyTest;
-
-/** Not in the new DB
- * @author margaretha
- */
-@Ignore
-@Deprecated
-public class PolicyServiceTest extends FastJerseyTest {
-
-    @Autowired
-    HttpAuthorizationHandler handler;
-    
-    private User user = UserFactory.getDemoUser();
-
-
-    @Test
-    public void testCreatePolicyForVirtualCollection ()
-            throws IOException, KustvaktException {
-        String id = UUID.randomUUID().toString();
-        ClientResponse response = resource().path(getAPIVersion()).path("admin")
-                .path("createPolicies").path(id)
-                .queryParam("type", "virtualcollection")
-                .queryParam("name", "Goethe VC")
-                .queryParam("description", "Goethe corpus")
-                .queryParam("group", "public")
-                .queryParam("perm", Permission.READ.name())
-                .queryParam("expire", "")
-                .header(Attributes.AUTHORIZATION,
-                        handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"))
-                .post(ClientResponse.class);
-
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatus());
-
-        // Check the policies
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        List<SecurityPolicy> policies = dao.getPolicies(
-                new PolicyCondition("public"), VirtualCollection.class,
-                Permissions.Permission.READ.toByte());
-        assertEquals(2, policies.size());
-        
-        policies = dao.getPoliciesByPersistentId(
-                new PolicyCondition("public"), VirtualCollection.class,
-                Permissions.Permission.READ.toByte(),id);
-        assertEquals(1, policies.size());
-        assertEquals(id, policies.get(0).getTarget());
-
-        // Check the resource
-        List<ResourceOperationIface> providers = (List<ResourceOperationIface>) helper()
-                .getContext().getResourceProviders();
-        ResourceOperationIface resourceDao = providers.get(0);
-
-        User user = UserFactory.getDemoUser();
-        KustvaktResource resource = resourceDao.findbyId(id, user);
-        assertEquals("Goethe VC", resource.getName());
-
-    }
-
-
-    @Test
-    public void testCreatePolicyForFoundry ()
-            throws IOException, KustvaktException {
-        String id = UUID.randomUUID().toString();
-        ClientResponse response = resource().path(getAPIVersion()).path("admin")
-                .path("createPolicies").path(id).queryParam("type", "foundry")
-                .queryParam("name", "stanford")
-                .queryParam("description", "stanford parser")
-                .queryParam("group", "public")
-                .queryParam("perm", Permission.READ.name())
-                .queryParam("loc", "255.255.255.0")
-                .queryParam("expire", "30D")
-                .header(Attributes.AUTHORIZATION,
-                        handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"))
-                .post(ClientResponse.class);
-
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatus());
-
-        // Check the resource store
-        List<ResourceOperationIface> providers = (List<ResourceOperationIface>) helper()
-                .getContext().getResourceProviders();
-        ResourceOperationIface resourceDao = providers.get(0);
-        KustvaktResource resource = resourceDao.findbyId(id, user);
-        assertEquals("stanford", resource.getName());
-
-        // Check the policies
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        List<SecurityPolicy> policies = dao.getPoliciesByPersistentId(
-                new PolicyCondition("public"), Foundry.class,
-                Permissions.Permission.READ.toByte(),id);
-        assertEquals(1, policies.size());
-        assertEquals("255.255.255.0",policies.get(0).getContext().getIpmask());
-
-    }
-
-
-    @Test
-    public void testCreatePolicyForMultiplePermissions ()
-            throws IOException, KustvaktException {
-        String id = UUID.randomUUID().toString();
-        ClientResponse response = resource().path(getAPIVersion()).path("admin")
-                .path("createPolicies").path(id).queryParam("type", "corpus")
-                .queryParam("name", "Brown")
-                .queryParam("description", "Brown corpus")
-                .queryParam("group", "public")
-                .queryParam("perm", Permission.READ.name())
-                .queryParam("perm", Permission.WRITE.name())
-                .queryParam("perm", Permission.DELETE.name())
-                .queryParam("expire", "30D")
-                .header(Attributes.AUTHORIZATION,
-                        handler.createBasicAuthorizationHeaderValue("kustvakt", "kustvakt2015"))
-                .post(ClientResponse.class);
-
-        assertEquals(ClientResponse.Status.OK.getStatusCode(),
-                response.getStatus());
-
-        // Check resource store
-        List<ResourceOperationIface> providers = (List<ResourceOperationIface>) helper()
-                .getContext().getResourceProviders();
-        ResourceOperationIface resourceDao = providers.get(0);
-
-        KustvaktResource resource = resourceDao.findbyId(id, user);
-        assertEquals("Brown", resource.getName());
-
-        // Check the policies
-        PolicyHandlerIface dao = helper().getContext().getPolicyDbProvider();
-        List<SecurityPolicy> policies = dao.getPoliciesByPersistentId(
-                new PolicyCondition("public"), Corpus.class,
-                Permissions.Permission.WRITE.toByte(),id);
-        assertEquals(1, policies.size());
-        assertEquals(id, policies.get(0).getTarget());
-        
-        policies = dao.getPoliciesByPersistentId(
-                new PolicyCondition("public"), Corpus.class,
-                Permissions.Permission.DELETE.toByte(),id);
-        assertEquals(1, policies.size());
-        assertEquals(id, policies.get(0).getTarget());
-    }
-
-
-    @Override
-    public void initMethod () throws KustvaktException {
-//        helper().runBootInterfaces();
-    }
-}
-
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
index 3cb66f2..4ea6807 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/controller/UserControllerTest.java
@@ -275,7 +275,7 @@
 
 	@Test
 	public void testGetUserDetailsNonExistent() throws KustvaktException {
-		helper().setupSimpleAccount("userservicetest", "servicepass");
+//		helper().setupSimpleAccount("userservicetest", "servicepass");
 
 		String enc = handler.createBasicAuthorizationHeaderValue("userservicetest", "servicepass");
 		ClientResponse response = resource().path("user").path("details")
diff --git a/full/src/test/resources/test-config.xml b/full/src/test/resources/test-config.xml
index 99b2dd7..83291a9 100644
--- a/full/src/test/resources/test-config.xml
+++ b/full/src/test/resources/test-config.xml
@@ -258,7 +258,7 @@
 	<bean id="kustvakt_authenticationmanager"
 		class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager">
 		<constructor-arg
-			type="de.ids_mannheim.korap.interfaces.db.EntityHandlerIface" ref="kustvakt_userdb" />
+			type="de.ids_mannheim.korap.interfaces.EntityHandlerIface" ref="kustvakt_userdb" />
 		<constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
 			ref="kustvakt_encryption" />
 		<constructor-arg ref="kustvakt_config" />
diff --git a/lite/pom.xml b/lite/pom.xml
index 9cc85a1..f73ba49 100644
--- a/lite/pom.xml
+++ b/lite/pom.xml
@@ -147,7 +147,7 @@
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Kustvakt-core</artifactId>
-			<version>0.60</version>
+			<version>0.60.1</version>
 		</dependency>
 		
 		<!-- Spring -->
