Limit more variables to file scope

Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
21 files changed