Add back generation for or and union on terms.
Fix generation not setting up the index and task engine.
Delete unused generate.str