Refactoring of config