add some comments and compress the core file to core.min.js