Simplify the generator.
Add the "refresh" event.