refactoring
also, update debug GUI tab
and fix minor bug when opening a QFG1 file after a QFG3 file