Avoid global variables in Javascript.