remove Query objects from QueryManager, we only really need the mask
improve performance by replacing hashmaps with trove implementations