Fixed inconsistent formal parameters, changed inappropriate pass-by-value's to pass-by-reference.