1. Added support in multiple optimization modes.
1. Saving current state.