Update deprecated list comprehensions to new for style