/// <summary>
        /// Add the home page to the sitemap
        /// </summary>
        /// <param name="urlSet"></param>
        /// <param name="packages"></param>
        /// <param name="baseUrl"></param>
        private static void AddHomepageToSiteMap(List<SiteMapUrl> urlSet, List<Api.Model.Package> packages, Uri baseUrl)
        {
            // Add a URL for the home page
            SiteMapUrl homePageUrl = new SiteMapUrl();
            homePageUrl.Location = baseUrl.AbsoluteUri;
            homePageUrl.Priority = 1;
            homePageUrl.LastModification = DateTime.Now;

            // Get the most recently updated package to get the actual last mod time
            // of the home page
            var homePageLastUpdated = DateTime.Now;
            var recentlyUpdatePackages = (from package in packages
                                          orderby package.MetadataModified
                                          descending
                                          select package)
                                     .Take(1)
                                     .ToList();

            if (recentlyUpdatePackages.Count > 0)
            {
                homePageUrl.LastModification = recentlyUpdatePackages[0].MetadataModifiedAsDate;
            }

            homePageUrl.ChangeFrequency = GetChangeFrequency(homePageUrl.LastModification);

            urlSet.Add(homePageUrl);
        }
 /// <summary>
 /// Add the package list to the sitemap.
 /// </summary>
 /// <param name="urlSet"></param>
 /// <param name="packages"></param>
 /// <param name="helper"></param>
 /// <param name="baseUrl"></param>
 private static void AddPackagesToSiteMap(List<SiteMapUrl> urlSet, List<Api.Model.Package> packages, UrlHelper helper, Uri baseUrl)
 {
     // Build the sitemap for each package
     foreach (var package in packages)
     {
         var routeUrl = helper.Action("Index", "Package", new { package = package.Name });
         SiteMapUrl url = new SiteMapUrl();
         url.Location = new Uri(baseUrl, routeUrl).AbsoluteUri;
         url.LastModification = package.MetadataModifiedAsDate;
         url.ChangeFrequency = GetChangeFrequency(url.LastModification);
         url.Priority = 0.5;
         urlSet.Add(url);
     }
 }