Modify code to accept host from configuration.

Basically anywhere we were relying on the constant variable we want to
replace with reading from the configuration from disk (or default).