[gui] more refactoring