Break out removal of target="_self" into it's own function