wow. big refactoring of ldap library