Added functionality to remove elements from the dictionary