Use EventDispatcherInterface instead of ContainerAwareEventDispatcher
Replace Boolean parameter with array of parameters
Extract AbstractGenerator class