Added level transition control flow.