Made gl a global variable.