Separates C implementation from Python generator