refactoring gui.panels