Remove unused transitions.