Add support for asynchronous/synchronous DNS lookups and rejigger hostname strings to always include the ip