Added XML stuff for events