Delete a node using a node as formal parameter instead of node id. Clean code and update log information.