Refactor DNS create/destroy.