Added remove_unconnected_nodes.