Scala example is documented
Add the reason to modify application class
Semicolon and underscore
Change the type for global variable in the example for more minimal one

I believe global context is a last resort and doesn't fit to an example.