Refactored toolkit to support custom events through method injection