Flesh out event fetching and parsing, refactor some XPath stuff.