I'd be happy enough with such an interface, and agree with your evaluation that the code is in the wrong place. Do you want me to do that in this PR?