Merge of the gui code.