Refactoring for config managment