Avoid using global variables, use classes instead