Clean up obsolete code

Remove traces of for loop and generator expression annotations.

Closes #464.