Updated formatting and fixed global scoping in node