Add node collapsing feature

closes #30