Ability to create XML sitemap (50K latest links only but I will write code for bigger)
Adding the ability for more entries will defeat the purpose of having a sitemap, since Google only recognizes the first 45-50k links within any sitemap file. The better thing might be to create a sitemap index, and in that index link to other sitemaps.
eg.
SitemapIndex.xml will link to SitemapA.xml, Sitemap1.xml, Sitemap2.xml, Sitemap3.xml ...etc
SitemapA.xml will contain category links, and other internal links you want indexed.
Sitemap1.xml will contain the first 50k download links (0-50,000)
Sitemap2.xml will contain the next 50k download links (50,001-100,000)
Sitemap3.xml will contain the next 50k download links (100,001-150,000)
...etc
Regards.