Added queryManager class