Updated API on insert if exist update instead, Updated client code for local dedup
no deduplication yet
Basic functions working