Began refactoring the config part