Avoid using global variables.