core rewrite
updated it to point to new core, core2.js
some code cleanup