Moved global declaration to bottom of file