refactored NamedDAGBuilder
more on NamedDAGBuilder
minor changes in the DAG