Changed some controls to global variables.