Added client quit handlers on server, in library, and in my.js; Also fixed various other bugs.