Minor cleanup of dependencies.py. Converted comprehensions to generators.