@mark-dce  Could you add a comment about what this does?  You had explained it to me last week, and I already forgot.  It's to make auto-generated PIDs have the format of 'template:123', right?  It's not obvious from the code what this is doing, so I think a comment would really help.