cleaning up core.js