Added within-day replanning stuff.