Added optional support for domains.