First version split from couchclient