Refactored events.js and made it send game updates every 500ms