Completed GUI logic