Add support for host identifiers.

Closes issue #6.