The code in this function is a bit hard to follow - it would help if you explained in a doc why you need to create an intermediate `Settings` object instead of just merging the configs first and then creating a settings. I'm not totally clear why that is.