added onLeave and onJoin events and a few other nicities.