Refactor of events and added some BlackBox helpers.