More work on primitive generation.