Small clean-ups.
Prune node and link list before generating code.

Resolves #29