Moving hit test logic to QuadTrees