Updated and commented sphere.js