license added
open a local library
refactor common bits into library
use library for dnet too