Refactored responseTemplateWithKeyValue to use an actual dictionary.