Basic query functionality up and running for hooking up in the client