Adds changes from chapter 10 exercises

The javascript is clunky and in the wrong place.