added js-only version, fixed indentation/JSLint, fixed missing call to _var function
fixed namespace/module defs, commented load fcns for use with other tools