Remove unused parameters and reduce visibility scope

Resubmission of https://gerrit.wikimedia.org/r/#/c/135802/

Change-Id: I7cf1e28d7b89a1a434c11c9ddff77a6b898a2035
Merge "Remove unused parameters and reduce visibility scope"