Factor out primitive -> box name mapping.