Added functionality that removes an item from the list if it already exists.