updating docs and tests.js
Added more docs