Added more comments to snap.js; clean-up