New collision detection class and tests