Fix event removal on IE8
Magically support IE5
Fix some syntax issues