Rename function and pass replacements by reference.