Added getLastEvent method
Added log method with try catch to stop console missing errors on IE8
Removed EventEm global var declaration