some GUI refactoring