Simplified some list comprehensions.