Changed the event generation script a bit.