Added detection of node/amd/window
Commit tabbing everything inside closure over.