Better hooks for expand/unexpand events.