Much of this tutorial is commented out. It is in a script tag in this file if you want to play with it.
A refactor that I could do was to move the javascript in the script tags to a file called domscript.js in the js directory.