New function to replace an internal node in a dag.
fixed typo.
Migration support for naming.
naming migration support & code cleanup.