Add URL to tutorial website I stole this from.
var declaration instead of top-level functions
function reordering
Variable renaming, declaration moving, JSLint fixing
Add underscore and refactor some for loops. Also clean up cell painting.