Adds delHistory function to delete a range from history