Removed var keyword for global variables so they are properly assigned to Node global variable