Initial code to Query Api improvements.