Renamed 'name' variables to 'path' in deleteNodes()