Refactor CannonBehaviour.