Figuring out reference replacements.