Add CollisionDetector class