Add SiteMap and Thread blocks and improve URL generation.