Tweaked to support a callback method which can be used for a name override, which is critical for us.