more gui refactoring