added some exceptions to the counting of the 'new' keyword and fixed a type coercion bug in dom.js