Removing all ties  to the ui.
Encapsulate management of DOM into dedicated class,
Changed to use DataSource instead of QDomDocument.