Rewriting gui.