Performance improvements by adding initial test at t=0.5 to find good starting point.