Added save and restore and fixud up GUI