[REFACTOR] Name-spaced the require modules so that it can be used within another require module
[BUG] global not being defined was causing us issues, not sure if this is a node thing so leaving in support for it