Refactoring for using with configuration API