With seeing this in an example algo, I wonder if we can find a way to take the mapping logic out of the algo script?

Though that may be opening up a bigger question of how to more easily allow custom behavior/plugins.