Make global variables explicit.
Other fixes suggested by jsLint.
more changes
Merge branch 'pre-amd'

Minimal changes to use AMD, start up without error, and show all
of user interface elements.  Consent form works.
There are a large number of requires in index.html which
might not all be necessary.
No mouse events are handled correctly, however.