Refactored ext/ldap