Refactored event triggering to cleanup magic class