moved require config into require-config.js.
remove references to 'document' global.