Final commits for analysis-part2 -- adding rut control.