Removal of nodes in destructor