split up core.js further