Added infrastructure for collision detection.