Split event listener from plugin