Tidy up how we build the list of hosts