Please declare global variables before the constructor.