Refactoring HorizontalSplitPanel class