Decouple query from select_cell for use in other functions.