if there is a parent element present limit scope of what elements have their classes removed.