Refactored the eventing API for more understanding + better debugging