Finished the node_delete() function