Skeleton code for query. Getting JSON stuff together.