refactor to use hqw::Factory to replace DAGImplManager