Update core.js

Final version