Adding GUI code