MainPanel refactoring. Playing with popup panel.