Minor refactor in sidepanelFolder directive