cleanup nodeContext
factor elimination 1 without mutable state
dtree elimination order without mutable state