Added a missing 'i' in the for loop. Fixes #280.
Additional style fixes.

* Decode HTML entities, also using straight apostrophes.
* Remove trailing whitespace.
* Spaces to tabs.
Code style fixes.

* Spaces to tabs.
* More spaces around arguments.
* HTML style guide adherence.