rewrite add command to use dagwriter, moved a pinner into the dagwriter for inline pinning
Address concerns in PR