Decouple deferred generator and move it to its own module