Fixing up the config file logic to be a little more generic