Add comments in core.js
update API in README.md