Making the Node class immutable