minor refactoring of reader/sketch.js (just added a bunch of curcly braces)