Finished refactoring of DOM implementation.
Added comments, minor code style fixes.
Optimized insertion of elements in repositories after binary search.
Moved binary search operations to TextUtil. Optimized structure handling in MarkupEventProcessor.
Optimized HtmlElement mechanics.
Enhanced code comments.