remove nodes that aren't useful