Edits to match style guidelines.
(var --> let, tabs --> two spaces, etc.)