refactoring in GUI classes