Refactored interfacing with LDAP. Fixed UTF-8 issues.