Add removeHistory function