config builder refactoring and comments