Finished refactoring Sequential Optimization class