Avoid inheritance where factories will do

[#55682936]

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Make global singleton config easier to test
Formatting