Replaced some reference parameters with normal parameters.