Refactor lesson 4

Add a refactored version of lesson 4 as well as
an HTML document that runs it.
Merge pull request #1 from backhand/master

Refactor lesson 4