added CDN fix, removed some print_r's and fixed the url check