Converted a couple of list comprehensions into generator comprehensions.