Refactor hierarchy logic Update to be compatible with sitemap 4.x.
Stable version compatible to sitemap 3