Made some IE8 compability fixes.

Changed console to window.console, renamed the PAPIs delete method and removed an extra comma for IE compability.

This is all tested in IE8 and IE9.