Use events class for generated modules