Moved Events class and parseLinkHeader method out to separate files