Added global variables for canvas width and height