added purge parameter to keyvalue deletes, updated unit tests