Re-formatted 'events.js' server file