numerous fixes to client.js Active slave management