Refactor sitemap creation stuff