Set up framework for queries.