Moved the extendConfig to a local function so it won't be used anywhere else.