Refactored kvp initialization.