Cleanup of gui.