Further simplify buildTransition.