friends: simplify the way to update and remove entries after an action