Refactor clearing selected chars/rels into function