refactor gui menu