Cleanup main_rte function in the ElementBrowser and children
main_rte method of the ElementBrowser has over 440lines.
A lot of code is duplicated between parent and child classes.
This duplicated code already costed us some headaches - some bugs were fixed in one place and not in the other.
We should split main_rte into smaller chunks to and remove duplicates.