Fix memory leak on remove selected
Rename function to be more expressive of ownership semantics