Refactoring SubPanel and SimpleSubPanel.