Code refactoring: It's easier to use non-serializable bookmarks.
Code refactoring: Created a shorthand function.
The tools.range.setWithHtml method should set range's root to passed element.
Code refactoring: Now (after fixing range.setWithHtml) we can swith to using range.start/endPath() methods.