Many improvements in class node_stack.