Final optimization.