cleanup minimizer code