A few mods in handling the return value and the deletes