ldap-client: restructured
ripping out nested functions
converted the remaining nested functions
ldap-client: package creation succeeds