Added function to remove the selected point