Implemented Serialization for GUI class constructor and windowClose
event