Merge from the Developmental Tree

Revised for CouchDB and now merging into the Master Branch.