consolidate core.js