Use before/after in layout instead of win.doOperation