revamp game event mechanism

also remove jslint workarounds for most cases