Optimization can be interrupted by ctrl+z.
merge with dev, conflicts resolved