Code review for event.js;