add lib and tests for index.js
update other tests and libs.