Various small cleanup for (m)DNS