refactoring
Optimizer updated