Minor changes to use remove instead of drop.