Add QueryManager to handle queries