Code to find and delete a node