Update core.js

Removed class2type fragments and changed $.type for better performance and size.