Moved add/remove event logic to the helper