Refactoring xAPI to use inheritence and event classes