removed legacy code
replaced DomDocument by a custom ComponentTree