Initial import of couchdb lib