Example cleanups - move plotly initialization into global scope