Generalize API to allow many implementations of a generator