refactor core.js and put comment on css