Arrange the codes and add comments for GUI scripts