Remove unneeded ref parameters.