Move config logic into yml and json files.