Deleted closestCDN var and fixed some errors