Base class for generators