Small performance improvement on `remove`; call once, instead of in a loop.