event.js cleanups