Reduced code duplication in panel component.