Is this a leaking global variable fix, or just a more succinct way of doing the same thing?