Some cleanup - adding const to arg lists. re #6181

And a change in code to enable this