Rewrites core.js as ES6, and updates build task accordingly