Adding edit feature and swtiching over to couchdb