Updated core.js to include Dave M's latest changes