Cleaned up Transition code.