Really do the optimization.