Added datastore index and fixed delete api.