Refactor into new Generatro