Made atd use generators instead of for loops. I think it is a bit faster, but mostly it just looks neater