restructured ldap server into a class with simple request dispatching