Code clean of deleteNode method