Hostname management refactoring.