These variables are only used in the 'redraw' function, no need for them to be global.