Add a NodeState to each TreeNode, when changing it's state.