refactores settings to make host_expand and original_hosts testable