Embed adview demo code in anonymous function.

Avoids polluting global namespace.