Add support for per-type originating elements.

off topic: I don't think the functional style helps here