Add docs to core.js