Refactoring of the config