Updated comments and made GUI code thread safe