Improve LDAP template