Compability changes for IE8/9

The following fixes were tested with IE8/9, chrome and FF.
Changed console to window.console, renamed the PAPIs delete method and removed an extra comma for IE compability.