Refactoring the code for 'collect highlight info' -> 'apply it to raw text on paste' processing. Work in progress