Refactoring to use transitioningDelegate.