Better collapse/expand of nodes