Minor Refactor

Replace can have array as first variable, and string as second, if all
replacements are the same.