Refactored whitespace replacement into NameValue.