Rename variables.
Consolidate the three operations into separate methods.