Replace tabs with spaces.
Reformat and remove dead code.
Remove the global map.
Reformat.
Cosmetic renames.
Cosmetic renames.