Updating query handler to work with new ACL model.  Partially done.