WCP-33 Fixing post-merge compile errors

Also moved ldap code into its own module