Simple rename domain to hostname.
Rename all occurrences of domain hostname in order to keep the semantics
replace domain to hostname
Looks cool, but I'm not keen on 'subhostname' et. al.
I'll have a think about what to do to address the issue - and then I'll probably pull and then patch your request.
Thanks for helping out!