refactoring gui.panels part 2