Simplifying generator code.
Further clean-up.