CollisionHandler.cs optimized