Refactors keyframe destruction logic.