Tidy up some LDAP stuff