Update nerdamer.core.js

Several bug fixes