Changed all the remaining functions to use caching
Added file exists check for sitemap.xml