Refactor CETextSelection class (ref #54)