refactors guest.js, adds comments, fixes guest disconnect event and removes unused pub/sub events