Do we actually need code="true"?
remove unneeded code attribute.
Minor nitpick: it seems like there's no any reason to pass config by reference now. At each call site, we de-reference a settings object. I suggest to pass config by pointer.
pass by pointer instead of ref