new feature: event pre-registration 

Codes review of the new feature.
Yes, I use tab-size 2.