moved ALL client-related operations to lib/clients.js
minor
code improvements