Refactoring for multiple generators support