cleanup $id usage and leave _id for CouchDB