split dnmgr into library and utility