remove_node implementation, not sure about the arguments it takes.