cleaned up the core.js