Style changes to listing 6.13

Most of these changes can be found with [JSHint](http://jshint.com/) or other tools.