Pass settings to the query set.

Required by latest tldap.
Remove obsolete function calls.