Added ability to force partial optimization