encapsulating global namespaces to pass JSHint tests