Added QuadTree for efficient collision detection