Add XPEvent class