Finish optimization.