Create a new type Id<T> paramaterized by whatever specific class of IDs is relevant to a domain; create stores and macros to support this; and repace the existing Id types.