reorganization, improve GUI