Updating and deocumenting index.js