Use list comprehensions where appropriate