refactor source code structure --> update MainFrame.java