various improvements in site loading logic