Fixed npm - replaced hidden module with _module variable

The npm packages do not work because the module exports variable is hidden by the locally defined module  variable within the functions - module.exports.settings is undefined. This fix adds a _module alias. A better but more involved fix is to not use module as local variable name, but that requires changing all the js files.