Refactored for new ucam-ldap api change, removed unneeded variable declarations