private void RemoveSite(SPSiteCollection sites, Site site, SPSite rootSite)
        {
            /*logger.Debug(string.Format("Processing site: {0}", site.Name));*/
            if (SiteCollectionExists(sites, site.Name))
            {
                /*logger.Debug(string.Format("Site: {0} has been found. Deleting permissions.", site.Name));*/
                var siteToDelete = sites[site.Name];
                foreach (var permission in site.Permissions)
                {
                    /*logger.Debug(string.Format(
                        "Deleting permission level: {0} from group: {1} for site: {2}",
                        permission.PermissionLevelId,
                        permission.GroupName,
                        site.Name));*/
                    GetRootWeb(siteToDelete).RoleAssignments.Remove(GetRootWeb(rootSite).SiteGroups[permission.GroupName]);
                    /*logger.Debug(string.Format("Done. Deleting permission level: {0} from group: {1} for site: {2}",
                        permission.PermissionLevelId,
                        permission.GroupName,
                        site.Name));*/
                }

                /*logger.Debug(string.Format("Done. Deleting permissions for site {0}", site.Name));
                logger.Debug(string.Format("Deleting site: {0} itself", site.Name));*/
                sites.Delete(site.Name);
                /*logger.Debug(string.Format("Done. Deleting site {0}", site.Name));*/
            }
            else
            {
                /*logger.Debug(string.Format("Can't locate site: {0}. Skipped", site.Name));*/
            }

            /*logger.Debug(string.Format("Done. Processing site {0}", site.Name));*/
        }
        private SPSite AddSite(SPSiteCollection sites, Site siteToAdd, SitesConfiguration configuration)
        {
            var newSite = sites.Add(
                    siteToAdd.Name,
                    siteToAdd.Title,
                    siteToAdd.Description,
                    siteToAdd.Locale,
                    null,
                    configuration.SitesOwner,
                    configuration.SitesOwner,
                    string.Empty);

            /*logger.Debug(
                    string.Format(
                        "Loading template: {0} from package: {1} in folder: {2}",
                        site.WebTemplate.Name,
                        site.WebTemplate.PackageFileName,
                        configuration.TemplatesDirectory));*/
            LoadTemplateFromPackage(
                newSite,
                siteToAdd.WebTemplate.PackageFileName,
                configuration.TemplatesDirectory);
            /*logger.Debug(string.Format("Done. Loading template: {0}", site.WebTemplate.Name));*/

            /*logger.Debug(string.Format(
                "Applying template: {0} to empty site: {1}",
                site.WebTemplate.Name,
                site.Name));*/
            ApplyWebTemplate(GetRootWeb(newSite), siteToAdd.WebTemplate.Name);
            /*logger.Debug(string.Format(
                "Done. Applying template: {0} to site: {1}",
                site.WebTemplate.Name,
                site.Name));*/

            return newSite;
        }