More robust client-side query model that supports tab completion