Refactoring contact matching strings.