docs, typos and fix in index.js