Generalized and future-proofed Generator creation
See #135