Update event_loop.js

many changes.