Small changes, almost ready to finish automatic event gen.