Minor refactor on the config handling