Improve GUI and Code refactoring