Added sitemap support and updated pre event