Accept host names as well as ips.
A bit of cleanup.