Undo temp code in mwtoptimizer