Added computation of spill costs.