cleaned code a bit and added a handler to process the retrieved events
(we should only need to change stuff in that handler and maybe the xml parser if we need more data from an event)