refactoring config definition in DI Factory