Use common CDN for libraries. Wrapped the visualization in a function.