Moving client side of queryservice to its own lib.