Remove unused or unnecessary functions
util.dns: Try to improve readability, declare all locals once