Moved ldap_trace_level to host config + cleanup

- Cleaned up the ldap API a little