use the internal removeSpan function for removing spans, and also use the proper removeSpan function to delete them