A bunch of updates to client lib