Modified saveData to work with couch. Had to make compromise in json format though. Hoping I have time to fix it.