Removed deprecated functions with new ECMAScript standards + support IE