Add in support for LDAP and many other tweaks