Additional commenting.

Added additional commenting to be more open source friendly and moved
some things from globals.js to config.js