Removed global (a bit, not really actually)
Added time limitation in main loop

My CPU was going haywire when I had the game running because the while
loop was going crazy...