Refactor game loop variables