Update core.js

Added support for optimized and imported classes.