Add in DNS lookup and unit tests around it