Feature: Additions to CommonJS PR 

Continuation of PR #1300 
Can you please add a comment to explain why it is necessary to put this on the global namespace?