Getting base functionality of query class working.