added sort of a range
modified paste_yanked_ents for sorting
some cleaning