Fixed variables leaking out to window namespace.