Hygiene: reduce number of fields that are used unnecessarily.

This patch takes some fields and either converts them to local variables,
anonymous variables, or removes them entirely. There should be no change in
user-facing behaviour, but having fewer fields floating around should reduce
memory overhead slightly.

Change-Id: I38b4d8ecc7a7d661faf85efb4e2477d017e2c5d1