added PersistentEvent, some performance improvements