Implementation of removeText() and removeImages(), ignoreLinks changed to removeLinks. (credit to Tien Hai)