Split out core.js and ui.js