some fixes and switched to getting scripts from CDN

some fixes and switched to getting scripts from CDN