Add DnsWriteConfig
Rewrite a lot of part to use core pkg