Update misc.js

some more polishing, for me and for toFixed.