Remove stale code
Small refactor for config
Fix test errors
Merge pull request #14209 from cachedout/master_config

Small refactor