Simplified generator implementation.