Moved everything from LDAP.php