Review round #1: added "allowedEvents" support.