Moved getHostInfo() into utils for reuse later. Also fixed SRV resolve bug!