several improvements in Collision.cs