Collision detector refactored to a service.