GuiRefinery code cleanup