Reformat the file

Rename variables, remove leading underscores, reorder actions, inline
one action.