Changes to Optimizer and Optimizer Test