Added option to getDomain by anything other than ID (e.g. name). Compatible.