Replace Minimizer.os with a callback function