cleaned up minor problems in core.js