remove unused code; refactor embedded ldap server for easier use