Added expand/collapse functionality