Add QueriesManager class