Improved ClientSideQueryVisitor