Reformat GUI code