Implementation of the optimization wizard