MediaSitemap class refactored and tested